|
| void | dogetsprite (void) |
| void | doshowsprite (void) |
| | ShowSprite Sprite#,X,Y,Sprite Channel - show a sprite on the used slice (Blitz mode only).
|
| void | doinfront1 (void) |
| void | doinfront2 (void) |
| void | dosavesprites (void) |
| void | doloadsprites (void) |
| void | doloadsprites2 (void) |
| void | dospritemode (void) |
| void | freeasprite (void) |
| static ULONG | codeinit (void) |
| void | gspchk (void) |
| void | spriteslib_sspchk (void) |
| void | infchk (void) |
| void | ssz (void) |
| void | spritemodechk (void) |
| static void * | globalloc (ULONG size, ULONG flags) |
| static void | globfree (void *mem, ULONG size) |
| static UWORD | lslw (UWORD v, UWORD n) |
| static ULONG | spsize (const struct bb_sprite *sp) |
| static void | dospritemode_c (ULONG m) |
| | SpriteMode 0=16 1=32 2=64 - the sprite width (FMODE) for the following GetaSprite/ShowSprite.
|
| | BLITZ_ALIAS (dospritemode, dospritemode_c) |
| static void | freeasprite_ (struct bb_sprite *sp) |
| static void | freeasprite_c (void) |
| static UBYTE * | partsprite (const UBYTE *src, UBYTE *dst, UWORD height, const struct bb_shape *shape, UWORD avail) |
| static UBYTE * | onesprite (const UBYTE *src, UBYTE *dst, UWORD height, const struct bb_shape *shape, WORD avail) |
| static void | dogetsprite_c (struct bb_shape *shape) |
| | GetaSprite Sprite#,Shape# - make a sprite from a 4 or 16 colour shape.
|
| | BLITZ_ALIAS (dogetsprite, dogetsprite_c) |
| static void | doinfront1_c (ULONG ch, struct bb_slice *slice) |
| | InFront Sprite Channel, InFrontB Sprite Channel - sprites from the channel on appear in front of playfield 2 (Blitz mode only).
|
| | BLITZ_ALIAS (doinfront1, doinfront1_c) |
| static void | doinfront2_c (ULONG ch, struct bb_slice *slice) |
| | InFrontF Sprite Channel - sprites from the channel on appear in front of playfield 1 (Blitz mode only).
|
| | BLITZ_ALIAS (doinfront2, doinfront2_c) |
| static void | dosavesprites_c (UBYTE *last, const char *name, struct DosLibrary *dos) |
| | SaveSprites Sprite#,Sprite#,Filename$ - save a range of sprites to a file (Amiga mode only).
|
| | BLITZ_ALIAS (dosavesprites, dosavesprites_c) |
| static void | loadsprites (struct bb_sprite *sp, const UBYTE *last, const char *name, struct DosLibrary *dos) |
| static void | doloadsprites_c (UBYTE *last, const char *name, struct DosLibrary *dos) |
| | LoadSprites Sprite#,Sprite#,Filename$ - load a range of sprites from a file made by SaveSprites (Amiga mode only).
|
| | BLITZ_ALIAS (doloadsprites, doloadsprites_c) |
| static void | doloadsprites2_c (UBYTE *base, ULONG max, const char *name, struct DosLibrary *dos) |
| | LoadSprites Sprite#,Filename$ - load sprites from the given one up to the last of the object table (Amiga mode only).
|
| | BLITZ_ALIAS (doloadsprites2, doloadsprites2_c) |
| static void | gspchk_c (struct bb_shape *shape) |
| static void | sspchk_c (ULONG ch, struct bb_slice *slice) |
| static void | infchk_c (ULONG ch, struct bb_slice *slice) |
| static void | ssz_c (UBYTE *last) |
| static void | spritemodechk_c (ULONG m) |
| void dogetsprite_c |
( |
struct bb_shape * | shape | ) |
|
|
static |
GetaSprite Sprite#,Shape# - make a sprite from a 4 or 16 colour shape.
Frees the sprite's old data, allocates CHIP memory for ((width-1) >> (shift+2)) + 1 hardware sprites (twice for 16 colours: attached pairs, planes 2+3 in the attached sprite) and copies per sprite and row the two planes' words/longs, then a 0 line (no control words: ShowSprite writes position and control into the slice's copper list). Takes the shape's handle.
Errors (debugger, gspchk): "Uninitialized Shape", "Shape MUST be 4 or
16 colours", "Sprite too Wide".
Fixed (#282): the last sprite of a shape whose byte width is no multiple of the sprite width (SpriteMode 1/2) takes only the bytes of the row and 0 for the rest; the original copied the whole sprite width (bytes of the next row).
- Parameters
-
| shape | a2: the shape object; a3: the sprite object |
| void doinfront1_c |
( |
ULONG | ch, |
|
|
struct bb_slice * | slice ) |
|
static |
InFront Sprite Channel, InFrontB Sprite Channel - sprites from the channel on appear in front of playfield 2 (Blitz mode only).
Sets the playfield 2 priority bits (BPLCON2 3-5) to channel/2 in the copper list of the used slice.
Errors (debugger, infchk): "Sprite Channel not in range" (odd or > 8), "Uninitialized Slice", "Slice does not support priority".
- Parameters
-
| ch | d0.w: the sprite channel (even, 0-8) |
| slice | a2: the used slice |
| void doloadsprites2_c |
( |
UBYTE * | base, |
|
|
ULONG | max, |
|
|
const char * | name, |
|
|
struct DosLibrary * | dos ) |
|
static |
LoadSprites Sprite#,Filename$ - load sprites from the given one up to the last of the object table (Amiga mode only).
As LoadSprites with two sprites; the last is base + (maximum - 1) << 4.
Fixed (#999): that offset is a long (the maximum is the low word of d2); the original adds it as a word (from a maximum of 2049 on the last sprite lies before the table).
- Parameters
-
| base | a2: the sprite table (object base); a3: the first sprite |
| max | d2: the maximum number of sprites |
| name | d1: the file name |
| dos | a6: dos.library |
| void doloadsprites_c |
( |
UBYTE * | last, |
|
|
const char * | name, |
|
|
struct DosLibrary * | dos ) |
|
static |
LoadSprites Sprite#,Sprite#,Filename$ - load a range of sprites from a file made by SaveSprites (Amiga mode only).
Frees each sprite, reads its 16 byte object and its data (CHIP memory); stops at the end of the file.
Errors: as SaveSprites.
Fixed (#280): the data size is the sprite's own (bytes per image x hardware sprites); the original used the current SpriteMode.
- Parameters
-
| last | a2: the last sprite object; a3: the first |
| name | d2: the file name |
| dos | a6: dos.library |
| void dosavesprites_c |
( |
UBYTE * | last, |
|
|
const char * | name, |
|
|
struct DosLibrary * | dos ) |
|
static |
SaveSprites Sprite#,Sprite#,Filename$ - save a range of sprites to a file (Amiga mode only).
Per sprite the 16 byte object, then its data if it has any.
Errors: "Can't open Sprites file", "Error reading/writing Sprites file" (runtime errors also without the debugger, their messages in the normal code: #954); debugger (ssz): "First
Sprite must be lower than second".
Fixed (#280): the data size is the sprite's own (bytes per image x hardware sprites); the original used the current SpriteMode.
- Parameters
-
| last | a2: the last sprite object; a3: the first |
| name | d2: the file name |
| dos | a6: dos.library |
| void doshowsprite |
( |
void | | ) |
|
ShowSprite Sprite#,X,Y,Sprite Channel - show a sprite on the used slice (Blitz mode only).
Writes position, control and data pointer of each hardware sprite into the slice's copper list from the channel on. Clips at the top (the data pointer is advanced by the clipped lines, 4/8/16 bytes each) and the bottom of the slice; switches the sprites off when completely outside.
Errors (debugger, sspchk): "Uninitialized Sprite", "Uninitialized
Slice", "Sprite Channel Unavailable".
Fixed (#283): the original's top clipping skips 4 bytes per line also in the 32/64 pixel modes and adds the upper word of the y register.
- d1 x, x position
- d2 y, y position
- d3 ch, the first sprite channel
- a2 slice, the used slice; a3: the sprite object
| void dospritemode_c |
( |
ULONG | m | ) |
|
|
static |
SpriteMode 0=16 1=32 2=64 - the sprite width (FMODE) for the following GetaSprite/ShowSprite.
Mode 0/1/2 = 16/32/64 pixels per sprite: widthshift 2/3/4, spritewid 2/4/8 bytes (from the table shlup).
The width is read from a table of 3 words: modes above 2 read the variables behind it. Errors (debugger only, spritemodechk): a mode above 2 -> "Illegal SpriteMode" (Fixed (#281): the original has no check). Fixed (#280): sprites made before the change keep their size (the original freed, saved and loaded them with the size of the new mode).
- Parameters
-