Prev: ABA8 Up: Map Next: AC08
ABF3: Mark Cell Destroyed
Used by the routine at CheckObjectHitByShot.
Sets the bit for the map cell of an object in the bitmap at CurrentPlayerState_MapCells (found by FindCellBit), unless the item number in A is below 06. The bit number is written straight into the operand of the SET instruction at AC05, so this routine modifies its own code.
Input
A Item number of the object
IX Address of the object
MarkCellDestroyed ABF3 CP $06 Return if A is less than 06.
ABF5 RET C
ABF6 LD E,(IX+$01) The map column.
ABF9 LD D,(IX+$04) The map zone.
ABFC CALL FindCellBit Call FindCellBit.
ABFF LD A,B A=B.
AC00 ADD A,$C6 Add C6 to A.
AC02 LD ($AC06),A The bit of the map cell.
AC05 SET 0,(HL) Set bit 0 of the byte at the address in HL.
AC07 RET Return.
Prev: ABA8 Up: Map Next: AC08