# HG changeset patch # User Nomad # Date 1364294501 -7200 # Node ID 448e6d979c7a45831d01b9aadbc0cf33349af30c # Parent cfc65feef029821aa5065b1343a95972c4e02c41# Parent ee75f497a57977dac30cc072a03bcfb07af3fed0 Merge diff -r cfc65feef029 -r 448e6d979c7a SaveLoad.cpp --- a/SaveLoad.cpp Tue Mar 26 12:40:27 2013 +0200 +++ b/SaveLoad.cpp Tue Mar 26 12:41:41 2013 +0200 @@ -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 cfc65feef029 -r 448e6d979c7a mm7_2.cpp --- a/mm7_2.cpp Tue Mar 26 12:40:27 2013 +0200 +++ b/mm7_2.cpp Tue Mar 26 12:41:41 2013 +0200 @@ -6548,7 +6548,7 @@ pParty->vPosition.y = 1816; pParty->sPrevRotationY = 512; pParty->sRotationY = 512; - SaveGame(1, (__int16 *)1); + SaveGame(1, 1); } pAllocator->FreeChunk(pSave); }