![]() |
Routines |
| Prev: 54311 | Up: Map | Next: 54380 |
|
Used by the routine at ApplyRoomDisplay.
Fetches this character's location and steps on to the next record.
|
||||
| ReadCharacterRoom | 54344 | PUSH DE | Call FetchCurrentCharacterLocation to fetch current character location. | |
| 54345 | PUSH BC | |||
| 54346 | PUSH IY | |||
| 54348 | LD B,A | |||
| 54349 | CALL FetchCurrentCharacterLocation | |||
| 54352 | LD DE,6 | Step to the next record. | ||
| 54355 | ADD IX,DE | |||
| ReadCharacterRoom_Loop | 54357 | CALL FetchNextObject | Go to ReadCharacterRoom_Restore if the next object id is 255. | |
| 54360 | JR Z,ReadCharacterRoom_Restore | |||
| 54362 | LD A,(IX+2) | Jump back to ReadCharacterRoom_Loop if the high byte of this entry's data pointer is zero. | ||
| 54365 | AND A | |||
| 54366 | JR Z,ReadCharacterRoom_Loop | |||
| 54368 | LD A,(IX+0) | Read this entry's id and keep searching while it is not the character asked for. | ||
| 54371 | CP B | |||
| 54372 | JP NZ,ReadCharacterRoom_Loop | |||
| ReadCharacterRoom_Restore | 54375 | POP IY | Restore the saved schedule entry, the saved count and the saved source from the stack. | |
| 54377 | POP BC | |||
| 54378 | POP DE | |||
| 54379 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 54311 | Up: Map | Next: 54380 |