Mercurial > mm7
changeset 1916:918a8cebd7a4
LoadGame slots error fix
author | Ritor1 |
---|---|
date | Tue, 22 Oct 2013 23:42:46 +0600 |
parents | 6e39bf5f13dd |
children | 4ecc099ef876 |
files | GUIWindow.cpp Game.cpp mm7_5.cpp |
diffstat | 3 files changed, 33 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Tue Oct 22 22:04:25 2013 +0600 +++ b/GUIWindow.cpp Tue Oct 22 23:42:46 2013 +0600 @@ -2222,6 +2222,11 @@ if ( sub_4637E0_is_there_popup_onscreen() ) UI_OnMouseRightClick(0); } +void LoadFonts_and_DrawCopyrightWindow() +{ + MainMenuUI_LoadFontsAndSomeStuff(); + DrawCopyrightWindow(); +} //----- (00415485) -------------------------------------------------------- void DrawCopyrightWindow() {
--- a/Game.cpp Tue Oct 22 22:04:25 2013 +0600 +++ b/Game.cpp Tue Oct 22 23:42:46 2013 +0600 @@ -4403,7 +4403,7 @@ { int param2; pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &pParam, ¶m2); - auto player = &pParty->pPlayers[pParam]; + //auto player = &pParty->pPlayers[pParam]; switch (pUIMessageType) // For buttons of window MainMenu { @@ -4430,64 +4430,64 @@ pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); break; case UIMSG_PlayerCreation_VoicePrev: - pSex = player->GetSexByVoice(); + pSex = pParty->pPlayers[pParam].GetSexByVoice(); do { - if (player->uVoiceID == 0) - player->uVoiceID = 19; - else --player->uVoiceID; + if (pParty->pPlayers[pParam].uVoiceID == 0) + pParty->pPlayers[pParam].uVoiceID = 19; + else --pParty->pPlayers[pParam].uVoiceID; } - while (player->GetSexByVoice() != pSex); + while (pParty->pPlayers[pParam].GetSexByVoice() != pSex); pButton = pCreationUI_BtnPressLeft2[pParam]; GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, (char *)1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); - player->PlaySound(SPEECH_PickMe, 0); + pParty->pPlayers[pParam].PlaySound(SPEECH_PickMe, 0); break; case UIMSG_PlayerCreation_VoiceNext: - pSex = player->GetSexByVoice(); + pSex = pParty->pPlayers[pParam].GetSexByVoice(); do { - player->uVoiceID = (player->uVoiceID + 1) % 20; + pParty->pPlayers[pParam].uVoiceID = (pParty->pPlayers[pParam].uVoiceID + 1) % 20; } - while (player->GetSexByVoice() != pSex); + while (pParty->pPlayers[pParam].GetSexByVoice() != pSex); pButton = pCreationUI_BtnPressRight2[pParam]; GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, (char *)1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); - player->PlaySound(SPEECH_PickMe, 0); + pParty->pPlayers[pParam].PlaySound(SPEECH_PickMe, 0); break; case UIMSG_PlayerCreation_FacePrev: - pPlayer = &pParty->pPlayers[pParam]; - if (!pPlayer->uCurrentFace) - pPlayer->uCurrentFace = 19; + //pPlayer = &pParty->pPlayers[pParam]; + if (!pParty->pPlayers[pParam].uCurrentFace) + pParty->pPlayers[pParam].uCurrentFace = 19; else - pPlayer->uCurrentFace -= 1; - pPlayer->uVoiceID = pPlayer->uCurrentFace; - pPlayer->SetInitialStats(); - pPlayer->SetSexByVoice(); - pPlayer->RandomizeName(); + pParty->pPlayers[pParam].uCurrentFace -= 1; + pParty->pPlayers[pParam].uVoiceID = pParty->pPlayers[pParam].uCurrentFace; + pParty->pPlayers[pParam].SetInitialStats(); + pParty->pPlayers[pParam].SetSexByVoice(); + pParty->pPlayers[pParam].RandomizeName(); v25 = pParam; pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; uPlayerCreationUI_SelectedCharacter = v25; GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], (char *)1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); - pPlayer->PlaySound(SPEECH_PickMe, 0); + pParty->pPlayers[pParam].PlaySound(SPEECH_PickMe, 0); break; case UIMSG_PlayerCreation_FaceNext: - pPlayer = &pParty->pPlayers[pParam]; - v20 = (char)((int)pPlayer->uCurrentFace + 1) % 20; - pPlayer->uCurrentFace = v20; - pPlayer->uVoiceID = v20; - pPlayer->SetInitialStats(); - pPlayer->SetSexByVoice(); - pPlayer->RandomizeName(); + //pPlayer = &pParty->pPlayers[pParam]; + v20 = (char)((int)pParty->pPlayers[pParam].uCurrentFace + 1) % 20; + pParty->pPlayers[pParam].uCurrentFace = v20; + pParty->pPlayers[pParam].uVoiceID = v20; + pParty->pPlayers[pParam].SetInitialStats(); + pParty->pPlayers[pParam].SetSexByVoice(); + pParty->pPlayers[pParam].RandomizeName(); v21 = pParam; pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; uPlayerCreationUI_SelectedCharacter = v21; GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], (char *)1); pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); - pPlayer->PlaySound(SPEECH_PickMe, 0); + pParty->pPlayers[pParam].PlaySound(SPEECH_PickMe, 0); break; case UIMSG_PlayerCreationClickPlus: GUIWindow::Create(613, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnPlus, (char *)1);
--- a/mm7_5.cpp Tue Oct 22 22:04:25 2013 +0600 +++ b/mm7_5.cpp Tue Oct 22 23:42:46 2013 +0600 @@ -1349,12 +1349,6 @@ // 4E28F8: using guessed type int pCurrentScreen; -void LoadFonts_and_DrawCopyrightWindow() -{ - MainMenuUI_LoadFontsAndSomeStuff(); - DrawCopyrightWindow(); -} - //----- (00417AD4) -------------------------------------------------------- unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level) {