![]() |
Routines |
| Prev: DFA3 | Up: Map | Next: DFD1 |
|
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 | DFAB | LD IX,$B670 | Point IX at B670. | |
| DFAF | LD B,$04 | B is 04. | ||
| DFB1 | LD DE,$0026 | DE is 26. | ||
| RemoveObjectEntities_Loop | DFB4 | LD A,(IX+$00) | Read field 00 of the entity. | |
| DFB7 | AND A | See whether A is zero. | ||
| DFB8 | JR Z,RemoveObjectEntities_Next | Jump to RemoveObjectEntities_Next if the zero flag is set. | ||
| DFBA | LD H,(IX+$1A) | Read field 1A of the entity into H. | ||
| DFBD | LD L,(IX+$1B) | Read field 1B of the entity into L. | ||
| DFC0 | INC HL | Advance HL. | ||
| DFC1 | INC HL | Advance HL. | ||
| DFC2 | RES 7,(HL) | Reset bit 7 of the byte at the address in HL. | ||
| DFC4 | LD (IX+$00),$00 | Set field 00 of the entity to 00. | ||
| DFC8 | LD (IX+$01),$80 | Set field 01 of the entity to 80. | ||
| RemoveObjectEntities_Next | DFCC | ADD IX,DE | IX takes DE. | |
| DFCE | DJNZ RemoveObjectEntities_Loop | Repeat from RemoveObjectEntities_Loop while B still counts. | ||
| DFD0 | RET | Return. | ||
| Prev: DFA3 | Up: Map | Next: DFD1 |