Prev: 8AC9 Up: Map Next: 8E72
8BB6: Routine at 8BB6
Used by the routine at _87c9.
8BB6 LD HL,Hero_ThroughDoor
8BB9 BIT 4,(HL)
8BBB JP NZ,$8DE2
8BBE BIT 2,(HL)
8BC0 JP NZ,$8BF9
8BC3 BIT 1,(HL)
8BC5 JP Z,_87c9_27
8BC8 XOR A
8BC9 JP $AFFD
8BCC SBC A,D
8BCD POP BC
8BCE LD E,(HL)
8BCF CP (HL)
8BD0 RET
8BD1 RET NZ
8BD2 AND C
8BD3 POP BC
8BD4 LD H,A
8BD5 CP (HL)
8BD6 OUT ($C0),A
8BD8 ADC A,H
8BD9 POP BC
8BDA LD H,E
8BDB CP (HL)
8BDC OUT ($C0),A
8BDE SUB E
8BDF POP BC
8BE0 LD L,D
8BE1 CP (HL)
8BE2 RET
8BE3 RET NZ
8BE4 RET NZ
8BE5 NOP
8BE6 LD A,D
8BE7 NOP
8BE8 LD A,D
8BE9 NOP
8BEA LD L,B
8BEB NOP
8BEC LD L,B
8BED NOP
8BEE LD A,D
8BEF NOP
8BF0 LD A,D
8BF1 NOP
8BF2 RET NZ
8BF3 NOP
8BF4 INC B
8BF5 EX AF,AF'
8BF6 LD BC,$0002
8BF9 XOR A
8BFA LD (Hero_ThroughDoor),A
8BFD LD HL,Mem_zeroes
8C00 LD DE,_bd90
8C03 LD BC,$000A
8C06 LDIR
8C08 LD IX,($BD87)
8C0C LD A,(IX+$01)
8C0F RRA
8C10 RRA
8C11 RRA
8C12 RRA
8C13 AND $0F
8C15 LD ($8BF8),A
8C18 JP NZ,$8C46
8C1B LD IX,(_bd8b)
8C1F LD HL,(_bd8b)
8C22 LD DE,$0003
8C25 ADD HL,DE
8C26 LD DE,Position_NS
8C29 LD BC,$0004
8C2C LDIR
8C2E LD A,(IX+$02)
8C31 CALL Area_CopyCurrent
8C34 LD A,(_bd75)
8C37 LD (Area_Colour),A
8C3A XOR A
8C3B LD (_bd55),A
8C3E LD A,$12
8C40 LD (Hero_ThroughN),A
8C43 JP _873a
8C46 CP $01
8C48 JR NZ,$8C72
8C4A CALL Stage_Colour
8C4D LD A,$11
8C4F LD (Hero_ThroughDoor),A
8C52 LD HL,$BD86
8C55 LD A,(IX+$02)
8C58 LD (HL),A
8C59 DEC HL
8C5A LD A,(Level_Char)
8C5D LD (HL),A
8C5E DEC HL
8C5F LD (HL),$00
8C61 DEC HL
8C62 CP (IX+$02)
8C65 RLA
8C66 AND $01
8C68 LD (HL),A
8C69 JP Z,$AFFA
8C6C INC HL
8C6D LD (HL),$16
8C6F JP $AFFA
8C72 LD IX,$8BCC
8C76 LD DE,$0006
8C79 LD B,$04
8C7B LD L,(IX+$04)
8C7E LD H,(IX+$05)
8C81 LD (HL),$08
8C83 ADD IX,DE
8C85 DJNZ $8C7B
8C87 LD IX,($BD87)
8C8B LD HL,(Stage_Compass)
8C8E LD H,$00
8C90 LD DE,$8BF4
8C93 ADD HL,DE
8C94 LD C,(HL)
8C95 LD A,(IX+$01)
8C98 AND $0F
8C9A JR Z,$8C9D
8C9C LD C,A
8C9D LD HL,$8BCC
8CA0 LD IX,($BD89)
8CA4 LD B,$00
8CA6 RRC C
8CA8 LD ($C588),BC
8CAC JR C,$8CB5
8CAE LD DE,$0006
8CB1 ADD HL,DE
8CB2 JP $8D5C
8CB5 LD A,(IX+$00)
8CB8 AND $0F
8CBA JR NZ,$8CD0
8CBC LD E,(HL)
8CBD INC HL
8CBE LD D,(HL)
8CBF DEC HL
8CC0 PUSH HL
8CC1 PUSH IX
8CC3 POP HL
8CC4 LD BC,$0007
8CC7 LDIR
8CC9 POP HL
8CCA XOR A
8CCB LD BC,$0007
8CCE JR $8D35
8CD0 CP $01
8CD2 JR NZ,$8CDC
8CD4 LD BC,$0003
8CD7 LD A,(IX+$02)
8CDA JR $8D35
8CDC LD E,(HL)
8CDD INC HL
8CDE LD D,(HL)
8CDF DEC HL
8CE0 PUSH HL
8CE1 LD A,(IX+$00)
8CE4 AND $F0
8CE6 LD B,(IX+$01)
8CE9 PUSH DE
8CEA EX (SP),IX
8CEC LD (IX+$00),A
8CEF LD (IX+$01),B
8CF2 LD A,(Area_Type)
8CF5 LD (IX+$02),A
8CF8 LD HL,(PathPtr)
8CFB LD E,(HL)
8CFC INC HL
8CFD LD D,(HL)
8CFE LD HL,$FFA8
8D01 LD A,(Stage_Compass)
8D04 AND A
8D05 JR Z,$8D0E
8D07 CP $03
8D09 JR Z,$8D0E
8D0B LD HL,$0058
8D0E LD BC,($C588)
8D12 CP B
8D13 JR NZ,$8D17
8D15 ADD HL,DE
8D16 EX DE,HL
8D17 LD HL,(_bd7e)
8D1A LD A,(Stage_Compass)
8D1D BIT 0,A
8D1F JR NZ,$8D22
8D21 EX DE,HL
8D22 LD (IX+$03),L
8D25 LD (IX+$04),H
8D28 LD (IX+$05),E
8D2B LD (IX+$06),D
8D2E POP IX
8D30 POP HL
8D31 LD BC,$0002
8D34 XOR A
8D35 LD E,(HL)
8D36 INC HL
8D37 LD D,(HL)
8D38 INC HL
8D39 EX DE,HL
8D3A RES 7,(HL)
8D3C BIT 6,(HL)
8D3E JR Z,$8D44
8D40 RES 6,(HL)
8D42 SET 7,(HL)
8D44 EX DE,HL
8D45 LD E,(HL)
8D46 INC HL
8D47 LD D,(HL)
8D48 INC HL
8D49 LD (DE),A
8D4A LD A,(IX+$00)
8D4D RRCA
8D4E RRCA
8D4F RRCA
8D50 RRCA
8D51 AND $03
8D53 ADD A,$92
8D55 LD E,(HL)
8D56 INC HL
8D57 LD D,(HL)
8D58 LD (DE),A
8D59 INC HL
8D5A ADD IX,BC
8D5C LD BC,($C588)
8D60 INC B
8D61 LD A,B
8D62 CP $04
8D64 JP NZ,$8CA6
8D67 LD IX,($BD87)
8D6B LD A,($BD81)
8D6E LD (_bd55),A
8D71 LD ($BD56),IX
8D75 LD DE,$8BE4
8D78 LD HL,(Stage_Compass)
8D7B LD H,$00
8D7D ADD HL,HL
8D7E ADD HL,HL
8D7F ADD HL,DE
8D80 LD DE,Position_NS
8D83 LD BC,$0004
8D86 LDIR
8D88 LD A,(Stage_Compass)
8D8B AND $01
8D8D LD HL,$8BF8
8D90 ADD A,(HL)
8D91 ADD A,$09
8D93 CALL Area_CopyCurrent
8D96 LD HL,($BD8D)
8D99 LD DE,$BE2D
8D9C LD A,(HL)
8D9D RLCA
8D9E RLCA
8D9F RLCA
8DA0 OR $01
8DA2 AND $07
8DA4 LD C,A
8DA5 LD B,$00
8DA7 LDIR
8DA9 LD DE,$BE34
8DAC LD C,$07
8DAE LDIR
8DB0 LD DE,$0007
8DB3 LD HL,$0159
8DB6 CALL $03B5
8DB9 LD IX,($BD87)
8DBD LD A,(IX+$02)
8DC0 LD (Area_Colour),A
8DC3 LD HL,(Handle_Lockers)
8DC6 INC HL
8DC7 INC HL
8DC8 INC HL
8DC9 LD A,(IX+$03)
8DCC AND $7F
8DCE LD (HL),A
8DCF LD IX,(PathPtr)
8DD3 LD A,(IX+$08)
8DD6 LD ($BE43),A
8DD9 LD ($BE4D),A
8DDC LD ($BE59),A
8DDF JP _873a
8DE2 BIT 5,(HL)
8DE4 JR NZ,$8E4E
8DE6 INC HL
8DE7 LD A,(HL)
8DE8 AND A
8DE9 JR Z,$8E3A
8DEB INC HL
8DEC DEC (HL)
8DED LD A,(HL)
8DEE CP $0A
8DF0 JR NZ,$8E1F
8DF2 INC HL
8DF3 INC (HL)
8DF4 XOR A
8DF5 LD ($BD65),A
8DF8 LD A,(HL)
8DF9 LD (Level_Char),A
8DFC SUB $60
8DFE CALL Area_CopyCurrent
8E01 LD A,(_bd75)
8E04 LD (Area_Colour),A
8E07 LD HL,(_bd7e)
8E0A LD A,(Stage_Compass)
8E0D BIT 0,A
8E0F JR Z,$8E16
8E11 LD (Position_NS),HL
8E14 JR $8E19
8E16 LD (Position_EW),HL
8E19 CALL _873a
8E1C JP $AFFA
8E1F AND A
8E20 JP NZ,$AFFA
8E23 LD (HL),$16
8E25 INC HL
8E26 LD A,(HL)
8E27 INC HL
8E28 CP (HL)
8E29 JP NZ,$AFFA
8E2C LD HL,Hero_ThroughDoor
8E2F LD (HL),$31
8E31 INC HL
8E32 LD (HL),$08
8E34 CALL _8f6e
8E37 JP $AFFA
8E3A INC HL
8E3B INC (HL)
8E3C LD A,(HL)
8E3D CP $0C
8E3F JR NZ,$8E45
8E41 INC HL
8E42 DEC (HL)
8E43 JR $8DF4
8E45 CP $16
8E47 JP NZ,$AFFA
8E4A LD (HL),$00
8E4C JR $8E25
8E4E BIT 2,(HL)
8E50 JR NZ,$8E67
8E52 INC HL
8E53 DEC (HL)
8E54 JP NZ,$AFFA
8E57 LD A,(Stage_Compass)
8E5A XOR $02
8E5C LD (Hero_ThroughCompass),A
8E5F LD A,$13
8E61 LD (Hero_ThroughN),A
8E64 JP $AFFD
8E67 XOR A
8E68 LD (HL),A
8E69 LD ($BD65),A
8E6C CALL Bg_DrawColumn
8E6F JP $AFFA
Prev: 8AC9 Up: Map Next: 8E72