9EFA: Draw a junction or corner
Bg_DrawJunction |
9EFA |
LD ($5BE0),HL |
|
9EFD |
LD L,(IX+$02) |
|
9F00 |
CALL Bitmap_GetData |
|
9F03 |
LD HL,($5BE0) |
|
9F06 |
LD A,(Bmp_DataBufferHeight) |
|
9F09 |
AND $7F |
|
9F0B |
RLA |
|
9F0C |
RLA |
|
9F0D |
RLA |
|
9F0E |
LD E,A |
|
9F0F |
LD D,$00 |
|
9F11 |
ADD HL,DE |
|
9F12 |
EX DE,HL |
|
9F13 |
LD HL,$0050 |
|
9F16 |
AND A |
|
9F17 |
SBC HL,DE |
|
9F19 |
RET C |
|
9F1A |
ADD HL,HL |
|
9F1B |
LD E,L |
|
9F1C |
LD D,H |
|
9F1D |
ADD HL,HL |
|
9F1E |
ADD HL,HL |
|
9F1F |
ADD HL,HL |
|
9F20 |
ADD HL,HL |
|
9F21 |
ADD HL,DE |
|
9F22 |
LD DE,($A339) |
|
9F26 |
ADD HL,DE |
|
9F27 |
LD ($A33B),HL |
|
9F2A |
LD E,(IX+$00) |
|
9F2D |
LD D,(IX+$01) |
|
9F30 |
LD HL,(Position_EW) |
|
9F33 |
LD A,(Stage_Compass) |
|
9F36 |
BIT 0,A |
|
9F38 |
JR Z,Bg_DrawJunction_0 |
|
9F3A |
LD HL,(Position_NS) |
Bg_DrawJunction_0 |
9F3D |
CALL abs_hl_de |
|
9F40 |
EX DE,HL |
|
9F41 |
LD A,(Bmp_DataBufferWidth) |
|
9F44 |
AND $7F |
|
9F46 |
LD L,A |
|
9F47 |
LD H,$00 |
|
9F49 |
LD A,(Hero_LastDir) |
|
9F4C |
CP $02 |
|
9F4E |
JR Z,Bg_DrawJunction_1 |
|
9F50 |
EX DE,HL |
|
9F51 |
AND A |
|
9F52 |
SBC HL,DE |
|
9F54 |
EX DE,HL |
|
9F55 |
LD HL,$0020 |
|
9F58 |
SBC HL,DE |
|
9F5A |
JR Bg_DrawJunction_2 |
Bg_DrawJunction_1 |
9F5C |
ADD HL,DE |
|
9F5D |
LD DE,$0022 |
|
9F60 |
AND A |
|
9F61 |
SBC HL,DE |
Bg_DrawJunction_2 |
9F63 |
SRL H |
|
9F65 |
RR L |
|
9F67 |
EX DE,HL |