From c0b39b322f2f4ca98ec5370be0577f9df9597ce2 Mon Sep 17 00:00:00 2001 From: Marco Antonio Jaguaribe Costa Date: Wed, 18 Jan 2023 16:36:02 -0300 Subject: [PATCH] Re-add Debug messages when door structures are missing Uncovered in #87 --- Tactical/Keys.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tactical/Keys.cpp b/Tactical/Keys.cpp index f7c53fea0..b5e9c0c30 100644 --- a/Tactical/Keys.cpp +++ b/Tactical/Keys.cpp @@ -1167,6 +1167,11 @@ BOOLEAN LoadDoorTableFromDoorTableTempFile( ) +static auto ComplainAboutMissingDoorStructure(const INT32 GridNo) { +#if JA2TESTVERSION + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", GridNo); +#endif +} // fOpen is True if the door is open, false if it is closed BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fPerceivedOpen ) @@ -1190,6 +1195,7 @@ BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fPerceivedOpen ) if ( pBaseStructure == NULL ) { + ComplainAboutMissingDoorStructure(sGridNo); return( FALSE ); } @@ -1311,6 +1317,7 @@ BOOLEAN IsDoorOpen( INT32 sGridNo ) if ( pBaseStructure == NULL ) { + ComplainAboutMissingDoorStructure(sGridNo); return( FALSE ); } @@ -1361,6 +1368,7 @@ DOOR_STATUS *GetDoorStatus( INT32 sGridNo ) if ( pBaseStructure == NULL ) { + ComplainAboutMissingDoorStructure(sGridNo); return( NULL ); } @@ -1521,6 +1529,7 @@ void SyncronizeDoorStatusToStructureData( DOOR_STATUS *pDoorStatus ) if ( pBaseStructure == NULL ) { + ComplainAboutMissingDoorStructure(pDoorStatus->sGridNo); return; } @@ -1602,6 +1611,7 @@ void InternalUpdateDoorGraphicFromStatus( DOOR_STATUS *pDoorStatus, BOOLEAN fUse if ( pBaseStructure == NULL ) { + ComplainAboutMissingDoorStructure(pDoorStatus->sGridNo); return; }