mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th04/th05] Declare a little-endian BCD score type
Only in C land though; doing the same in ASM land actually makes digit accesses harder to read. Part of P0065, funded by Touhou Patch Center.
This commit is contained in:
parent
23ea2d4bee
commit
c3a9816e60
|
@ -1,4 +1,4 @@
|
|||
#include "th02/score.h"
|
||||
#include "th04/score.h"
|
||||
|
||||
#if GAME == 5
|
||||
# define SCOREDAT_PLACES 5
|
||||
|
@ -14,9 +14,10 @@
|
|||
|
||||
#define SCOREDAT_NAME_LEN 8
|
||||
|
||||
#pragma option -a1
|
||||
typedef struct {
|
||||
unsigned char g_name[SCOREDAT_PLACES][SCOREDAT_NAME_LEN + 1];
|
||||
unsigned char g_points[SCOREDAT_PLACES][SCORE_DIGITS];
|
||||
score_lebcd_t g_points[SCOREDAT_PLACES];
|
||||
|
||||
#if GAME == 5
|
||||
unsigned char g_stage[SCOREDAT_PLACES];
|
||||
|
@ -29,6 +30,7 @@ typedef struct {
|
|||
unsigned char unused_2[SCOREDAT_PLACES];
|
||||
#endif
|
||||
} scoredat_t;
|
||||
#pragma option -a.
|
||||
|
||||
typedef struct {
|
||||
int8_t key1;
|
||||
|
|
|
@ -1 +1,8 @@
|
|||
#include "th02/score.h"
|
||||
|
||||
typedef union {
|
||||
unsigned char continues_used;
|
||||
unsigned char digits[SCORE_DIGITS];
|
||||
} score_lebcd_t;
|
||||
|
||||
extern unsigned char extends_gained;
|
||||
|
|
|
@ -32,6 +32,7 @@ int pascal far select_for_rank(
|
|||
/// Player
|
||||
/// ------
|
||||
#include "th04/player/player.h"
|
||||
#include "th04/score.h"
|
||||
/// ------
|
||||
|
||||
/// Stages
|
||||
|
|
Loading…
Reference in New Issue