From 0cc4b8d6db42e403b2692eb5e8f97ff0686c2320 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 6 Feb 2018 14:50:08 -0500 Subject: [PATCH 01/23] Smoother MD2 interpolation --- src/hardware/hw_md2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index f59c1d4fc..d1315979a 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1347,7 +1347,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr) frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames; buff = md2->model->glCommandBuffer; curr = &md2->model->frames[frame]; - if (cv_grmd2.value == 1) + if (cv_grmd2.value == 1 && tics <= durs) { // frames are handled differently for states with FF_ANIMATE, so get the next frame differently for the interpolation if (spr->mobj->frame & FF_ANIMATE) From 490f5beb89b90f77a98d49c39de700200859b170 Mon Sep 17 00:00:00 2001 From: Louis-Antoine Date: Tue, 13 Feb 2018 17:53:18 +0100 Subject: [PATCH 02/23] Do not prevent all net commands for the current tic from being executed because of an unkown net command ID --- src/d_clisrv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index d48f223c7..87b154f8e 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -401,8 +401,7 @@ static void ExtraDataTicker(void) DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic)); } CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]); - D_FreeTextcmd(gametic); - return; + break; } } } From bd2334dd93985799cb6f77909f2a145ab1474ab5 Mon Sep 17 00:00:00 2001 From: Louis-Antoine Date: Wed, 14 Feb 2018 21:00:55 +0100 Subject: [PATCH 03/23] Fix SV_StopServer not calling D_Clearticcmd correctly --- src/d_clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 87b154f8e..e42bceef9 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3292,7 +3292,7 @@ void SV_StopServer(void) localtextcmd[0] = 0; localtextcmd2[0] = 0; - for (i = 0; i < BACKUPTICS; i++) + for (i = firstticstosend; i < firstticstosend + BACKUPTICS; i++) D_Clearticcmd(i); consoleplayer = 0; From e66e0bb20e7b2f211c5ed5956b2539abcca1f99a Mon Sep 17 00:00:00 2001 From: GoldenTails <39245725+GoldenTails@users.noreply.github.com> Date: Sun, 13 May 2018 14:19:36 -0500 Subject: [PATCH 04/23] Fixed MD2 models not loading correctly on Linux --- src/hardware/hw_md2.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index f59c1d4fc..5d156e1d5 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -288,7 +288,8 @@ static md2_model_t *md2_readModel(const char *filename) if (model == NULL) return 0; - file = fopen(filename, "rb"); + //Filename checking fixed ~Monster Iestyn and Golden + file = fopen(va("%s"PATHSEP"%s", srb2home, filename), "rb"); if (!file) { free(model); @@ -477,7 +478,8 @@ static GrTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_ #endif #endif png_FILE_p png_FILE; - char *pngfilename = va("md2/%s", filename); + //Filename checking fixed ~Monster Iestyn and Golden + char *pngfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2home, filename); FIL_ForceExtension(pngfilename, ".png"); png_FILE = fopen(pngfilename, "rb"); @@ -605,7 +607,8 @@ static GrTextureFormat_t PCX_Load(const char *filename, int *w, int *h, size_t pw, ph, size, ptr = 0; INT32 ch, rep; FILE *file; - char *pcxfilename = va("md2/%s", filename); + //Filename checking fixed ~Monster Iestyn and Golden + char *pcxfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2home, filename); FIL_ForceExtension(pcxfilename, ".pcx"); file = fopen(pcxfilename, "rb"); @@ -795,7 +798,8 @@ void HWR_InitMD2(void) } // read the md2.dat file - f = fopen("md2.dat", "rt"); + //Filename checking fixed ~Monster Iestyn and Golden + f = fopen(va("%s"PATHSEP"%s", srb2home, "md2.dat"), "rt"); if (!f) { @@ -861,7 +865,8 @@ void HWR_AddPlayerMD2(int skin) // For MD2's that were added after startup CONS_Printf("AddPlayerMD2()...\n"); // read the md2.dat file - f = fopen("md2.dat", "rt"); + //Filename checking fixed ~Monster Iestyn and Golden + f = fopen(va("%s"PATHSEP"%s", srb2home, "md2.dat"), "rt"); if (!f) { @@ -906,7 +911,8 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu return; // Read the md2.dat file - f = fopen("md2.dat", "rt"); + //Filename checking fixed ~Monster Iestyn and Golden + f = fopen(va("%s"PATHSEP"%s", srb2home, "md2.dat"), "rt"); if (!f) { From 5f0a45124c8209fb10800ec76261e40a92572006 Mon Sep 17 00:00:00 2001 From: GoldenTails <39245725+GoldenTails@users.noreply.github.com> Date: Sun, 13 May 2018 14:32:33 -0500 Subject: [PATCH 05/23] Update hw_md2.c --- src/hardware/hw_md2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 5d156e1d5..3dc434709 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -26,6 +26,7 @@ #include #include +#include "../d_main.h" #include "../doomdef.h" #include "../doomstat.h" From 7783ddd13443854955a977d70a7fe087edad6d64 Mon Sep 17 00:00:00 2001 From: GoldenTails <39245725+GoldenTails@users.noreply.github.com> Date: Sun, 13 May 2018 14:34:08 -0500 Subject: [PATCH 06/23] Update hw_md2.c --- src/hardware/hw_md2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 3dc434709..be547e5ac 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -26,7 +26,6 @@ #include #include -#include "../d_main.h" #include "../doomdef.h" #include "../doomstat.h" @@ -34,6 +33,7 @@ #include "hw_drv.h" #include "hw_light.h" #include "hw_md2.h" +#include "../d_main.h" #include "../r_bsp.h" #include "../r_main.h" #include "../m_misc.h" From 7f084868b9a84baf9929e153513c9d5e224c9a4e Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 13 May 2018 15:35:38 -0400 Subject: [PATCH 07/23] More helpful error message --- src/hardware/hw_md2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index f59c1d4fc..99018e1e5 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -799,7 +799,7 @@ void HWR_InitMD2(void) if (!f) { - CONS_Printf("%s", M_GetText("Error while loading md2.dat\n")); + CONS_Printf("%s %s\n", M_GetText("Error while loading md2.dat:"), strerror(errno)); nomd2s = true; return; } From b4d479ad9a121bcb4095e7610baaed63c27f6ebe Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 13 May 2018 16:04:34 -0400 Subject: [PATCH 08/23] Include errno if not already included. --- src/hardware/hw_md2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 99018e1e5..d60524451 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -67,6 +67,10 @@ #endif #endif +#ifndef errno +#include "errno.h" +#endif + #define NUMVERTEXNORMALS 162 float avertexnormals[NUMVERTEXNORMALS][3] = { {-0.525731f, 0.000000f, 0.850651f}, From 0b6d6c3363d4b1aeece18a415caec54e7b0aca86 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Thu, 24 May 2018 16:24:09 -0400 Subject: [PATCH 09/23] GME low volume fix --- src/sdl/mixer_sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 718324591..8938cb749 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -458,7 +458,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len) // apply volume to stream for (i = 0, p = (short *)stream; i < len/2; i++, p++) - *p = ((INT32)*p) * music_volume / 31; + *p = ((INT32)*p) * music_volume*2/31; } #endif From 0248fcecd40c67fa6adffe0b6d0ff2a93ea46ceb Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 29 May 2018 20:31:28 -0400 Subject: [PATCH 10/23] Some small change Really this is just to prevent the music end up being disorted at max volume --- src/sdl/mixer_sound.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 8938cb749..fd8e64de5 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -458,7 +458,8 @@ static void mix_gme(void *udata, Uint8 *stream, int len) // apply volume to stream for (i = 0, p = (short *)stream; i < len/2; i++, p++) - *p = ((INT32)*p) * music_volume*2/31; + *p = ((INT32)*p) * music_volume*2 / 42; + CONS_Printf("%hs", p); } #endif From e394f7992deb81a195709126bec7e9cc68d14114 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 29 May 2018 22:12:36 -0400 Subject: [PATCH 11/23] Removed CONS_Printf line. That wasn't meant to be commited. --- src/sdl/mixer_sound.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index fd8e64de5..497422724 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -459,7 +459,6 @@ static void mix_gme(void *udata, Uint8 *stream, int len) // apply volume to stream for (i = 0, p = (short *)stream; i < len/2; i++, p++) *p = ((INT32)*p) * music_volume*2 / 42; - CONS_Printf("%hs", p); } #endif From 77362c45cc0d6b1371f7145daaef6a1c6dd66a82 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 3 Jun 2018 18:15:20 -0400 Subject: [PATCH 12/23] Fix pausing on gme --- src/sdl/mixer_sound.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 718324591..18670649e 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -475,12 +475,24 @@ void I_ShutdownMusic(void) void I_PauseSong(INT32 handle) { (void)handle; +#ifdef HAVE_LIBGME + if (gme) + { + Mix_HookMusic(NULL, NULL); + } +#endif Mix_PauseMusic(); } void I_ResumeSong(INT32 handle) { (void)handle; +#ifdef HAVE_LIBGME + if (gme) + { + Mix_HookMusic(mix_gme, gme); + } +#endif Mix_ResumeMusic(); } From 91081a3e534ad6885bac1fae3013444f9fb2c67e Mon Sep 17 00:00:00 2001 From: Louis-Antoine Date: Mon, 4 Jun 2018 22:14:01 +0200 Subject: [PATCH 13/23] Disable admin password by default --- src/d_main.c | 9 --------- src/d_netcmd.c | 9 +++++++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index fbec5f7d8..df3398752 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1051,15 +1051,6 @@ void D_SRB2Main(void) if (M_CheckParm("-password") && M_IsNextParm()) D_SetPassword(M_GetNextParm()); - else - { - size_t z; - char junkpw[25]; - for (z = 0; z < 24; z++) - junkpw[z] = (char)(rand() & 64)+32; - junkpw[24] = '\0'; - D_SetPassword(junkpw); - } // add any files specified on the command line with -file wadfile // to the wad list diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 673d64fd8..876a38523 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2656,10 +2656,12 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt, #define BASESALT "basepasswordstorage" static UINT8 adminpassmd5[16]; +static boolean adminpasswordset = false; void D_SetPassword(const char *pw) { D_MD5PasswordPass((const UINT8 *)pw, strlen(pw), BASESALT, &adminpassmd5); + adminpasswordset = true; } // Remote Administration @@ -2728,6 +2730,9 @@ static void Got_Login(UINT8 **cp, INT32 playernum) READMEM(*cp, sentmd5, 16); + if (!adminpasswordset) + CONS_Printf(M_GetText("Password from %s failed (no password set).\n"), player_names[playernum]); + if (client) return; @@ -3951,7 +3956,7 @@ static void Command_RestartAudio_f(void) I_ShutdownSound(); I_StartupSound(); I_InitMusic(); - + // These must be called or no sound and music until manually set. I_SetSfxVolume(cv_soundvolume.value); @@ -3959,7 +3964,7 @@ static void Command_RestartAudio_f(void) I_SetMIDIMusicVolume(cv_midimusicvolume.value); if (Playing()) // Gotta make sure the player is in a level P_RestoreMusic(&players[consoleplayer]); - + } /** Quits a game and returns to the title screen. From c389c0b3dc5fb285f5492474f1c93b62c6336b7a Mon Sep 17 00:00:00 2001 From: Louis-Antoine Date: Mon, 4 Jun 2018 22:30:27 +0200 Subject: [PATCH 14/23] xd --- src/d_netcmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 876a38523..727d5eff4 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2731,7 +2731,10 @@ static void Got_Login(UINT8 **cp, INT32 playernum) READMEM(*cp, sentmd5, 16); if (!adminpasswordset) + { CONS_Printf(M_GetText("Password from %s failed (no password set).\n"), player_names[playernum]); + return; + } if (client) return; From aed30519d4413e14c26f114e67f29e73d4c35ec5 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 23 Jun 2018 18:47:32 +0100 Subject: [PATCH 15/23] Fix HWR_ProjectSprite to check properly whether the displayed player's mobj or its subsector exists, to avoid a crash when checking for fake planes. (also use viewplayer since its available to use, silly hardware code) Also tweaked a weird splitscreen check in HWR_DrawSpriteShadow; still investigating whether stplyr is ever not player 2 when it's player 2's view, but this looks better for now --- src/hardware/hw_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index a5fe6b673..5d9c2993b 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3941,7 +3941,7 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t angle_t shadowdir; // Set direction - if (splitscreen && stplyr != &players[displayplayer]) + if (splitscreen && stplyr == &players[secondarydisplayplayer]) shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value); else shadowdir = localangle + FixedAngle(cv_cam_rotate.value); @@ -5302,7 +5302,10 @@ static void HWR_ProjectSprite(mobj_t *thing) } heightsec = thing->subsector->sector->heightsec; - phs = players[displayplayer].mo->subsector->sector->heightsec; + if (viewplayer->mo && viewplayer->mo->subsector) + phs = viewplayer->mo->subsector->sector->heightsec; + else + phs = -1; if (heightsec != -1 && phs != -1) // only clip things which are in special sectors { From 415c0952740f8dd0587f07e0688286ebf60a6e27 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 26 Jun 2018 17:46:04 +0100 Subject: [PATCH 16/23] fix the multiplayer menu not allowing the full max length for player names unlike the "name" console command --- src/m_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index 0ab771579..79ac6800b 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6543,7 +6543,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) if (choice < 32 || choice > 127 || itemOn != 0) break; l = strlen(setupm_name); - if (l < MAXPLAYERNAME-1) + if (l < MAXPLAYERNAME) { S_StartSound(NULL,sfx_menu1); // Tails setupm_name[l] =(char)choice; From d8a86a8d744f13f6206b1aefa25ce1bb2047323a Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 26 Jun 2018 21:41:05 +0100 Subject: [PATCH 17/23] Fix OpenGL completely missing the ability to alter FOF wall pegging by lower unpegged flag. Stupid OpenGL. Sorry in advance Lat'! --- src/hardware/hw_main.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index a5fe6b673..1caf84fe9 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2182,27 +2182,34 @@ static void HWR_StoreWallRange(double startfrac, double endfrac) } else if (drawtextured) { -#ifdef ESLOPE // P.S. this is better-organized than the old version - fixed_t offs = sides[(newline ? newline : rover->master)->sidenum[0]].rowoffset; - grTex = HWR_GetTexture(texnum); - - wallVerts[3].t = (*rover->topheight - h + offs) * grTex->scaleY; - wallVerts[2].t = (*rover->topheight - hS + offs) * grTex->scaleY; - wallVerts[0].t = (*rover->topheight - l + offs) * grTex->scaleY; - wallVerts[1].t = (*rover->topheight - lS + offs) * grTex->scaleY; -#else - grTex = HWR_GetTexture(texnum); + fixed_t texturevpeg; + // Wow, how was this missing from OpenGL for so long? + // ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software + // -- Monster Iestyn 26/06/18 if (newline) { - wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset) * grTex->scaleY; - wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset)) * grTex->scaleY; + texturevpeg = sides[newline->sidenum[0]].rowoffset; + if (newline->flags & ML_DONTPEGBOTTOM) + texturevpeg -= *rover->topheight - *rover->bottomheight; } else { - wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset) * grTex->scaleY; - wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset)) * grTex->scaleY; + texturevpeg = sides[rover->master->sidenum[0]].rowoffset; + if (gr_linedef->flags & ML_DONTPEGBOTTOM) + texturevpeg -= *rover->topheight - *rover->bottomheight; } + + grTex = HWR_GetTexture(texnum); + +#ifdef ESLOPE + wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY; + wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY; + wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY; + wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY; +#else + wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY; + wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY; #endif wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX; From 82d953bbc219d02edd0cba6bde6ac44a591c96bf Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 4 Jul 2018 20:15:36 +0100 Subject: [PATCH 18/23] Fixed the Lua crash exploit. --- src/lua_consolelib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index 566e73748..3239b7c5e 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -77,7 +77,9 @@ void Got_Luacmd(UINT8 **cp, INT32 playernum) deny: //must be hacked/buggy client - lua_settop(gL, 0); // clear stack + if (gL) // check if Lua is actually turned on first, you dummmy -- Monster Iestyn 04/07/18 + lua_settop(gL, 0); // clear stack + CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]); if (server) { From 7da6aca4505e0f5227cb3e802b11d200bef4aec0 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Sat, 7 Jul 2018 20:33:19 +0000 Subject: [PATCH 19/23] Update m_misc.c --- src/m_misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/m_misc.c b/src/m_misc.c index 041899a3b..69542dc9a 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -56,7 +56,9 @@ typedef off_t off64_t; #endif #endif -#if defined (_WIN32) +#if defined(__MINGW32__) &&(__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3) +#define PRIdS "u" +#elif defined (_WIN32) #define PRIdS "Iu" #elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3) #define PRIdS "u" From a79b9a912709c0bf23e9ae99302cc6cbc23c7ce5 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Sat, 7 Jul 2018 20:41:11 +0000 Subject: [PATCH 20/23] Update m_misc.c --- src/m_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_misc.c b/src/m_misc.c index 69542dc9a..5c4e7f2f9 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -56,7 +56,7 @@ typedef off_t off64_t; #endif #endif -#if defined(__MINGW32__) &&(__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3) +#if defined(__MINGW32__) && ((__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3)) #define PRIdS "u" #elif defined (_WIN32) #define PRIdS "Iu" From 0a931a1364a0f151eba1ff8f644dfda4558ae700 Mon Sep 17 00:00:00 2001 From: colette Date: Sat, 7 Jul 2018 20:20:46 -0400 Subject: [PATCH 21/23] Update f_finale.c --- src/f_finale.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/f_finale.c b/src/f_finale.c index 958bef0f6..a8b27bb80 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -977,7 +977,6 @@ static const char *credits[] = { "\1Programming", "Alam \"GBC\" Arias", "Logan \"GBA\" Arias", - "Colette \"fickle\" Bordelon", "Callum Dickinson", "Scott \"Graue\" Feeney", "Nathan \"Jazz\" Giroux", From 1ee7eda0ad1971b5a826138368356d25468574f8 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 20 Jul 2018 17:35:18 -0400 Subject: [PATCH 22/23] Fixup PROFILEMODE --- src/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 57bd0644e..dd250b0bc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,3 +1,4 @@ + # GNU Make makefile for SRB2 ############################################################################# # Copyright (C) 1998-2000 by DooM Legacy Team. @@ -421,7 +422,8 @@ endif ifdef PROFILEMODE # build with profiling information - CFLAGS:=-pg $(CFLAGS) + CFLAGS+=-pg + LDFLAGS+=-pg endif ifdef ZDEBUG From c02ee9a50283088eb490b401999937ad99ff84be Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sat, 28 Jul 2018 01:58:25 -0400 Subject: [PATCH 23/23] Re-did this fix. --- src/sdl/mixer_sound.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 18670649e..7ab1523c6 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -66,6 +66,7 @@ static boolean midimode; static Mix_Music *music; static UINT8 music_volume, midi_volume, sfx_volume; static float loop_point; +static boolean songpaused; #ifdef HAVE_LIBGME static Music_Emu *gme; @@ -102,6 +103,7 @@ void I_StartupSound(void) } sound_started = true; + songpaused = false; Mix_AllocateChannels(256); } @@ -450,7 +452,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len) (void)udata; // no gme? no music. - if (!gme || gme_track_ended(gme)) + if (!gme || gme_track_ended(gme) || songpaused) return; // play gme into stream @@ -475,25 +477,15 @@ void I_ShutdownMusic(void) void I_PauseSong(INT32 handle) { (void)handle; -#ifdef HAVE_LIBGME - if (gme) - { - Mix_HookMusic(NULL, NULL); - } -#endif Mix_PauseMusic(); + songpaused = true; } void I_ResumeSong(INT32 handle) { (void)handle; -#ifdef HAVE_LIBGME - if (gme) - { - Mix_HookMusic(mix_gme, gme); - } -#endif Mix_ResumeMusic(); + songpaused = false; } //