comparison mm7_5.cpp @ 1268:2929c4406d2c

guiwindow funcs cleanup
author Gloval
date Sat, 15 Jun 2013 01:22:17 +0400
parents 6bc88137a019
children fbb7428fa58c
comparison
equal deleted inserted replaced
1267:33e360a9b4bf 1268:2929c4406d2c
726 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); 726 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0);
727 continue; 727 continue;
728 } 728 }
729 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6; 729 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6;
730 pGame->pGammaController->Initialize(v19); 730 pGame->pGammaController->Initialize(v19);
731 GUIWindow::Create(21, 161, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, 1); 731 GUIWindow::Create(21, 161, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, (char *)1);
732 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); 732 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0);
733 continue; 733 continue;
734 } 734 }
735 if ( uMessageParam == 5 ) 735 if ( uMessageParam == 5 )
736 { 736 {
737 ++uGammaPos; 737 ++uGammaPos;
738 if ( (signed int)uGammaPos <= 9 ) 738 if ( (signed int)uGammaPos <= 9 )
739 { 739 {
740 v21 = (double)(signed int)uGammaPos * 0.1 + 0.6; 740 v21 = (double)(signed int)uGammaPos * 0.1 + 0.6;
741 pGame->pGammaController->Initialize(v21); 741 pGame->pGammaController->Initialize(v21);
742 GUIWindow::Create(213, 161, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, 1); 742 GUIWindow::Create(213, 161, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, (char *)1);
743 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0); 743 pAudioPlayer->PlaySound((SoundID)21, 0, 0, -1, 0, 0, 0, 0);
744 continue; 744 continue;
745 } 745 }
746 uGammaPos = 9; 746 uGammaPos = 9;
747 } 747 }
766 if ( uMessageParam == 4 ) 766 if ( uMessageParam == 4 )
767 { 767 {
768 --uMusicVolimeMultiplier; 768 --uMusicVolimeMultiplier;
769 if ( (char)uMusicVolimeMultiplier < 1 ) 769 if ( (char)uMusicVolimeMultiplier < 1 )
770 uMusicVolimeMultiplier = 0; 770 uMusicVolimeMultiplier = 0;
771 GUIWindow::Create(243, 0xD8u, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, 1); 771 GUIWindow::Create(243, 0xD8u, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, (char *)1);
772 if ( uMusicVolimeMultiplier ) 772 if ( uMusicVolimeMultiplier )
773 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); 773 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0);
774 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); 774 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f);
775 continue; 775 continue;
776 } 776 }
777 if ( uMessageParam == 5 ) 777 if ( uMessageParam == 5 )
778 { 778 {
779 ++uMusicVolimeMultiplier; 779 ++uMusicVolimeMultiplier;
780 if ( (char)uMusicVolimeMultiplier > 9 ) 780 if ( (char)uMusicVolimeMultiplier > 9 )
781 uMusicVolimeMultiplier = 9; 781 uMusicVolimeMultiplier = 9;
782 GUIWindow::Create(435, 0xD8u, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, 1); 782 GUIWindow::Create(435, 0xD8u, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, (char *)1);
783 if ( uMusicVolimeMultiplier ) 783 if ( uMusicVolimeMultiplier )
784 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0); 784 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0);
785 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f); 785 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f);
786 continue; 786 continue;
787 } 787 }
796 if ( uMessageParam == 4 )//reduce sound level button left 796 if ( uMessageParam == 4 )//reduce sound level button left
797 { 797 {
798 --uSoundVolumeMultiplier; 798 --uSoundVolumeMultiplier;
799 if ( (char)uSoundVolumeMultiplier < 1 ) 799 if ( (char)uSoundVolumeMultiplier < 1 )
800 uSoundVolumeMultiplier = 0; 800 uSoundVolumeMultiplier = 0;
801 GUIWindow::Create(243, 162, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, 1); 801 GUIWindow::Create(243, 162, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, (char *)1);
802 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); 802 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f);
803 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); 803 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0);
804 continue; 804 continue;
805 } 805 }
806 if ( uMessageParam == 5 )//Increase sound level button right 806 if ( uMessageParam == 5 )//Increase sound level button right
809 if ( (char)uSoundVolumeMultiplier > 8 ) 809 if ( (char)uSoundVolumeMultiplier > 8 )
810 uSoundVolumeMultiplier = 9; 810 uSoundVolumeMultiplier = 9;
811 //v168 = 1; 811 //v168 = 1;
812 v24 = 435; 812 v24 = 435;
813 //v154 = (int)pBtn_SliderRight; 813 //v154 = (int)pBtn_SliderRight;
814 GUIWindow::Create(v24, 0xA2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, 1); 814 GUIWindow::Create(v24, 0xA2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, (char *)1);
815 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f); 815 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f);
816 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0); 816 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0);
817 continue; 817 continue;
818 } 818 }
819 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17; 819 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17;
838 if ( uMessageParam == 4 ) 838 if ( uMessageParam == 4 )
839 { 839 {
840 --uVoicesVolumeMultiplier; 840 --uVoicesVolumeMultiplier;
841 if ( (char)uVoicesVolumeMultiplier < 1 ) 841 if ( (char)uVoicesVolumeMultiplier < 1 )
842 uVoicesVolumeMultiplier = 0; 842 uVoicesVolumeMultiplier = 0;
843 GUIWindow::Create(243, 270, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, 1); 843 GUIWindow::Create(243, 270, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderLeft, (char *)1);
844 if ( !uVoicesVolumeMultiplier ) 844 if ( !uVoicesVolumeMultiplier )
845 continue; 845 continue;
846 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); 846 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0);
847 continue; 847 continue;
848 } 848 }
849 if ( uMessageParam == 5 ) 849 if ( uMessageParam == 5 )
850 { 850 {
851 ++uVoicesVolumeMultiplier; 851 ++uVoicesVolumeMultiplier;
852 if ( (char)uVoicesVolumeMultiplier > 8 ) 852 if ( (char)uVoicesVolumeMultiplier > 8 )
853 uVoicesVolumeMultiplier = 9; 853 uVoicesVolumeMultiplier = 9;
854 GUIWindow::Create(435, 270, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, 1); 854 GUIWindow::Create(435, 270, 0, 0, WINDOW_PressedButton2, (int)pBtn_SliderRight, (char *)1);
855 if ( !uVoicesVolumeMultiplier ) 855 if ( !uVoicesVolumeMultiplier )
856 continue; 856 continue;
857 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); 857 pAudioPlayer->PlaySound((SoundID)5788, -1, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0);
858 continue; 858 continue;
859 } 859 }
1512 continue; 1512 continue;
1513 } 1513 }
1514 if ( !pGUIWindow_Settings )//Draw Menu 1514 if ( !pGUIWindow_Settings )//Draw Menu
1515 { 1515 {
1516 dword_6BE138 = -1; 1516 dword_6BE138 = -1;
1517 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_GameSettings, 1); 1517 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_GameSettings, (char *)1);
1518 pEventTimer->Pause(); 1518 pEventTimer->Pause();
1519 pAudioPlayer->StopChannels(-1, -1); 1519 pAudioPlayer->StopChannels(-1, -1);
1520 pCurrentScreen = SCREEN_MENU; 1520 pCurrentScreen = SCREEN_MENU;
1521 1521
1522 ++pIcons_LOD->uTexturePacksCount; 1522 ++pIcons_LOD->uTexturePacksCount;
1946 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 1946 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
1947 continue; 1947 continue;
1948 1948
1949 case UIMSG_OnCastTownPortal: 1949 case UIMSG_OnCastTownPortal:
1950 pAudioPlayer->StopChannels(-1, -1); 1950 pAudioPlayer->StopChannels(-1, -1);
1951 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_TownPortal, uMessageParam); 1951 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_TownPortal, (char *)uMessageParam);
1952 continue; 1952 continue;
1953 1953
1954 case UIMSG_OnCastLloydsBeacon: 1954 case UIMSG_OnCastLloydsBeacon:
1955 pAudioPlayer->StopChannels(-1, -1); 1955 pAudioPlayer->StopChannels(-1, -1);
1956 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_LloydsBeacon, 0); 1956 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_LloydsBeacon, 0);
2134 v66 = TownPortalList[uMessageParam].rot_x; 2134 v66 = TownPortalList[uMessageParam].rot_x;
2135 _5B65B4_npcdata_loword_house_or_other = TownPortalList[uMessageParam].rot_y; 2135 _5B65B4_npcdata_loword_house_or_other = TownPortalList[uMessageParam].rot_y;
2136 _5B65B8_npcdata_hiword_house_or_other = v66; 2136 _5B65B8_npcdata_hiword_house_or_other = v66;
2137 InitializeActors(); 2137 InitializeActors();
2138 } 2138 }
2139 v67 = pGUIWindow_CurrentMenu->Hint; 2139 v67 = (char*)pGUIWindow_CurrentMenu->Hint;
2140 if ( v67 ) 2140 if ( v67 )
2141 *((int *)v67 + 17) = 1; 2141 *((int *)v67 + 17) = 1;
2142 else 2142 else
2143 pParty->pPlayers[(unsigned __int8)town_portal_caster_id].CanCastSpell(0x14u); 2143 pParty->pPlayers[(unsigned __int8)town_portal_caster_id].CanCastSpell(0x14u);
2144 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 2144 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
2453 continue; 2453 continue;
2454 if ( !(pTurnEngine->field_18 & 2) ) 2454 if ( !(pTurnEngine->field_18 & 2) )
2455 _42ECB5_PlayerAttacksActor(); 2455 _42ECB5_PlayerAttacksActor();
2456 continue; 2456 continue;
2457 case UIMSG_ExitRest: 2457 case UIMSG_ExitRest:
2458 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, (int)pGlobalTXT_LocalizationStrings[81]);// "Exit Rest" 2458 GUIWindow::Create(pButton_RestUI_Exit->uX, pButton_RestUI_Exit->uY, 0, 0, WINDOW_CloseRestWindowBtn, (int)pButton_RestUI_Exit, pGlobalTXT_LocalizationStrings[81]);// "Exit Rest"
2459 continue; 2459 continue;
2460 case UIMSG_Wait5Minutes: 2460 case UIMSG_Wait5Minutes:
2461 if ( dword_506F14 == 2 ) 2461 if ( dword_506F14 == 2 )
2462 { 2462 {
2463 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" 2463 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!"
2464 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); 2464 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0);
2465 continue; 2465 continue;
2466 } 2466 }
2467 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, WINDOW_PressedButton2, 2467 GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, WINDOW_PressedButton2,
2468 (int)pButton_RestUI_Wait5Minutes, (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" 2468 (int)pButton_RestUI_Wait5Minutes, pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes"
2469 dword_506F14 = 1; 2469 dword_506F14 = 1;
2470 _506F18_num_hours_to_sleep = 5; 2470 _506F18_num_hours_to_sleep = 5;
2471 continue; 2471 continue;
2472 case UIMSG_Wait1Hour: 2472 case UIMSG_Wait1Hour:
2473 if ( dword_506F14 == 2 ) 2473 if ( dword_506F14 == 2 )
2475 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" 2475 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!"
2476 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); 2476 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0);
2477 continue; 2477 continue;
2478 } 2478 }
2479 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, WINDOW_PressedButton2, 2479 GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, WINDOW_PressedButton2,
2480 (int)pButton_RestUI_Wait1Hour, (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" 2480 (int)pButton_RestUI_Wait1Hour, pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour"
2481 dword_506F14 = 1; 2481 dword_506F14 = 1;
2482 _506F18_num_hours_to_sleep = 60; 2482 _506F18_num_hours_to_sleep = 60;
2483 continue; 2483 continue;
2484 case UIMSG_RentRoom: 2484 case UIMSG_RentRoom:
2485 dword_506F14 = 2; 2485 dword_506F14 = 2;
2613 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!" 2613 ShowStatusBarString(pGlobalTXT_LocalizationStrings[477], 2);// "You are already resting!"
2614 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); 2614 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0);
2615 continue; 2615 continue;
2616 } 2616 }
2617 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, WINDOW_PressedButton2, 2617 GUIWindow::Create(pButton_RestUI_WaitUntilDawn->uX, pButton_RestUI_WaitUntilDawn->uY, 0, 0, WINDOW_PressedButton2,
2618 (int)pButton_RestUI_WaitUntilDawn, (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" 2618 (int)pButton_RestUI_WaitUntilDawn, pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn"
2619 v97 = _494820_training_time(pParty->uCurrentHour); 2619 v97 = _494820_training_time(pParty->uCurrentHour);
2620 dword_506F14 = 1; 2620 dword_506F14 = 1;
2621 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; 2621 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute;
2622 continue; 2622 continue;
2623 case UIMSG_HintSelectRemoveQuickSpellBtn: 2623 case UIMSG_HintSelectRemoveQuickSpellBtn:
3009 Autonotes_Instructors_page_flag = 1; 3009 Autonotes_Instructors_page_flag = 1;
3010 break; 3010 break;
3011 default: 3011 default:
3012 continue; 3012 continue;
3013 } 3013 }
3014 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); 3014 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, (char *)1);
3015 continue; 3015 continue;
3016 case UIMSG_SelectCharacter: 3016 case UIMSG_SelectCharacter:
3017 if ( pMessageQueue_50CBD0->uNumMessages ) 3017 if ( pMessageQueue_50CBD0->uNumMessages )
3018 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 3018 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
3019 GameUI_OnPlayerPortraitLeftClick(uMessageParam); 3019 GameUI_OnPlayerPortraitLeftClick(uMessageParam);
3334 player->uVoiceID = 19; 3334 player->uVoiceID = 19;
3335 else --player->uVoiceID; 3335 else --player->uVoiceID;
3336 } 3336 }
3337 while (player->GetSexByVoice() != pSex); 3337 while (player->GetSexByVoice() != pSex);
3338 pButton = pCreationUI_BtnPressLeft2[pParam]; 3338 pButton = pCreationUI_BtnPressLeft2[pParam];
3339 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); 3339 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, (char *)1);
3340 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); 3340 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0);
3341 player->PlaySound(SPEECH_PickMe, 0); 3341 player->PlaySound(SPEECH_PickMe, 0);
3342 break; 3342 break;
3343 case UIMSG_PlayerCreation_VoiceNext: 3343 case UIMSG_PlayerCreation_VoiceNext:
3344 pSex = player->GetSexByVoice(); 3344 pSex = player->GetSexByVoice();
3346 { 3346 {
3347 player->uVoiceID = (player->uVoiceID + 1) % 20; 3347 player->uVoiceID = (player->uVoiceID + 1) % 20;
3348 } 3348 }
3349 while (player->GetSexByVoice() != pSex); 3349 while (player->GetSexByVoice() != pSex);
3350 pButton = pCreationUI_BtnPressRight2[pParam]; 3350 pButton = pCreationUI_BtnPressRight2[pParam];
3351 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, 1); 3351 GUIWindow::Create(pButton->uX, pButton->uY, 0, 0, WINDOW_PressedButton, (int)pButton, (char *)1);
3352 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); 3352 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0);
3353 player->PlaySound(SPEECH_PickMe, 0); 3353 player->PlaySound(SPEECH_PickMe, 0);
3354 break; 3354 break;
3355 case UIMSG_PlayerCreation_FacePrev: 3355 case UIMSG_PlayerCreation_FacePrev:
3356 pPlayer = &pParty->pPlayers[pParam]; 3356 pPlayer = &pParty->pPlayers[pParam];
3364 pPlayer->RandomizeName(); 3364 pPlayer->RandomizeName();
3365 v25 = pParam; 3365 v25 = pParam;
3366 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) 3366 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
3367 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; 3367 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam;
3368 uPlayerCreationUI_SelectedCharacter = v25; 3368 uPlayerCreationUI_SelectedCharacter = v25;
3369 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], 1); 3369 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressLeft[v25], (char *)1);
3370 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0); 3370 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0.0, 0);
3371 pPlayer->PlaySound(SPEECH_PickMe, 0); 3371 pPlayer->PlaySound(SPEECH_PickMe, 0);
3372 break; 3372 break;
3373 case UIMSG_PlayerCreation_FaceNext: 3373 case UIMSG_PlayerCreation_FaceNext:
3374 pPlayer = &pParty->pPlayers[pParam]; 3374 pPlayer = &pParty->pPlayers[pParam];
3380 pPlayer->RandomizeName(); 3380 pPlayer->RandomizeName();
3381 v21 = pParam; 3381 v21 = pParam;
3382 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) 3382 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
3383 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam; 3383 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam;
3384 uPlayerCreationUI_SelectedCharacter = v21; 3384 uPlayerCreationUI_SelectedCharacter = v21;
3385 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], 1); 3385 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, WINDOW_PressedButton, (int)pCreationUI_BtnPressRight[v21], (char *)1);
3386 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0); 3386 pAudioPlayer->PlaySound(SOUND_Button, 0, 0, -1, 0, 0, 0, 0);
3387 pPlayer->PlaySound(SPEECH_PickMe, 0); 3387 pPlayer->PlaySound(SPEECH_PickMe, 0);
3388 break; 3388 break;
3389 case UIMSG_PlayerCreationClickPlus: 3389 case UIMSG_PlayerCreationClickPlus:
3390 GUIWindow::Create(613, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnPlus, 1); 3390 GUIWindow::Create(613, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnPlus, (char *)1);
3391 pPlayer[uPlayerCreationUI_SelectedCharacter].IncreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); 3391 pPlayer[uPlayerCreationUI_SelectedCharacter].IncreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
3392 pAudioPlayer->PlaySound((SoundID)20, 0, 0, -1, 0, 0, 0, 0); 3392 pAudioPlayer->PlaySound((SoundID)20, 0, 0, -1, 0, 0, 0, 0);
3393 break; 3393 break;
3394 case UIMSG_PlayerCreationClickMinus: 3394 case UIMSG_PlayerCreationClickMinus:
3395 GUIWindow::Create(523, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnMinus, 1); 3395 GUIWindow::Create(523, 393, 0, 0, WINDOW_PressedButton2, (int)pPlayerCreationUI_BtnMinus, (char *)1);
3396 pPlayer[uPlayerCreationUI_SelectedCharacter].DecreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); 3396 pPlayer[uPlayerCreationUI_SelectedCharacter].DecreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
3397 pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0); 3397 pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0);
3398 break; 3398 break;
3399 case UIMSG_PlayerCreationSelectActiveSkill: 3399 case UIMSG_PlayerCreationSelectActiveSkill:
3400 pPlayer = &pPlayer[uPlayerCreationUI_SelectedCharacter]; 3400 pPlayer = &pPlayer[uPlayerCreationUI_SelectedCharacter];
9537 //----- (004156F0) -------------------------------------------------------- 9537 //----- (004156F0) --------------------------------------------------------
9538 void GUI_UpdateWindows() 9538 void GUI_UpdateWindows()
9539 { 9539 {
9540 GUIWindow *pWindow; // esi@4 9540 GUIWindow *pWindow; // esi@4
9541 //unsigned int pWindowType; // eax@4 9541 //unsigned int pWindowType; // eax@4
9542 char *pHint; // edx@66 9542 const char *pHint; // edx@66
9543 GUIButton *pButtonPtr_1C; // ebp@79 9543 GUIButton *pButtonPtr_1C; // ebp@79
9544 char *pHint1; // edx@80 9544 char *pHint1; // edx@80
9545 int v26; // eax@98 9545 int v26; // eax@98
9546 unsigned int v27; // ebp@106 9546 unsigned int v27; // ebp@106
9547 GUIWindow *pGUIWindow2; // ecx@109 9547 GUIWindow *pGUIWindow2; // ecx@109