From 5c81cf20baf7a7a6c800dfc5d98559fe0c4b333c Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sun, 14 Aug 2011 23:53:20 +0000 Subject: [PATCH] - Merged r1236, r1237, and r1240 of GZDoom. SVN r3279 (trunk) --- src/dobjgc.cpp | 7 ++++++- src/r_utility.cpp | 5 +++-- src/sound/fmodsound.cpp | 4 ++++ src/v_palette.cpp | 4 ++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/dobjgc.cpp b/src/dobjgc.cpp index ba69f58f7..ebf61a698 100644 --- a/src/dobjgc.cpp +++ b/src/dobjgc.cpp @@ -533,7 +533,12 @@ void Barrier(DObject *pointing, DObject *pointed) void DelSoftRootHead() { - if (SoftRoots != NULL) delete SoftRoots; + if (SoftRoots != NULL) + { + // Don't let the destructor print a warning message + SoftRoots->ObjectFlags |= OF_YesReallyDelete; + delete SoftRoots; + } SoftRoots = NULL; } diff --git a/src/r_utility.cpp b/src/r_utility.cpp index 8a9e4fe11..29d008ca5 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -529,8 +529,9 @@ void R_Init () StartScreen->Progress(); V_InitFonts(); StartScreen->Progress(); - R_InitColormaps (); - StartScreen->Progress(); + // Colormap init moved back to InitPalette() + //R_InitColormaps (); + //StartScreen->Progress(); R_InitPointToAngle (); R_InitTables (); diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index e1a15bb24..4a5ab95a8 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -397,7 +397,9 @@ public: bool is; FMOD_OPENSTATE openstate = FMOD_OPENSTATE_MAX; bool starving; +#if FMOD_VERSION >= 0x43400 bool diskbusy; +#endif if (Stream == NULL) { @@ -494,7 +496,9 @@ public: unsigned int percentbuffered; unsigned int position; bool starving; +#if FMOD_VERSION >= 0x43400 bool diskbusy; +#endif float volume; float frequency; bool paused; diff --git a/src/v_palette.cpp b/src/v_palette.cpp index 80ea75a6f..fa8ed4615 100644 --- a/src/v_palette.cpp +++ b/src/v_palette.cpp @@ -378,6 +378,10 @@ void InitPalette () GPalette.BaseColors[0].r, GPalette.BaseColors[0].g, GPalette.BaseColors[0].b, 1, 255); } } + + // Colormaps have to be initialized before actors are loaded, + // otherwise Powerup.Colormap will not work. + R_InitColormaps (); } extern "C" void STACK_ARGS DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);