![]() |
Routines |
| Prev: C76C | Up: Map | Next: C7A9 |
|
Used by the routine at HandleNearArch.
Nudges the player and the special objects towards the middle of a doorway, if they are close enough to the arch and are flagged to be adjusted. The way in which they are nudged is picked from the table at ArchDirectionTable, by the direction in which the arch faces.
|
||||||||
|
Nudge each nearby object towards the middle of the doorway.
|
||||||||
| NudgeObjectsToArch | C785 | LD HL,$0F0F | Set the distances that count as near to 0F in X and in Y. | |||||
| C788 | LD IY,$5C08 | Point IY at ObjectsTable. | ||||||
| C78C | LD DE,$0020 | Set DE to the size of an object. | ||||||
| C78F | LD B,$04 | Set the number of objects to 04, which is the player and the special objects. | ||||||
|
This entry point is used by the routine at NudgeObjectNorthSouth.
|
||||||||
| NudgeObjectsToArch_Next | C791 | LD A,(IY+$00) | Fetch the graphic number of the object. | |||||
| C794 | AND A | Test whether there is an object. | ||||||
| C795 | JR Z,NudgeObjectsToArch_Advance | Jump to NudgeObjectsToArch_Advance if there is not. | ||||||
| C797 | BIT 3,(IY+$07) | Jump to NudgeObjectsToArch_Advance if the object is not flagged to be adjusted near arches. | ||||||
| C79B | JR Z,NudgeObjectsToArch_Advance | |||||||
| C79D | CALL TestNearTo | Test whether the object is near the arch. | ||||||
| C7A0 | JR NC,NudgeObjectsToArch_Advance | Jump to NudgeObjectsToArch_Advance if it is not. | ||||||
| C7A2 | PUSH BC | Stash the number of objects left on the stack. | ||||||
| C7A3 | LD BC,$C7A9 | Point BC at ArchDirectionTable. | ||||||
| C7A6 | JP SetPlayerSpeed_Direction | Jump to the routine for the direction of the arch. | ||||||
| Prev: C76C | Up: Map | Next: C7A9 |