Mercurial > mm7
comparison UI/UiGame.cpp @ 1393:28f87f5234a1
More hardcoded UI colors moved to varibables.
author | Nomad |
---|---|
date | Thu, 18 Jul 2013 16:11:57 +0200 |
parents | b51332ab228f |
children | d071e0e9ba75 |
comparison
equal
deleted
inserted
replaced
1392:e3e9c0467529 | 1393:28f87f5234a1 |
---|---|
401 //----- (00445350) -------------------------------------------------------- | 401 //----- (00445350) -------------------------------------------------------- |
402 void GameUI_DrawDialogue() | 402 void GameUI_DrawDialogue() |
403 { | 403 { |
404 NPCData *pNPC; // ebx@2 | 404 NPCData *pNPC; // ebx@2 |
405 int pGreetType; // eax@2 | 405 int pGreetType; // eax@2 |
406 unsigned __int16 v2; // di@2 | 406 //unsigned __int16 v2; // di@2 |
407 //unsigned int v3; // eax@2 | 407 //unsigned int v3; // eax@2 |
408 char *v4; // esi@3 | 408 char *v4; // esi@3 |
409 //int v5; // eax@11 | 409 //int v5; // eax@11 |
410 //char *v6; // ecx@13 | 410 //char *v6; // ecx@13 |
411 //char *v7; // eax@16 | 411 //char *v7; // eax@16 |
421 //unsigned int v23; // eax@53 | 421 //unsigned int v23; // eax@53 |
422 //const char *v24; // eax@59 | 422 //const char *v24; // eax@59 |
423 //unsigned __int16 v30; // cx@83 | 423 //unsigned __int16 v30; // cx@83 |
424 int v31; // ecx@86 | 424 int v31; // ecx@86 |
425 int v32; // ebx@93 | 425 int v32; // ebx@93 |
426 unsigned int v33; // eax@93 | 426 //unsigned int v33; // eax@93 |
427 GUIWindow *v34; // ecx@93 | 427 GUIWindow *v34; // ecx@93 |
428 int v35; // esi@93 | 428 int v35; // esi@93 |
429 int i; // eax@93 | 429 int i; // eax@93 |
430 GUIButton *v37; // eax@94 | 430 GUIButton *v37; // eax@94 |
431 int v38; // eax@95 | 431 int v38; // eax@95 |
456 pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID); | 456 pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID); |
457 pGreetType = GetGreetType(sDialogue_SpeakingActorNPC_ID); | 457 pGreetType = GetGreetType(sDialogue_SpeakingActorNPC_ID); |
458 v51.uFrameWidth -= 10; | 458 v51.uFrameWidth -= 10; |
459 v51.uFrameZ -= 10; | 459 v51.uFrameZ -= 10; |
460 //v54 = v1; | 460 //v54 = v1; |
461 TargetColor(0xFFu, 0xFFu, 0xFFu); | 461 //TargetColor(0xFFu, 0xFFu, 0xFFu); |
462 TargetColor(0xE1u, 0xCDu, 0x23u); | 462 //TargetColor(0xE1u, 0xCDu, 0x23u); |
463 v2 = TargetColor(0x15u, 0x99u, 0xE9u); | 463 //v2 = TargetColor(0x15u, 0x99u, 0xE9u); |
464 pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); | 464 pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); |
465 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); | 465 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); |
466 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); | 466 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); |
467 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]); | 467 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]); |
468 | 468 |
472 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s | 472 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s |
473 } | 473 } |
474 else | 474 else |
475 strcpy(pTmpBuf.data(), pNPC->pName); | 475 strcpy(pTmpBuf.data(), pNPC->pName); |
476 | 476 |
477 v51.DrawTitleText(pFontArrus, 483, 112, v2, pTmpBuf.data(), 3); | 477 v51.DrawTitleText(pFontArrus, 483, 112, ui_game_dialogue_npc_name_color, pTmpBuf.data(), 3); |
478 pParty->GetPartyFame(); | 478 pParty->GetPartyFame(); |
479 | 479 |
480 pInString = nullptr; | 480 pInString = nullptr; |
481 switch (uDialogueType) | 481 switch (uDialogueType) |
482 { | 482 { |
694 } | 694 } |
695 } | 695 } |
696 | 696 |
697 | 697 |
698 v32 = 0; | 698 v32 = 0; |
699 //pInString = (char *)TargetColor(0xFFu, 0xFFu, 0xFFu); | |
700 v33 = TargetColor(0xE1u, 0xCDu, 0x23u); | |
701 v34 = pDialogueWindow; | 699 v34 = pDialogueWindow; |
702 //v54 = v33; | 700 //v54 = v33; |
703 v35 = pDialogueWindow->pStartingPosActiveItem; | 701 v35 = pDialogueWindow->pStartingPosActiveItem; |
704 for ( i = v35 + pDialogueWindow->pNumPresenceButton; v35 < i; i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ) | 702 for ( i = v35 + pDialogueWindow->pNumPresenceButton; v35 < i; i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ) |
705 { | 703 { |
737 v45 = v43->uY; | 735 v45 = v43->uY; |
738 v46 = (unsigned short *)v55; | 736 v46 = (unsigned short *)v55; |
739 v43->uHeight = v44; | 737 v43->uHeight = v44; |
740 v42 = v45 + v44 - 1; | 738 v42 = v45 + v44 - 1; |
741 v43->uW = v42; | 739 v43->uW = v42; |
742 v47 = v33; | 740 v47 = ui_game_dialogue_option_highlight_color; |
743 if ( (unsigned __int16 *)pDialogueWindow->pCurrentPosActiveItem != v46 ) | 741 if ( (unsigned __int16 *)pDialogueWindow->pCurrentPosActiveItem != v46 ) |
744 v47 = TargetColor(0xFFu, 0xFFu, 0xFFu); | 742 v47 = ui_game_dialogue_option_normal_color; |
745 v52.DrawTitleText(pFontArrus, 0, v45, v47, Str, 3u); | 743 v52.DrawTitleText(pFontArrus, 0, v45, v47, Str, 3u); |
746 v34 = pDialogueWindow; | 744 v34 = pDialogueWindow; |
747 ++v55; | 745 ++v55; |
748 ++v41; | 746 ++v41; |
749 } | 747 } |
996 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]); // "%s the %s" | 994 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]); // "%s the %s" |
997 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 995 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
998 strcat(pTmpBuf.data(), "\f00000\n"); | 996 strcat(pTmpBuf.data(), "\f00000\n"); |
999 | 997 |
1000 v20 = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth()); | 998 v20 = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth()); |
1001 sprintf(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", | 999 sprintfex(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", |
1002 pGlobalTXT_LocalizationStrings[108], // "Hit Points" | 1000 pGlobalTXT_LocalizationStrings[108], // "Hit Points" |
1003 v20, player->sHealth, player->GetMaxHealth()); | 1001 v20, player->sHealth, player->GetMaxHealth()); |
1004 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1002 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1005 | 1003 |
1006 v24 = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana()); | 1004 v24 = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana()); |
1007 sprintf(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", | 1005 sprintfex(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", |
1008 pGlobalTXT_LocalizationStrings[212], // "Spell Points" | 1006 pGlobalTXT_LocalizationStrings[212], // "Spell Points" |
1009 v24, player->sMana, player->GetMaxMana()); | 1007 v24, player->sMana, player->GetMaxMana()); |
1010 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1008 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1011 | 1009 |
1012 v25 = player->GetMajorConditionIdx(); | 1010 v25 = player->GetMajorConditionIdx(); |
1013 sprintf(pTmpBuf2.data(), "%s: \f%05d%s\f00000\n", | 1011 sprintfex(pTmpBuf2.data(), "%s: \f%05d%s\f00000\n", |
1014 pGlobalTXT_LocalizationStrings[47], // "Condition | 1012 pGlobalTXT_LocalizationStrings[47], // "Condition |
1015 GetConditionDrawColor(v25), aCharacterConditionNames[v25]); | 1013 GetConditionDrawColor(v25), aCharacterConditionNames[v25]); |
1016 strcat(pTmpBuf.data(), pTmpBuf2.data()); | 1014 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
1017 | 1015 |
1018 v28 = player->uQuickSpell; | 1016 v28 = player->uQuickSpell; |
1019 if ( v28 ) | 1017 if ( v28 ) |
1020 v29 = pSpellStats->pInfos[v28].pShortName; | 1018 v29 = pSpellStats->pInfos[v28].pShortName; |
1040 } | 1038 } |
1041 | 1039 |
1042 v39 = ""; | 1040 v39 = ""; |
1043 if ( uFramesetIDa == 0 ) | 1041 if ( uFramesetIDa == 0 ) |
1044 v39 = pGlobalTXT_LocalizationStrings[153]; // "None" | 1042 v39 = pGlobalTXT_LocalizationStrings[153]; // "None" |
1045 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[450], v39); // "Active Spells: %s" | 1043 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[450], v39); // "Active Spells: %s" |
1046 window->DrawText(pFontArrus, 14, 114, 0, pTmpBuf.data(), 0, 0, 0); | 1044 window->DrawText(pFontArrus, 14, 114, 0, pTmpBuf.data(), 0, 0, 0); |
1047 } | 1045 } |
1048 | 1046 |
1049 | 1047 |
1050 | 1048 |