|
| void | _shapetomapshape (void) |
| void | _blitmapshape (void) |
| | BlitMapShape window#,mapshape#,x,y: a map shape blitted into the window's RastPort (assembler entry).
|
| void | _remapmapshape (void) |
| | RemapMapShape mapshape#,botcol,topcol: does nothing.
|
| void | _blitmapshapesize (void) |
| | BlitMapShapeSize window#,mapshape#,x,y,width,height: a part of a map shape blitted into the window's RastPort (assembler entry).
|
| void | _setnummapshapes (void) |
| void | _mapshapeaddr (void) |
| void | _freemapshapes (void) |
| void | _addgroupmember (void) |
| void | _blitgroup (void) |
| | BlitGroup window#,x,y: every member of the group blitted at x+dx, y+dy.
|
| void | _resetgroup (void) |
| void | rimapshapeslib_libinit (void) |
| void | rimapshapeslib_libfinit (void) |
| void | _shapetomapshapechk (void) |
| void | _addgroupmemberchk (void) |
| void | _blitmapshapechk (void) |
| void | _blitmapshapesizechk (void) |
| void | _mapshapeaddrchk (void) |
| void | _freemapshapeschk (void) |
| static void | libinit_c (void) |
| | init: the group block (512 bytes, AllocMem MEMF_PUBLIC|MEMF_CLEAR).
|
| static void | libfinit_c (void) |
| | finit: frees the map shapes and the group block.
|
| static void | shapetomapshape_c (UWORD n, const struct bb_shape *sh) |
| | ShapeToMapShape shape#,mapshape#: a map shape from a Blitz shape.
|
| static void | setnummapshapes_c (UWORD num) |
| | SetNumMapShapes num: (re)allocates num map shapes.
|
| static struct mapshape * | mapshapeaddr_c (UWORD n) |
| | MapShapeAddr(mapshape#): the address of a map shape.
|
| static void | freemapshapes_c (UWORD first, UWORD last) |
| | FreeMapShapes first,last: the map shapes first to last made empty.
|
| static struct member * | resetgroup_c (UWORD bw, UWORD bh) |
| | ResetGroup(blockwidth,blockheight): empties the group and sets the block size for AddGroupMember.
|
| static void | addgroupmember_c (UWORD n, UWORD dx, UWORD dy) |
| | AddGroupMember mapshape#,dx,dy: a map shape added to the group.
|
| static void | numchk (UWORD n) |
| static void | shapetomapshapechk_c (UWORD n, const struct bb_shape *sh) |
| | The error check of ShapeToMapShape (debugger only).
|
| static void | addgroupmemberchk_c (UWORD n) |
| | The error check of AddGroupMember (debugger only).
|
| static void | blitmapshapechk_c (UWORD n) |
| | The error check of BlitMapShape (debugger only).
|
| static void | blitmapshapesizechk_c (UWORD n, UWORD w) |
| | The error check of BlitMapShapeSize (debugger only).
|
| static void | mapshapeaddrchk_c (UWORD n) |
| | The error check of MapShapeAddr (debugger only).
|
| static void | freemapshapeschk_c (UWORD first, UWORD last) |
| | The error check of FreeMapShapes (debugger only).
|
BlitGroup window#,x,y: every member of the group blitted at x+dx, y+dy.
As BlitMapShape for each member (empty ones skipped); x+dx and y+dy are words, with the upper words of the caller's d2/d3. The original's d5 is the member's address when _blitmapshape2 loads the height into its low word. d2 comes in with y in its low word and becomes xbase. Without a group block it does nothing (fixed #905: the original read the members from address 0). a6 is graphics.library: fixed (#902), the original's !libs had no graphicslib, so a6 was the caller's. Assembler entry, the original's code: d1 x, d2 y, a1 the window object, a6 graphics.library; a5 is kept on the stack, each member's a1/a5/d2/d3 around the call of _blitmapshape2.
| void _blitmapshape |
( |
void | | ) |
|
BlitMapShape window#,mapshape#,x,y: a map shape blitted into the window's RastPort (assembler entry).
BltBitMapRastPort from 0,0, minterm $C0, the map shape's width and height; nothing for an empty map shape (width 0). Registers on entry: d1 the map shape number, d2/d3 x and y (the caller's longs go to the call), a1 the window object, a6 graphics.library; width, height and minterm replace the low words of the caller's d4/d5/d6 (MOVE.w). It falls into _blitmapshape2 (a0 = the map shape, a1 = the RastPort), which BlitGroup calls for each member and which ends in the JMP to BltBitMapRastPort. Without map shapes it does nothing (fixed #906: the original blitted a "map shape" from address n * 64; one test of the pointer per call); the number is checked by blitmapshapechk only (fixed #906).
| void _blitmapshapesize |
( |
void | | ) |
|
BlitMapShapeSize window#,mapshape#,x,y,width,height: a part of a map shape blitted into the window's RastPort (assembler entry).
As BlitMapShape with the given width (d4) and height (d5), the height at most the map shape's (CMP.w: signed words; the width is not limited); nothing for an empty map shape. The caller's longs of d2-d5 go to the call, the low word of d6 becomes $C0. Without map shapes it does nothing (fixed #906); the number and the width are checked by blitmapshapesizechk only (fixed #906).
| void addgroupmember_c |
( |
UWORD | n, |
|
|
UWORD | dx, |
|
|
UWORD | dy ) |
|
static |
AddGroupMember mapshape#,dx,dy: a map shape added to the group.
The member {map shape, dx*blockwidth, dy*blockheight (MULU.w, the low words)}, then the end mark. Before the first ResetGroup it adds to the empty group of init (fixed #901: the original wrote at address 0). A member is added only below the group's end (an unsigned compare): at most 63, further ones are ignored (fixed #904: the original wrote the 64th member's end mark behind the 512-byte block, and each further member 8 bytes more), and none without a group block (fixed #905: the end is 0 then), nor without map shapes (fixed #906: the original's member pointed into low memory).
- Parameters
-
| n | d0: the map shape number |
| dx | d1: the column in blocks |
| dy | d2: the row in blocks |
| void addgroupmemberchk_c |
( |
UWORD | n | ) |
|
|
static |
The error check of AddGroupMember (debugger only).
Fixed (#904), not in the original: the group block has room for 63 members and the end mark; the release code ignores further members, the check tells the programmer. Without a group block (init's allocation failed) the release code adds nothing, silently (D-018).
Fixed (#906): the map shape number must be below the count of the last SetNumMapShapes.
Errors: "Map shape not allocated by SetNumMapShapes"; "Group holds at
most 63 members" when the group is full.
- Parameters
-
| n | d0: the map shape number |
| void blitmapshapesizechk_c |
( |
UWORD | n, |
|
|
UWORD | w ) |
|
static |
The error check of BlitMapShapeSize (debugger only).
Fixed (#906), not in the original: the number as BlitMapShape's, and the width at most the map shape's (the release code limits the height only: a wider blit reads each row on into the next rows and the last one behind the shape's data). An empty map shape (width 0) is not blitted and its width not checked.
Errors: "Map shape not allocated by SetNumMapShapes"; "BlitMapShapeSize
wider than the map shape".
- Parameters
-
| n | d1: the map shape number |
| w | d4: the width |
| void freemapshapeschk_c |
( |
UWORD | first, |
|
|
UWORD | last ) |
|
static |
The error check of FreeMapShapes (debugger only).
Fixed (#906), not in the original: when the range is not empty (last not below first, signed words, as the release code), both numbers must be below the count of the last SetNumMapShapes.
Errors: "Map shape not allocated by SetNumMapShapes".
- Parameters
-
| first | d0: the first map shape number |
| last | d1: the last map shape number |
init: the group block (512 bytes, AllocMem MEMF_PUBLIC|MEMF_CLEAR).
AllocMem, not the original's AllocVec (exec V36): the library runs on Kickstart 1.x (fixed #1141).
The next-member pointer is set to the (cleared, so empty) group and the block size to 0, as at the first load: fixed (#901, #1134), the original set only the group's address, so an AddGroupMember before ResetGroup wrote at 0, and in a second run from the editor into the run before's freed group with its block size. The group's end, the place of a 64th member, is kept for AddGroupMember (fixed #904). Without memory groupaddr, the pointer and the end are 0: the group commands then do nothing (fixed #905, the original did not check the AllocVec).
| void setnummapshapes_c |
( |
UWORD | num | ) |
|
|
static |
SetNumMapShapes num: (re)allocates num map shapes.
The old block is freed (FreeMem with the count kept), num * 64 bytes allocated (AllocMem MEMF_PUBLIC|MEMF_CLEAR; fixed #1141: the original's AllocVec and FreeVec are exec V36). After a failure, or with num 0, there are no map shapes: the commands then do nothing (fixed #906: the original took them from address 0 on). The number is kept for FreeMem and the error checks (0 without a block).
- Parameters
-
| num | d0: the number of map shapes (a word) |
| void shapetomapshape_c |
( |
UWORD | n, |
|
|
const struct bb_shape * | sh ) |
|
static |
ShapeToMapShape shape#,mapshape#: a map shape from a Blitz shape.
Width, height, depth and ebwidth of the shape; the plane pointers point into the shape's data (onebpmem apart, not copied). Without map shapes it does nothing (fixed #906: the original wrote from address 0 on); the number is checked by shapetomapshapechk only (fixed #906). Depth 0 writes 65536 plane pointers (DBRA), depths above 8 run into unused[] and the next map shapes: an invalid object, refused by shapetomapshapechk with runtime error checking (fixed #903), here unchecked.
- Parameters
-
| n | d1: the map shape number |
| sh | a0: the shape (!libs shapeslib,ia0|pd0) |
| void shapetomapshapechk_c |
( |
UWORD | n, |
|
|
const struct bb_shape * | sh ) |
|
static |
The error check of ShapeToMapShape (debugger only).
Fixed (#903), not in the original (rimapshapeslib had no error check area): ShapeToMapShape copies one plane pointer per plane of the shape with SUBQ.w #1 ... DBRA into the 8 of the map shape, so a shape of depth 0 writes 65536 pointers and one of more than 8 planes runs into the unused bytes and the next map shape. The release code is unchanged (an invalid object, D-005).
Fixed (#906): the map shape number must be below the count of the last SetNumMapShapes (the release code does not compare it).
Errors: "Map shape not allocated by SetNumMapShapes"; "Illegal Shape
Depth" (shapeslib's text) for a depth of 0 or above 8.
- Parameters
-
| n | d1: the map shape number |
| sh | a0: the shape (!libs shapeslib,ia0|pd0) |