|
| void | _GetWBSprite (void) |
| void | _freesprite (void) |
| void | _movewbsprite (void) |
| void | _changewbsprite (void) |
| void | _wbspritex (void) |
| void | _wbspritey (void) |
| void | riwbspritelib_libinit (void) |
| void | riwbspritelib_libfinit (void) |
| void | _getwbspritechk (void) |
| void | _freesprchk (void) |
| void | _movewbspritechk (void) |
| void | _changewbspritechk (void) |
| void | _wbspritexychk (void) |
| static void | movesprite (ULONG vp, ULONG spr, ULONG x, ULONG y) |
| static ULONG | freespritedata (ULONG spr) |
| static LONG | changeextsprite (ULONG vp, ULONG old, ULONG new, ULONG tags) |
| static ULONG | v39get (void) |
| static ULONG | v33get (void) |
| static ULONG | v33freedata (ULONG spr) |
| static BB_BOOL | v39change (void) |
| static BB_BOOL | v33change (void) |
| static void | libinit_c (void) |
| | init: opens graphics.library (any version) and chooses the sprite functions by its version: V39 and up the ExtSprite functions, below V39 those of the SimpleSprite (fixed #1151).
|
| static void | libfinit_c (void) |
| | finit: every sprite freed (FreeSprite, FreeSpriteData), the library closed.
|
| static void | copyshape (struct BitMap *bm) |
| static int | shapebitmap (void) |
| static ULONG | newsprite (void) |
| static ULONG | getwbsprite_c (UWORD x, UWORD y, LONG ch, ULONG shape) |
| | GetWBSprite(x,y,shape[,spritechannel]): a Workbench sprite from a Blitz shape.
|
| static ULONG | freesprite_c (ULONG ch) |
| | FreeWBSprite sprite_channel: frees a sprite (FreeSprite, FreeSpriteData) and clears its table entry.
|
| static ULONG | movewbsprite_c (ULONG vp, ULONG x, ULONG y, ULONG ch) |
| | MoveWBSprite(viewport,x,y,sprite_channel): MoveSprite of the channel's sprite.
|
| static BB_BOOL | changewbsprite_c (ULONG vp, ULONG ch, ULONG shape) |
| | ChangeWBSprite(viewport,sprite_channel,shape#): a new image for a sprite (ChangeExtSpriteA).
|
| static UWORD * | v33image (void) |
| static ULONG | wbspritex_c (ULONG ch) |
| | WBSpriteX(sprite_channel): the x of the channel's sprite.
|
| static ULONG | wbspritey_c (ULONG ch) |
| | WBSpriteY(sprite_channel): the y of the channel's sprite.
|
| static void | chchk (ULONG ch) |
| static void | shapechk (const struct bb_shape *sh) |
| static void | getwbspritechk_c (LONG ch, const struct bb_shape *shape) |
| | The error check of GetWBSprite (debugger only).
|
| static void | freesprchk_c (ULONG ch) |
| | The error check of FreeWBSprite (debugger only).
|
| static void | movewbspritechk_c (ULONG ch) |
| | The error check of MoveWBSprite (debugger only).
|
| static void | changewbspritechk_c (ULONG ch, const struct bb_shape *shape) |
| | The error check of ChangeWBSprite (debugger only).
|
| static void | wbspritexychk_c (ULONG ch) |
| | The error check of WBSpriteX and WBSpriteY (debugger only).
|
| BB_BOOL changewbsprite_c |
( |
ULONG | vp, |
|
|
ULONG | ch, |
|
|
ULONG | shape ) |
|
static |
ChangeWBSprite(viewport,sprite_channel,shape#): a new image for a sprite (ChangeExtSpriteA).
Amiga mode only. The shape is converted as in GetWBSprite, at the sprite's position; on success the old sprite data are freed and the new ones replace them in the table. The channel and the shape: changewbspritechk (fixed #916, #917). Fixed (#915): if ChangeExtSpriteA fails, the new sprite data are freed (the original lost them).
- Parameters
-
| vp | d0: the ViewPort |
| ch | d1: the channel |
| shape | a0: the shape (!libs shapeslib,ia0|pd2) |
- Returns
- d0: BB_TRUE, BB_FALSE without graphics.library, shape data or sprite, or if a step fails
| void changewbspritechk_c |
( |
ULONG | ch, |
|
|
const struct bb_shape * | shape ) |
|
static |
The error check of ChangeWBSprite (debugger only).
Fixed (#916), not in the original: the channel (a long) indexes the table without a check. Release code unchanged (D-005).
Fixed (#917): the shape as GetWBSprite's.
Errors: "Sprite channel must be 0 to 7"; "Illegal Shape Height", "Illegal Shape Depth".
- Parameters
-
| ch | d1: the channel |
| shape | a0: the shape |
| ULONG getwbsprite_c |
( |
UWORD | x, |
|
|
UWORD | y, |
|
|
LONG | ch, |
|
|
ULONG | shape ) |
|
static |
GetWBSprite(x,y,shape[,spritechannel]): a Workbench sprite from a Blitz shape.
Amiga mode only. The shape is copied into a bitmap of AllocBitMap, converted with AllocSpriteDataA (x, y set) and got with GetExtSpriteA (channel -1: any); the sprite goes into the table. The copy has DBRA counts; the channel and the shape: getwbspritechk (fixed #916, #917). Fixed (#918): the copy steps by the shape's ebwidth and the bitmap's BytesPerRow. Fixed (#920): every failure (no graphics.library, no shape data, a shape narrower than 16, a failing AllocBitMap, AllocSpriteDataA or GetExtSpriteA) gives -1; the original decided by the channel's table entry (the channel if the library held a sprite there, else 0) and gave 0 or -1 for the others.
- Parameters
-
| x | d0: x (a word) |
| y | d1: y (a word) |
| ch | d3: the channel, -1 for any |
| shape | a0: the shape (!libs shapeslib,ia0|pd2) |
- Returns
- d0: the channel 0-7, -1 if no sprite was got
| void getwbspritechk_c |
( |
LONG | ch, |
|
|
const struct bb_shape * | shape ) |
|
static |
The error check of GetWBSprite (debugger only).
Fixed (#916), not in the original (riwbspritelib had no error check area): the channel indexes the sprite table of 8 entries without a check (the tag lists before it, the library name and base behind it). The release code is unchanged (an invalid argument, D-005).
Fixed (#917): a shape with data and a height of 0, a depth of 0 or above 8 (an invalid object: Blitz's shape commands make none) is refused before AllocBitMap; the copy counts height - 1 and depth - 1 with DBRA (65536 rows or planes; the planes read behind the 8 of the bitmap). Release code unchanged (D-005).
Errors: "Sprite channel must be -1 to 7"; "Illegal Shape Height", "Illegal Shape Depth".
- Parameters
-
| ch | d3: the channel (a long), -1 for any |
| shape | a0: the shape |
| ULONG movewbsprite_c |
( |
ULONG | vp, |
|
|
ULONG | x, |
|
|
ULONG | y, |
|
|
ULONG | ch ) |
|
static |
MoveWBSprite(viewport,x,y,sprite_channel): MoveSprite of the channel's sprite.
Amiga mode only; nothing without a sprite. The channel: movewbspritechk (fixed #916). Fixed (#921): the result is -1 when the sprite was moved (the original returned the d0 MoveSprite leaves, declared as a byte).
- Parameters
-
| vp | d0: the ViewPort |
| x | d1: x |
| y | d2: y |
| ch | d3: the channel |
- Returns
- d0: -1 moved, 0 without a sprite
| void wbspritexychk_c |
( |
ULONG | ch | ) |
|
|
static |
The error check of WBSpriteX and WBSpriteY (debugger only).
Fixed (#916), not in the original: the channel (a word) indexes the table without a check. Release code unchanged (D-005).
Fixed (#922): a channel without a sprite of the library is refused; the release code reads the word at 6 or 8 of the entry, 0, without a test (a query of a sprite that does not exist, as #686, #1131).
Errors: "Sprite channel must be 0 to 7", "No sprite on this channel".
- Parameters
-