# HG changeset patch # User Gloval # Date 1364271598 -14400 # Node ID 35122475edd741c6e75a9e222f63bf1b1764b04d # Parent d6e84d15805264b111337f183b2c09a84e202a5b struct correction diff -r d6e84d158052 -r 35122475edd7 SaveLoad.cpp --- 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; diff -r d6e84d158052 -r 35122475edd7 mm7_2.cpp --- 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); }