changeset 814:35122475edd7

struct correction
author Gloval
date Tue, 26 Mar 2013 08:19:58 +0400
parents d6e84d158052
children ee75f497a579
files SaveLoad.cpp mm7_2.cpp
diffstat 2 files changed, 11 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/SaveLoad.cpp	Tue Mar 26 00:58:16 2013 +0400
+++ b/SaveLoad.cpp	Tue Mar 26 08:19:58 2013 +0400
@@ -24,15 +24,6 @@
 
 
 
-struct SaveDataHeader
-    {
-    int Signature;
-    char txt_ver[4];
-    int compressed_size;
-    int uncompressed_size;
-    };
-
-
 
 
 struct SavegameList *pSavegameList = new SavegameList;
@@ -292,7 +283,7 @@
   int pPositionX; // [sp+20Ch] [bp-64h]@2
   int v53; // [sp+210h] [bp-60h]@2
   int v54; // [sp+214h] [bp-5Ch]@2
-  SaveDataHeader Src; // [sp+218h] [bp-58h]@30
+  ODMHeader Src; // [sp+218h] [bp-58h]@30
   char v56; // [sp+21Ch] [bp-54h]@30
   char v57; // [sp+21Dh] [bp-53h]@30
   char v58; // [sp+21Eh] [bp-52h]@30
@@ -436,13 +427,13 @@
     CompactLayingItemsList();
     compressed_buf = (char*)malloc(1000000);
   //  v71 = (std::string *)compressed_buf;
-    Src.Signature = 91969;
-    Src.txt_ver[0] = 'm';
-    Src.txt_ver[1] = 'v';
-    Src.txt_ver[2] = 'i';
-    Src.txt_ver[3] = 'i';
-    Src.compressed_size = 0;
-    Src.uncompressed_size = 0;
+    Src.uVersion = 91969;
+    Src.pMagic[0] = 'm';
+    Src.pMagic[1] = 'v';
+    Src.pMagic[2] = 'i';
+    Src.pMagic[3] = 'i';
+    Src.uCompressedSize = 0;
+    Src.uDecompressedSize = 0;
     data_write_pos = uncompressed_buff;
     memcpy((void *)compressed_buf, &Src, 0x10);
     if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
@@ -570,8 +561,8 @@
       compressed_block_size = Size;
     }
     compressed_block_size += 16;
-    memcpy(&((SaveDataHeader *)compressed_buf)->compressed_size, &compressed_block_size, 4);
-    memcpy(&((SaveDataHeader *)compressed_buf)->uncompressed_size, &Size, 4);
+    memcpy(&((ODMHeader *)compressed_buf)->uCompressedSize, &compressed_block_size, 4);
+    memcpy(&((ODMHeader *)compressed_buf)->uDecompressedSize, &Size, 4);
     sprintf(Source, "%s%s", &Filename, &Ext);
     strcpy((char *)&pLodDirectory, Source);
     pLodDirectory.uDataSize = compressed_block_size;
--- a/mm7_2.cpp	Tue Mar 26 00:58:16 2013 +0400
+++ b/mm7_2.cpp	Tue Mar 26 08:19:58 2013 +0400
@@ -6548,7 +6548,7 @@
     pParty->vPosition.y = 1816;
     pParty->sPrevRotationY = 512;
     pParty->sRotationY = 512;
-    SaveGame(1, (__int16 *)1);
+    SaveGame(1, 1);
   }
   pAllocator->FreeChunk(pSave);
 }