From b76557045f7ca617e5fd0e7391627619f3c710c2 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sat, 11 Feb 2023 08:23:57 -0600 Subject: [PATCH] Change mapmusrng to UINT8 --- src/doomstat.h | 2 +- src/g_game.c | 2 +- src/lua_script.c | 2 +- src/p_saveg.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doomstat.h b/src/doomstat.h index d8a591b12..3a9e4396d 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -42,7 +42,7 @@ extern char mapmusname[7]; extern UINT16 mapmusflags; extern UINT32 mapmusposition; extern UINT32 mapmusresume; -extern UINT32 mapmusrng; +extern UINT8 mapmusrng; #define MUSIC_TRACKMASK 0x0FFF // ----************ #define MUSIC_RELOADRESET 0x8000 // *--------------- #define MUSIC_FORCERESET 0x4000 // -*-------------- diff --git a/src/g_game.c b/src/g_game.c index 9a70ea79f..d933b5a80 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -93,7 +93,7 @@ char mapmusname[7]; // Music name UINT16 mapmusflags; // Track and reset bit UINT32 mapmusposition; // Position to jump to UINT32 mapmusresume; -UINT32 mapmusrng; // Random selection result +UINT8 mapmusrng; // Random selection result INT16 gamemap = 1; UINT32 maptol; diff --git a/src/lua_script.c b/src/lua_script.c index fd1dcb9e1..17dd61a8d 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -433,7 +433,7 @@ int LUA_WriteGlobals(lua_State *L, const char *word) else if (fastcmp(word, "mapmusflags")) mapmusflags = (UINT16)luaL_checkinteger(L, 2); else if (fastcmp(word, "mapmusrng")) - mapmusrng = (UINT32)luaL_checkinteger(L, 2); + mapmusrng = (UINT8)luaL_checkinteger(L, 2); // SRB2Kart else if (fastcmp(word,"racecountdown")) racecountdown = (tic_t)luaL_checkinteger(L, 2); diff --git a/src/p_saveg.c b/src/p_saveg.c index c3620f19b..b7f57514e 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -4882,7 +4882,7 @@ static void P_NetArchiveMisc(savebuffer_t *save, boolean resending) WRITEUINT8(save->p, encoremode); - WRITEUINT32(save->p, mapmusrng); + WRITEUINT8(save->p, mapmusrng); WRITEUINT32(save->p, leveltime); WRITEINT16(save->p, lastmap); @@ -5048,7 +5048,7 @@ static inline boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading) encoremode = (boolean)READUINT8(save->p); - mapmusrng = READUINT32(save->p); + mapmusrng = READUINT8(save->p); if (!P_LoadLevel(true, reloading)) {