diff --git a/th01/resident.hpp b/th01/resident.hpp index e57e8b43..d05221aa 100644 --- a/th01/resident.hpp +++ b/th01/resident.hpp @@ -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; diff --git a/th01/th01.inc b/th01/th01.inc index 2fa1ee22..5df5a5db 100644 --- a/th01/th01.inc +++ b/th01/th01.inc @@ -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 ? diff --git a/th01_op.asm b/th01_op.asm index 9c52e7c4..0b37bd0f 100644 --- a/th01_op.asm +++ b/th01_op.asm @@ -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 diff --git a/th01_reiiden.asm b/th01_reiiden.asm index 4bd7c4d0..c233c7f6 100644 --- a/th01_reiiden.asm +++ b/th01_reiiden.asm @@ -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"