From 2d29d130c0e46e9280ff2b709de801b05503dc1c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 May 2020 18:58:57 +0200 Subject: [PATCH] - fixed Blood startup. --- source/blood/src/screen.cpp | 4 ++-- source/build/src/engine.cpp | 1 + source/build/src/palette.cpp | 2 -- source/common/utility/basics.h | 7 ------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/source/blood/src/screen.cpp b/source/blood/src/screen.cpp index ebb684640..303c2c453 100644 --- a/source/blood/src/screen.cpp +++ b/source/blood/src/screen.cpp @@ -71,10 +71,10 @@ void scrLoadPLUs(void) // load lookup tables for (int i = 0; i < MAXPALOOKUPS; i++) { - int lump = i <= 15 ? fileSystem.FindFile(PLU[i]) : fileSystem.FindResource(i, "PLU"); + int lump = i < 15 ? fileSystem.FindFile(PLU[i]) : fileSystem.FindResource(i, "PLU"); if (lump < 0) { - if (i <= 15) I_FatalError("%s.PLU not found", PLU[i]); + if (i < 15) I_FatalError("%s.PLU not found", PLU[i]); else continue; } auto data = fileSystem.GetFileData(lump); diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 4bae07c39..eb0e2589d 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -2095,6 +2095,7 @@ int32_t engineInit(void) maxspritesonscreen = MAXSPRITESONSCREEN; + GPalette.Init(MAXPALOOKUPS + 1); // one slot for each translation, plus a separate one for the base palettes. if (paletteLoadFromDisk_replace) { paletteLoadFromDisk_replace(); diff --git a/source/build/src/palette.cpp b/source/build/src/palette.cpp index 1c255d888..559a24954 100644 --- a/source/build/src/palette.cpp +++ b/source/build/src/palette.cpp @@ -75,8 +75,6 @@ void paletteSetColorTable(int32_t id, uint8_t const* table, bool notransparency, void paletteLoadFromDisk(void) { - GPalette.Init(MAXPALOOKUPS + 1); // one slot for each translation, plus a separate one for the base palettes. - for (auto & x : glblend) x = defaultglblend; diff --git a/source/common/utility/basics.h b/source/common/utility/basics.h index 42ee9f414..503d3ea7b 100644 --- a/source/common/utility/basics.h +++ b/source/common/utility/basics.h @@ -57,13 +57,6 @@ using INTBOOL = int; using BITFIELD = uint32_t; -#if defined(_MSC_VER) -#define NOVTABLE __declspec(novtable) -#else -#define NOVTABLE -#endif - - #if defined(_MSC_VER) #define NOVTABLE __declspec(novtable) #else