Changeset 1361 for trunk/tigcc/doc/System/Include/sprites.h/Sprite8.hsf
- Timestamp:
- 07/24/09 18:55:32 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tigcc/doc/System/Include/sprites.h/Sprite8.hsf
r1360 r1361 5 5 Header Files=sprites.h 6 6 Definition=void Sprite8 (short x, short y, short height, const unsigned char *sprite, void *vm_addr, short mode); 7 See Also=sprites.h/ClipSprite8 7 8 8 9 [Library Call] … … 21 22 22 23 [Explanation] 23 Sprite8 draws a sprite with a width of 8 pixels or less on the screen. 24 Use <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A> or <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> for wider sprites. 25 This routine is many times faster than TIOS routines like 26 <A HREF="$$LINK(graph.h/DrawIcon)">DrawIcon</A>, <A HREF="$$LINK(graph.h/BitmapPut)">BitmapPut</A>, etc. 24 Sprite8 draws a sprite with a width of 8 pixels or less on the screen. See <A HREF="$$LINK(sprites.h/ClipSprite8)">ClipSprite8</A> 25 for a version that handles out-of-screen sprites gracefully, and <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>, <A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A>, 26 <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> or <A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A> for wider sprites. 27 This routine is much faster than TIOS routines such as <A HREF="$$LINK(graph.h/DrawIcon)">DrawIcon</A>, 28 <A HREF="$$LINK(graph.h/BitmapPut)">BitmapPut</A>, etc. 27 29 <I>x</I> and <I>y</I> are the coordinates of the upper left corner of the sprite. 28 30 <I>height</I> is the height of the sprite. <I>sprite</I> is a pointer to the array of … … 84 86 very useful. Note that '~' is "bitwise NOT". Of course, ~0xFF is the same as 0x00, but this notation 85 87 makes the program more clear (and it does not increase the code size, because the inverting will 86 be performed at compilation time). And if you want to use <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A> or 87 <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>, the notation ~0xFF will still be valid in a short int array, or in a long int array 88 if you add the <B>'L'</B> suffix (see the respective info about <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>). 89 Without this notation, you must use 0x00 in Sprite8, but 0xFF00 in <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>, and 90 0xFFFFFF00 in <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>. This is why a notation like ~0xFF is more universal. 88 be performed at compilation time). And if you want to use <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>, 89 <A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A>, <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> or 90 <A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A>, the notation ~0xFF will still be valid in a short int 91 array, or in a long int array if you add the <B>'L'</B> suffix (see the respective info about 92 <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> and <A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A>). 93 Without this notation, you must use 0x00 in Sprite8, but 0xFF00 in 94 <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>/<A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A>, and 95 0xFFFFFF00 in <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>/<A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A>. 96 This is why a notation like ~0xFF is more universal. 91 97 <BR><BR> 92 98 Starting from TIGCC v0.91, you can use binary numbers to define your sprites. On the one hand,
Note: See TracChangeset
for help on using the changeset viewer.
