![]() |
Routines |
| Prev: 9A80 | Up: Map | Next: 9B25 |
|
Used by the routine at ActionPrintOpeningText.
Accepts the picture when the character attribute is 67 and the room display parameter is 32 or when the character attribute is 32 and the room display parameter is 67 or 12.
|
||||
| ReadRoomDisplayParameter | 9AA3 | LD A,($A00A) | Jump ahead to ReadRoomDisplayParameter_TestRoomByte if the current character attribute is not 67. | |
| 9AA6 | CP $67 | |||
| 9AA8 | JR NZ,ReadRoomDisplayParameter_TestRoomByte | |||
| 9AAA | LD A,($A034) | Jump to ReadRoomDisplayParameter_TestActionSucceeded if the room display parameter is 32. | ||
| 9AAD | CP $32 | |||
| 9AAF | LD L,$70 | |||
| 9AB1 | JR Z,ReadRoomDisplayParameter_TestActionSucceeded | |||
| ReadRoomDisplayParameter_Loop | 9AB3 | XOR A | Clear A. | |
| 9AB4 | RET | Return. | ||
|
The character attribute is 32. Accept the picture when the room display parameter is 67 or 12.
|
||||
| ReadRoomDisplayParameter_TestRoomByte | 9AB5 | CP $32 | Jump to ReadRoomDisplayParameter_Loop if the character attribute is not 32. | |
| 9AB7 | JR NZ,ReadRoomDisplayParameter_Loop | |||
| 9AB9 | LD A,($A034) | Jump to ReadRoomDisplayParameter_TestActionSucceeded if the room display parameter is 67. | ||
| 9ABC | CP $67 | |||
| 9ABE | LD L,$72 | |||
| 9AC0 | JR Z,ReadRoomDisplayParameter_TestActionSucceeded | |||
| 9AC2 | CP $12 | Jump back to ReadRoomDisplayParameter_Loop while the room display parameter is not 12. | ||
| 9AC4 | JR NZ,ReadRoomDisplayParameter_Loop | |||
| 9AC6 | LD L,$5E | The token is 5E. | ||
| ReadRoomDisplayParameter_TestActionSucceeded | 9AC8 | OR %00000001 | Reset the zero flag. | |
| 9ACA | RET | Return. | ||
|
Script action: adjust attribute match.
|
||||
| 9ACB | DEFB $04,$00 | Display record read by ProcessDisplayRecord: flags 04 value 00. | ||
| ReadRoomDisplayParameter_AdjustMatch | 9ACD | CALL ReadRoomDisplayParameter | Return zero through ParseInputNumber_ReturnZero if ReadRoomDisplayParameter finds no display parameter. | |
| 9AD0 | JP Z,ParseInputNumber_ReturnZero | |||
| 9AD3 | LD A,L | Take the low byte of the pointer, drop 14 from the attribute pair result and store that in the low byte. | ||
| 9AD4 | SUB $14 | |||
| 9AD6 | LD L,A | |||
|
This entry point is used by the routine at ActionPrintOpeningText.
Leave 6D as the result, then record the result in the character just matched, then leave 69 as the result.
|
||||
| ReadRoomDisplayParameter_0 | 9AD7 | LD A,$6D | Police Cab. | |
| 9AD9 | LD ($E2C6),A | Store it in the character just matched. | ||
| 9ADC | LD A,$69 | Jump ahead to ReadRoomDisplayParameter_1 to walk and place character. | ||
| 9ADE | JP ReadRoomDisplayParameter_1 | |||
|
Walks a character by six or two places and stores the result.
|
||||
| 9AE1 | DEFB $04,$00 | Display record read by ProcessDisplayRecord: flags 04 value 00. | ||
| ReadRoomDisplayParameter_PlaceCharacter | 9AE3 | CALL PlaceCharacterBesideMatch | Call PlaceCharacterBesideMatch to place the character beside the match. | |
| 9AE6 | LD DE,$0006 | Call MeasureCharacterDistance to measure character distance. | ||
| 9AE9 | CALL MeasureCharacterDistance | |||
| 9AEC | LD A,(IX+$02) | Subtract 02 from the location and jump to ReadRoomDisplayParameter_Next to store the script cycle. | ||
| 9AEF | SUB $02 | |||
| 9AF1 | LD L,A | |||
| 9AF2 | JR ReadRoomDisplayParameter_Next | |||
| 9AF4 | DEFB $04,$00 | Display record read by ProcessDisplayRecord: flags 04 value 00. | ||
| 9AF6 | CALL PlaceCharacterBesideMatch | Call PlaceCharacterBesideMatch to place the character beside the match. | ||
| 9AF9 | LD DE,$0002 | Call MeasureCharacterDistance to measure character distance. | ||
| 9AFC | CALL MeasureCharacterDistance | |||
| 9AFF | LD L,(IX+$02) | Read the location. | ||
| ReadRoomDisplayParameter_Next | 9B02 | LD A,$01 | Take 01. | |
|
Clear the high byte of the pointer, then record the pointer in the script cycle counter, then read the character just matched.
|
||||
| ReadRoomDisplayParameter_1 | 9B04 | PUSH AF | Save 01 and store the location in the script cycle counter. | |
| 9B05 | LD H,$00 | |||
| 9B07 | LD ($A01F),HL | |||
| 9B0A | LD A,($E2C6) | Read the character just matched and call ClearObjectHeldMark to clear object attribute bit 7. | ||
| 9B0D | CALL ClearObjectHeldMark | |||
| 9B10 | POP BC | |||
| 9B11 | PUSH BC | Read the character just matched and call StoreMatchedCharacterRoom to compare current character. | ||
| 9B12 | LD A,($E2C6) | |||
| 9B15 | CALL StoreMatchedCharacterRoom | |||
| 9B18 | POP AF | |||
|
Fetch location data pointer.
|
||||
| 9B19 | CALL FetchLocationDataPointer | Call FetchLocationDataPointer to look this room up. | ||
| 9B1C | RES 6,(IX+$00) | Clear bit 6 of the room, point HL at the command at F3AD and set the carry. | ||
| 9B20 | LD HL,$F3AD | |||
| 9B23 | SCF | |||
| 9B24 | RET | Return. | ||
| Prev: 9A80 | Up: Map | Next: 9B25 |