![]() |
Routines |
| Prev: C737 | Up: Map | Next: C76C |
|
The handler for the near side of an arch (objects 02 and 04). As an arch does not move, its speeds are used to keep the position of the middle of the doorway: the middle is 0D further along the y axis than the arch, or 0D further back along the x axis if the sprite is flipped. The player, and any special object, is flagged if near the arch, and is nudged towards the middle of the doorway.
|
||||||||
|
Unflipped: doorway 0D along y.
|
||||||||
| HandleNearArch | C73C | BIT 6,(IX+$07) | Jump to HandleFlippedNearArch if the arch is flipped horizontally. | |||||
| C740 | JR NZ,HandleFlippedNearArch | |||||||
| C742 | LD A,(IX+$00) | Fetch the graphic number of the arch. | ||||||
| C745 | CP $04 | Jump to AdjustTreeArch if it is a tree arch. | ||||||
| C747 | JR Z,AdjustTreeArch | |||||||
| C749 | LD HL,$FDF9 | Set HL to FDF9. | ||||||
|
This entry point is used by the routine at AdjustTreeArch.
The doorway is thirteen units further along the Y axis than the arch.
|
||||||||
| HandleNearArch_Position | C74C | CALL StorePixelAdjustments | Call StorePixelAdjustments. | |||||
| C74F | LD A,(IX+$02) | Fetch the y position of the arch. | ||||||
| C752 | ADD A,$0D | Add 0D. | ||||||
| C754 | LD (IX+$0A),A | Keep it as the Y coordinate of the middle of the doorway. | ||||||
| C757 | LD A,(IX+$01) | Fetch the x position of the arch. | ||||||
| C75A | LD (IX+$09),A | Keep it as the X coordinate of the middle of the doorway. | ||||||
| C75D | LD HL,$060F | Set HL to 060F. | ||||||
|
This entry point is used by the routine at HandleFlippedNearArch.
Keep z and flag or nudge the player.
|
||||||||
| HandleNearArch_Near | C760 | LD A,(IX+$03) | Fetch the z position of the arch. | |||||
| C763 | LD (IX+$0B),A | Keep it as the Z coordinate of the middle of the doorway. | ||||||
| C766 | CALL FlagObjectsNearArch | Flag the objects that are near the arch. | ||||||
| C769 | JP NudgeObjectsToArch | Jump to NudgeObjectsToArch. | ||||||
| Prev: C737 | Up: Map | Next: C76C |