comparison UI/UIHouses.cpp @ 1661:e1d1fe32c194

NPCTopics
author Ritor1
date Wed, 18 Sep 2013 14:19:37 +0600
parents d453ed393d6e
children 620b6ba3e6b8
comparison
equal deleted inserted replaced
1654:d11b5669f089 1661:e1d1fe32c194
2982 int v8; // edx@4 2982 int v8; // edx@4
2983 double v9; // st7@6 2983 double v9; // st7@6
2984 signed int v10; // esi@6 2984 signed int v10; // esi@6
2985 int pPrice; // ecx@6 2985 int pPrice; // ecx@6
2986 signed int v14; // esi@14 2986 signed int v14; // esi@14
2987 //unsigned int v15; // esi@16
2988 int v16; // eax@16 2987 int v16; // eax@16
2989 //unsigned int v17; // eax@17
2990 int v19; // ecx@24 2988 int v19; // ecx@24
2991 //GUIButton *v20; // eax@26
2992 //GUIButton *v21; // esi@26
2993 //int v22; // eax@26
2994 //const char *v23; // eax@28
2995 //int v24; // eax@28
2996 //unsigned int v25; // ecx@28
2997 //int v26; // eax@28
2998 //unsigned __int16 v27; // ax@28
2999 //unsigned __int16 v29; // ST14_2@34
3000 //int v30; // eax@34
3001 int v33; // eax@36 2989 int v33; // eax@36
3002 unsigned int v36; // eax@38 2990 unsigned int v36; // eax@38
3003 unsigned int v42; // eax@46 2991 unsigned int v42; // eax@46
3004 int index; 2992 int index;
3005 int all_text_height; // eax@68 2993 int all_text_height; // eax@68
3006 int v49; // ebx@69 2994 int v49; // ebx@69
3007 GUIButton *pButton; // eax@71 2995 GUIButton *pButton; // eax@71
3008 int pTextHeight; // eax@71 2996 int pTextHeight; // eax@71
3009 unsigned __int16 pTextColor; // ax@71 2997 unsigned __int16 pTextColor; // ax@71
3010 GUIWindow training_dialog_window; // [sp+Ch] [bp-78h]@1 2998 GUIWindow training_dialog_window; // [sp+Ch] [bp-78h]@1
3011 //int v68; // [sp+6Ch] [bp-18h]@3
3012 int v69; // [sp+70h] [bp-14h]@6 2999 int v69; // [sp+70h] [bp-14h]@6
3013 int v73; // [sp+80h] [bp-4h]@14 3000 int v73; // [sp+80h] [bp-4h]@14
3014 3001
3015 memcpy(&training_dialog_window, window_SpeakInHouse, sizeof(training_dialog_window)); 3002 memcpy(&training_dialog_window, window_SpeakInHouse, sizeof(training_dialog_window));
3016 training_dialog_window.uFrameX = 483; 3003 training_dialog_window.uFrameX = 483;
3063 } 3050 }
3064 } 3051 }
3065 v49 = (2 * (87 - (174 - all_text_height) / 2) - all_text_height) / 2 - (174 - all_text_height) / 2 / 2 + 138; 3052 v49 = (2 * (87 - (174 - all_text_height) / 2) - all_text_height) / 2 - (174 - all_text_height) / 2 / 2 + 138;
3066 if (pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton) 3053 if (pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton)
3067 { 3054 {
3068 //int pCurrentItem = 2;
3069 index = 0; 3055 index = 0;
3070 for ( int i = pDialogueWindow->pStartingPosActiveItem; 3056 for ( int i = pDialogueWindow->pStartingPosActiveItem;
3071 i < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton; ++i ) 3057 i < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton; ++i )
3072 { 3058 {
3073 pButton = pDialogueWindow->GetControl(i); 3059 pButton = pDialogueWindow->GetControl(i);
3078 v49 = pButton->uW; 3064 v49 = pButton->uW;
3079 pTextColor = TargetColor(0xE1u, 0xCDu, 0x23u); 3065 pTextColor = TargetColor(0xE1u, 0xCDu, 0x23u);
3080 if ( pDialogueWindow->pCurrentPosActiveItem != i ) 3066 if ( pDialogueWindow->pCurrentPosActiveItem != i )
3081 pTextColor = TargetColor(255, 255, 255); 3067 pTextColor = TargetColor(255, 255, 255);
3082 training_dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[index], 3); 3068 training_dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pShopOptions[index], 3);
3083 //++pCurrentItem;
3084 ++index; 3069 ++index;
3085 } 3070 }
3086 } 3071 }
3087 } 3072 }
3088 } 3073 }
3094 v33 = pFontArrus->CalcTextHeight(pNPCTopics[122].pText, &training_dialog_window, 0, 0); 3079 v33 = pFontArrus->CalcTextHeight(pNPCTopics[122].pText, &training_dialog_window, 0, 0);
3095 training_dialog_window.DrawTitleText(pFontArrus, 0, (212 - v33) / 2 + 101, TargetColor(0xE1u, 0xCDu, 0x23u), pNPCTopics[122].pText, 3); 3080 training_dialog_window.DrawTitleText(pFontArrus, 0, (212 - v33) / 2 + 101, TargetColor(0xE1u, 0xCDu, 0x23u), pNPCTopics[122].pText, 3);
3096 pDialogueWindow->pNumPresenceButton = 0; 3081 pDialogueWindow->pNumPresenceButton = 0;
3097 return; 3082 return;
3098 } 3083 }
3099 //v34 = pPlayers[uActiveCharacter]->uLevel;
3100 if ( pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_TRAINING_HALL_EMERALD_ISLE] ) 3084 if ( pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_TRAINING_HALL_EMERALD_ISLE] )
3101 { 3085 {
3102 if ( (signed __int64)pPlayers[uActiveCharacter]->uExperience >= v5 ) 3086 if ( (signed __int64)pPlayers[uActiveCharacter]->uExperience >= v5 )
3103 { 3087 {
3104 if ( pParty->uNumGold >= pPrice) 3088 if ( pParty->uNumGold >= pPrice)
3441 { 3425 {
3442 pButton = right_panel_window.GetControl(i); 3426 pButton = right_panel_window.GetControl(i);
3443 switch ( pButton->msg_param ) 3427 switch ( pButton->msg_param )
3444 { 3428 {
3445 case 19://evt_A 3429 case 19://evt_A
3446 v15 = (char *)pNPCTopics[pNPC->evt_A-1].pTopic; 3430 v15 = (char *)pNPCTopics[pNPC->evt_A].pTopic;
3447 if ( !v15 ) 3431 if ( !v15 )
3448 { 3432 {
3449 pButton->msg_param = 0; 3433 pButton->msg_param = 0;
3450 v15 = ""; 3434 v15 = "";
3451 } 3435 }
3452 strcpy(pButton->pButtonName, v15); 3436 strcpy(pButton->pButtonName, v15);
3453 continue; 3437 continue;
3454 case 20://evt_B 3438 case 20://evt_B
3455 v15 = (char *)pNPCTopics[pNPC->evt_B-1].pTopic; 3439 v15 = (char *)pNPCTopics[pNPC->evt_B].pTopic;
3456 if ( !v15 ) 3440 if ( !v15 )
3457 { 3441 {
3458 pButton->msg_param = 0; 3442 pButton->msg_param = 0;
3459 v15 = ""; 3443 v15 = "";
3460 } 3444 }
3467 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); 3451 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data());
3468 current_npc_text = pTmpBuf2.data(); 3452 current_npc_text = pTmpBuf2.data();
3469 strcpy(pButton->pButtonName, v15); 3453 strcpy(pButton->pButtonName, v15);
3470 continue; 3454 continue;
3471 case 21://evt_C 3455 case 21://evt_C
3472 v15 = (char *)pNPCTopics[pNPC->evt_C-1].pTopic; 3456 v15 = (char *)pNPCTopics[pNPC->evt_C].pTopic;
3473 if ( !v15 ) 3457 if ( !v15 )
3474 { 3458 {
3475 pButton->msg_param = 0; 3459 pButton->msg_param = 0;
3476 v15 = ""; 3460 v15 = "";
3477 } 3461 }
3478 strcpy(pButton->pButtonName, v15); 3462 strcpy(pButton->pButtonName, v15);
3479 continue; 3463 continue;
3480 case 22://evt_D 3464 case 22://evt_D
3481 v15 = (char *)pNPCTopics[pNPC->evt_D-1].pTopic; 3465 v15 = (char *)pNPCTopics[pNPC->evt_D].pTopic;
3482 if ( !v15 ) 3466 if ( !v15 )
3483 { 3467 {
3484 pButton->msg_param = 0; 3468 pButton->msg_param = 0;
3485 v15 = ""; 3469 v15 = "";
3486 } 3470 }
3487 strcpy(pButton->pButtonName, v15); 3471 strcpy(pButton->pButtonName, v15);
3488 continue; 3472 continue;
3489 case 23://evt_E 3473 case 23://evt_E
3490 v15 = (char *)pNPCTopics[pNPC->evt_E-1].pTopic; 3474 v15 = (char *)pNPCTopics[pNPC->evt_E].pTopic;
3491 if ( !v15 ) 3475 if ( !v15 )
3492 { 3476 {
3493 pButton->msg_param = 0; 3477 pButton->msg_param = 0;
3494 v15 = ""; 3478 v15 = "";
3495 } 3479 }
3496 strcpy(pButton->pButtonName, v15); 3480 strcpy(pButton->pButtonName, v15);
3497 continue; 3481 continue;
3498 case 24://evt_F 3482 case 24://evt_F
3499 v15 = (char *)pNPCTopics[pNPC->evt_F-1].pTopic; 3483 v15 = (char *)pNPCTopics[pNPC->evt_F].pTopic;
3500 if ( !v15 ) 3484 if ( !v15 )
3501 { 3485 {
3502 pButton->msg_param = 0; 3486 pButton->msg_param = 0;
3503 v15 = ""; 3487 v15 = "";
3504 } 3488 }