7DD5: Main routine, menu and game loop.
Main_routine |
7DD5 |
EI |
|
7DD6 |
JR Main_routine_1 |
Main_routine_0 |
7DD8 |
CALL Panel_CopyToOffscreen |
Main_routine_1 |
7DDB |
CALL Game_MainMenu |
|
7DDE |
CALL Panel_CopyToScreen |
|
7DE1 |
CALL Area_Init |
|
7DE4 |
XOR A |
|
7DE5 |
LD (_bd9c),A |
|
7DE8 |
LD HL,$0000 |
|
7DEB |
LD ($6928),HL |
|
7DEE |
LD (_7e90),HL |
|
7DF1 |
LD ($5C78),HL |
|
7DF4 |
CALL Game_Init |
|
7DF7 |
LD A,(IY+$3E) |
|
7DFA |
LD ($BD20),A |
Main_routine_2 |
7DFD |
LD A,(IY+$3E) |
|
7E00 |
LD HL,($BD20) |
|
7E03 |
SUB L |
|
7E04 |
CP $04 |
|
7E06 |
JR C,Main_routine_2 |
|
7E08 |
LD A,(IY+$3E) |
|
7E0B |
LD ($BD20),A |
|
7E0E |
CALL Screen_Update |
|
7E11 |
CALL _b0ea |
|
7E14 |
CALL _87c9 |
|
7E17 |
CALL Print_TerminalMessage |
|
7E1A |
LD A,(Stat_ResetGame) |
|
7E1D |
CP $FF |
|
7E1F |
JR NZ,Main_routine_3 |
|
7E21 |
XOR A |
|
7E22 |
LD (Hero_ThroughDoor),A |
|
7E25 |
LD (Stage_Compass),A |
|
7E28 |
LD HL,$03EC |
|
7E2B |
LD (Position_NS),HL |
|
7E2E |
LD HL,$04C8 |
|
7E31 |
LD (Position_EW),HL |
|
7E34 |
LD A,$63 |
|
7E36 |
LD (Level_Char),A |
|
7E39 |
LD A,$03 |
|
7E3B |
LD (Area_Type),A |
|
7E3E |
JR Main_routine_0 |
Main_routine_3 |
7E40 |
LD A,(Hero_ThroughDoor) |
|
7E43 |
AND A |
|
7E44 |
JR NZ,Main_routine_4 |
|
7E46 |
LD A,($BD2C) |
|
7E49 |
INC A |
|
7E4A |
JR NZ,Main_routine_4 |
|
7E4C |
LD A,(Stat_ResetGame) |
|
7E4F |
AND A |
|
7E50 |
JR NZ,Main_routine_2 |
|
7E52 |
LD BC,$EFFE |
|
7E55 |
IN A,(C) |
|
7E57 |
BIT 4,A |
|
7E59 |
JP Z,Main_routine_0 |
Main_routine_4 |
7E5C |
LD BC,$F7FE |
|
7E5F |
IN A,(C) |
|
7E61 |
BIT 4,A |
|
7E63 |
JR NZ,Main_routine_8 |
|
7E65 |
DI |
Main_routine_5 |
7E66 |
IN A,(C) |
|
7E68 |
BIT 4,A |
|
7E6A |
JR Z,Main_routine_5 |
Main_routine_6 |
7E6C |
IN A,(C) |
|
7E6E |
BIT 4,A |
|
7E70 |
JR NZ,Main_routine_6 |
Main_routine_7 |
7E72 |
IN A,(C) |
|
7E74 |
BIT 4,A |
|
7E76 |
JR Z,Main_routine_7 |
|
7E78 |
EI |
Main_routine_8 |
7E79 |
BIT 3,A |
|
7E7B |
JR NZ,Main_routine_10 |
|
7E7D |
LD A,(Flag_Demo) |
|
7E80 |
XOR $01 |
|
7E82 |
LD (Flag_Demo),A |
|
7E85 |
DI |
Main_routine_9 |
7E86 |
IN A,(C) |
|
7E88 |
BIT 3,A |
|
7E8A |
JR Z,Main_routine_9 |
|
7E8C |
EI |
Main_routine_10 |
7E8D |
JP Main_routine_2 |