![]() |
Routines |
| Prev: BBAE | Up: Map | Next: BBDD |
|
Used by the routine at DrawRoomContents.
Works through the actor table from ImmortalData_Actors and draws (with DrawEntity) every actor whose room (byte 01) is the same as the room the player is in (9703).
|
||||
| DrawRoomActors | BBBB | PUSH IX | Stash the actor record pointer on the stack. | |
| BBBD | LD IX,$970E | Point IX at the first actor after the player at ImmortalData_Actors. | ||
|
Draw the actor if it is in the same room as the player.
|
||||
| DrawRoomActors_Loop | BBC1 | LD A,($9703) | Fetch the room of the player from 9703. | |
| BBC4 | CP (IX+$01) | Draw the actor if it is in the room of the player. | ||
| BBC7 | CALL Z,DrawEntity | |||
|
Move on to the next actor, until the end of the actor table is reached.
|
||||
| BBCA | LD DE,$000C | Set the size of an actor record in DE to 0C. | ||
| BBCD | ADD IX,DE | Move onto the next actor. | ||
| BBCF | PUSH IX | Copy the pointer to the actor into HL. | ||
| BBD1 | POP HL | |||
| BBD2 | LD DE,$982E | Point DE at the end of the actor table at StoredActorTable. | ||
| BBD5 | AND A | Subtract the end of the actor table from the pointer to the actor. | ||
| BBD6 | SBC HL,DE | |||
| BBD8 | JR C,DrawRoomActors_Loop | Jump to DrawRoomActors_Loop if there are more actors to draw. | ||
| BBDA | POP IX | Restore the actor record pointer from the stack. | ||
| BBDC | RET | Return. | ||
| Prev: BBAE | Up: Map | Next: BBDD |