diff UiGame.cpp @ 991:c5d8ea1e6ccb

CharacterUI cleanings.
author Nomad
date Mon, 13 May 2013 17:01:20 +0200
parents 9a5db2cf999a
children 3a3ab572eff5
line wrap: on
line diff
--- a/UiGame.cpp	Sat May 11 17:56:12 2013 +0200
+++ b/UiGame.cpp	Mon May 13 17:01:20 2013 +0200
@@ -48,6 +48,196 @@
 
 
 
+
+//----- (0041A57E) --------------------------------------------------------
+void GameUI_QuickRef_Draw()
+{
+        unsigned int v0; // ebx@1
+        //unsigned int v1; // eax@1
+        Player *pPlayer; // ebp@2
+        int v3; // eax@6
+        int v4; // edi@6
+        unsigned int v5; // eax@7
+        unsigned int v6; // edi@9
+        unsigned int v7; // edi@11
+        signed int v8; // eax@13
+        unsigned int v9; // eax@13
+        unsigned int v10; // edi@13
+        int v11; // eax@15
+        unsigned int v12; // eax@15
+        unsigned int v13; // edi@15
+        int v14; // eax@17
+        int v15; // ST18_4@17
+        int v16; // ebx@17
+        int v17; // eax@17
+        unsigned int v18; // eax@17
+        unsigned int v19; // edi@17
+        int v20; // eax@19
+        unsigned int v21; // edi@19
+        char *v22; // eax@21
+        unsigned int v23; // edi@21
+        int v24; // eax@23
+        unsigned int v25; // edi@23
+        char *v26; // eax@25
+        unsigned int v27; // edi@25
+        int v28; // ecx@27
+        char *v29; // eax@27
+        signed int v30; // edx@27
+        unsigned int v31; // edi@31
+        unsigned int v32; // edi@33
+        const char *v33; // ST10_4@35
+        unsigned int v34; // eax@35
+        unsigned int v35; // edi@35
+        unsigned __int8 v36; // al@37
+        char *v37; // eax@38
+        int v38; // eax@41
+        signed int v39; // edi@42
+        char *v40; // eax@45
+        unsigned int v41; // eax@45
+        signed int v43; // [sp+10h] [bp-1Ch]@1
+        unsigned int v44; // [sp+14h] [bp-18h]@2
+        int v45; // [sp+18h] [bp-14h]@1
+        unsigned int v46; // [sp+1Ch] [bp-10h]@1
+        unsigned int v47; // [sp+20h] [bp-Ch]@1
+        unsigned int v48; // [sp+24h] [bp-8h]@33
+        //unsigned int v49; // [sp+28h] [bp-4h]@1
+
+        v0 = 0;
+        v47 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
+        //v49 = TargetColor(0xFFu, 0, 0);
+        v46 = TargetColor(0, 0xFFu, 0);
+        //v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE);
+        pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("quikref", TEXTURE_16BIT_PALETTE));
+        v43 = 0;
+        v45 = LOBYTE(pFontArrus->uFontHeight) + 1;
+        do
+            {
+            pPlayer = &pParty->pPlayers[v43];
+            v44 = 94 * v43 + 89;
+            if ( v43 == v0 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, v0, pGlobalTXT_LocalizationStrings[149], 60, v0);//Name
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, v47, pPlayer->pName, 84, v0);
+            if ( v43 == v0 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, v0, pGlobalTXT_LocalizationStrings[131], 60, v0); //Уров.
+            v3 = pPlayer->GetActualLevel();
+            sprintf(pTmpBuf, "%lu", v3);
+            v4 = pPlayer->GetBaseLevel();
+            if ( pPlayer->GetActualLevel() <= v4 )
+                v5 = pPlayer->GetExperienceDisplayColor();
+            else
+                v5 = TargetColor(0, 0xFFu, v0);
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, v0);
+            v6 = v45 + 47;
+            if ( v43 == v0 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, v0, pGlobalTXT_LocalizationStrings[41], 60, v0);//Класс
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, v0, pClassNames[pPlayer->classType], 84, v0);
+            v7 = v45 + v6;
+            if ( v43 == v0 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v7, v0, pGlobalTXT_LocalizationStrings[107], 60, v0);//Здор.
+            sprintf(pTmpBuf, "%d", pPlayer->sHealth);
+            v8 = pPlayer->GetMaxHealth();
+            v9 = UI_GetHealthManaStringColor(pPlayer->sHealth, v8);
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v7, v9, pTmpBuf, 84, v0);
+            v10 = v45 + v7;
+            if ( v43 == v0 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v10, v0, pGlobalTXT_LocalizationStrings[209], 60, v0);//Мана
+            sprintf(pTmpBuf, "%d", pPlayer->sMana);
+            v11 = pPlayer->GetMaxMana();
+            v12 = UI_GetHealthManaStringColor(pPlayer->sMana, v11);
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v10, v12, pTmpBuf, 84, v0);
+            v13 = v45 + v10;
+            if ( v43 == v0 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v13, v0, pGlobalTXT_LocalizationStrings[0], 60, v0);//Класс брони
+            v14 = pPlayer->GetActualAC();
+            sprintf(pTmpBuf, "%d", v14);
+            v15 = v0;
+            v16 = pPlayer->GetBaseAC();
+            v17 = pPlayer->GetActualAC();
+            v18 = UI_GetHealthManaStringColor(v17, v16);
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v13, v18, pTmpBuf, 84, v15);
+            v0 = 0;
+            v19 = v45 + v13;
+            if ( !v43 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v19, 0, pGlobalTXT_LocalizationStrings[18], 60, 0);//Атака
+            v20 = pPlayer->GetActualAttack(0);
+            sprintf(pTmpBuf, "%+d", v20);
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v19, 0, pTmpBuf, 84, 0);
+            v21 = v45 + v19;
+            if ( !v43 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v21, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Повр.
+            v22 = pPlayer->GetMeleeDamageString();
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v21, 0, v22, 84, 0);
+            v23 = v45 + v21;
+            if ( !v43 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v23, 0, pGlobalTXT_LocalizationStrings[203], 60, 0);// Стрелять
+            v24 = pPlayer->GetRangedAttack();
+            sprintf(pTmpBuf, "%+d", v24);
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v23, 0, pTmpBuf, 84, 0);
+            v25 = v45 + v23;
+            if ( !v43 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v25, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Повр.
+            v26 = pPlayer->GetRangedDamageString();
+            pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v25, 0, v26, 84, 0);
+            v27 = v45 + v25;
+            if ( !v43 )
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v27, 0, pGlobalTXT_LocalizationStrings[205], 60, 0);//Навыки
+            v28 = 0;
+            v29 = (char *)pPlayer->pActiveSkills;
+            v30 = 36;
+            do
+                {
+                if ( *(short *)v29 )
+                    ++v28;
+                v29 += 2;
+                --v30;
+                }
+                while ( v30 );
+                sprintf(pTmpBuf, "%lu", v28);
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0);
+                v31 = v45 + v27;
+                if ( !v43 )
+                    pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Очки
+                sprintf(pTmpBuf, "%lu", pPlayer->uSkillPoints);
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, pPlayer->uSkillPoints != 0 ? v46 : 0, pTmpBuf, 84, 0);
+                v32 = v45 + v31;
+                v48 = pPlayer->GetMajorConditionIdx();
+                if ( !v43 )
+                    pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Сост.
+                v33 = aCharacterConditionNames[v48];
+                v34 = GetConditionDrawColor(v48);
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v32, v34, v33, 84, 0);
+                v35 = v45 + v32;
+                if ( !v43 )
+                    pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v35, 0, pGlobalTXT_LocalizationStrings[170], 60, 0);//Б.Прим.
+                v36 = pPlayer->uQuickSpell;
+                if ( v36 )
+                    v37 = pSpellStats->pInfos[v36].pShortName;
+                else
+                    v37 = pGlobalTXT_LocalizationStrings[153];//Нет
+                pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v35, 0, v37, 84, 0);
+                ++v43;
+            }
+            while ( v43 < 4 );
+
+            v38 = GetPartyReputation();
+            if ( v38 >= 0 )
+                {
+                if ( v38 <= 5 )
+                    v39 = TargetColor(0xFF, 0xFF, 0xFF);
+                else
+                    v39 = TargetColor(0xFF, 0, 0);
+                }
+            else
+                v39 = v46;
+
+            v40 = GetReputationString(v38);
+            sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, v40);//Reputation
+            pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0);
+            v41 = pParty->GetPartyFame();
+            sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], v41);// Fame Слава
+            pGUIWindow_CurrentMenu->DrawText(pFontArrus, 0, 323, 0, pTmpBuf, 0, 0, 0);
+        }
+
 //----- (0041AD6E) --------------------------------------------------------
 void __cdecl GameUI_DrawRightPanelItems()
 {