Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / sprite
1 ;
2 ; sprite.sh
3 ;
4 ; Nice operations on sprites
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ; sprite_op
32 ; sprite_getTable
33 ; sprite_plot
34
35 [ :LNOT::DEF:sprite__dfn
36 GBLL sprite__dfn
37
38 ; --- sprite_op ---
39 ;
40 ; On entry: R0,R2-R7 == SpriteOp parameters (R1 set up here)
41 ;
42 ; On exit: Registers and flags altered as for the SpriteOp
43 ;
44 ; Use: Performs an OS_SpriteOp with the given arguments, using
45 ; the appication's Sprites resource as the sprite area.
46
47 IMPORT sprite_op
48
49 ; --- sprite_getTable ---
50 ;
51 ; On entry: R0 == pointer to a sprite
52 ; R1 == pointer to buffer for translate table
53 ;
54 ; On exit: --
55 ;
56 ; Use: Creates a colour translate table for the given sprite in
57 ; the specified buffer.
58 ;
59 ; If you have a sprite name but no pointer, use OS_SpriteOp
60 ; 24 to find the pointer -- this will make further sprite ops
61 ; on the sprite much quicker.
62
63 IMPORT sprite_getTable
64
65 ; --- sprite_plot ---
66 ;
67 ; On entry: R0 == pointer to a sprite
68 ; R1 == x coordinate to plot at
69 ; R2 == y coordinate to plot at
70 ; R3 == pointer to scale block, or 0 for 1:1
71 ;
72 ; On exit: CS if the sprite was plotted OK, else CC
73 ;
74 ; Use: Plots a sprite on the screen. The scaling refers to the
75 ; sprite proper: /this/ routine takes care of odd pixel
76 ; sizes and things, so sprites don't appear squashed or
77 ; stretched unless you really want them to.
78 ;
79 ; We return C clear on exit if we couldn't plot the sprite;
80 ; typically this would be if the sprite's mode is undefined.
81
82 IMPORT sprite_plot
83
84 ]
85
86 ;----- That's all, folks ----------------------------------------------------
87
88 END