2ee739cc |
1 | /* |
2 | * sprite.h |
3 | * |
4 | * [Generated from sprite, 25 September 1996] |
5 | */ |
6 | |
7 | #if !defined(__CC_NORCROFT) || !defined(__arm) |
8 | #error You must use the Norcroft ARM Compiler for Sapphire programs |
9 | #endif |
10 | |
11 | #pragma include_only_once |
12 | #pragma force_top_level |
13 | |
14 | #ifndef __sprite_h |
15 | #define __sprite_h |
16 | |
17 | #ifndef __sapphire_h |
18 | #include "sapphire.h" |
19 | #endif |
20 | |
21 | /*----- Overview ----------------------------------------------------------* |
22 | * |
23 | * Functions provided: |
24 | * |
25 | * sprite_op |
26 | * sprite_getTable |
27 | * sprite_plot |
28 | */ |
29 | |
30 | /* --- sprite_op --- * |
31 | * |
32 | * On entry: R0,R2-R7 == SpriteOp parameters (R1 set up here) |
33 | * |
34 | * On exit: Registers and flags altered as for the SpriteOp |
35 | * |
36 | * Use: Performs an OS_SpriteOp with the given arguments, using |
37 | * the appication's Sprites resource as the sprite area. |
38 | */ |
39 | |
40 | extern routine sprite_op; |
41 | |
42 | /* --- sprite_getTable --- * |
43 | * |
44 | * On entry: R0 == pointer to a sprite |
45 | * R1 == pointer to buffer for translate table |
46 | * |
47 | * On exit: -- |
48 | * |
49 | * Use: Creates a colour translate table for the given sprite in |
50 | * the specified buffer. |
51 | * |
52 | * If you have a sprite name but no pointer, use OS_SpriteOp |
53 | * 24 to find the pointer -- this will make further sprite ops |
54 | * on the sprite much quicker. |
55 | */ |
56 | |
57 | extern routine sprite_getTable; |
58 | |
59 | /* --- sprite_plot --- * |
60 | * |
61 | * On entry: R0 == pointer to a sprite |
62 | * R1 == x coordinate to plot at |
63 | * R2 == y coordinate to plot at |
64 | * R3 == pointer to scale block, or 0 for 1:1 |
65 | * |
66 | * On exit: CS if the sprite was plotted OK, else CC |
67 | * |
68 | * Use: Plots a sprite on the screen. The scaling refers to the |
69 | * sprite proper: /this/ routine takes care of odd pixel |
70 | * sizes and things, so sprites don't appear squashed or |
71 | * stretched unless you really want them to. |
72 | * |
73 | * We return C clear on exit if we couldn't plot the sprite; |
74 | * typically this would be if the sprite's mode is undefined. |
75 | */ |
76 | |
77 | extern routine sprite_plot; |
78 | |
79 | /*----- That's all, folks -------------------------------------------------*/ |
80 | |
81 | #endif |