From 0a7f148a8b5ffd32b9d5de029f86cc9aef85d742 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 23 Jul 2018 02:56:11 +0000 Subject: [PATCH] Create P_GetOverheadPal() and restore the DOS definition of it. DOS: the player sprite's pal (including pants color and frozenness), unaffected by sector floor pal what the code had for some reason: the sector's floor pal, neglecting the nofloorpal bit, frozenness, and the player's pants color I contend that it is okay for the automap sprite to ignore the sector's color for map legibility purposes. git-svn-id: https://svn.eduke32.com/eduke32@6955 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 5 +++++ source/duke3d/src/player.h | 1 + source/duke3d/src/screens.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 4a86c7abc..842c082c1 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -1688,6 +1688,11 @@ int P_GetKneePal(DukePlayer_t const * pPlayer, int const hudPal) return hudPal == 0 ? pPlayer->palookup : hudPal; } +int P_GetOverheadPal(DukePlayer_t const * pPlayer) +{ + return sprite[pPlayer->i].pal; +} + static int P_DisplayFist(int const fistShade) { DukePlayer_t const *const pPlayer = g_player[screenpeek].ps; diff --git a/source/duke3d/src/player.h b/source/duke3d/src/player.h index f5c8bd5a3..64376113f 100644 --- a/source/duke3d/src/player.h +++ b/source/duke3d/src/player.h @@ -368,6 +368,7 @@ int P_GetKneePal(const DukePlayer_t *pPlayer); int P_GetKneePal(const DukePlayer_t *pPlayer, int const hudPal); extern "C" { #endif +int P_GetOverheadPal(const DukePlayer_t *pPlayer); int Proj_GetDamage(projectile_t const *pProj); diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index b5a8d9397..a8bbe664a 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -611,7 +611,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16 else if (j > (65536<<1)) j = (65536<<1); rotatesprite_win((x1<<4)+(xdim<<15), (y1<<4)+(ydim<<15), j, daang, i, pSprite->shade, - (pPlayer->cursectnum > -1) ? sector[pPlayer->cursectnum].floorpal : 0, 0); + P_GetOverheadPal(pPlayer), 0); } } }