Map types: Make more map ID types consistent as UINT16

- nextmap
- prevmap
- nextmapoverride
- G_GetFirstMapOfGametype
This commit is contained in:
toaster 2023-06-02 20:27:38 +01:00
parent b195d43577
commit 82b60cc585
4 changed files with 9 additions and 9 deletions

View file

@ -343,7 +343,7 @@ struct textprompt_t
extern textprompt_t *textprompts[MAX_PROMPTS]; extern textprompt_t *textprompts[MAX_PROMPTS];
// For the Custom Exit linedef. // For the Custom Exit linedef.
extern INT16 nextmapoverride; extern UINT16 nextmapoverride;
extern UINT8 skipstats; extern UINT8 skipstats;
// Fun extra stuff // Fun extra stuff

View file

@ -183,7 +183,7 @@ boolean exitfadestarted = false;
cutscene_t *cutscenes[128]; cutscene_t *cutscenes[128];
textprompt_t *textprompts[MAX_PROMPTS]; textprompt_t *textprompts[MAX_PROMPTS];
INT16 nextmapoverride; UINT16 nextmapoverride;
UINT8 skipstats; UINT8 skipstats;
// Pointers to each CTF flag // Pointers to each CTF flag
@ -332,7 +332,7 @@ typedef struct joystickvector2_s
boolean precache = true; // if true, load all graphics at start boolean precache = true; // if true, load all graphics at start
INT16 prevmap, nextmap; UINT16 prevmap, nextmap;
static void weaponPrefChange(void); static void weaponPrefChange(void);
static void weaponPrefChange2(void); static void weaponPrefChange2(void);
@ -3717,10 +3717,10 @@ UINT32 G_TOLFlag(INT32 pgametype)
return 0; return 0;
} }
INT16 G_GetFirstMapOfGametype(UINT8 pgametype) UINT16 G_GetFirstMapOfGametype(UINT8 pgametype)
{ {
UINT8 i = 0; UINT8 i = 0;
INT16 mapnum = NEXTMAP_INVALID; UINT16 mapnum = NEXTMAP_INVALID;
levelsearch_t templevelsearch; levelsearch_t templevelsearch;
templevelsearch.cup = NULL; templevelsearch.cup = NULL;
@ -4181,7 +4181,7 @@ static void G_GetNextMap(void)
// nextmap is 0-based, unlike gamemap // nextmap is 0-based, unlike gamemap
if (nextmapoverride != 0) if (nextmapoverride != 0)
{ {
nextmap = (INT16)(nextmapoverride-1); nextmap = (nextmapoverride-1);
setalready = true; setalready = true;
} }
else if (roundqueue.size > 0) else if (roundqueue.size > 0)

View file

@ -38,7 +38,7 @@ extern boolean playeringame[MAXPLAYERS];
extern tic_t levelstarttic; extern tic_t levelstarttic;
// for modding? // for modding?
extern INT16 prevmap, nextmap; extern UINT16 prevmap, nextmap;
// see also G_MapNumber // see also G_MapNumber
typedef enum typedef enum
@ -276,7 +276,7 @@ FUNCMATH INT32 G_TicsToMilliseconds(tic_t tics);
// Don't split up TOL handling // Don't split up TOL handling
UINT32 G_TOLFlag(INT32 pgametype); UINT32 G_TOLFlag(INT32 pgametype);
INT16 G_GetFirstMapOfGametype(UINT8 pgametype); UINT16 G_GetFirstMapOfGametype(UINT8 pgametype);
UINT16 G_RandMap(UINT32 tolflags, UINT16 pprevmap, boolean ignoreBuffers, boolean callAgainSoon, UINT16 *extBuffer); UINT16 G_RandMap(UINT32 tolflags, UINT16 pprevmap, boolean ignoreBuffers, boolean callAgainSoon, UINT16 *extBuffer);
void G_AddMapToBuffer(UINT16 map); void G_AddMapToBuffer(UINT16 map);

View file

@ -131,7 +131,7 @@ UINT16 M_CountLevelsToShowInList(levelsearch_t *levelsearch)
UINT16 M_GetFirstLevelInList(UINT8 *i, levelsearch_t *levelsearch) UINT16 M_GetFirstLevelInList(UINT8 *i, levelsearch_t *levelsearch)
{ {
INT16 mapnum = NEXTMAP_INVALID; UINT16 mapnum = NEXTMAP_INVALID;
if (!levelsearch) if (!levelsearch)
return NEXTMAP_INVALID; return NEXTMAP_INVALID;