Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/mm7_5.cpp Tue Mar 26 15:21:03 2013 +0000 +++ b/mm7_5.cpp Thu Mar 28 00:37:27 2013 +0400 @@ -517,7 +517,7 @@ if ( pGUIWindow_CurrentMenu->field_40 == v0 ) { pKeyActionMap->_459ED1(0); - strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer); + strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], (const char *)pKeyActionMap->pPressedKeysBuffer); } DoSavegame(uLoadGameUI_SelectedSlot); stru_506E40.Release(); @@ -2051,14 +2051,14 @@ pNPCData2->rep = pParty->vPosition.z; LOWORD(pNPCData2->Location2D) = LOWORD(pParty->sRotationY); HIWORD(pNPCData2->Location2D) = LOWORD(pParty->sRotationX); - if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 ) + if ( (signed int)pGames_LOD->uNumSubDirs / 2 <= 0 ) continue; uAction = 0; while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) ) { ++thisg; uAction += 32; - if ( thisg >= (signed int)pGames_LOD->uNumSubIndices / 2 ) + if ( thisg >= (signed int)pGames_LOD->uNumSubDirs / 2 ) continue; } HIWORD(pNPCData4->uProfession) = thisg; @@ -2266,7 +2266,7 @@ memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); if ( v216.uPropCount == 1 ) { - pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2); + pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubDirs / 2); v70 = atoi(v216.pProperties[0]); if ( v70 <= 0 || v70 >= 77 ) {