Mercurial > mm7
diff SaveLoad.cpp @ 817:448e6d979c7a
Merge
author | Nomad |
---|---|
date | Tue, 26 Mar 2013 12:41:41 +0200 |
parents | cfc65feef029 35122475edd7 |
children | bebc19f3d2af |
line wrap: on
line diff
--- 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;