Prev: 8118 Up: Map Next: 81FC
8138: Routine at 8138
Used by the routine at _87c9.
8138 PUSH IX
813A LD A,(Hero_LastDir)
813D CP $02
813F JP Z,$819F
8142 LD HL,(Position_EW)
8145 LD A,(Stage_Compass)
8148 AND $01
814A JR Z,$814F
814C LD HL,(Position_NS)
814F PUSH HL
8150 BIT 0,L
8152 LD HL,$5E89
8155 LD IX,$80F8
8159 CALL Z,_a345
815C LD HL,(Stage_Compass)
815F LD H,$00
8161 ADD HL,HL
8162 LD BC,$8108
8165 ADD HL,BC
8166 CALL Vector_Jump
8169 LD C,$02
816B LD HL,$6907
816E LD B,$AA
8170 RLD
8172 DEC HL
8173 RLD
8175 DEC HL
8176 RLD
8178 DEC HL
8179 RLD
817B DEC HL
817C RLD
817E DEC HL
817F RLD
8181 DEC HL
8182 RLD
8184 DEC HL
8185 RLD
8187 DEC HL
8188 DJNZ $8170
818A DEC C
818B JR NZ,$816E
818D POP HL
818E POP IX
8190 BIT 0,L
8192 RET Z
8193 LD HL,$5E25
8196 LD DE,attr_offscreen
8199 LD BC,$0043
819C LDIR
819E RET
819F LD HL,(Position_EW)
81A2 LD A,(Stage_Compass)
81A5 AND $01
81A7 JR Z,$81AC
81A9 LD HL,(Position_NS)
81AC PUSH HL
81AD BIT 0,L
81AF LD HL,$5E68
81B2 LD IX,$80E8
81B6 CALL Z,_a345
81B9 LD HL,(Stage_Compass)
81BC LD H,$00
81BE ADD HL,HL
81BF LD BC,$8110
81C2 ADD HL,BC
81C3 CALL Vector_Jump
81C6 LD C,$02
81C8 LD HL,$5E68
81CB LD B,$AA
81CD RRD
81CF INC HL
81D0 RRD
81D2 INC HL
81D3 RRD
81D5 INC HL
81D6 RRD
81D8 INC HL
81D9 RRD
81DB INC HL
81DC RRD
81DE INC HL
81DF RRD
81E1 INC HL
81E2 RRD
81E4 INC HL
81E5 DJNZ $81CD
81E7 DEC C
81E8 JR NZ,$81CB
81EA POP HL
81EB POP IX
81ED BIT 0,L
81EF RET NZ
81F0 LD HL,$5E66
81F3 LD DE,$5E67
81F6 LD BC,$0043
81F9 LDDR
81FB RET
Prev: 8118 Up: Map Next: 81FC