; Assembler header file for WimpSpriteOp
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:44:04 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 12 May 1995

; OSLib---efficient, type-safe, transparent, extensible,
; register-safe API coverage of RISC OS
; 
; Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
; 
; Licence:
; 
;    OSLib is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 1, or (at your option)
; any later version - and this with the following clarification and
; special exception:
; 
;    Linking this library statically or dynamically with other modules
; is making a combined work based on this library. Thus, the terms
; and conditions of the GNU General Public License cover the whole
; combination.
; 
;    As a special exception, the copyright holders of this library
; give you permission to link this library with independent modules
; to produce an executable, regardless of the license terms of these
; independent modules, and to copy and distribute the resulting
; executable under terms of your choice, provided that you also meet,
; for each linked independent module, the terms and conditions of the
; license of that module. An independent module is a module which is
; not derived from or based on this library. If you modify this
; library, you may extend this exception to your version of the library,
; but you are not obliged to do so. If you do not wish to do so, delete
; this exception statement from your version.
; 
;    OSLib is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; 
;    You should have received a copy of the GNU General Public License
; along with this programme; if not, write to the Free Software
; Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

        [       :LNOT: :DEF: WimpSpriteOp_Hdr
        GBLS    WimpSpriteOp_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

;Symbols for constants
WimpSpriteOp_Area               *       &1

;Symbols for SWI's and SWI reason codes
XWimp_SpriteOp                  *       &600E9
Wimp_SpriteOp                   *       &400E9

WimpSpriteOp_MergeSpriteFile    *       &B
   ;Entry
   ;  R0 = &B
   ;  R2 -> file_name (String)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_GetSprite          *       &E
   ;Entry
   ;  R0 = &E
   ;  R2 -> sprite_name (String)
   ;  R3 = get_palette (Bool)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R2 -> header (OSSpriteOp_Header)

WimpSpriteOp_SelectSprite       *       &18
   ;Entry
   ;  R0 = &18
   ;  R2 -> sprite_name (String)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R2 -> header (OSSpriteOp_Header)

WimpSpriteOp_PutSprite          *       &1C
   ;Entry
   ;  R0 = &1C
   ;  R2 -> sprite_name (String)
   ;  R5 = action (OS_Action)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PutSpriteUserCoords *       &22
   ;Entry
   ;  R0 = &22
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;  R5 = action (OS_Action)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_SetPointerShape    *       &24
   ;Entry
   ;  R0 = &24
   ;  R2 -> sprite_name (String)
   ;  R3 = flags (Bits)
   ;  R4 = xactive (Int)
   ;  R5 = yactive (Int)
   ;  R6 -> factors (OS_Factors)
   ;  R7 -> trans_tab (OSSpriteOp_TransTab)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_ReadPaletteSize    *       &25
   ;Entry
   ;  R0 = &25
   ;  R2 -> sprite_name (String)
   ;  R3 = &FFFFFFFF
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R3 = size (Int)
   ;  R4 -> palette (OS_SpritePalette)
   ;  R5 = mode (OS_Mode)

WimpSpriteOp_ReadSpriteSize     *       &28
   ;Entry
   ;  R0 = &28
   ;  R2 -> sprite_name (String)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R3 = width (Int)
   ;  R4 = height (Int)
   ;  R5 = mask (Bool)
   ;  R6 = mode (OS_Mode)

WimpSpriteOp_ReadSpriteInfo     *       &28
   ;Entry
   ;  R0 = &28
   ;  R2 -> sprite_name (String)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R3 = width (Int)
   ;  R4 = height (Int)
   ;  R5 = mask (Bool)
   ;  R6 = mode (OS_Mode)

WimpSpriteOp_ReadPixelColour    *       &29
   ;Entry
   ;  R0 = &29
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R5 = gcol (OS_GCOL)
   ;  R6 = tint (OS_Tint)

WimpSpriteOp_ReadPixelMask      *       &2B
   ;Entry
   ;  R0 = &2B
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R5 = solid (Bool)

WimpSpriteOp_PlotMask           *       &30
   ;Entry
   ;  R0 = &30
   ;  R2 -> sprite_name (String)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PlotMaskUserCoords *       &31
   ;Entry
   ;  R0 = &31
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PlotMaskScaled     *       &32
   ;Entry
   ;  R0 = &32
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;  R5 -> factors (OS_Factors)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PutSpriteScaled    *       &34
   ;Entry
   ;  R0 = &34
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;  R5 = action (OS_Action)
   ;  R6 -> factors (OS_Factors)
   ;  R7 -> trans_tab (OSSpriteOp_TransTab)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PutSpriteGreyScaled *       &35
   ;Entry
   ;  R0 = &35
   ;  R2 -> sprite_name (String)
   ;  R3 = x (Int)
   ;  R4 = y (Int)
   ;  R5 = &0
   ;  R6 -> factors (OS_Factors)
   ;  R7 -> trans_tab (OSSpriteOp_TransTab)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PlotMaskTrfm       *       &37
   ;Entry
   ;  R0 = &37
   ;  R2 -> sprite_name (String)
   ;  R3 = flags (Bits)
   ;  R4 -> source_rect (OS_Box)
   ;  R6 -> trfm (OS_Trfm)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

WimpSpriteOp_PutSpriteTrfm      *       &38
   ;Entry
   ;  R0 = &38
   ;  R2 -> sprite_name (String)
   ;  R3 = flags (Bits)
   ;  R4 -> source_rect (OS_Box)
   ;  R5 = action (OS_Action)
   ;  R6 -> trfm (OS_Trfm)
   ;  R7 -> trans_tab (OSSpriteOp_TransTab)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted

        ]
        END
