Changeset 1361
- Timestamp:
- 07/24/09 18:55:32 (3 years ago)
- Location:
- trunk/tigcc
- Files:
-
- 6 added
- 5 edited
-
archive/clipsprite16.s (added)
-
archive/clipsprite32.s (added)
-
archive/clipsprite8.s (added)
-
archive/tigcc.tpr (modified) (1 diff)
-
doc/System/Include/sprites.h/ClipSprite16.hsf (added)
-
doc/System/Include/sprites.h/ClipSprite32.hsf (added)
-
doc/System/Include/sprites.h/ClipSprite8.hsf (added)
-
doc/System/Include/sprites.h/Sprite16.hsf (modified) (2 diffs)
-
doc/System/Include/sprites.h/Sprite32.hsf (modified) (2 diffs)
-
doc/System/Include/sprites.h/Sprite8.hsf (modified) (3 diffs)
-
include/C/sprites.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tigcc/archive/tigcc.tpr
r1345 r1361 436 436 GNU Assembler File 218=sprite16.s 437 437 GNU Assembler File 219=sprite32.s 438 GNU Assembler File 220=ptrtohandle.s 438 GNU Assembler File 220=clipsprite8.s 439 GNU Assembler File 221=clipsprite16.s 440 GNU Assembler File 222=clipsprite32.s 441 GNU Assembler File 223=ptrtohandle.s 439 442 Text File 1=License.txt 440 443 Text File 2=startup\Startup.txt -
trunk/tigcc/doc/System/Include/sprites.h/Sprite16.hsf
r1360 r1361 6 6 Definition=void Sprite16 (short x, short y, short height, const unsigned short *sprite, void *vm_addr, short mode); 7 7 Real Definition=extern void Sprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__; 8 See Also=sprites.h/ClipSprite16 8 9 9 10 [Library Call] … … 27 28 <PRE>static const unsigned short sprite[] = {...}; 28 29 </PRE> 29 See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites. 30 See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites, and 31 <A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A> for a version that handles out-of-screen sprites gracefully. -
trunk/tigcc/doc/System/Include/sprites.h/Sprite32.hsf
r1360 r1361 6 6 Definition=void Sprite32 (short x, short y, short height, const unsigned long *sprite, void *vm_addr, short mode); 7 7 Real Definition=extern void Sprite32(short asm("d0"),short asm("d1"),short asm("d2"),__cpulong asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__; 8 See Also=sprites.h/ClipSprite32 8 9 9 10 [Library Call] … … 47 48 </UL> 48 49 <BR><BR> 49 See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites. 50 See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites, and 51 <A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A> for a version that handles out-of-screen sprites gracefully. -
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, -
trunk/tigcc/include/C/sprites.h
r1360 r1361 6 6 /* Begin Auto-Generated Part */ 7 7 enum SprtModes{SPRT_XOR,SPRT_OR,SPRT_AND,SPRT_RPLC}; 8 extern void ClipSprite8(short asm("d0"),short asm("d1"),short asm("d2"),const unsigned char* asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__; 9 extern void ClipSprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__; 10 extern void ClipSprite32(short asm("d0"),short asm("d1"),short asm("d2"),__cpulong asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__; 8 11 extern void Sprite8(short asm("d0"),short asm("d1"),short asm("d2"),const unsigned char* asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__; 9 12 extern void Sprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
Note: See TracChangeset
for help on using the changeset viewer.
