diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 6e02bfeb0..c1c66dcba 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -43,7 +43,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "levels.h" #include "loadsave.h" #include "network.h" -#include "screen.h" #include "sectorfx.h" #include "seq.h" #include "sound.h" diff --git a/source/blood/src/credits.cpp b/source/blood/src/credits.cpp index f629fdd82..983c763c5 100644 --- a/source/blood/src/credits.cpp +++ b/source/blood/src/credits.cpp @@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "blood.h" #include "controls.h" #include "globals.h" -#include "screen.h" #include "sound.h" #include "view.h" #include "animtexture.h" diff --git a/source/blood/src/globals.cpp b/source/blood/src/globals.cpp index 83cf6df25..d999c6096 100644 --- a/source/blood/src/globals.cpp +++ b/source/blood/src/globals.cpp @@ -50,6 +50,7 @@ int32_t gRotateMap = 0; bool gNoClip; bool gInfiniteAmmo; int32_t gDeliriumBlur = 1; +bool gFogMode = false; ////////// int gWeaponsV10x; diff --git a/source/blood/src/globals.h b/source/blood/src/globals.h index 8b604172d..78586958b 100644 --- a/source/blood/src/globals.h +++ b/source/blood/src/globals.h @@ -52,4 +52,6 @@ extern int32_t gDeliriumBlur; extern int gWeaponsV10x; ////// +extern bool gFogMode; + END_BLD_NS diff --git a/source/blood/src/levels.cpp b/source/blood/src/levels.cpp index 7921a876c..fd44b74f6 100644 --- a/source/blood/src/levels.cpp +++ b/source/blood/src/levels.cpp @@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "loadsave.h" #include "messages.h" #include "network.h" -#include "screen.h" #include "seq.h" #include "sound.h" #include "view.h" diff --git a/source/blood/src/loadsave.cpp b/source/blood/src/loadsave.cpp index eed50b121..ecfb62172 100644 --- a/source/blood/src/loadsave.cpp +++ b/source/blood/src/loadsave.cpp @@ -34,7 +34,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "messages.h" #include "network.h" #include "loadsave.h" -#include "screen.h" #include "sectorfx.h" #include "seq.h" #include "sound.h" diff --git a/source/blood/src/misc.h b/source/blood/src/misc.h index 5c869dcf7..eb277d854 100644 --- a/source/blood/src/misc.h +++ b/source/blood/src/misc.h @@ -43,7 +43,6 @@ void sub_557C4(int x, int y, int interpolation); void DrawMirrors(int x, int y, int z, fix16_t a, fix16_t horiz, int smooth, int viewPlayer); int32_t registerosdcommands(void); int qanimateoffs(int a1, int a2); -void qloadpalette(); int32_t qgetpalookup(int32_t a1, int32_t a2); void HookReplaceFunctions(); @@ -123,5 +122,6 @@ void tilePreloadTile(int nTile); void tilePrecacheTile(int nTile, int nType = 1); char tileGetSurfType(int hit); +void scrLoadPalette(void); END_BLD_NS diff --git a/source/blood/src/osdcmd.cpp b/source/blood/src/osdcmd.cpp index ee8fd109f..86f520c87 100644 --- a/source/blood/src/osdcmd.cpp +++ b/source/blood/src/osdcmd.cpp @@ -33,7 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "levels.h" #include "messages.h" #include "network.h" -#include "screen.h" #include "sound.h" #include "view.h" #include "mapinfo.h" diff --git a/source/blood/src/replace.cpp b/source/blood/src/replace.cpp index cf22a7f1f..03ac20538 100644 --- a/source/blood/src/replace.cpp +++ b/source/blood/src/replace.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "m_crc32.h" #include "globals.h" -#include "screen.h" BEGIN_BLD_NS @@ -64,11 +63,6 @@ int qanimateoffs(int a1, int a2) return offset; } -void qloadpalette() -{ - scrLoadPalette(); -} - int32_t qgetpalookup(int32_t a1, int32_t a2) { if (gFogMode) @@ -87,7 +81,7 @@ int32_t qloadboard(const char* filename, char flags, vec3_t* dapos, int16_t* daa void HookReplaceFunctions(void) { animateoffs_replace = qanimateoffs; - paletteLoadFromDisk_replace = qloadpalette; + paletteLoadFromDisk_replace = scrLoadPalette; getpalookup_replace = qgetpalookup; initspritelists_replace = qinitspritelists; insertsprite_replace = qinsertsprite; diff --git a/source/blood/src/screen.cpp b/source/blood/src/screen.cpp index 77dce39c1..05e111496 100644 --- a/source/blood/src/screen.cpp +++ b/source/blood/src/screen.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "common_game.h" #include "globals.h" -#include "screen.h" #include "v_video.h" #include "view.h" @@ -60,12 +59,7 @@ const char *PAL[5] = { }; -static RGB toRGB; -static RGB *palTable[5]; -static int curPalette; -bool gFogMode = false; - -void scrLoadPLUs(void) +static void scrLoadPLUs(void) { // load lookup tables for (int i = 0; i < MAXPALOOKUPS; i++) @@ -112,9 +106,4 @@ void scrLoadPalette(void) paletteloaded |= PALETTE_SHADE | PALETTE_TRANSLUC; } -void scrSetPalette(int palId) -{ - curPalette = palId; -} - END_BLD_NS diff --git a/source/blood/src/screen.h b/source/blood/src/screen.h deleted file mode 100644 index 441db1234..000000000 --- a/source/blood/src/screen.h +++ /dev/null @@ -1,44 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 2010-2019 EDuke32 developers and contributors -Copyright (C) 2019 Nuke.YKT - -This file is part of NBlood. - -NBlood is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -//------------------------------------------------------------------------- -#pragma once - -BEGIN_BLD_NS - -struct LOADITEM { - int id; - const char *name; -}; - -#pragma pack(push, 1) -struct RGB { - char red, green, blue; -}; -#pragma pack(pop) - -extern bool gFogMode; -void scrLoadPLUs(void); -void scrLoadPalette(void); -void scrSetPalette(int palId); - - -END_BLD_NS diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index ce4877de5..6f2066324 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -35,7 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "aistate.h" #include "map2d.h" #include "loadsave.h" -#include "screen.h" #include "sectorfx.h" #include "choke.h" #include "view.h" @@ -2241,13 +2240,6 @@ void DoLensEffect(void) void UpdateDacs(int nPalette, bool bNoTint) { - static RGB newDAC[256]; - static int oldPalette; - if (oldPalette != nPalette) - { - scrSetPalette(nPalette); - oldPalette = nPalette; - } gLastPal = 0; auto& tint = lookups.tables[MAXPALOOKUPS - 1]; tint.tintFlags = 0;