![]() |
Routines |
| Prev: 9AA3 | Up: Map | Next: 9B50 |
|
Used by the routine at ReadRoomDisplayParameter.
Counts steps of five and records the room graphics parameter.
|
||||
| MeasureCharacterDistance | 9B25 | LD A,(IX+$02) | Read the location. | |
| 9B28 | PUSH IX | |||
| 9B2A | LD HL,$0000 | |||
| MeasureCharacterDistance_Loop | 9B2D | ADD HL,DE | Jump back to MeasureCharacterDistance_Loop while at least 05 is still left. | |
| 9B2E | SUB $05 | |||
| 9B30 | JR NC,MeasureCharacterDistance_Loop | |||
| 9B32 | EX DE,HL | Call ScanObjects to scan objects. | ||
| 9B33 | LD A,($A036) | |||
| 9B36 | CALL ScanObjects | |||
| 9B39 | JR Z,MeasureCharacterDistance_Next | Go to MeasureCharacterDistance_Next if the object was not found. | ||
| 9B3B | CALL ReadTextPointerLowByte | Call ReadTextPointerLowByte to read the text pointer. | ||
| 9B3E | AND A | Subtract DE from the text pointer, then call StoreShiftedTextPointer to store the shifted text pointer. | ||
| 9B3F | SBC HL,DE | |||
| 9B41 | CALL StoreShiftedTextPointer | |||
|
Find character script entry.
|
||||
| MeasureCharacterDistance_Next | 9B44 | CALL FindCharacterScriptEntry | Call FindCharacterScriptEntry to find this character's script entry. | |
| 9B47 | LD A,(IX+$03) | Record the room graphics parameter. | ||
| 9B4A | LD ($A035),A | |||
| 9B4D | POP IX | |||
| 9B4F | RET | Return. | ||
| Prev: 9AA3 | Up: Map | Next: 9B50 |