From f1f2985dc07ea2087f9b95e7e4bc35066ce93c50 Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 23 Oct 2013 06:50:02 +0000 Subject: [PATCH] Fixes (by Moa) - Hitting CTRL + V in Debug Build now writes all the data into file SGPVideoDump.txt (This can show instances of not removed objects ...) - Fixed guiMAPINV was not disposed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6525 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Standard Gaming Platform/vobject.cpp | 5 ++++- Strategic/mapscreen.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Standard Gaming Platform/vobject.cpp b/Standard Gaming Platform/vobject.cpp index cd870338..234cd7a3 100644 --- a/Standard Gaming Platform/vobject.cpp +++ b/Standard Gaming Platform/vobject.cpp @@ -64,7 +64,10 @@ HLIST ghVideoObjects = NULL; BOOLEAN gfVideoObjectsInit=FALSE; -#define USE_HASHMAP_FOR_VOBJECTS +#ifndef SGP_VIDEO_DEBUGGING + #define USE_HASHMAP_FOR_VOBJECTS +#endif + #ifdef USE_HASHMAP_FOR_VOBJECTS typedef struct VOBJECT_NODE { diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index b81f64b4..e87d4fc6 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -4868,9 +4868,9 @@ UINT32 MapScreenHandle(void) if(!AddVideoObject(&VObjectDesc, &guiMAPINV)) { - FilenameForBPP("INTERFACE\\mapinv.sti", VObjectDesc.ImageFile); + FilenameForBPP("INTERFACE\\mapinv.sti", VObjectDesc.ImageFile); + CHECKF(AddVideoObject(&VObjectDesc, &guiMAPINV)); } - CHECKF(AddVideoObject(&VObjectDesc, &guiMAPINV)); VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; FilenameForBPP("INTERFACE\\map_inv_2nd_gun_cover.sti", VObjectDesc.ImageFile);