![]() |
Routines |
| Prev: 48046 | Up: Map | Next: 48093 |
|
Used by the routine at DrawRoomContents.
Works through the actor table from ImmortalData_Actors and draws (with DrawEntity) every actor whose room (byte 1) is the same as the room the player is in (38659).
|
||||
| DrawRoomActors | 48059 | PUSH IX | Stash the actor record pointer on the stack. | |
| 48061 | LD IX,38670 | 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 | 48065 | LD A,(38659) | Fetch the room of the player from 38659. | |
| 48068 | CP (IX+1) | Draw the actor if it is in the room of the player. | ||
| 48071 | CALL Z,DrawEntity | |||
|
Move on to the next actor, until the end of the actor table is reached.
|
||||
| 48074 | LD DE,12 | Set the size of an actor record in DE to 12. | ||
| 48077 | ADD IX,DE | Move onto the next actor. | ||
| 48079 | PUSH IX | Copy the pointer to the actor into HL. | ||
| 48081 | POP HL | |||
| 48082 | LD DE,38958 | Point DE at the end of the actor table at StoredActorTable. | ||
| 48085 | AND A | Subtract the end of the actor table from the pointer to the actor. | ||
| 48086 | SBC HL,DE | |||
| 48088 | JR C,DrawRoomActors_Loop | Jump to DrawRoomActors_Loop if there are more actors to draw. | ||
| 48090 | POP IX | Restore the actor record pointer from the stack. | ||
| 48092 | RET | Return. | ||
| Prev: 48046 | Up: Map | Next: 48093 |