comparison mm7_5.cpp @ 837:bebc19f3d2af

Save/load work with some problems
author Gloval
date Thu, 28 Mar 2013 00:37:27 +0400
parents 5e3f4bf3b8e6
children d061180f2b42
comparison
equal deleted inserted replaced
821:5e3f4bf3b8e6 837:bebc19f3d2af
515 continue; 515 continue;
516 case UIMSG_SaveGame: 516 case UIMSG_SaveGame:
517 if ( pGUIWindow_CurrentMenu->field_40 == v0 ) 517 if ( pGUIWindow_CurrentMenu->field_40 == v0 )
518 { 518 {
519 pKeyActionMap->_459ED1(0); 519 pKeyActionMap->_459ED1(0);
520 strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer); 520 strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], (const char *)pKeyActionMap->pPressedKeysBuffer);
521 } 521 }
522 DoSavegame(uLoadGameUI_SelectedSlot); 522 DoSavegame(uLoadGameUI_SelectedSlot);
523 stru_506E40.Release(); 523 stru_506E40.Release();
524 continue; 524 continue;
525 case UIMSG_Game_OpenSaveGameDialog: 525 case UIMSG_Game_OpenSaveGameDialog:
2049 pNPCData2->uFlags = pParty->vPosition.x; 2049 pNPCData2->uFlags = pParty->vPosition.x;
2050 pNPCData2->fame = pParty->vPosition.y; 2050 pNPCData2->fame = pParty->vPosition.y;
2051 pNPCData2->rep = pParty->vPosition.z; 2051 pNPCData2->rep = pParty->vPosition.z;
2052 LOWORD(pNPCData2->Location2D) = LOWORD(pParty->sRotationY); 2052 LOWORD(pNPCData2->Location2D) = LOWORD(pParty->sRotationY);
2053 HIWORD(pNPCData2->Location2D) = LOWORD(pParty->sRotationX); 2053 HIWORD(pNPCData2->Location2D) = LOWORD(pParty->sRotationX);
2054 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 ) 2054 if ( (signed int)pGames_LOD->uNumSubDirs / 2 <= 0 )
2055 continue; 2055 continue;
2056 uAction = 0; 2056 uAction = 0;
2057 while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) ) 2057 while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) )
2058 { 2058 {
2059 ++thisg; 2059 ++thisg;
2060 uAction += 32; 2060 uAction += 32;
2061 if ( thisg >= (signed int)pGames_LOD->uNumSubIndices / 2 ) 2061 if ( thisg >= (signed int)pGames_LOD->uNumSubDirs / 2 )
2062 continue; 2062 continue;
2063 } 2063 }
2064 HIWORD(pNPCData4->uProfession) = thisg; 2064 HIWORD(pNPCData4->uProfession) = thisg;
2065 } 2065 }
2066 continue; 2066 continue;
2264 LABEL_524: 2264 LABEL_524:
2265 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); 2265 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer);
2266 memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); 2266 memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216));
2267 if ( v216.uPropCount == 1 ) 2267 if ( v216.uPropCount == 1 )
2268 { 2268 {
2269 pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2); 2269 pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubDirs / 2);
2270 v70 = atoi(v216.pProperties[0]); 2270 v70 = atoi(v216.pProperties[0]);
2271 if ( v70 <= 0 || v70 >= 77 ) 2271 if ( v70 <= 0 || v70 >= 77 )
2272 { 2272 {
2273 //LABEL_90: 2273 //LABEL_90:
2274 v1 = ""; 2274 v1 = "";