Bring roundsplayed_t into the highest common denominator header

No indirect, hard-to-maintain magic number range in modetimeplayed arrays
This commit is contained in:
toaster 2024-04-06 20:58:04 +01:00
parent ee41d309f5
commit d0724c263a
3 changed files with 12 additions and 11 deletions

View file

@ -590,6 +590,16 @@ UINT32 quickncasehash (const char *p, size_t n)
return x;
}
// m_cond, doomstat
typedef enum {
GDGT_RACE,
GDGT_BATTLE,
GDGT_PRISONS,
GDGT_SPECIAL,
GDGT_CUSTOM,
GDGT_MAX
} roundsplayed_t;
#ifndef __cplusplus
#ifndef min // Double-Check with WATTCP-32's cdefs.h
#define min(x, y) (((x) < (y)) ? (x) : (y))

View file

@ -124,7 +124,7 @@ struct skinrecord_t
UINT32 wins;
UINT32 rounds;
UINT32 timeplayed;
UINT32 modetimeplayed[5]; // no GDGT_MAX, m_cond.h is not included in here... it might need to be?
UINT32 modetimeplayed[GDGT_MAX];
UINT32 tumbletime;
};
@ -167,7 +167,7 @@ struct recorddata_t
recordtimes_t spbattack; ///< Best times for SPB Attack
UINT32 timeplayed;
UINT32 netgametimeplayed;
UINT32 modetimeplayed[5];
UINT32 modetimeplayed[GDGT_MAX];
UINT32 timeattacktimeplayed;
UINT32 spbattacktimeplayed;
UINT32 rounds;

View file

@ -311,15 +311,6 @@ typedef enum {
GDGONER_DONE,
} gdgoner_t;
typedef enum {
GDGT_RACE,
GDGT_BATTLE,
GDGT_PRISONS,
GDGT_SPECIAL,
GDGT_CUSTOM,
GDGT_MAX
} roundsplayed_t;
struct candata_t
{
UINT16 col;