From 140174d1eec0f0002b8742fc8f1eb9b1e303dc32 Mon Sep 17 00:00:00 2001 From: nukeykt Date: Sat, 29 Jun 2019 21:24:23 +0900 Subject: [PATCH] Minor tweaks # Conflicts: # source/blood/src/m32common.cpp # source/blood/src/mapedit.cpp --- source/blood/src/db.cpp | 6 ++++++ source/blood/src/screen.cpp | 2 ++ source/build/src/palette.cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/blood/src/db.cpp b/source/blood/src/db.cpp index d61e246e2..64787d022 100644 --- a/source/blood/src/db.cpp +++ b/source/blood/src/db.cpp @@ -256,6 +256,7 @@ void qinitspritelists(void) // Replace InsertSpriteStat(i, kMaxStatus); } memset(gStatCount, 0, sizeof(gStatCount)); + Numsprites = 0; } int InsertSprite(int nSector, int nStat) @@ -279,6 +280,8 @@ int InsertSprite(int nSector, int nStat) pSprite->index = nSprite; xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0; + Numsprites++; + return nSprite; } @@ -299,6 +302,8 @@ int DeleteSprite(int nSprite) RemoveSpriteSect(nSprite); InsertSpriteStat(nSprite, kMaxStatus); + Numsprites--; + return nSprite; } @@ -1079,6 +1084,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short } InsertSpriteSect(i, sprite[i].sectnum); InsertSpriteStat(i, sprite[i].statnum); + Numsprites++; sprite[i].index = i; qsprite_filler[i] = pSprite->blend; pSprite->blend = 0; diff --git a/source/blood/src/screen.cpp b/source/blood/src/screen.cpp index f6d9f0643..a6d34ce86 100644 --- a/source/blood/src/screen.cpp +++ b/source/blood/src/screen.cpp @@ -128,6 +128,8 @@ glblend_t const bloodglblend = void scrLoadPalette(void) { + initfastcolorlookup_scale(30, 59, 11); + initfastcolorlookup_gridvectors(); paletteloaded = 0; initprintf("Loading palettes\n"); for (int i = 0; i < 5; i++) diff --git a/source/build/src/palette.cpp b/source/build/src/palette.cpp index e5b928581..9d351d81f 100644 --- a/source/build/src/palette.cpp +++ b/source/build/src/palette.cpp @@ -389,7 +389,7 @@ void palettePostLoadTables(void) for (size_t i = 0; i<16; i++) { palette_t *edcol = (palette_t *) &vgapal16[4*i]; - editorcolors[i] = getclosestcol_lim(edcol->b, edcol->g, edcol->r, 239); + editorcolors[i] = getclosestcol_lim(edcol->b, edcol->g, edcol->r, bloodhack ? 254 : 239); } // Bmemset(PaletteIndexFullbrights, 0, sizeof(PaletteIndexFullbrights));