![]() |
Routines |
| Prev: 57857 | Up: Map | Next: 57898 |
|
Used by the routine at DispatchRoomGraphics.
Finds the response for the id in A in the table at Table_ResponsesById.
|
||||
| FindResponseForThisId | 57863 | LD IX,57898 | Point at the response table at Table_ResponsesById. | |
| FindResponseForThisId_Match | 57867 | CP (IX+0) | Jump back to DispatchRoomGraphics_0 if this id matches the entry's id. | |
| 57870 | JR Z,DispatchRoomGraphics_0 | |||
| 57872 | PUSH AF | Jump to DispatchRoomGraphics_ActionSucceeded if this is the catch-all entry (254). | ||
| 57873 | LD A,(IX+0) | |||
| 57876 | CP 254 | |||
| 57878 | JR Z,DispatchRoomGraphics_ActionSucceeded | |||
| 57880 | INC A | Jump to FindResponseForThisId_Ended if the table has ended (255). | ||
| 57881 | JR Z,FindResponseForThisId_Ended | |||
| 57883 | INC IX | Step to the first group and call SearchThreeByteTable to find the 255 that ends it. | ||
| 57885 | LD A,255 | |||
| 57887 | CALL SearchThreeByteTable | |||
| 57890 | INC IX | Step past the terminator and test the next entry. | ||
| 57892 | POP AF | |||
| 57893 | JR FindResponseForThisId_Match | |||
| FindResponseForThisId_Ended | 57895 | POP AF | Drop the saved id and clear A. | |
| 57896 | XOR A | |||
| 57897 | RET | Return. | ||
| Prev: 57857 | Up: Map | Next: 57898 |