; ; sprite.sh ; ; Nice operations on sprites ; ; © 1994-1998 Straylight ; ;----- Licensing note ------------------------------------------------------- ; ; This file is part of Straylight's Sapphire library. ; ; Sapphire 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 2, or (at your option) ; any later version. ; ; Sapphire 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 Sapphire. If not, write to the Free Software Foundation, ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; sprite_op ; sprite_getTable ; sprite_plot [ :LNOT::DEF:sprite__dfn GBLL sprite__dfn ; --- sprite_op --- ; ; On entry: R0,R2-R7 == SpriteOp parameters (R1 set up here) ; ; On exit: Registers and flags altered as for the SpriteOp ; ; Use: Performs an OS_SpriteOp with the given arguments, using ; the appication's Sprites resource as the sprite area. IMPORT sprite_op ; --- sprite_getTable --- ; ; On entry: R0 == pointer to a sprite ; R1 == pointer to buffer for translate table ; ; On exit: -- ; ; Use: Creates a colour translate table for the given sprite in ; the specified buffer. ; ; If you have a sprite name but no pointer, use OS_SpriteOp ; 24 to find the pointer -- this will make further sprite ops ; on the sprite much quicker. IMPORT sprite_getTable ; --- sprite_plot --- ; ; On entry: R0 == pointer to a sprite ; R1 == x coordinate to plot at ; R2 == y coordinate to plot at ; R3 == pointer to scale block, or 0 for 1:1 ; ; On exit: CS if the sprite was plotted OK, else CC ; ; Use: Plots a sprite on the screen. The scaling refers to the ; sprite proper: /this/ routine takes care of odd pixel ; sizes and things, so sprites don't appear squashed or ; stretched unless you really want them to. ; ; We return C clear on exit if we couldn't plot the sprite; ; typically this would be if the sprite's mode is undefined. IMPORT sprite_plot ] ;----- That's all, folks ---------------------------------------------------- END