7CD4: Offscreen : Scroll the offscreen in the direction of the player.
BG_ScrollInDirection |
7CD4 |
PUSH IX |
|
7CD6 |
LD A,(Hero_LastDirection) |
|
7CD9 |
CP $02 |
|
7CDB |
JP Z,BG_ScrollInDirection_3 |
|
7CDE |
LD HL,(Coords_EW) |
|
7CE1 |
LD A,(Camera_Compass) |
|
7CE4 |
AND $01 |
|
7CE6 |
JR Z,BG_ScrollInDirection_0 |
|
7CE8 |
LD HL,(Coords_NS) |
BG_ScrollInDirection_0 |
7CEB |
PUSH HL |
|
7CEC |
BIT 0,L |
|
7CEE |
LD HL,$5E89 |
|
7CF1 |
LD IX,Table_PathOffsets_Right |
|
7CF5 |
CALL Z,Bg_DrawColumn |
|
7CF8 |
LD HL,(Camera_Compass) |
|
7CFB |
LD H,$00 |
|
7CFD |
ADD HL,HL |
|
7CFE |
LD BC,Coords_MoveVector |
|
7D01 |
ADD HL,BC |
|
7D02 |
CALL JP_HL |
|
7D05 |
LD A,L |
|
7D06 |
AND $1E |
|
7D08 |
CP $1E |
|
7D0A |
CALL Z,Area_Check |
|
7D0D |
LD C,$02 |
|
7D0F |
LD HL,$6907 |
BG_ScrollInDirection_1 |
7D12 |
LD B,$AA |
BG_ScrollInDirection_2 |
7D14 |
RLD |
|
7D16 |
DEC HL |
|
7D17 |
RLD |
|
7D19 |
DEC HL |
|
7D1A |
RLD |
|
7D1C |
DEC HL |
|
7D1D |
RLD |
|
7D1F |
DEC HL |
|
7D20 |
RLD |
|
7D22 |
DEC HL |
|
7D23 |
RLD |
|
7D25 |
DEC HL |
|
7D26 |
RLD |
|
7D28 |
DEC HL |
|
7D29 |
RLD |
|
7D2B |
DEC HL |
|
7D2C |
DJNZ BG_ScrollInDirection_2 |
|
7D2E |
DEC C |
|
7D2F |
JR NZ,BG_ScrollInDirection_1 |
|
7D31 |
POP HL |
|
7D32 |
POP IX |
|
7D34 |
BIT 0,L |
|
7D36 |
RET Z |
|
7D37 |
LD HL,Offscreen_Attr2 |
|
7D3A |
LD DE,Offscreen_Attr |
|
7D3D |
LD BC,$0043 |
|
7D40 |
LDIR |
|
7D42 |
RET |
BG_ScrollInDirection_3 |
7D43 |
LD HL,(Coords_EW) |
|
7D46 |
LD A,(Camera_Compass) |
|
7D49 |
AND $01 |
|
7D4B |
JR Z,BG_ScrollInDirection_4 |
|
7D4D |
LD HL,(Coords_NS) |
BG_ScrollInDirection_4 |
7D50 |
PUSH HL |
|
7D51 |
BIT 0,L |
|
7D53 |
LD HL,Offscreen_Bitmap |
|
7D56 |
LD IX,Table_PathOffsets_Left |
|
7D5A |
CALL Z,Bg_DrawColumn |
|
7D5D |
LD HL,(Camera_Compass) |
|
7D60 |
LD H,$00 |
|
7D62 |
ADD HL,HL |
|
7D63 |
LD BC,$7CAC |
|
7D66 |
ADD HL,BC |
|
7D67 |
CALL JP_HL |
|
7D6A |
LD A,L |
|
7D6B |
AND $1E |
|
7D6D |
CP $1E |
|
7D6F |
CALL Z,Area_Check |
|
7D72 |
LD C,$02 |
|
7D74 |
LD HL,Offscreen_Bitmap |
BG_ScrollInDirection_5 |
7D77 |
LD B,$AA |
BG_ScrollInDirection_6 |
7D79 |
RRD |
|
7D7B |
INC HL |
|
7D7C |
RRD |
|
7D7E |
INC HL |
|
7D7F |
RRD |
|
7D81 |
INC HL |
|
7D82 |
RRD |
|
7D84 |
INC HL |
|
7D85 |
RRD |
|
7D87 |
INC HL |
|
7D88 |
RRD |
|
7D8A |
INC HL |
|
7D8B |
RRD |
|
7D8D |
INC HL |
|
7D8E |
RRD |
|
7D90 |
INC HL |
|
7D91 |
DJNZ BG_ScrollInDirection_6 |
|
7D93 |
DEC C |
|
7D94 |
JR NZ,BG_ScrollInDirection_5 |
|
7D96 |
POP HL |
|
7D97 |
POP IX |
|
7D99 |
BIT 0,L |
|
7D9B |
RET NZ |
|
7D9C |
LD HL,$5E66 |
|
7D9F |
LD DE,$5E67 |
|
7DA2 |
LD BC,$0043 |
|
7DA5 |
LDDR |
|
7DA7 |
RET |