Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/UI/UiGame.cpp Thu Jul 18 14:43:06 2013 +0200 +++ b/UI/UiGame.cpp Thu Jul 18 16:11:57 2013 +0200 @@ -403,7 +403,7 @@ { NPCData *pNPC; // ebx@2 int pGreetType; // eax@2 - unsigned __int16 v2; // di@2 + //unsigned __int16 v2; // di@2 //unsigned int v3; // eax@2 char *v4; // esi@3 //int v5; // eax@11 @@ -423,7 +423,7 @@ //unsigned __int16 v30; // cx@83 int v31; // ecx@86 int v32; // ebx@93 - unsigned int v33; // eax@93 + //unsigned int v33; // eax@93 GUIWindow *v34; // ecx@93 int v35; // esi@93 int i; // eax@93 @@ -458,9 +458,9 @@ v51.uFrameWidth -= 10; v51.uFrameZ -= 10; //v54 = v1; - TargetColor(0xFFu, 0xFFu, 0xFFu); - TargetColor(0xE1u, 0xCDu, 0x23u); - v2 = TargetColor(0x15u, 0x99u, 0xE9u); + //TargetColor(0xFFu, 0xFFu, 0xFFu); + //TargetColor(0xE1u, 0xCDu, 0x23u); + //v2 = TargetColor(0x15u, 0x99u, 0xE9u); pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); @@ -474,7 +474,7 @@ else strcpy(pTmpBuf.data(), pNPC->pName); - v51.DrawTitleText(pFontArrus, 483, 112, v2, pTmpBuf.data(), 3); + v51.DrawTitleText(pFontArrus, 483, 112, ui_game_dialogue_npc_name_color, pTmpBuf.data(), 3); pParty->GetPartyFame(); pInString = nullptr; @@ -696,8 +696,6 @@ v32 = 0; - //pInString = (char *)TargetColor(0xFFu, 0xFFu, 0xFFu); - v33 = TargetColor(0xE1u, 0xCDu, 0x23u); v34 = pDialogueWindow; //v54 = v33; v35 = pDialogueWindow->pStartingPosActiveItem; @@ -739,9 +737,9 @@ v43->uHeight = v44; v42 = v45 + v44 - 1; v43->uW = v42; - v47 = v33; + v47 = ui_game_dialogue_option_highlight_color; if ( (unsigned __int16 *)pDialogueWindow->pCurrentPosActiveItem != v46 ) - v47 = TargetColor(0xFFu, 0xFFu, 0xFFu); + v47 = ui_game_dialogue_option_normal_color; v52.DrawTitleText(pFontArrus, 0, v45, v47, Str, 3u); v34 = pDialogueWindow; ++v55; @@ -998,21 +996,21 @@ strcat(pTmpBuf.data(), "\f00000\n"); v20 = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth()); - sprintf(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", - pGlobalTXT_LocalizationStrings[108], // "Hit Points" - v20, player->sHealth, player->GetMaxHealth()); + sprintfex(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", + pGlobalTXT_LocalizationStrings[108], // "Hit Points" + v20, player->sHealth, player->GetMaxHealth()); strcat(pTmpBuf.data(), pTmpBuf2.data()); v24 = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana()); - sprintf(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", - pGlobalTXT_LocalizationStrings[212], // "Spell Points" - v24, player->sMana, player->GetMaxMana()); + sprintfex(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", + pGlobalTXT_LocalizationStrings[212], // "Spell Points" + v24, player->sMana, player->GetMaxMana()); strcat(pTmpBuf.data(), pTmpBuf2.data()); v25 = player->GetMajorConditionIdx(); - sprintf(pTmpBuf2.data(), "%s: \f%05d%s\f00000\n", - pGlobalTXT_LocalizationStrings[47], // "Condition - GetConditionDrawColor(v25), aCharacterConditionNames[v25]); + sprintfex(pTmpBuf2.data(), "%s: \f%05d%s\f00000\n", + pGlobalTXT_LocalizationStrings[47], // "Condition + GetConditionDrawColor(v25), aCharacterConditionNames[v25]); strcat(pTmpBuf.data(), pTmpBuf2.data()); v28 = player->uQuickSpell; @@ -1042,7 +1040,7 @@ v39 = ""; if ( uFramesetIDa == 0 ) v39 = pGlobalTXT_LocalizationStrings[153]; // "None" - sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[450], v39); // "Active Spells: %s" + sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[450], v39); // "Active Spells: %s" window->DrawText(pFontArrus, 14, 114, 0, pTmpBuf.data(), 0, 0, 0); }