Prev: 9A7E Up: Map Next: 9A9A
9A8A: AND every byte of the objects-in-the-world table with E
Used by the routines at planet_secured and new_game.
map_object_kinds holds one byte for each object lying in the world, in map-column order: bits 0-5 its kind, bit 7 set once it is gone for player 1 and bit 6 for player 2 (ship_hits_ground_objects, beam_hits_ground_object). A new game passes $3F (new_game), clearing bits 6 and 7 of each, so everything is back. planet_secured passes $7F for player 1 or $BF for player 2 at the end of a planet, bringing back only that player's objects.
Input
E The mask
mask_world_objects 9A8A LD BC,$0122
9A8D LD HL,map_object_kinds
mask_world_objects_0 9A90 LD A,(HL)
9A91 AND E
9A92 LD (HL),A
9A93 INC HL
9A94 DEC BC
9A95 LD A,B
9A96 OR C
9A97 JR NZ,mask_world_objects_0
9A99 RET
Prev: 9A7E Up: Map Next: 9A9A