![]() |
Routines |
| Prev: 46333 | Up: Map | Next: 46409 |
|
Used by the routine at CheckFlagAndSetDisplay_ProcessPointer.
Returns when the display flag at 40988 is zero. Otherwise walks the character's objects and returns non-zero when one matches the room display parameter.
|
||||
| CheckFlagAndSetDisplay_CheckObjects | 46359 | LD A,(40988) | Return if the display flag (40988) is zero. | |
| 46362 | AND A | |||
| 46363 | RET Z | |||
| 46364 | PUSH IY | Keep the character record. | ||
| 46366 | PUSH DE | |||
| 46367 | PUSH IX | |||
| CheckFlagAndSetDisplay_ObjectLoop | 46369 | CALL FollowCharacterLink | Call FollowCharacterLink to follow the character link. | |
| 46372 | BIT 6,(IY+1) | See whether bit 6 of the schedule entry is clear. | ||
| 46376 | JR Z,CheckFlagAndSetDisplay_RestoreAndReturn | Jump ahead to CheckFlagAndSetDisplay_RestoreAndReturn if bit 6 of the schedule entry is clear. | ||
| 46378 | CALL AdjustObjectTableForSum | Call AdjustObjectTableForSum to adjust the object table for this room. | ||
| CheckFlagAndSetDisplay_ProcessObject | 46381 | PUSH IY | Point HL at byte 8 of the record (IY+8). | |
| 46383 | POP HL | |||
| 46384 | LD DE,8 | |||
| 46387 | ADD HL,DE | |||
| 46388 | CALL ProcessObjectEntry | Call ProcessObjectEntry to check the next object. | ||
| 46391 | CP 255 | Jump back to CheckFlagAndSetDisplay_ObjectLoop if the entry is the end marker. | ||
| 46393 | JR Z,CheckFlagAndSetDisplay_ObjectLoop | |||
| 46395 | LD HL,41012 | Jump back to CheckFlagAndSetDisplay_ProcessObject while the object is not in the room on screen. | ||
| 46398 | CP (HL) | |||
| 46399 | JR NZ,CheckFlagAndSetDisplay_ProcessObject | |||
| 46401 | OR 1 | Clear the zero flag to report that an object in the room on screen was found. | ||
| CheckFlagAndSetDisplay_RestoreAndReturn | 46403 | POP IX | Restore the saved character record, the saved source and the saved schedule entry from the stack. | |
| 46405 | POP DE | |||
| 46406 | POP IY | |||
| 46408 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 46333 | Up: Map | Next: 46409 |