![]() |
Routines |
| Prev: E22A | Up: Map | Next: E2EE |
|
Used by the routine at CheckCharacterForRoomGraphics.
Returns through ParseInputNumber_ReturnZero when the character being processed is the room display parameter. A non-zero return means the script step succeeded.
|
||||
| TestCharacterAgainstRoom | E28D | LD A,($A036) | Go to ParseInputNumber_ReturnZero if the character being processed is the room display parameter. | |
| E290 | LD HL,$A034 | |||
| E293 | CP (HL) | |||
| E294 | JP Z,ParseInputNumber_ReturnZero | |||
| E297 | RET | Return. | ||
|
Reached through the display record at E2C7, dispatched by DispatchLookedUpHandlerThird.
|
||||
| E298 | LD A,($A034) | Jump to TestCharacterAgainstRoom_SearchPairs if the room display parameter is 1E. | ||
| E29B | CP $1E | |||
| E29D | JR Z,TestCharacterAgainstRoom_SearchPairs | |||
| E29F | CP $21 | Return zero through ParseInputNumber_ReturnZero if the room display parameter is not Entrance Hall. | ||
| E2A1 | JP NZ,ParseInputNumber_ReturnZero | |||
| TestCharacterAgainstRoom_SearchPairs | E2A4 | LD A,($A00A) | Call SearchPairTable to search pair table. | |
| E2A7 | LD C,$00 | |||
| E2A9 | CALL SearchPairTable | |||
| E2AC | JP NZ,ParseInputNumber_ReturnZero | Return zero through ParseInputNumber_ReturnZero if SearchPairTable finds no pair. | ||
| E2AF | LD IX,($A013) | Read the current object. | ||
| E2B3 | LD A,(IX+$0F) | Return zero through ParseInputNumber_ReturnZero if the record is not zero. | ||
| E2B6 | AND A | |||
| E2B7 | JP NZ,ParseInputNumber_ReturnZero | |||
| E2BA | LD A,($A034) | Read the room display parameter. | ||
| E2BD | CALL FindCharacterScriptEntry_StartSearch | Call FindCharacterScriptEntry_StartSearch to walk the character-script entries. | ||
| E2C0 | JP NZ,ParseInputNumber_ReturnZero | Return zero through ParseInputNumber_ReturnZero if FindCharacterScriptEntry_StartSearch finds a script entry. | ||
| E2C3 | OR %00000001 | Reset the zero flag. | ||
| E2C5 | RET | Return. | ||
| E2C6 | DEFB $00 | Script byte overwritten by 9AD9, read by ReadRoomDisplayParameter and PlaceCharacterBesideMatch. | ||
| E2C7 | DEFB $47,$10,$98,$E2 | Display record read by ProcessDisplayRecord: flags 47 value 10 handler E298. | ||
| E2CB | LD A,($A00A) | Read the character attribute. | ||
| E2CE | LD B,A | Keep it as the count. | ||
| E2CF | LD A,($A034) | Read the room display parameter. | ||
| E2D2 | INC A | Count one more. | ||
| E2D3 | LD ($E2C6),A | Store that count in the script byte at E2C6. | ||
| E2D6 | DEC A | Count down one. | ||
| E2D7 | CALL StoreMatchedCharacterRoom | Call StoreMatchedCharacterRoom to match the character and store its room. | ||
| E2DA | LD A,($A036) | Read the character being processed. | ||
| E2DD | LD B,A | Keep it as the count. | ||
| E2DE | LD A,($A034) | Read the room display parameter. | ||
| E2E1 | LD C,A | Keep that parameter. | ||
| E2E2 | LD DE,$F2B6 | Take the workspace at F2B6. | ||
| E2E5 | LD A,($E2C6) | Read the script byte at E2C6. | ||
| E2E8 | CALL RecordResultRoomDisplay | Call RecordResultRoomDisplay to record the room display. | ||
| E2EB | OR %00000001 | Reset the zero flag. | ||
| E2ED | RET | Return. | ||
| Prev: E22A | Up: Map | Next: E2EE |