|
| void | dosetcolodd (void) |
| void | dosetcol (void) |
| void | dosetcol2 (void) |
| void | dosetcolhi (void) |
| void | doshapeshit (void) |
| void | doshsphit (void) |
| void | dosphit (void) |
| void | dorectshit (void) |
| void | doscoll (void) |
| | SColl(Sprite Channel,Sprite Channel): whether two sprites collided.
|
| void | dopcoll (void) |
| | PColl(Sprite Channel): whether a sprite collided with the playfield.
|
| void | dodocoll (void) |
| | DoColl: latch the hardware collision bits (Blitz mode only).
|
| void | setcolchk (void) |
| void | setcolchk2 (void) |
| void | colbpchk (void) |
| void | shitchk (void) |
| void | shspchk (void) |
| void | spspchk (void) |
| void | scollchk (void) |
| void | pcollchk (void) |
| static ULONG | setclx (ULONG result, UWORD v) |
| BL_ALWAYS_INLINE BB_BOOL | chkifhit (WORD x1, WORD y1, WORD w1, WORD h1, WORD x2, WORD y2, WORD w2, WORD h2) |
| static BLITZ_ENTRYPOINT BB_BOOL | doshapeshit_c (ULONG x1, ULONG y1, ULONG x2, ULONG y2, const struct bb_shape *a, const struct bb_shape *b) |
| | ShapesHit(Shape#,X,Y,Shape#,X,Y): whether two shapes overlap.
|
| | BLITZ_ALIAS_EP (doshapeshit, doshapeshit_c) |
| static BLITZ_ENTRYPOINT BB_BOOL | doshsphit_c (ULONG x1, ULONG y1, ULONG x2, ULONG y2, const struct bb_shape *a, const struct bb_sprite *b) |
| | ShapeSpriteHit(Shape#,X,Y,Sprite#,X,Y): whether a shape and a sprite overlap.
|
| | BLITZ_ALIAS_EP (doshsphit, doshsphit_c) |
| static BLITZ_ENTRYPOINT BB_BOOL | dosphit_c (ULONG x1, ULONG y1, ULONG x2, ULONG y2, const struct bb_sprite *a, const struct bb_sprite *b) |
| | SpritesHit(Sprite#,X,Y,Sprite#,X,Y): whether two sprites overlap.
|
| | BLITZ_ALIAS_EP (dosphit, dosphit_c) |
| static BLITZ_ENTRYPOINT BB_BOOL | dorectshit_c (ULONG x1, ULONG y1, ULONG w1, ULONG h1, ULONG x2, ULONG y2, const UWORD *args) |
| | RectsHit(X1,Y1,Width1,Height1,X2,Y2,Width2,Height2): whether two rectangles overlap.
|
| | BLITZ_ALIAS_EP (dorectshit, dorectshit_c) |
| static ULONG | dosetcolodd_c (ULONG result) |
| | SetCollOdd: collisions with the odd bitplanes (CLXCON = $F041).
|
| | BLITZ_ALIAS (dosetcolodd, dosetcolodd_c) |
| static ULONG | setcol (ULONG colour, UWORD planes) |
| static ULONG | dosetcol_c (ULONG col, ULONG planes) |
| | SetColl Colour,Bitplanes: collisions with a colour.
|
| | BLITZ_ALIAS (dosetcol, dosetcol_c) |
| static UWORD | spreadit (UWORD bits) |
| static ULONG | dosetcol2_c (ULONG col, ULONG planes, ULONG pf) |
| | SetColl Colour,Bitplanes,Playfield: collisions with a colour of one playfield.
|
| | BLITZ_ALIAS (dosetcol2, dosetcol2_c) |
| static ULONG | dosetcolhi_c (ULONG planes) |
| | SetCollHi Bitplanes: collisions with the highest bitplane only.
|
| | BLITZ_ALIAS (dosetcolhi, dosetcolhi_c) |
| static void | setcolchk_c (ULONG col, ULONG planes) |
| static void | setcolchk2_c (ULONG col, ULONG planes, ULONG pf) |
| static void | colbpchk_c (ULONG planes) |
| static void | shitchk_c (const struct bb_shape *a, const struct bb_shape *b) |
| static void | shspchk_c (const struct bb_shape *a, const struct bb_sprite *b) |
| static void | spspchk_c (const struct bb_sprite *a, const struct bb_sprite *b) |
| static void | scollchk_c (ULONG c0, ULONG c1) |
| static void | pcollchk_c (ULONG c) |
PColl(Sprite Channel): whether a sprite collided with the playfield.
Tests two bits of the CLXDAT value latched by DoColl, pair + 1 and pair + 5 (mod 32, BTST on a register). Blitz mode only. A word function: the upper word of d0 is the caller's. Errors (debugger only): "Illegal Sprite channel" (>= 8). The original tests both bits into d0 and d1 (SNE d0, SNE d1, AND d1,d0, EXT d0) with colval in d2; here the second test is made only when the first bit is set, with colval in d1: the same d0 (EXT uses only the low byte of the AND, so the high bytes of the bit numbers do not matter), and only d0 and d1 change. Assembler: as a C function PColl cost 120 cycles more.
In: d0.w the sprite channel (0..7) Out: d0.w -1 = both bits set, 0 otherwise
SColl(Sprite Channel,Sprite Channel): whether two sprites collided.
Tests the bit of the pair in the CLXDAT value latched by DoColl (bits 9-14 = sprite pairs) - with BTST Dn,<memory>: a bit of the HIGH byte of the latched word, bit number mod 8. Blitz mode only. A word function: the upper word of d0 is the caller's. Changes d0.w and d1, as the original. Errors (debugger only): "Illegal Sprite channel" (>= 8), "Sprite
channels must be different", "Sprite channels must be of different
pairs" (the last fixed #110, the original has no such check). Fixed (#110): the original's bit number was right only with the lower channel first (SColl(2,0): bit 10 instead of 9, SColl(4,0): 11 instead of 10, SColl(6,0): 12 instead of 11). With the pairs p0 = d0/2 and p1 = d1/2 the original tests bit p1 of the high byte (CLXDAT bit 8 + p1) for p0 = 0 and p0 + 1 + p1 otherwise; the bit of two different pairs is p0 + p1 + 1 when neither is pair 0, else p0 + p1, so the original is wrong only for p0 != 0 and p1 = 0. The routine is the original's code with ADDQ #1,d0 : ADD d0,d1 replaced by NEG d1 : NEG d1 : ADDX d0,d1, which adds p0 and the X flag of the second NEG (set for p1 != 0) to p1: the same cycles (12 against 8, but BEQ.s instead of the original's BEQ.w saves 4 when it falls through), and BTST reads colval PC-relative instead of absolute (4 cycles less on both paths). Every other input, also the invalid ones (same pair, channel >= 8, the upper word of d1), tests the original's bit. Assembler in the argument registers: as a C function SColl cost a thunk, a register save and copies (about 250 cycles more per call). Cycles (68000, without the call): p0 = 0 62/64 (the original 66/68), p0 != 0 72/74 (76/78), no collision/collision.
In: d0.w the first sprite channel (0..7), d1.w the second Out: d0.w -1 = collision, 0 = none