comparison UiGame.cpp @ 991:c5d8ea1e6ccb

CharacterUI cleanings.
author Nomad
date Mon, 13 May 2013 17:01:20 +0200
parents 9a5db2cf999a
children 3a3ab572eff5
comparison
equal deleted inserted replaced
984:d982fffb8b96 991:c5d8ea1e6ccb
45 45
46 #include "mm7_data.h" 46 #include "mm7_data.h"
47 47
48 48
49 49
50
51
52 //----- (0041A57E) --------------------------------------------------------
53 void GameUI_QuickRef_Draw()
54 {
55 unsigned int v0; // ebx@1
56 //unsigned int v1; // eax@1
57 Player *pPlayer; // ebp@2
58 int v3; // eax@6
59 int v4; // edi@6
60 unsigned int v5; // eax@7
61 unsigned int v6; // edi@9
62 unsigned int v7; // edi@11
63 signed int v8; // eax@13
64 unsigned int v9; // eax@13
65 unsigned int v10; // edi@13
66 int v11; // eax@15
67 unsigned int v12; // eax@15
68 unsigned int v13; // edi@15
69 int v14; // eax@17
70 int v15; // ST18_4@17
71 int v16; // ebx@17
72 int v17; // eax@17
73 unsigned int v18; // eax@17
74 unsigned int v19; // edi@17
75 int v20; // eax@19
76 unsigned int v21; // edi@19
77 char *v22; // eax@21
78 unsigned int v23; // edi@21
79 int v24; // eax@23
80 unsigned int v25; // edi@23
81 char *v26; // eax@25
82 unsigned int v27; // edi@25
83 int v28; // ecx@27
84 char *v29; // eax@27
85 signed int v30; // edx@27
86 unsigned int v31; // edi@31
87 unsigned int v32; // edi@33
88 const char *v33; // ST10_4@35
89 unsigned int v34; // eax@35
90 unsigned int v35; // edi@35
91 unsigned __int8 v36; // al@37
92 char *v37; // eax@38
93 int v38; // eax@41
94 signed int v39; // edi@42
95 char *v40; // eax@45
96 unsigned int v41; // eax@45
97 signed int v43; // [sp+10h] [bp-1Ch]@1
98 unsigned int v44; // [sp+14h] [bp-18h]@2
99 int v45; // [sp+18h] [bp-14h]@1
100 unsigned int v46; // [sp+1Ch] [bp-10h]@1
101 unsigned int v47; // [sp+20h] [bp-Ch]@1
102 unsigned int v48; // [sp+24h] [bp-8h]@33
103 //unsigned int v49; // [sp+28h] [bp-4h]@1
104
105 v0 = 0;
106 v47 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
107 //v49 = TargetColor(0xFFu, 0, 0);
108 v46 = TargetColor(0, 0xFFu, 0);
109 //v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE);
110 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("quikref", TEXTURE_16BIT_PALETTE));
111 v43 = 0;
112 v45 = LOBYTE(pFontArrus->uFontHeight) + 1;
113 do
114 {
115 pPlayer = &pParty->pPlayers[v43];
116 v44 = 94 * v43 + 89;
117 if ( v43 == v0 )
118 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, v0, pGlobalTXT_LocalizationStrings[149], 60, v0);//Name
119 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, v47, pPlayer->pName, 84, v0);
120 if ( v43 == v0 )
121 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, v0, pGlobalTXT_LocalizationStrings[131], 60, v0); //Уров.
122 v3 = pPlayer->GetActualLevel();
123 sprintf(pTmpBuf, "%lu", v3);
124 v4 = pPlayer->GetBaseLevel();
125 if ( pPlayer->GetActualLevel() <= v4 )
126 v5 = pPlayer->GetExperienceDisplayColor();
127 else
128 v5 = TargetColor(0, 0xFFu, v0);
129 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, v0);
130 v6 = v45 + 47;
131 if ( v43 == v0 )
132 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, v0, pGlobalTXT_LocalizationStrings[41], 60, v0);//Класс
133 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, v0, pClassNames[pPlayer->classType], 84, v0);
134 v7 = v45 + v6;
135 if ( v43 == v0 )
136 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v7, v0, pGlobalTXT_LocalizationStrings[107], 60, v0);//Здор.
137 sprintf(pTmpBuf, "%d", pPlayer->sHealth);
138 v8 = pPlayer->GetMaxHealth();
139 v9 = UI_GetHealthManaStringColor(pPlayer->sHealth, v8);
140 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v7, v9, pTmpBuf, 84, v0);
141 v10 = v45 + v7;
142 if ( v43 == v0 )
143 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v10, v0, pGlobalTXT_LocalizationStrings[209], 60, v0);//Мана
144 sprintf(pTmpBuf, "%d", pPlayer->sMana);
145 v11 = pPlayer->GetMaxMana();
146 v12 = UI_GetHealthManaStringColor(pPlayer->sMana, v11);
147 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v10, v12, pTmpBuf, 84, v0);
148 v13 = v45 + v10;
149 if ( v43 == v0 )
150 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v13, v0, pGlobalTXT_LocalizationStrings[0], 60, v0);//Класс брони
151 v14 = pPlayer->GetActualAC();
152 sprintf(pTmpBuf, "%d", v14);
153 v15 = v0;
154 v16 = pPlayer->GetBaseAC();
155 v17 = pPlayer->GetActualAC();
156 v18 = UI_GetHealthManaStringColor(v17, v16);
157 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v13, v18, pTmpBuf, 84, v15);
158 v0 = 0;
159 v19 = v45 + v13;
160 if ( !v43 )
161 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v19, 0, pGlobalTXT_LocalizationStrings[18], 60, 0);//Атака
162 v20 = pPlayer->GetActualAttack(0);
163 sprintf(pTmpBuf, "%+d", v20);
164 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v19, 0, pTmpBuf, 84, 0);
165 v21 = v45 + v19;
166 if ( !v43 )
167 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v21, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Повр.
168 v22 = pPlayer->GetMeleeDamageString();
169 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v21, 0, v22, 84, 0);
170 v23 = v45 + v21;
171 if ( !v43 )
172 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v23, 0, pGlobalTXT_LocalizationStrings[203], 60, 0);// Стрелять
173 v24 = pPlayer->GetRangedAttack();
174 sprintf(pTmpBuf, "%+d", v24);
175 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v23, 0, pTmpBuf, 84, 0);
176 v25 = v45 + v23;
177 if ( !v43 )
178 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v25, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Повр.
179 v26 = pPlayer->GetRangedDamageString();
180 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v25, 0, v26, 84, 0);
181 v27 = v45 + v25;
182 if ( !v43 )
183 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v27, 0, pGlobalTXT_LocalizationStrings[205], 60, 0);//Навыки
184 v28 = 0;
185 v29 = (char *)pPlayer->pActiveSkills;
186 v30 = 36;
187 do
188 {
189 if ( *(short *)v29 )
190 ++v28;
191 v29 += 2;
192 --v30;
193 }
194 while ( v30 );
195 sprintf(pTmpBuf, "%lu", v28);
196 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0);
197 v31 = v45 + v27;
198 if ( !v43 )
199 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Очки
200 sprintf(pTmpBuf, "%lu", pPlayer->uSkillPoints);
201 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, pPlayer->uSkillPoints != 0 ? v46 : 0, pTmpBuf, 84, 0);
202 v32 = v45 + v31;
203 v48 = pPlayer->GetMajorConditionIdx();
204 if ( !v43 )
205 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Сост.
206 v33 = aCharacterConditionNames[v48];
207 v34 = GetConditionDrawColor(v48);
208 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v32, v34, v33, 84, 0);
209 v35 = v45 + v32;
210 if ( !v43 )
211 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v35, 0, pGlobalTXT_LocalizationStrings[170], 60, 0);//Б.Прим.
212 v36 = pPlayer->uQuickSpell;
213 if ( v36 )
214 v37 = pSpellStats->pInfos[v36].pShortName;
215 else
216 v37 = pGlobalTXT_LocalizationStrings[153];//Нет
217 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v35, 0, v37, 84, 0);
218 ++v43;
219 }
220 while ( v43 < 4 );
221
222 v38 = GetPartyReputation();
223 if ( v38 >= 0 )
224 {
225 if ( v38 <= 5 )
226 v39 = TargetColor(0xFF, 0xFF, 0xFF);
227 else
228 v39 = TargetColor(0xFF, 0, 0);
229 }
230 else
231 v39 = v46;
232
233 v40 = GetReputationString(v38);
234 sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, v40);//Reputation
235 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0);
236 v41 = pParty->GetPartyFame();
237 sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], v41);// Fame Слава
238 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 0, 323, 0, pTmpBuf, 0, 0, 0);
239 }
50 240
51 //----- (0041AD6E) -------------------------------------------------------- 241 //----- (0041AD6E) --------------------------------------------------------
52 void __cdecl GameUI_DrawRightPanelItems() 242 void __cdecl GameUI_DrawRightPanelItems()
53 { 243 {
54 if (GameUI_RightPanel_BookFlashTimer > pParty->uTimePlayed) 244 if (GameUI_RightPanel_BookFlashTimer > pParty->uTimePlayed)