From 3cc8153a61104c5ade83355a62ede5399412d9a3 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 13 Sep 2012 19:53:14 +0000 Subject: [PATCH] - fixed an issue saving the map in vanilla mode (by DepressivesBrot) - fixed a minor cosmetic issue (loading wrong frame for the overhead map) (by DepressivesBrot) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5564 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Map Information.cpp | 4 ++++ TileEngine/overhead map.cpp | 2 +- TileEngine/worlddef.cpp | 20 +++++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Tactical/Map Information.cpp b/Tactical/Map Information.cpp index ada963394..a93139843 100644 --- a/Tactical/Map Information.cpp +++ b/Tactical/Map Information.cpp @@ -629,6 +629,10 @@ void UpdateOldVersionMap() { //Allow map edgepoints to be regenerated as new system has been reenabled. gMapInformation.ubMapVersion = 27; } + if( gMapInformation.ubMapVersion < 29 ) + { + gMapInformation.ubMapVersion = 29; + } } void AutoCalculateItemNoOverwriteStatus() diff --git a/TileEngine/overhead map.cpp b/TileEngine/overhead map.cpp index 004d6e70b..1e6b366ea 100644 --- a/TileEngine/overhead map.cpp +++ b/TileEngine/overhead map.cpp @@ -641,7 +641,7 @@ void GoIntoOverheadMap( ) FilenameForBPP("INTERFACE\\MAP_BORD_800x600.sti", VObjectDesc.ImageFile); if( !AddVideoObject( &VObjectDesc, &uiOVERMAP ) ) AssertMsg(0, "Missing INTERFACE\\MAP_BORD_800x600.sti" ); - }else if(iResolution >= _1680x1050){ + }else if(iResolution >= _1680x1050 && gfUseBiggerOverview){ VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; FilenameForBPP("INTERFACE\\MAP_BORD_1920x1080.sti", VObjectDesc.ImageFile); if( !AddVideoObject( &VObjectDesc, &uiOVERMAP ) ) diff --git a/TileEngine/worlddef.cpp b/TileEngine/worlddef.cpp index b768bf847..a1e361904 100644 --- a/TileEngine/worlddef.cpp +++ b/TileEngine/worlddef.cpp @@ -2214,12 +2214,22 @@ BOOLEAN SaveWorld(const STR8 puiFilename, FLOAT dMajorMapVersion, UINT8 ubMinorM } } - for ( cnt = 0; cnt < WORLD_MAX; cnt++ ) - { + // Write out room information - FileWrite( hfile, &gusWorldRoomInfo[ cnt ], sizeof( UINT16 ), &uiBytesWritten ); - - } + if(ubMinorMapVersion < 29){ + UINT8 tmproom; + for ( cnt = 0; cnt < WORLD_MAX; cnt++ ) + { + tmproom = (UINT8)gusWorldRoomInfo[ cnt ]; + FileWrite( hfile, &tmproom, sizeof( UINT8 ), &uiBytesWritten ); + } + }else{ + for ( cnt = 0; cnt < WORLD_MAX; cnt++ ) + { + FileWrite( hfile, &gusWorldRoomInfo[ cnt ], sizeof( UINT16 ), &uiBytesWritten ); + } + } + if ( uiFlags & MAP_WORLDITEMS_SAVED ) {