diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 578d4c733..bfe665be2 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -167,9 +167,6 @@ short nCurBodyNum = 0; short nBodyTotal = 0; short lastfps; - -short nMapMode = 0; - short nTotalPlayers = 1; // TODO: Rename this (or make it static) so it doesn't conflict with library function //short socket = 0; diff --git a/source/exhumed/src/exhumed.h b/source/exhumed/src/exhumed.h index ae0641fd3..bd98f6980 100644 --- a/source/exhumed/src/exhumed.h +++ b/source/exhumed/src/exhumed.h @@ -188,11 +188,6 @@ extern short nBodyTotal; extern short bSnakeCam; extern uint8_t nCinemaSeen; -//extern short nScreenWidth; -//extern short nScreenHeight; - -extern short nMapMode; - extern short nButtonColor; extern short nHeadStage; diff --git a/source/exhumed/src/gameloop.cpp b/source/exhumed/src/gameloop.cpp index 4a6fc520c..6b761910d 100644 --- a/source/exhumed/src/gameloop.cpp +++ b/source/exhumed/src/gameloop.cpp @@ -74,7 +74,7 @@ static int FinishLevel(TArray &jobs) StopAllSounds(); bCamera = false; - nMapMode = 0; + automapMode = am_off; STAT_Update(lnum == kMap20); if (lnum != kMap20) diff --git a/source/exhumed/src/gun.cpp b/source/exhumed/src/gun.cpp index 283c4c1fd..74fadf7e1 100644 --- a/source/exhumed/src/gun.cpp +++ b/source/exhumed/src/gun.cpp @@ -958,7 +958,7 @@ void DrawWeapons(double smooth) nPal = RemapPLU(nPal); - double xOffset, yOffset; + double xOffset = 0, yOffset = 0; if (cl_weaponsway) { diff --git a/source/exhumed/src/input.cpp b/source/exhumed/src/input.cpp index 4a079a066..16e2a52f2 100644 --- a/source/exhumed/src/input.cpp +++ b/source/exhumed/src/input.cpp @@ -128,7 +128,7 @@ void UpdateInputs() void CheckKeys() { - if (!nMapMode) + if (automapMode == am_off) { if (buttonMap.ButtonDown(gamefunc_Enlarge_Screen)) { @@ -191,11 +191,11 @@ void CheckKeys2() buttonMap.ClearButton(gamefunc_Map); if (!nFreeze) { - nMapMode = (nMapMode + 1) % 3; + automapMode = (automapMode + 1) % 3; } } - if (nMapMode != 0) + if (automapMode != am_off) { int const timerOffset = ((int)totalclock - nonsharedtimer); nonsharedtimer += timerOffset; diff --git a/source/exhumed/src/map.cpp b/source/exhumed/src/map.cpp index 589cbcff0..54e677e7c 100644 --- a/source/exhumed/src/map.cpp +++ b/source/exhumed/src/map.cpp @@ -335,7 +335,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16 if (sector[wal->nextsector].ceilingz == z1 && sector[wal->nextsector].floorz == z2) if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue; - if (nMapMode == 2) + if (automapMode == am_full) col = 111; else col = 111 - min(klabs(z2 - nPlayerZ) >> 13, 12); @@ -364,7 +364,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16 endwall = sector[i].wallptr + sector[i].wallnum; z2 = sector[i].floorz; - if (nMapMode == 2) + if (automapMode == am_full) { col = 111; } @@ -465,9 +465,9 @@ void UpdateMap() void DrawMap() { - if (!nFreeze && nMapMode) { + if (!nFreeze && automapMode != am_off) { //drawoverheadmap(initx, inity, lMapZoom, inita); - if (nMapMode == 2) + if (automapMode == am_full) { twod->ClearScreen(); renderDrawMapView(initx, inity, lMapZoom, inita); diff --git a/source/exhumed/src/player.cpp b/source/exhumed/src/player.cpp index 207556d96..ebfd2f63e 100644 --- a/source/exhumed/src/player.cpp +++ b/source/exhumed/src/player.cpp @@ -453,7 +453,7 @@ void InitPlayerInventory(short nPlayer) PlayerList[nPlayer].nCurrentWeapon = 0; if (nPlayer == nLocalPlayer) { - nMapMode = 0; + automapMode = am_off; } nPlayerScore[nPlayer] = 0;