From ddd90f5317afd475f0d42d224e5601be3212360e Mon Sep 17 00:00:00 2001 From: ChrisL Date: Thu, 8 Jan 2009 16:41:34 +0000 Subject: [PATCH] Bugfix: Corrected the shopkeeper interface so that the clock and town strings are displayed in the correct location. Bugfix: Added a condition so that the clock doesn't try to display on the SM Panel while in NIV mode. It was displaying, just hidden under the radar screen. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2473 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Panels.cpp | 4 +++- Tactical/Interface Panels.h | 5 +++++ Tactical/ShopKeeper Interface.cpp | 16 ++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Tactical/Interface Panels.cpp b/Tactical/Interface Panels.cpp index 6340516f..ca755813 100644 --- a/Tactical/Interface Panels.cpp +++ b/Tactical/Interface Panels.cpp @@ -2734,7 +2734,9 @@ void RenderSMPanel( BOOLEAN *pfDirty ) if( fRenderRadarScreen == TRUE ) { // Render clock - RenderClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y ); + // CHRISL: If we're in NIV mode, don't render the clock on the SM panel + if(UsingNewInventorySystem() == false) + RenderClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y ); CreateMouseRegionForPauseOfClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y ); // CHRISL: Change function call to include X,Y coordinates. RenderTownIDString( LOCATION_NAME_X, LOCATION_NAME_Y ); diff --git a/Tactical/Interface Panels.h b/Tactical/Interface Panels.h index 4605cf15..bb0de3bc 100644 --- a/Tactical/Interface Panels.h +++ b/Tactical/Interface Panels.h @@ -42,6 +42,11 @@ typedef enum #define SHOW_LOCATOR_NORMAL 1 #define SHOW_LOCATOR_FAST 2 +extern int INTERFACE_CLOCK_X; +extern int INTERFACE_CLOCK_Y; +extern int LOCATION_NAME_X; +extern int LOCATION_NAME_Y; + BOOLEAN CreateSMPanelButtons( ); void RemoveSMPanelButtons( ); BOOLEAN InitializeSMPanel( ); diff --git a/Tactical/ShopKeeper Interface.cpp b/Tactical/ShopKeeper Interface.cpp index 13f19f5a..98265b79 100644 --- a/Tactical/ShopKeeper Interface.cpp +++ b/Tactical/ShopKeeper Interface.cpp @@ -1396,9 +1396,13 @@ void HandleShopKeeperInterface() fInterfacePanelDirty = DIRTYLEVEL0; } - RenderClock( CLOCK_X, CLOCK_Y ); + // CHRISL: If in NIV mode, don't display the clock + //RenderClock( CLOCK_X, CLOCK_Y ); + if( UsingNewInventorySystem() == false ) + RenderClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y ); // CHRISL: Added X,Y parameters to allow control of TownID string placement. - RenderTownIDString( CLOCK_X, (CLOCK_Y - 29) ); + //RenderTownIDString( CLOCK_X, (CLOCK_Y - 29) ); + RenderTownIDString( LOCATION_NAME_X, LOCATION_NAME_Y ); //ATM: // RenderSkiAtmPanel(); @@ -1543,9 +1547,13 @@ BOOLEAN RenderShopKeeperInterface() CrossOutUnwantedItems( ); //Render the clock and the town name - RenderClock( CLOCK_X, CLOCK_Y ); + // CHRISL: If in NIV mode, don't display the clock + //RenderClock( CLOCK_X, CLOCK_Y ); + if( UsingNewInventorySystem() == false ) + RenderClock( INTERFACE_CLOCK_X, INTERFACE_CLOCK_Y ); // CHRISL: Added X,Y parameters to allow control of TownID string placement. - RenderTownIDString( CLOCK_X, (CLOCK_Y - 29) ); + RenderTownIDString( LOCATION_NAME_X, LOCATION_NAME_Y ); + //RenderTownIDString( CLOCK_X, (CLOCK_Y - 29) ); // RenderTacticalInterface( ); // RenderSMPanel( &fDirty );