From db40cd433e17ccf4670512284b9d75cbe852d692 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:04:15 +0200 Subject: [PATCH] Move mapscreen bottom coordinates' initialization Fixes radar map's initial position in strategic screen being in the top right corner. --- Ja2/Init.cpp | 5 +++++ Strategic/mapscreen.cpp | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Ja2/Init.cpp b/Ja2/Init.cpp index bf74dbf3..2a4f7527 100644 --- a/Ja2/Init.cpp +++ b/Ja2/Init.cpp @@ -51,6 +51,7 @@ #include "Multilingual Text Code Generator.h" #include "editscreen.h" #include "Arms Dealer Init.h" +#include "Map Screen Interface Bottom.h" #include "MPXmlTeams.hpp" #include "Strategic Mines LUA.h" #include "UndergroundInit.h" @@ -1474,6 +1475,10 @@ UINT32 InitializeJA2(void) return( ERROR_SCREEN ); } + // InitRadarScreenCoords() depend on Mapscreen Interface Bottom coordinates -> need to initiate them first + // before calling InitTacticalEngine() + InitMapScreenInterfaceBottomCoords(); + // Init tactical engine if ( !InitTacticalEngine( ) ) { diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index bdd2a631..4e1f329c 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -4793,9 +4793,6 @@ UINT32 MapScreenHandle(void) InitPreviousPaths(); - // HEADROCK HAM 3.6: Init coordinates for new variable-sized message window - InitMapScreenInterfaceBottomCoords(); - // if arrival sector is invalid, reset to A9 if ( ( gsMercArriveSectorX < 1 ) || ( gsMercArriveSectorY < 1 ) || ( gsMercArriveSectorX > 16 ) || ( gsMercArriveSectorY > 16 ) )