From bcf0c1b513f3d1a36f7e022c932901fd85797bfe Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Sat, 27 May 2023 11:51:20 -0700 Subject: [PATCH 1/2] Add version info to asserts --- Standard Gaming Platform/DEBUG.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Standard Gaming Platform/DEBUG.cpp b/Standard Gaming Platform/DEBUG.cpp index 3fd27413e8..8463e9fb4a 100644 --- a/Standard Gaming Platform/DEBUG.cpp +++ b/Standard Gaming Platform/DEBUG.cpp @@ -43,6 +43,9 @@ #endif #include "GameSettings.h" #include "SaveLoadGame.h" +#include "Font.h" +#include "GameVersion.h" +#include "Text.h" #include "debug_util.h" @@ -408,6 +411,8 @@ void _FailMessage(const char* message, unsigned lineNum, const char * functionNa sgp::dumpStackTrace(message); + mprintf( 10, 10, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation ); + std::stringstream basicInformation; basicInformation << "Assertion Failure [Line " << lineNum; if (functionName) { From dc0de8ae290151954dd71cb493e3faec99f332de Mon Sep 17 00:00:00 2001 From: rftrdev <102184004+rftrdev@users.noreply.github.com> Date: Sat, 27 May 2023 11:54:20 -0700 Subject: [PATCH 2/2] Add gMAXITEMS_READ to arms dealer init assert --- Tactical/Arms Dealer Init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tactical/Arms Dealer Init.cpp b/Tactical/Arms Dealer Init.cpp index 1a08622100..51f5643dbf 100644 --- a/Tactical/Arms Dealer Init.cpp +++ b/Tactical/Arms Dealer Init.cpp @@ -1120,7 +1120,7 @@ UINT32 GetArmsDealerItemTypeFromItemNumber( UINT16 usItem ) return( 0 ); break; default: - AssertMsg( FALSE, String( "GetArmsDealerItemTypeFromItemNumber(), invalid class %d for item %d. DF 0.", Item[ usItem ].usItemClass, usItem ) ); + AssertMsg( FALSE, String( "GetArmsDealerItemTypeFromItemNumber(), invalid class %d for item %d. gMAXITEMS_READ = %d.", Item[ usItem ].usItemClass, usItem, gMAXITEMS_READ ) ); break; } return( 0 );