comparison mm7_4.cpp @ 494:af286cec8967

guild ..
author Gloval
date Thu, 28 Feb 2013 18:18:52 +0400
parents 59649750a054
children 90fdb47bfcba
comparison
equal deleted inserted replaced
493:59649750a054 494:af286cec8967
12271 } 12271 }
12272 12272
12273 12273
12274 12274
12275 //----- (004B5D7C) -------------------------------------------------------- 12275 //----- (004B5D7C) --------------------------------------------------------
12276 int __cdecl GuildDialog() 12276 void GuildDialog()
12277 { 12277 {
12278 GUIWindow *v0; // ebx@1 12278 GUIWindow *v0; // ebx@1
12279 Player *v1; // edi@1 12279 Player *v1; // edi@1
12280 signed int v2; // ebx@1 12280 signed int base_teach_price; // ebx@1
12281 int v3; // edi@6 12281 int v3; // edi@6
12282 int result; // eax@11 12282 int result; // eax@11
12283 unsigned int v5; // ebx@13 12283 unsigned int v5; // ebx@13
12284 int v6; // esi@13 12284 int v6; // esi@13
12285 signed int v7; // esi@17 12285 signed int v7; // esi@17
12286 int v8; // esi@22 12286 int v8; // esi@22
12287 signed int v9; // ecx@22 12287 signed int v9; // ecx@22
12288 char *v10; // eax@22 12288 char *v10; // eax@22
12289 const char *v11; // ecx@26 12289 const char *statusbar_string; // ecx@26
12290 POINT *v12; // esi@30 12290 POINT *v12; // esi@30
12291 int v13; // ecx@30 12291 int v13; // ecx@30
12292 void *v14; // ST1C_4@31 12292 void *v14; // ST1C_4@31
12293 ItemGen *v15; // ST18_4@31 12293 ItemGen *v15; // ST18_4@31
12294 int v16; // ST10_4@31 12294 int v16; // ST10_4@31
12325 char v47[100]; // [sp+D4h] [bp-218h]@3 12325 char v47[100]; // [sp+D4h] [bp-218h]@3
12326 char v48[100]; // [sp+138h] [bp-1B4h]@3 12326 char v48[100]; // [sp+138h] [bp-1B4h]@3
12327 char v49[100]; // [sp+19Ch] [bp-150h]@3 12327 char v49[100]; // [sp+19Ch] [bp-150h]@3
12328 POINT v50; // [sp+264h] [bp-88h]@30 12328 POINT v50; // [sp+264h] [bp-88h]@30
12329 POINT v51; // [sp+26Ch] [bp-80h]@30 12329 POINT v51; // [sp+26Ch] [bp-80h]@30
12330 GUIWindow v52; // [sp+274h] [bp-78h]@1 12330 GUIWindow working_window; // [sp+274h] [bp-78h]@1
12331 signed int v53; // [sp+27Ch] [bp-70h]@1 12331 signed int v53; // [sp+27Ch] [bp-70h]@1
12332 signed int v54; // [sp+284h] [bp-68h]@1 12332 signed int v54; // [sp+284h] [bp-68h]@1
12333 int v55; // [sp+2C8h] [bp-24h]@47 12333 int v55; // [sp+2C8h] [bp-24h]@47
12334 int v56; // [sp+2CCh] [bp-20h]@1 12334 int main_text_color; // [sp+2CCh] [bp-20h]@1
12335 int v57; // [sp+2D0h] [bp-1Ch]@1 12335 int hi_text_color; // [sp+2D0h] [bp-1Ch]@1
12336 Player *v58; // [sp+2D4h] [bp-18h]@1 12336 Player *v58; // [sp+2D4h] [bp-18h]@1
12337 unsigned __int8 uPlayerID; // [sp+2DBh] [bp-11h]@31 12337 unsigned __int8 uPlayerID; // [sp+2DBh] [bp-11h]@31
12338 char *Str; // [sp+2DCh] [bp-10h]@35 12338 char *Str; // [sp+2DCh] [bp-10h]@35
12339 int v61; // [sp+2E0h] [bp-Ch]@35 12339 int v61; // [sp+2E0h] [bp-Ch]@35
12340 unsigned int v62; // [sp+2E4h] [bp-8h]@13 12340 unsigned int v62; // [sp+2E4h] [bp-8h]@13
12341 int v63; // [sp+2E8h] [bp-4h]@1 12341 int v63; // [sp+2E8h] [bp-4h]@1
12342 12342
12343 v0 = window_SpeakInHouse; 12343 v0 = window_SpeakInHouse;
12344 memcpy(&v52, window_SpeakInHouse, sizeof(v52)); 12344 memcpy(&working_window, window_SpeakInHouse, sizeof(GUIWindow));
12345 v58 = pPlayers[uActiveCharacter]; 12345 v58 = pPlayers[uActiveCharacter];
12346 v1 = v58; 12346 v1 = v58;
12347 v52.uFrameX = 483; 12347 working_window.uFrameX = 483;
12348 v53 = 148; 12348 v53 = 148;
12349 v54 = 334; 12349 v54 = 334;
12350 v56 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 12350 main_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
12351 v57 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 12351 hi_text_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
12352 //v2 = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v0->ptr_1C] * 500.0); 12352 //v2 = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v0->ptr_1C] * 500.0);
12353 v2 = (signed __int64)(p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier * 500.0); 12353 base_teach_price = (signed __int64)(p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier * 500.0);
12354 v63 = v2 * (100 - v1->GetMerchant()) / 100; 12354 v63 = base_teach_price * (100 - v1->GetMerchant()) / 100;
12355 if ( v63 < v2 / 3 ) 12355 if ( v63 < base_teach_price / 3 )
12356 v63 = v2 / 3; 12356 v63 = base_teach_price / 3;
12357 strcpy(Dest, ""); 12357 strcpy(Dest, "");
12358 strcpy(v46, ""); 12358 strcpy(v46, "");
12359 strcpy(v47, ""); 12359 strcpy(v47, "");
12360 strcpy(v48, ""); 12360 strcpy(v48, "");
12361 strcpy(v49, ""); 12361 strcpy(v49, "");
12362 if ( dword_F8B19C != 1 ) 12362 if ( dword_F8B19C != 1 )
12363 { 12363 {
12364 if ( dword_F8B19C != 18 ) 12364 if ( dword_F8B19C != 18 ) //buy skill
12365 { 12365 {
12366 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) 12366 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
12367 { 12367 {
12368 v3 = (int)(&v1->uIntelligence + dword_F8B19C); 12368 v3 = (int)(&v1->uIntelligence + dword_F8B19C); //test skill
12369 if ( *(short *)v3 ) 12369 if ( *(short *)v3 )
12370 { 12370 {
12371 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[403], pClassNames[dword_F8B19C + 20]); 12371 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[403], pClassNames[dword_F8B19C + 20]); //"You already know the %s skill"
12372 ShowStatusBarString(pTmpBuf, 2u); 12372 ShowStatusBarString(pTmpBuf, 2u);
12373 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 12373 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
12374 } 12374 }
12375 else 12375 else
12376 { 12376 {
12377 if ( pParty->uNumGold < v63 ) 12377 if ( pParty->uNumGold < v63 )
12378 { 12378 {
12379 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); 12379 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); //"You don't have enough gold"
12380 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); 12380 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2);
12381 } 12381 }
12382 else 12382 else
12383 { 12383 {
12384 Party::TakeGold(v63); 12384 Party::TakeGold(v63);
12385 *(short *)v3 = 1; 12385 *(short *)v3 = 1;
12386 } 12386 }
12387 } 12387 }
12388 } 12388 }
12389 /*result = pMessageQueue_50CBD0->uNumMessages;
12390 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
12391 {
12392 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
12393 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
12394 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
12395 *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
12396 ++pMessageQueue_50CBD0->uNumMessages;
12397 }*/
12398 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 12389 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
12399 return 1; // void function actually 12390 return;
12400 } 12391 }
12401 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164); 12392 pRenderer->DrawTextureIndexed(8u, 8u, dword_F8B164);
12402 v5 = 0; 12393 v5 = 0;
12403 v6 = 0; 12394 v6 = 0;
12404 v62 = 0; 12395 v62 = 0;
12414 v63 += 70; 12405 v63 += 70;
12415 v62 += 280; 12406 v62 += 280;
12416 ++v6; 12407 ++v6;
12417 } 12408 }
12418 while ( v63 < 452 ); 12409 while ( v63 < 452 );
12410
12419 v62 = 1680; 12411 v62 = 1680;
12420 v7 = 6; 12412 v7 = 6;
12421 v63 = 32; 12413 v63 = 32;
12422 do 12414 do
12423 { 12415 {
12430 v63 += 70; 12422 v63 += 70;
12431 v62 += 280; 12423 v62 += 280;
12432 ++v7; 12424 ++v7;
12433 } 12425 }
12434 while ( v63 < 452 ); 12426 while ( v63 < 452 );
12435 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); 12427
12436 if ( result ) 12428 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
12437 { 12429 {
12438 v8 = 0; 12430 v8 = 0;
12439 v9 = 12; 12431 v9 = 12;
12440 v10 = (char *)(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 108 * (unsigned int)window_SpeakInHouse->ptr_1C); 12432 v10 = (char *)(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 108 * (unsigned int)window_SpeakInHouse->ptr_1C);
12441 do 12433 do
12444 ++v8; 12436 ++v8;
12445 v10 += 36; 12437 v10 += 36;
12446 --v9; 12438 --v9;
12447 } 12439 }
12448 while ( v9 ); 12440 while ( v9 );
12441
12449 GetAsyncKeyState(17); 12442 GetAsyncKeyState(17);
12450 v11 = pGlobalTXT_LocalizationStrings[195]; 12443 statusbar_string = pGlobalTXT_LocalizationStrings[195]; //"Select the Item to Buy"
12451 if ( dword_F8B19C != 2 ) 12444 if ( dword_F8B19C != 2 )
12452 v11 = pGlobalTXT_LocalizationStrings[196]; 12445 statusbar_string = pGlobalTXT_LocalizationStrings[196]; //"Select the Special Item to Buy"
12453 DrawTextAtStatusBar(v11, 0); 12446 DrawTextAtStatusBar(statusbar_string, 0);
12454 if ( !v8 ) 12447 if ( !v8 )
12455 { 12448 {
12456 v52.DrawCurrentTime( 12449 working_window.DrawCurrentTime(
12457 __PAIR__( 12450 __PAIR__(
12458 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44472], 12451 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44472],
12459 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44468]) 12452 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44468])
12460 - pParty->uTimePlayed); 12453 - pParty->uTimePlayed);
12461 return 0; 12454 return;
12462 } 12455 }
12463 v12 = pMouse->GetCursorPos(&v51); 12456 v12 = pMouse->GetCursorPos(&v51);
12464 result = v12->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v50)->y]; 12457 result = v12->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v50)->y];
12465 v13 = pRenderer->pActiveZBuffer[result] & 0xFFFF; 12458 v13 = pRenderer->pActiveZBuffer[result] & 0xFFFF;
12466 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) 12459 if ( pRenderer->pActiveZBuffer[result] & 0xFFFF )
12467 { 12460 {
12468 v14 = window_SpeakInHouse->ptr_1C; 12461 v14 = window_SpeakInHouse->ptr_1C;
12469 v15 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v13 + 12 * (int)v14)); 12462 v15 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v13 + 12 * (int)v14));
12470 v16 = (int)window_SpeakInHouse->ptr_1C; 12463 v16 = (int)window_SpeakInHouse->ptr_1C;
12471 uPlayerID = uActiveCharacter - 1; 12464 uPlayerID = uActiveCharacter - 1;
12472 v17 = v1->_490EEE( 12465 v17 = v1->_490EEE( (ItemGen *)&pParty->pPlayers[1].uExpressionTimeLength + v13 + 12 * (int)v14, 3, v16, 2);
12473 (ItemGen *)&pParty->pPlayers[1].uExpressionTimeLength + v13 + 12 * (int)v14, 12466 v18 = BuilDialogueString((char *)pMerchantsBuyPhrases[v17], uPlayerID, v15, (char *)v14, 2, 0);
12474 3, 12467 v19 = pFontArrus->CalcTextHeight(v18, &working_window, 0, 0);
12475 v16, 12468 working_window.DrawTitleText(pFontArrus, v5, (174 - v19) / 2 + 138, main_text_color, v18, 3);
12476 2); 12469 return;
12477 v18 = BuilDialogueString((char *)pMerchantsBuyPhrases[v17], uPlayerID, v15, (char *)v14, 2, 0); 12470 }
12478 v44 = 3; 12471 }
12479 v43 = v18; 12472 return;
12480 v42 = v56;
12481 v41 = 0;
12482 v40 = 0;
12483 v39 = &v52;
12484 LABEL_32:
12485 v19 = pFontArrus->CalcTextHeight(v18, v39, v40, v41);
12486 return (int)v52.DrawTitleText(pFontArrus, v5, (174 - v19) / 2 + 138, v42, v43, v44);
12487 }
12488 }
12489 return result;
12490 } 12473 }
12491 if ( !(unsigned __int16)_449B57_test_bit( 12474 if ( !(unsigned __int16)_449B57_test_bit(
12492 (unsigned __int8 *)v1->_guilds_member_bits, 12475 (unsigned __int8 *)v1->_guilds_member_bits,
12493 word_4F0704[(unsigned int)window_SpeakInHouse->ptr_1C-139]) ) 12476 word_4F0704[(unsigned int)window_SpeakInHouse->ptr_1C-139]) )
12494 { 12477 { //you must me member
12495 v36 = pNPCTopics[121].pText; 12478 v36 = pNPCTopics[121].pText;
12496 v37 = v57; 12479 v37 = hi_text_color;
12497 v38 = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &v52, 0, 0); 12480 v38 = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &working_window, 0, 0);
12498 v52.DrawTitleText(pFontArrus, 0, (212 - v38) / 2 + 101, v37, v36, 3u); 12481 working_window.DrawTitleText(pFontArrus, 0, (212 - v38) / 2 + 101, v37, v36, 3u);
12499 result = (int)pDialogueWindow;
12500 pDialogueWindow->pNumPresenceButton = 0; 12482 pDialogueWindow->pNumPresenceButton = 0;
12501 return result; 12483 return;
12502 } 12484 }
12503 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); 12485
12504 if ( !result ) 12486 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
12505 return result; 12487 return;
12506 v20 = pDialogueWindow; 12488 v20 = pDialogueWindow;
12507 v5 = 0; 12489 v5 = 0;
12508 v62 = 0; 12490 v62 = 0;
12509 Str = 0; 12491 Str = 0;
12510 v21 = pDialogueWindow->pStartingPosActiveItem; 12492 v21 = pDialogueWindow->pStartingPosActiveItem;
12511 v22 = v21 + pDialogueWindow->pNumPresenceButton; 12493 v22 = v21 + pDialogueWindow->pNumPresenceButton;
12512 v61 = 0; 12494 v61 = 0;
12513 if ( v21 >= v22 ) 12495 if ( v21 >= v22 )
12514 goto LABEL_64; 12496 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); // "Seek knowledge elsewhere %s the %s"
12497 strcat(pTmpBuf, "\n \n");
12498 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); //"I can offer you nothing further."
12499 v19 = pFontArrus->CalcTextHeight(pTmpBuf, &working_window, 0, 0);
12500 working_window.DrawTitleText(pFontArrus, v5, (174 - v19) / 2 + 138, hi_text_color, pTmpBuf, 3);
12501 return;
12515 do 12502 do
12516 { 12503 {
12517 v23 = v20->GetControl(v21)->uControlParam; 12504 v23 = v20->GetControl(v21)->uControlParam;
12518 if ( v23 == 18 ) 12505 if ( v23 == 18 )
12519 { 12506 {
12520 v25 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[400], &v52, 0, 0); 12507 v25 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[400], &working_window, 0, 0); //"Buy Spells"
12521 v62 += v25; 12508 v62 += v25;
12522 ++v61; 12509 ++v61;
12523 } 12510 }
12524 else 12511 else
12525 { 12512 {
12530 // or 12517 // or
12531 //byte_4ED970_skill_learn_ability_by_class_table[v58->uClass - 1][v23 + 1] 12518 //byte_4ED970_skill_learn_ability_by_class_table[v58->uClass - 1][v23 + 1]
12532 12519
12533 //if ( *(&byte_4ED94C[37 * v58->uClass] + v23) && !*(&v58->uIntelligence + v23) ) 12520 //if ( *(&byte_4ED94C[37 * v58->uClass] + v23) && !*(&v58->uIntelligence + v23) )
12534 { 12521 {
12535 v24 = pFontArrus->CalcTextHeight(pClassNames[v23 + 20], &v52, 0, 0); 12522 v24 = pFontArrus->CalcTextHeight(pClassNames[v23 + 20], &working_window, 0, 0);
12536 v62 += v24; 12523 v62 += v24;
12537 ++v61; 12524 ++v61;
12538 ++Str; 12525 ++Str;
12539 } 12526 }
12540 } 12527 }
12542 } 12529 }
12543 while ( v21 < v20->pNumPresenceButton + v20->pStartingPosActiveItem ); 12530 while ( v21 < v20->pNumPresenceButton + v20->pStartingPosActiveItem );
12544 if ( !v61 ) 12531 if ( !v61 )
12545 { 12532 {
12546 LABEL_64: 12533 LABEL_64:
12547 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v58->pName, pClassNames[v58->classType]); 12534 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v58->pName, pClassNames[v58->classType]); // "Seek knowledge elsewhere %s the %s"
12548 strcat(pTmpBuf, "\n \n"); 12535 strcat(pTmpBuf, "\n \n");
12549 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); 12536 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); //"I can offer you nothing further."
12550 v18 = pTmpBuf; 12537 v19 = pFontArrus->CalcTextHeight(pTmpBuf, &working_window, 0, 0);
12551 v44 = 3; 12538 working_window.DrawTitleText(pFontArrus, v5, (174 - v19) / 2 + 138, hi_text_color, pTmpBuf, 3);
12552 v43 = pTmpBuf; 12539 return;
12553 v42 = v57;
12554 v41 = 0;
12555 v40 = 0;
12556 v39 = &v52;
12557 goto LABEL_32;
12558 } 12540 }
12559 if ( Str ) 12541 if ( Str )
12560 { 12542 {
12561 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v63); 12543 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v63); //"Skill Cost: %lu"
12562 v52.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); 12544 working_window.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
12563 } 12545 }
12564 v63 = (signed int)(149 - v62) / v61; 12546 v63 = (signed int)(149 - v62) / v61;
12565 if ( v63 > 32 ) 12547 if ( v63 > 32 )
12566 v63 = 32; 12548 v63 = 32;
12567 result = v20->pStartingPosActiveItem;
12568 v26 = (signed int)(149 - v61 * v63 - v62) / 2 - v63 / 2 + 162; 12549 v26 = (signed int)(149 - v61 * v63 - v62) / 2 - v63 / 2 + 162;
12569 v62 = result; 12550 v62 = v20->pStartingPosActiveItem;
12570 v55 = v26; 12551 v55 = v26;
12571 if ( result < result + v20->pNumPresenceButton ) 12552 if (v20->pStartingPosActiveItem < v20->pStartingPosActiveItem + v20->pNumPresenceButton )
12572 { 12553 {
12573 v61 = 2; 12554 v61 = 2;
12574 while ( 1 ) 12555 while ( 1 )
12575 { 12556 {
12576 v27 = v20->GetControl(v62); 12557 v27 = v20->GetControl(v62);
12590 { 12571 {
12591 v30 = pClassNames[v29 + 20]; 12572 v30 = pClassNames[v29 + 20];
12592 LABEL_55: 12573 LABEL_55:
12593 Str = v30; 12574 Str = v30;
12594 v28->uY = v63 + v55; 12575 v28->uY = v63 + v55;
12595 v31 = pFontArrus->CalcTextHeight(v30, &v52, 0, 0); 12576 v31 = pFontArrus->CalcTextHeight(v30, &working_window, 0, 0);
12596 v32 = v28->uY; 12577 v32 = v28->uY;
12597 v28->uHeight = v31; 12578 v28->uHeight = v31;
12598 v33 = v32 + v31 - 1; 12579 v33 = v32 + v31 - 1;
12599 v28->uW = v33; 12580 v28->uW = v33;
12600 v55 = v33; 12581 v55 = v33;
12601 v34 = v57; 12582 v34 = hi_text_color;
12602 if ( pDialogueWindow->pCurrentPosActiveItem != v61 ) 12583 if ( pDialogueWindow->pCurrentPosActiveItem != v61 )
12603 v34 = v56; 12584 v34 = main_text_color;
12604 v52.DrawTitleText(pFontArrus, 0, v32, v34, Str, 3u); 12585 working_window.DrawTitleText(pFontArrus, 0, v32, v34, Str, 3u);
12605 goto LABEL_58; 12586 v35 = v20->pStartingPosActiveItem;
12587 ++v62;
12588 ++v61;
12589 if ( (signed int)v62 >=v20->pNumPresenceButton +v20->pStartingPosActiveItem )
12590 return;
12606 } 12591 }
12607 v28->uW = 0; 12592 v28->uW = 0;
12608 v28->uHeight = 0; 12593 v28->uHeight = 0;
12609 v28->uY = 0; 12594 v28->uY = 0;
12610 LABEL_58: 12595 LABEL_58:
12611 v35 = v20->pStartingPosActiveItem; 12596 v35 = v20->pStartingPosActiveItem;
12612 ++v62; 12597 ++v62;
12613 result = v20->pNumPresenceButton + v35;
12614 ++v61; 12598 ++v61;
12615 if ( (signed int)v62 >= result ) 12599 if ( (signed int)v62 >=v20->pNumPresenceButton +v20->pStartingPosActiveItem )
12616 return result; 12600 return;
12617 } 12601 }
12618 v30 = pGlobalTXT_LocalizationStrings[400]; 12602 v30 = pGlobalTXT_LocalizationStrings[400]; //"Buy Spells"
12619 goto LABEL_55; 12603 goto LABEL_55;
12620 } 12604 }
12621 return result; 12605 return;
12622 } 12606 }
12623 12607
12624 12608
12625 12609
12626 //----- (004B705E) -------------------------------------------------------- 12610 //----- (004B705E) --------------------------------------------------------