Prev: D37F Up: Map Next: D395
D38C: Stand the player on the floor of the arch
Used by the routines at enter_arch_s, enter_arch_n, enter_arch_w and enter_arch_e.
The code expects a room's arches to be its first background objects, each two records (the two pillars, types 2 to 5), so the first pillars are records 4, 6, 8 and 10. The side an arch is on is recognised by the X+Y of its first pillar -- $51 north, $37 east, $C8 south, $AE west, from the arch data at arch_n on. The player takes that pillar's Z, which is what puts him at the right height in a raised arch; the head goes 12 above.
The search stops at the first record that is not an arch pillar; if no arch matches, Z is left alone.
Input
C X+Y of the arch wanted
IX object 0, the player's legs
adjust_plyr_Z_for_arch D38C LD IY,$5C88 IY = record 4; step two records; four arches at most
D390 LD DE,$0040
D393 LD B,$04
Prev: D37F Up: Map Next: D395