![]() |
Routines |
| Prev: 58817 | Up: Map | Next: 58905 |
|
Looks up the character id at Table_Timetable and compares that object's attribute with the current character record. A non-zero return means the script step succeeded.
|
||||
|
Run by 51812 after the display record at 58817, from the show-message command at 59265.
|
||||
| LookUpCurrentObject | 58819 | LD A,(39008) | Take the character id at Table_Timetable and call FetchObjectDataPointer to look that object up. | |
| 58822 | CALL FetchObjectDataPointer | |||
| 58825 | LD A,(IX+15) | Read byte 15 of this record and point IX at the character record at CurrentCharacterData. | ||
| 58828 | LD IX,(40983) | |||
| 58832 | CP (IX+15) | Compare it with the character record, take the character being processed, and jump to LookUpCurrentObject_ZeroThrough. | ||
| 58835 | LD A,(41014) | |||
| 58838 | JR LookUpCurrentObject_ZeroThrough | |||
| 58840 | DEFB 71,7,223,229 | Display record read by ProcessDisplayRecord: flags 71 value 7 handler 58847. | ||
| 58844 | OR %00000001 | Reset the zero flag. | ||
| 58846 | RET | Return. | ||
| 58847 | LD IX,(40979) | Point IX at the current object and read byte 15. | ||
| 58851 | LD A,(IX+15) | |||
| 58854 | LD IX,(40981) | Read the secondary pointer. | ||
| 58858 | CP (IX+15) | Compare A with byte 15 of the record at 40981 and read the room graphics parameter. | ||
| 58861 | LD A,(41013) | |||
| LookUpCurrentObject_ZeroThrough | 58864 | JP NZ,ParseInputNumber_ReturnZero | Return zero through ParseInputNumber_ReturnZero when that comparison did not match. | |
| 58867 | LD HL,41012 | Go to ParseInputNumber_ReturnZero if A matches the room display parameter at RoomDisplayParameter. | ||
| 58870 | CP (HL) | |||
| 58871 | JP Z,ParseInputNumber_ReturnZero | |||
| 58874 | OR %00000001 | Reset the zero flag. | ||
| 58876 | RET | Return. | ||
| 58877 | DEFB 71,0,4,230 | Display record read by ProcessDisplayRecord: flags 71 value 0 handler 58884. | ||
| 58881 | OR %00000001 | Reset the zero flag. | ||
| 58883 | RET | Return. | ||
|
Reached through the display record at 58877, dispatched by DispatchLookedUpHandlerThird.
|
||||
| 58884 | LD A,(41014) | Read the character being processed. | ||
| 58887 | CALL GetObjectLocation | Call GetObjectLocation to get that character's location. | ||
| 58890 | EX AF,AF' | Keep the location. | ||
| 58891 | LD B,A | |||
| 58892 | LD A,(41012) | Read the room display parameter. | ||
| 58895 | CALL GetObjectLocation | Call GetObjectLocation to get the object's location. | ||
| 58898 | EX AF,AF' | Compare the two locations. | ||
| 58899 | CP B | |||
| 58900 | LD A,(41014) | Read the character again and jump back to LookUpCurrentObject_ZeroThrough. | ||
| 58903 | JR LookUpCurrentObject_ZeroThrough | |||
| Prev: 58817 | Up: Map | Next: 58905 |