Prev: 57251 Up: Map Next: 57297
57259: Remove Object Entities
Used by the routines at BuildView and RunGame.
Removes each of the four entities that were made for objects of the level by AddObjectEntity, and clears the flag of each of the objects.
RemoveObjectEntities 57259 LD IX,46704 Point IX at 46704.
57263 LD B,4 B is 4.
57265 LD DE,38 DE is 38.
RemoveObjectEntities_Loop 57268 LD A,(IX+0) Read field 0 of the entity.
57271 AND A See whether A is zero.
57272 JR Z,RemoveObjectEntities_Next Jump to RemoveObjectEntities_Next if the zero flag is set.
57274 LD H,(IX+26) Read field 26 of the entity into H.
57277 LD L,(IX+27) Read field 27 of the entity into L.
57280 INC HL Advance HL.
57281 INC HL Advance HL.
57282 RES 7,(HL) Reset bit 7 of the byte at the address in HL.
57284 LD (IX+0),0 Set field 0 of the entity to 0.
57288 LD (IX+1),128 Set field 1 of the entity to 128.
RemoveObjectEntities_Next 57292 ADD IX,DE IX takes DE.
57294 DJNZ RemoveObjectEntities_Loop Repeat from RemoveObjectEntities_Loop while B still counts.
57296 RET Return.
Prev: 57251 Up: Map Next: 57297