From 119cf11f0800b4f2340b4bbc3d603c441c4e6338 Mon Sep 17 00:00:00 2001 From: Nathan Fulton Date: Sat, 29 Apr 2017 21:17:11 -0400 Subject: [PATCH] Add 24bpp color array Change Color to dword and add gaclr24bpp --- game/game.cpp | 6 ++++++ game/ht.h | 3 ++- game/misc.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/game/game.cpp b/game/game.cpp index 86a9372..2961a00 100644 --- a/game/game.cpp +++ b/game/game.cpp @@ -1183,6 +1183,12 @@ bool Game::InitDisplay(int immRequested) gfGrayscale = false; break; + case 24: + case 32: + gaclrFixed = gaclr24bpp; + gfGrayscale = false; + break; + default: Assert("Whoa! Unsupported color depth"); break; diff --git a/game/ht.h b/game/ht.h index 9302781..ca74963 100644 --- a/game/ht.h +++ b/game/ht.h @@ -304,7 +304,7 @@ const int knDecreasedDamagePercent = 90; // Color type -typedef word Color; // clr +typedef dword Color; // clr // Network stuff @@ -8450,6 +8450,7 @@ extern int gtGameSpeed; extern AnimationData *g_panidMoveTarget; extern UpdateMap *gpupdSim; extern Color *gaclrFixed; +extern Color gaclr24bpp[]; extern Color gaclr8bpp[]; extern Color gaclr4bpp[]; extern byte gmpDistFromDxy[10][10]; diff --git a/game/misc.cpp b/game/misc.cpp index 4338d80..6d22846 100644 --- a/game/misc.cpp +++ b/game/misc.cpp @@ -1370,6 +1370,58 @@ Color gaclr8bpp[] = { 52, // Galaxite fullness indicator/neon pink }; +Color gaclr24bpp[] = { + 255, // black (0 0 0) + 4244438271, // white (252 252 252) + 4227858687, // red (252 0 0) + 16515327, // green (0 252 0) + 4244373759, // yellow (252 252 0) + 7661823, // side 1 color (0 116 232) + 3894411519, // side 2 color (232 32 0) + 3907256575, // side 3 color (232 228 0) + 1761410303, // side 4 color (104 252 252) + 12633343, // button fill (0 192 196) + 6341887, // button border (0 96 196) + 255, // menu background (0 0 0) + 255, // form background (0 0 0) + 473447423, // mini map border area (28 56 59) + 2606271743, // Galaxite minimap color (155 88 140) + 1419816191, // button fill highlight (84 160 172) + 2223014143, // medium gray (132 128 128) + 7661823, // blue side 0 (0 116 232) + 6341887, // blue side 1 (0 96 196) + 4225279, // blue side 2 (0 64 120) + 3169535, // blue side 3 (0 48 92) + 2113791, // blue side 4 (0 32 64) + 3894411519, // red side 0 (232 32 0) + 3290235135, // red side 1 (196 29 0) + 2013790463, // red side 2 (120 8 0) + 1544028415, // red side 3 (92 8 0) + 1074266367, // red side 4 (64 8 0) + 3907256575, // yellow side 0 (232 228 0) + 3300917503, // yellow side 1 (196 192 0) + 2020868351, // yellow side 2 (120 116 0) + 1549271295, // yellow side 3 (92 88 0) + 1077674239, // yellow side 4 (64 60 0) + 1761410303, // cyan side 0 (104 252 252) + 1419816191, // cyan side 1 (84 160 172) + 947422207, // cyan side 2 (56 120 131) + 676354303, // cyan side 3 (40 80 88) + 473447423, // cyan side 4 (28 56 59) + 271068159, // list background (16 40 43) + 1419816191, // list border (84 160 172) + 3103324415, // Jana font (184 248 248) + 1761410303, // Andy font (104 252 252) + 3907256575, // Olstrom font (232 228 0) + 3894411519, // Fox font (232 32 0) + 3638089983, // neutral side 0 (216 216 216) + 2829625599, // neutral side 1 (168 168 168) + 2021161215, // neutral side 2 (120 120 120) + 1549556991, // neutral side 3 (92 92 92) + 1077952767, // neutral side 4 (64 64 64) + 4227923199, // Galaxite fullness indicator/neon pink (252 0 252) +}; + int gaiclrSide[kcSides] = { kiclrSideNeutral, kiclrSide1, kiclrSide2, kiclrSide3, kiclrSide4 }; void DrawBorder(DibBitmap *pbm, Rect *prc, int nThickness, Color clr, UpdateMap *pupd)