comparison SaveLoad.cpp @ 160:062e8a8e09bc

LoadWindow(work) 30.11.12
author Ritor1
date Fri, 30 Nov 2012 17:29:38 +0600
parents a64b244da76c
children af624eaf2fc5
comparison
equal deleted inserted replaced
159:494015e90b8b 160:062e8a8e09bc
342 sprintf(Str, pGlobalTXT_LocalizationStrings[612], 200); //Сохраненная игра повреждена! Code=%d 342 sprintf(Str, pGlobalTXT_LocalizationStrings[612], 200); //Сохраненная игра повреждена! Code=%d
343 MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:773", 0); 343 MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:773", 0);
344 } 344 }
345 345
346 assert(sizeof(SavegameHeader) == 100); 346 assert(sizeof(SavegameHeader) == 100);
347 memset(header.pName, 0, 20);
348 memset(header.pLocationName, 0, 20);
349 memset(header.field_30, 0, 52);
347 strcpy(header.pLocationName, pCurrentMapName); 350 strcpy(header.pLocationName, pCurrentMapName);
348 header.uWordTime = pParty->uTimePlayed; 351 header.uWordTime = pParty->uTimePlayed;
349 strcpy(pDir.pFilename, "header.bin"); 352 strcpy(pDir.pFilename, "header.bin");
350 pDir.uDataSize = sizeof(SavegameHeader); 353 pDir.uDataSize = sizeof(SavegameHeader);
351 if (pNew_LOD->Write(&pDir, &header, 0)) 354 if (pNew_LOD->Write(&pDir, &header, 0))
664 667
665 668
666 //----- (0045E297) -------------------------------------------------------- 669 //----- (0045E297) --------------------------------------------------------
667 void SavegameList::Initialize(unsigned int bHideEmptySlots) 670 void SavegameList::Initialize(unsigned int bHideEmptySlots)
668 { 671 {
669 uNumSavegameFiles = 0; 672 memset(pSavegameList, 0, 0x3138);
673 uNumSavegameFiles = 0;
670 674
671 _chdir("saves"); 675 _chdir("saves");
672 { 676 {
673 if (!bHideEmptySlots && _access(pGlobalTXT_LocalizationStrings[613], 0) != -1 ) 677 if (!bHideEmptySlots && _access(pGlobalTXT_LocalizationStrings[613], 0) != -1 )
674 strcpy(pSavesNames[uNumSavegameFiles++], pGlobalTXT_LocalizationStrings[613]); 678 strcpy(pSavesNames[uNumSavegameFiles++], pGlobalTXT_LocalizationStrings[613]);