diff SaveLoad.cpp @ 1477:7ef4b64f6329

* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load Added support for most of mm6 resources, placeholders for mm8 resources. Fixed few C4258
author Nomad
date Wed, 28 Aug 2013 18:43:07 +0200
parents 934074e7fcc1
children a27cdb3d753e
line wrap: on
line diff
--- a/SaveLoad.cpp	Wed Aug 28 14:39:01 2013 +0600
+++ b/SaveLoad.cpp	Wed Aug 28 18:43:07 2013 +0200
@@ -216,7 +216,7 @@
     Abortf(pTmpBuf.data());
   }
 
-  strcpy(pCurrentMapName.data(), header.pLocationName);
+  strcpy(pCurrentMapName, header.pLocationName);
   dword_6BE364_game_settings_1 |= 0x2001;
 
   for (uint i = 0; i < uNumSavegameFiles; ++i)
@@ -261,8 +261,8 @@
   unsigned int compressed_block_size; // [sp+260h] [bp-10h]@23
  
   //v66 = a2;
-  strcpy(byte_6BE3B0.data(), pCurrentMapName.data());
-  if (!_stricmp(pCurrentMapName.data(), "d05.blv")) // arena
+  strcpy(byte_6BE3B0.data(), pCurrentMapName);
+  if (!_stricmp(pCurrentMapName, "d05.blv")) // arena
     return;
 
   uncompressed_buff = (char*)malloc(1000000);
@@ -312,7 +312,7 @@
   memset(save_header.pName, 0, 20);
   memset(save_header.pLocationName, 0, 20);
   memset(save_header.field_30, 0, 52);
-  strcpy(save_header.pLocationName, pCurrentMapName.data());
+  strcpy(save_header.pLocationName, pCurrentMapName);
   save_header.uWordTime = pParty->uTimePlayed;
   strcpy(pLodDirectory.pFilename, "header.bin");
   pLodDirectory.uDataSize = sizeof(SavegameHeader);
@@ -485,7 +485,7 @@
       memcpy(data_write_pos, &pOutdoor->loc_time, 0x38);
       data_write_pos += 56;
     }
-    strcpy(Source, pCurrentMapName.data());
+    strcpy(Source, pCurrentMapName);
     _splitpath(Source, Drive, Dir, Filename, Ext);
    
     Size = (int)data_write_pos - (int)uncompressed_buff;
@@ -541,13 +541,13 @@
 
   //v1 = uSlot;
   //v6 = uSlot;
-  bNotArena = _stricmp(pCurrentMapName.data(), "d05.blv");
+  bNotArena = _stricmp(pCurrentMapName, "d05.blv");
   if ( bNotArena )
   {
     LOD::Directory pDir; // [sp+Ch] [bp-28h]@2
     SaveGame(0, 0);
     //v2 = 100 * v1;
-    strcpy(pSavegameHeader[uSlot].pLocationName, pCurrentMapName.data());
+    strcpy(pSavegameHeader[uSlot].pLocationName, pCurrentMapName);
     pSavegameHeader[uSlot].uWordTime = pParty->uTimePlayed;
     strcpy(pDir.pFilename, "header.bin");
     pDir.uDataSize = 100;