[Naming] [th01] Extra bombs per life lost

This variable makes more sense if we name it after its one actual and
consistent usage. All others make more sense when interpreted as a bug
or bloat.

Part of P0229, funded by Ember2528.
This commit is contained in:
nmlgc 2023-02-05 06:05:30 +01:00
parent 357573eaf7
commit cb7b67bfe3
4 changed files with 14 additions and 6 deletions

View File

@ -82,7 +82,13 @@ void player_gameover_animate(void)
}
z_vsync_wait_and_scrollup(0);
rem_bombs = credit_bombs;
// ZUN bug: Both should have been set to [credit_bombs] from REIIDEN.CFG.
// That file is never read in REIIDEN.EXE though, nor is the value
// preserved in the resident structure. In the end it makes no difference,
// as both [credit_bombs] and [bombs_extra_per_life_lost] are a constant 1
// in the original game.
rem_bombs = bombs_extra_per_life_lost;
resident->rem_bombs = 1;
#undef frame

View File

@ -1033,7 +1033,7 @@ void player_miss_animate_and_update(void)
hud_lives_put(rem_lives + 1);
prev_bombs = rem_bombs;
rem_bombs = (credit_bombs + rem_bombs);
rem_bombs = (bombs_extra_per_life_lost + rem_bombs);
if(rem_bombs > BOMBS_MAX) {
rem_bombs = BOMBS_MAX;
} else {

View File

@ -3,7 +3,7 @@
extern int8_t rank; // ACTUAL TYPE: rank_t
extern bgm_mode_t bgm_mode;
extern int8_t rem_bombs;
extern int8_t credit_bombs;
extern int8_t bombs_extra_per_life_lost;
extern int8_t stage_num;
extern bool bgm_change_blocked;

View File

@ -97,7 +97,7 @@ int orb_rotation_frame = 0;
int rem_lives = 4;
bool16 stage_cleared = false;
int8_t credit_bombs;
int8_t bombs_extra_per_life_lost;
int8_t player_swing_deflection_frames;
unsigned long frame_rand;
uint32_t coreleft_prev;
@ -483,7 +483,7 @@ int main(void)
if(resident_stuff_get(
rank,
bgm_mode,
credit_bombs,
bombs_extra_per_life_lost, // ZUN bloat: Supposed to be [rem_bombs]...
credit_lives_extra,
frame_rand,
continues_total,
@ -493,7 +493,9 @@ int main(void)
return 1;
}
credit_bombs = 1;
// ZUN bloat: ...and the variable is hardcoded here anyway.
bombs_extra_per_life_lost = 1;
score = resident->score;
extend_next = ((resident->score / SCORE_PER_EXTEND) + 1);
srand(frame_rand);