@ GNU AS assembler header file for WimpSpriteOp
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:46:01 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.

#ifndef WimpSpriteOp_Hdr
#  define WimpSpriteOp_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_OSSpriteOp
#    define Get_OSSpriteOp
#    include "oslib/OSSpriteOp.Hdr"
#  endif

#  ifndef Get_Wimp
#    define Get_Wimp
#    include "oslib/Wimp.Hdr"
#  endif

@Symbols for constants
#  define WimpSpriteOp_Area 0x1

@Symbols for SWI's and SWI reason codes
.set XWimp_SpriteOp,0x600e9
.set Wimp_SpriteOp,0x400e9

#  define WimpSpriteOp_MergeSpriteFile 0xb
   @Entry
   @  R0 = &B
   @  R2 -> file_name (String)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_GetSprite 0xe
   @Entry
   @  R0 = &E
   @  R2 -> sprite_name (String)
   @  R3 = get_palette (Bool)
   @Exit
   @  R0 corrupted
   @  R1 corrupted
   @  R2 -> header (OSSpriteOp_Header)

#  define WimpSpriteOp_SelectSprite 0x18
   @Entry
   @  R0 = &18
   @  R2 -> sprite_name (String)
   @Exit
   @  R0 corrupted
   @  R1 corrupted
   @  R2 -> header (OSSpriteOp_Header)

#  define WimpSpriteOp_PutSprite 0x1c
   @Entry
   @  R0 = &1C
   @  R2 -> sprite_name (String)
   @  R5 = action (OS_Action)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_PutSpriteUserCoords 0x22
   @Entry
   @  R0 = &22
   @  R2 -> sprite_name (String)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = action (OS_Action)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_SetPointerShape 0x24
   @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

#  define WimpSpriteOp_ReadPaletteSize 0x25
   @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)

#  define WimpSpriteOp_ReadSpriteSize 0x28
   @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)

#  define WimpSpriteOp_ReadSpriteInfo 0x28
   @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)

#  define WimpSpriteOp_ReadPixelColour 0x29
   @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)

#  define WimpSpriteOp_ReadPixelMask 0x2b
   @Entry
   @  R0 = &2B
   @  R2 -> sprite_name (String)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @Exit
   @  R0 corrupted
   @  R1 corrupted
   @  R5 = solid (Bool)

#  define WimpSpriteOp_PlotMask 0x30
   @Entry
   @  R0 = &30
   @  R2 -> sprite_name (String)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_PlotMaskUserCoords 0x31
   @Entry
   @  R0 = &31
   @  R2 -> sprite_name (String)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_PlotMaskScaled 0x32
   @Entry
   @  R0 = &32
   @  R2 -> sprite_name (String)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 -> factors (OS_Factors)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_PutSpriteScaled 0x34
   @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

#  define WimpSpriteOp_PutSpriteGreyScaled 0x35
   @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

#  define WimpSpriteOp_PlotMaskTrfm 0x37
   @Entry
   @  R0 = &37
   @  R2 -> sprite_name (String)
   @  R3 = flags (Bits)
   @  R4 -> source_rect (OS_Box)
   @  R6 -> trfm (OS_Trfm)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

#  define WimpSpriteOp_PutSpriteTrfm 0x38
   @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

#endif
