[Maintenance] [th04/th05] Move MAIN-specific score declarations to a new header

th04/shared.hpp was also a bad idea.

Part of P0149, funded by Blue Bolt, Ember2528, and -Tom-.
This commit is contained in:
nmlgc 2021-07-17 16:27:11 +02:00
parent a99cda80fd
commit 7f19c72550
4 changed files with 10 additions and 14 deletions

9
th04/main/score.h Normal file
View File

@ -0,0 +1,9 @@
#include "th04/score.h"
extern unsigned char extends_gained;
extern unsigned long score_delta;
void pascal near score_update_and_render(void);
// Adds the entire score delta at once to the current score.
void pascal score_delta_commit(void);

View File

@ -4,5 +4,3 @@ typedef union {
unsigned char continues_used;
unsigned char digits[SCORE_DIGITS];
} score_lebcd_t;
extern unsigned char extends_gained;

View File

@ -21,7 +21,6 @@
/// Player
/// ------
#include "th04/main/player/player.h"
#include "th04/score.h"
/// ------
/// Stages
@ -29,13 +28,3 @@
extern nearfunc_t_near stage_invalidate;
extern nearfunc_t_near stage_render;
/// ------
/// Score
/// -----
extern unsigned long score_delta;
void pascal near score_update_and_render(void);
// Adds the entire score delta at once to the current score.
void pascal score_delta_commit(void);
/// -----

View File

@ -14,6 +14,7 @@ extern "C" {
#include "th01/math/area.hpp"
#include "th04/shared.hpp"
#include "th04/main/null.hpp"
#include "th04/main/score.h"
#include "th04/main/rank.hpp"
#include "th04/main/item/items.hpp"
#include "th05/formats/bb.h"
@ -25,7 +26,6 @@ extern "C" {
#include "th04/formats/bb_stage.c"
#include "th05/main/stage/setup.cpp"
// Adds the entire score delta at once to the current score.
void pascal score_delta_commit(void)
{
while(score_delta > 0) {