comparison mm7_5.cpp @ 1340:22cb507446a4

turnengine refactoring continue
author Gloval
date Sat, 06 Jul 2013 00:29:29 +0400
parents 8bfdc44cebfd
children 61010a655c94
comparison
equal deleted inserted replaced
1339:8bfdc44cebfd 1340:22cb507446a4
2425 stru_50C198.LootActor(&pActors[uMessageParam]); 2425 stru_50C198.LootActor(&pActors[uMessageParam]);
2426 else 2426 else
2427 Actor::StealFrom(uMessageParam); 2427 Actor::StealFrom(uMessageParam);
2428 continue; 2428 continue;
2429 } 2429 }
2430 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 ) 2430 if ( pTurnEngine->turn_stage == 1 || pTurnEngine->turn_stage == 3 )
2431 continue; 2431 continue;
2432 if ( !(pTurnEngine->field_18 & TE_FLAG_2) ) 2432 if ( !(pTurnEngine->field_18 & TE_FLAG_2) )
2433 { 2433 {
2434 if ( pActors[uMessageParam].uAIState == 5 ) 2434 if ( pActors[uMessageParam].uAIState == 5 )
2435 stru_50C198.LootActor(&pActors[uMessageParam]); 2435 stru_50C198.LootActor(&pActors[uMessageParam]);
2444 if ( pParty->bTurnBasedModeOn != 1 ) 2444 if ( pParty->bTurnBasedModeOn != 1 )
2445 { 2445 {
2446 _42ECB5_PlayerAttacksActor(); 2446 _42ECB5_PlayerAttacksActor();
2447 continue; 2447 continue;
2448 } 2448 }
2449 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3 ) 2449 if ( pTurnEngine->turn_stage == 1 || pTurnEngine->turn_stage == 3 )
2450 continue; 2450 continue;
2451 if ( !(pTurnEngine->field_18 & TE_FLAG_2) ) 2451 if ( !(pTurnEngine->field_18 & TE_FLAG_2) )
2452 _42ECB5_PlayerAttacksActor(); 2452 _42ECB5_PlayerAttacksActor();
2453 continue; 2453 continue;
2454 case UIMSG_ExitRest: 2454 case UIMSG_ExitRest:
2718 pGUIWindow_CurrentMenu->OpenSpellBook(); 2718 pGUIWindow_CurrentMenu->OpenSpellBook();
2719 v127 = rand() % 2 + 204; 2719 v127 = rand() % 2 + 204;
2720 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); 2720 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0);
2721 continue; 2721 continue;
2722 case UIMSG_OpenSpellbookPage: 2722 case UIMSG_OpenSpellbookPage:
2723 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->lastOpenedSpellbookPage ) 2723 if ( pTurnEngine->turn_stage == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->lastOpenedSpellbookPage )
2724 continue; 2724 continue;
2725 sub_41140B(); 2725 sub_41140B();
2726 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = uMessageParam; 2726 pPlayers[uActiveCharacter]->lastOpenedSpellbookPage = uMessageParam;
2727 pGUIWindow_CurrentMenu->OpenSpellBook(); 2727 pGUIWindow_CurrentMenu->OpenSpellBook();
2728 v127 = rand() % 2 + 204; 2728 v127 = rand() % 2 + 204;
2729 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0); 2729 pAudioPlayer->PlaySound((SoundID)v127, 0, 0, -1, 0, 0, 0, 0);
2730 continue; 2730 continue;
2731 case UIMSG_SelectSpell: 2731 case UIMSG_SelectSpell:
2732 { 2732 {
2733 if (pTurnEngine->field_4 == 3) 2733 if (pTurnEngine->turn_stage == 3)
2734 continue; 2734 continue;
2735 if (!uActiveCharacter) 2735 if (!uActiveCharacter)
2736 continue; 2736 continue;
2737 2737
2738 // uNumSeconds = (unsigned int)pPlayers[uActiveCharacter]; 2738 // uNumSeconds = (unsigned int)pPlayers[uActiveCharacter];
2766 } 2766 }
2767 } 2767 }
2768 continue; 2768 continue;
2769 2769
2770 case UIMSG_CastSpellFromBook: 2770 case UIMSG_CastSpellFromBook:
2771 if ( pTurnEngine->field_4 != 3 ) 2771 if ( pTurnEngine->turn_stage != 3 )
2772 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 0, 0, 0); 2772 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 0, 0, 0);
2773 continue; 2773 continue;
2774 2774
2775 case UIMSG_SpellScrollUse: 2775 case UIMSG_SpellScrollUse:
2776 __debugbreak(); 2776 __debugbreak();
2777 if ( pTurnEngine->field_4 != 3 ) 2777 if ( pTurnEngine->turn_stage != 3 )
2778 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 133, 1, 0); 2778 _42777D_CastSpell_UseWand_ShootArrow(uMessageParam, v199, 133, 1, 0);
2779 continue; 2779 continue;
2780 case UIMSG_SpellBookWindow: 2780 case UIMSG_SpellBookWindow:
2781 if ( pTurnEngine->field_4 == 3 ) 2781 if ( pTurnEngine->turn_stage == 3 )
2782 continue; 2782 continue;
2783 if ( bUnderwater == 1 ) 2783 if ( bUnderwater == 1 )
2784 { 2784 {
2785 ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!" 2785 ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2);// "You can not do that while you are underwater!"
2786 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); 2786 pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0);