[Maintenance] [th01] Rename the resident debug flags

MODE_REGULAR is an awfully generic name for a global constant.

Part of P0162, funded by Ember2528.
This commit is contained in:
nmlgc 2021-10-14 22:09:23 +02:00
parent c4a0eb6aff
commit be29850887
4 changed files with 20 additions and 16 deletions

View File

@ -4,11 +4,11 @@ typedef enum {
ROUTE_COUNT,
} route_t;
typedef enum {
MODE_REGULAR = 0,
MODE_TEST = 1,
MODE_DEBUG = 3
} mode_t;
enum debug_mode_t {
DM_OFF = 0,
DM_TEST = 1,
DM_FULL = 3
};
// Much like subpixels, pellet speeds are stored pre-multiplied by 40 to allow
// an effective resolution of 0.025 pixels to be losslessly stored in an
@ -34,7 +34,7 @@ typedef struct {
char rem_lives;
char snd_need_init;
char unused_2;
char mode;
debug_mode_t debug_mode;
pellet_speed_t pellet_speed;
long rand;
long score;

View File

@ -29,6 +29,10 @@ REGS ends
SCENE_COUNT = 4
DM_OFF = 0
DM_TEST = 1
DM_FULL = 3
reiidenconfig_t struc ; (sizeof=0x4B)
id db 13 dup(?) ; = "ReiidenConfig"
db ?
@ -42,7 +46,7 @@ reiidenconfig_t struc ; (sizeof=0x4B)
rem_lives db ?
snd_need_init db ?
unused_2 db ?
mode db ? ; 0 = regular, 1 = test, 3 = debug
debug_mode db ?
bullet_speed dw ?
rand dd ?
score dd ?

View File

@ -172,7 +172,7 @@ sub_A7B5 proc far
cmp ax, 2
jnz short loc_A7FC
les bx, _resident
mov es:[bx+reiidenconfig_t.mode], 1
mov es:[bx+reiidenconfig_t.debug_mode], DM_TEST
jmp short loc_A820
; ---------------------------------------------------------------------------
@ -182,7 +182,7 @@ loc_A7FC:
cmp ax, 3
jnz short loc_A810
les bx, _resident
mov es:[bx+reiidenconfig_t.mode], 3
mov es:[bx+reiidenconfig_t.debug_mode], DM_FULL
jmp short loc_A820
; ---------------------------------------------------------------------------
@ -190,7 +190,7 @@ loc_A810:
cmp _mode, 0
jnz short loc_A820
les bx, _resident
mov es:[bx+reiidenconfig_t.mode], 0
mov es:[bx+reiidenconfig_t.debug_mode], DM_OFF
loc_A820:
les bx, _resident
@ -262,7 +262,7 @@ loc_A8E1:
call _game_switch_binary
les bx, _resident
assume es:nothing
mov es:[bx+reiidenconfig_t.mode], 0
mov es:[bx+reiidenconfig_t.debug_mode], DM_OFF
mov es:[bx+reiidenconfig_t.snd_need_init], 1
mov al, _opts.O_lives_extra
add al, 2

View File

@ -2342,7 +2342,7 @@ loc_D583:
les bx, _resident
mov al, es:[bx+reiidenconfig_t.route]
mov _route, al
cmp es:[bx+reiidenconfig_t.mode], 0
cmp es:[bx+reiidenconfig_t.debug_mode], DM_OFF
jz loc_D68E
cmp es:[bx+reiidenconfig_t.stage], 0
jnz short loc_D649
@ -2396,9 +2396,9 @@ loc_D644:
loc_D649:
les bx, _resident
mov al, es:[bx+reiidenconfig_t.mode]
mov al, es:[bx+reiidenconfig_t.debug_mode]
cbw
cmp ax, 1
cmp ax, DM_TEST
jnz short loc_D669
push ds
push offset aGegxgggvbGhbib ; "テストモード!!\n"
@ -2408,9 +2408,9 @@ loc_D649:
loc_D669:
les bx, _resident
mov al, es:[bx+reiidenconfig_t.mode]
mov al, es:[bx+reiidenconfig_t.debug_mode]
cbw
cmp ax, 3
cmp ax, DM_FULL
jnz short loc_D68E
push ds
push offset aGfgogbgogvbGhb ; "デバッグモード!!\n"