![]() |
Routines |
| Prev: CEB8 | Up: Map | Next: CEFE |
|
Used by the routines at ProcessScriptDisplay, HandleDisplayRoomDescription, HandleRoomDisplay and HandleSimpleAction.
Resolves special parameter values used in room display scripts to actual game values (current room, character ID, location value).
|
||||||||||||
| ProcessRoomDisplayParameter | CEDE | CP $F5 | Return unchanged if the parameter is not a special value (less than F5). | |||||||||
| CEE0 | RET C | |||||||||||
| CEE1 | CP $FE | Return unchanged if the parameter is not a special value (greater than FE). | ||||||||||
| CEE3 | RET NC | |||||||||||
| CEE4 | CP $FA | Jump to ProcessRoomDisplayParameter_CheckCharacterID if not room parameter (FA). | ||||||||||
| CEE6 | JR NZ,ProcessRoomDisplayParameter_CheckCharacterID | |||||||||||
| CEE8 | LD A,($9FD6) | Return the current room ID (A=*CurrentRoom_ID). | ||||||||||
| CEEB | RET | |||||||||||
| ProcessRoomDisplayParameter_CheckCharacterID | CEEC | CP $FB | Jump to ProcessRoomDisplayParameter_GetLocationValue if not character ID parameter (FB). | |||||||||
| CEEE | JR NZ,ProcessRoomDisplayParameter_GetLocationValue | |||||||||||
| CEF0 | LD A,($A036) | Return the current character ID (A=*CurrentCharacter_ID). | ||||||||||
| CEF3 | RET | |||||||||||
| ProcessRoomDisplayParameter_GetLocationValue | CEF4 | CP $FC | Return the location value (high byte) if parameter is FC otherwise return the location value (low byte). | |||||||||
| CEF6 | LD A,($9FD8) | |||||||||||
| CEF9 | RET Z | |||||||||||
| CEFA | LD A,($9FD7) | |||||||||||
| CEFD | RET | |||||||||||
| Prev: CEB8 | Up: Map | Next: CEFE |