Mercurial > mm7
comparison SaveLoad.cpp @ 466:91e1ba340f39
Слияние
author | Ritor1 |
---|---|
date | Mon, 25 Feb 2013 09:09:08 +0600 |
parents | a4a5996fea5b |
children | a3939d5067c4 |
comparison
equal
deleted
inserted
replaced
465:e65d75206263 | 466:91e1ba340f39 |
---|---|
83 pSoundList->_4A9DCD(j, 1); | 83 pSoundList->_4A9DCD(j, 1); |
84 break; | 84 break; |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 sprintf(pTmpBuf, "saves\\%s", pSavegameList->pSavesNames[uSlot]); | 88 sprintf(pTmpBuf, "saves\\%s", pSavegameList->pFileList[uSlot].pSaveFileName); |
89 | 89 |
90 pNew_LOD->CloseWriteFile(); | 90 pNew_LOD->CloseWriteFile(); |
91 if (!CopyFileA(pTmpBuf, "data\\new.lod", 0)) | 91 if (!CopyFileA(pTmpBuf, "data\\new.lod", 0)) |
92 int e = GetLastError(); | 92 int e = GetLastError(); |
93 | 93 |
194 pGUIWindow_CurrentMenu->Release(); | 194 pGUIWindow_CurrentMenu->Release(); |
195 pCurrentScreen = SCREEN_GAME; | 195 pCurrentScreen = SCREEN_GAME; |
196 | 196 |
197 viewparams->bRedrawGameUI = true; | 197 viewparams->bRedrawGameUI = true; |
198 | 198 |
199 SetUserInterface(pParty->uAlignment, true); | 199 SetUserInterface(pParty->alignment, true); |
200 | 200 |
201 pEventTimer->Resume(); | 201 pEventTimer->Resume(); |
202 pEventTimer->StopGameTime(); | 202 pEventTimer->StopGameTime(); |
203 | 203 |
204 v25 = pGames_LOD->DoesContainerExist(header.pLocationName); | 204 v25 = pGames_LOD->DoesContainerExist(header.pLocationName); |
669 | 669 |
670 //----- (0045E297) -------------------------------------------------------- | 670 //----- (0045E297) -------------------------------------------------------- |
671 void SavegameList::Initialize(unsigned int bHideEmptySlots) | 671 void SavegameList::Initialize(unsigned int bHideEmptySlots) |
672 { | 672 { |
673 memset(pSavegameList, 0, 0x3138); | 673 memset(pSavegameList, 0, 0x3138); |
674 // Reset(); | |
674 uNumSavegameFiles = 0; | 675 uNumSavegameFiles = 0; |
675 | 676 |
676 _chdir("saves"); | 677 _chdir("saves"); |
677 { | 678 { |
678 if (!bHideEmptySlots && _access(pGlobalTXT_LocalizationStrings[613], 0) != -1 ) // AutoSave.MM7 | 679 if (!bHideEmptySlots && _access(pGlobalTXT_LocalizationStrings[613], 0) != -1 ) // AutoSave.MM7 |
679 strcpy(pSavesNames[uNumSavegameFiles++], pGlobalTXT_LocalizationStrings[613]); | 680 strcpy(pSavegameList->pFileList[uNumSavegameFiles++].pSaveFileName, pGlobalTXT_LocalizationStrings[613]); |
680 | 681 |
681 for (uint i = 0; i < 40; ++i) | 682 for (uint i = 0; i < 40; ++i) |
682 { | 683 { |
683 sprintf(pTmpBuf, "save%03d.mm7", i); | 684 sprintf(pTmpBuf, "save%03d.mm7", i); |
684 if (_access(pTmpBuf, 0) == -1) | 685 if (_access(pTmpBuf, 0) == -1) |
685 continue; | 686 continue; |
686 | 687 |
687 uint idx = i; | 688 uint idx = i; |
688 if (!bHideEmptySlots) | 689 if (!bHideEmptySlots) |
689 idx = uNumSavegameFiles; | 690 idx = uNumSavegameFiles; |
690 strcpy(pSavesNames[idx], pTmpBuf); | 691 strcpy(pSavegameList->pFileList[idx].pSaveFileName, pTmpBuf); |
691 | 692 |
692 ++uNumSavegameFiles; | 693 ++uNumSavegameFiles; |
693 } | 694 } |
694 } | 695 } |
695 _chdir(".."); | 696 _chdir(".."); |