Prev: D427 Up: Map Next: D46C
D448: Read The Character's Room
Used by the routine at ApplyRoomDisplay.
Fetches this character's location and steps on to the next record.
ReadCharacterRoom D448 PUSH DE Call FetchCurrentCharacterLocation to fetch current character location.
D449 PUSH BC
D44A PUSH IY
D44C LD B,A
D44D CALL FetchCurrentCharacterLocation
D450 LD DE,$0006 Step to the next record.
D453 ADD IX,DE
ReadCharacterRoom_Loop D455 CALL FetchNextObject Go to ReadCharacterRoom_Restore if the next object id is FF.
D458 JR Z,ReadCharacterRoom_Restore
D45A LD A,(IX+$02) Jump back to ReadCharacterRoom_Loop if the high byte of this entry's data pointer is zero.
D45D AND A
D45E JR Z,ReadCharacterRoom_Loop
D460 LD A,(IX+$00) Read this entry's id and keep searching while it is not the character asked for.
D463 CP B
D464 JP NZ,ReadCharacterRoom_Loop
ReadCharacterRoom_Restore D467 POP IY Restore the saved schedule entry, the saved count and the saved source from the stack.
D469 POP BC
D46A POP DE
D46B RET Return.
View the equivalent code in;
Prev: D427 Up: Map Next: D46C