comparison UiGame.cpp @ 995:5876a9cafa3e

Various UIs, autonotes title fixed
author Nomad
date Tue, 14 May 2013 14:03:07 +0200
parents 3431f6abc786
children eac5af72b614 c45d51b3f4f4
comparison
equal deleted inserted replaced
994:3431f6abc786 995:5876a9cafa3e
45 45
46 #include "mm7_data.h" 46 #include "mm7_data.h"
47 47
48 48
49 49
50
51 int uTextureID_GameUI_CharSelectionFrame; // 50C98C
50 52
51 53
52 //----- (0041A57E) -------------------------------------------------------- 54 //----- (0041A57E) --------------------------------------------------------
53 void GameUI_QuickRef_Draw() 55 void GameUI_QuickRef_Draw()
54 { 56 {
114 { 116 {
115 auto player = &pParty->pPlayers[v43]; 117 auto player = &pParty->pPlayers[v43];
116 v44 = 94 * v43 + 89; 118 v44 = 94 * v43 + 89;
117 if ( v43 == 0 ) 119 if ( v43 == 0 )
118 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, 0, pGlobalTXT_LocalizationStrings[149], 60, 0);//Name 120 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, 0, pGlobalTXT_LocalizationStrings[149], 60, 0);//Name
119 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, ui_color_text_header, player->pName, 84, 0); 121 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, ui_character_header_text_color, player->pName, 84, 0);
120 if ( v43 == 0 ) 122 if ( v43 == 0 )
121 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, 0, pGlobalTXT_LocalizationStrings[131], 60, 0); //Óðîâ. 123 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, 0, pGlobalTXT_LocalizationStrings[131], 60, 0); //Óðîâ.
122 sprintf(pTmpBuf, "%lu", player->GetActualLevel()); 124 sprintf(pTmpBuf, "%lu", player->GetActualLevel());
123 if ( player->GetActualLevel() <= player->GetBaseLevel()) 125 if ( player->GetActualLevel() <= player->GetBaseLevel())
124 v5 = player->GetExperienceDisplayColor(); 126 v5 = player->GetExperienceDisplayColor();
125 else 127 else
126 v5 = ui_color_text_bonus; 128 v5 = ui_character_bonus_text_color;
127 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, 0); 129 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, 0);
128 v6 = v45 + 47; 130 v6 = v45 + 47;
129 if ( v43 == 0 ) 131 if ( v43 == 0 )
130 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, 0, pGlobalTXT_LocalizationStrings[41], 60, 0);//Êëàññ 132 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, 0, pGlobalTXT_LocalizationStrings[41], 60, 0);//Êëàññ
131 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, 0, pClassNames[player->classType], 84, 0); 133 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, 0, pClassNames[player->classType], 84, 0);
185 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0); 187 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0);
186 v31 = v45 + v27; 188 v31 = v45 + v27;
187 if ( !v43 ) 189 if ( !v43 )
188 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Î÷êè 190 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Î÷êè
189 sprintf(pTmpBuf, "%lu", player->uSkillPoints); 191 sprintf(pTmpBuf, "%lu", player->uSkillPoints);
190 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, player->uSkillPoints ? ui_color_text_bonus : ui_color_text_default, pTmpBuf, 84, 0); 192 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, pTmpBuf, 84, 0);
191 v32 = v45 + v31; 193 v32 = v45 + v31;
192 v48 = player->GetMajorConditionIdx(); 194 v48 = player->GetMajorConditionIdx();
193 if ( !v43 ) 195 if ( !v43 )
194 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Ñîñò. 196 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Ñîñò.
195 v33 = aCharacterConditionNames[v48]; 197 v33 = aCharacterConditionNames[v48];
209 211
210 v38 = GetPartyReputation(); 212 v38 = GetPartyReputation();
211 if ( v38 >= 0 ) 213 if ( v38 >= 0 )
212 { 214 {
213 if ( v38 <= 5 ) 215 if ( v38 <= 5 )
214 v39 = ui_color_text_default; 216 v39 = ui_character_default_text_color;
215 else 217 else
216 v39 = ui_color_text_bonus_neg; 218 v39 = ui_character_bonus_text_color_neg;
217 } 219 }
218 else 220 else
219 v39 = ui_color_text_bonus; 221 v39 = ui_character_bonus_text_color;
220 222
221 sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, GetReputationString(v38));//Reputation 223 sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, GetReputationString(v38));//Reputation
222 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0); 224 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0);
223 225
224 sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], pParty->GetPartyFame());// Fame Ñëàâà 226 sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], pParty->GetPartyFame());// Fame Ñëàâà
1095 } 1097 }
1096 } 1098 }
1097 1099
1098 1100
1099 //----- (0044158F) -------------------------------------------------------- 1101 //----- (0044158F) --------------------------------------------------------
1100 void __cdecl GameUI_DrawCharacterSelectionFrame() 1102 void GameUI_DrawCharacterSelectionFrame()
1101 { 1103 {
1102 if ( uActiveCharacter ) 1104 if ( uActiveCharacter )
1103 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[uActiveCharacter - 1] - 9, 1105 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[uActiveCharacter - 1] - 9, 380,
1104 380, &pIcons_LOD->pTextures[dword_50C98C]); 1106 pIcons_LOD->GetTexture(uTextureID_GameUI_CharSelectionFrame));
1105 } 1107 }
1106 1108
1107 //----- (004415C5) -------------------------------------------------------- 1109
1108 void LoadPartyBuffIcons()
1109 {
1110 for (uint i = 0; i < 14; ++i)
1111 {
1112 char filename[200];
1113 sprintf(filename, "isn-%02d", i + 1);
1114 pTextureIDs_PartyBuffIcons[i] = pIcons_LOD->LoadTexture(filename, TEXTURE_16BIT_PALETTE);
1115 }
1116
1117 uIconIdx_FlySpell = pIconsFrameTable->FindIcon("spell21");
1118 uIconIdx_WaterWalk = pIconsFrameTable->FindIcon("spell27");
1119 }
1120 1110
1121 //----- (0044162D) -------------------------------------------------------- 1111 //----- (0044162D) --------------------------------------------------------
1122 void __cdecl GameUI_DrawPartySpells() 1112 void GameUI_DrawPartySpells()
1123 { 1113 {
1124 unsigned int v0; // ebp@1 1114 unsigned int v0; // ebp@1
1125 //signed int v1; // edi@1 1115 //signed int v1; // edi@1
1126 //int v2; // eax@2 1116 //int v2; // eax@2
1127 //int v3; // ecx@5 1117 //int v3; // ecx@5
1128 //__int16 *v4; // ebx@25 1118 //__int16 *v4; // ebx@25
1140 //v2 = byte_4E5DD8[v1]; 1130 //v2 = byte_4E5DD8[v1];
1141 if (pParty->pPartyBuffs[byte_4E5DD8[i]].uExpireTime) 1131 if (pParty->pPartyBuffs[byte_4E5DD8[i]].uExpireTime)
1142 { 1132 {
1143 auto tex = pIcons_LOD->GetTexture(pTextureIDs_PartyBuffIcons[i]); 1133 auto tex = pIcons_LOD->GetTexture(pTextureIDs_PartyBuffIcons[i]);
1144 //v3 = pTextureIDs_PartyBuffIcons[i]; 1134 //v3 = pTextureIDs_PartyBuffIcons[i];
1145 if (tex)
1146 pRenderer->_4A65CC(pPartySpellbuffsUI_XYs[i][0], 1135 pRenderer->_4A65CC(pPartySpellbuffsUI_XYs[i][0],
1147 pPartySpellbuffsUI_XYs[i][1], tex, tex, 1136 pPartySpellbuffsUI_XYs[i][1], tex, tex,
1148 v0 + 20 * pPartySpellbuffsUI_smthns[i], 0, 63); 1137 v0 + 20 * pPartySpellbuffsUI_smthns[i], 0, 63);
1149 } 1138 }
1150 //++v1; 1139 //++v1;
1154 if (pCurrentScreen == SCREEN_GAME || pCurrentScreen == SCREEN_NPC_DIALOGUE) 1143 if (pCurrentScreen == SCREEN_GAME || pCurrentScreen == SCREEN_NPC_DIALOGUE)
1155 { 1144 {
1156 if (pParty->FlyActive()) 1145 if (pParty->FlyActive())
1157 { 1146 {
1158 if ( pParty->bFlying ) 1147 if ( pParty->bFlying )
1159 v7 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID]; 1148 v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID);
1160 else 1149 else
1161 v7 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID]; 1150 v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID);
1162 if ( pRenderer->pRenderD3D ) 1151 if ( pRenderer->pRenderD3D )
1163 pRenderer->DrawTextureIndexed(8u, 8u, v7); 1152 pRenderer->DrawTextureIndexed(8, 8, v7);
1164 else 1153 else
1165 pRenderer->DrawTextureTransparent(8u, 8u, v7); 1154 pRenderer->DrawTextureTransparent(8, 8, v7);
1166 } 1155 }
1167 if (pParty->WaterWalkActive()) 1156 if (pParty->WaterWalkActive())
1168 { 1157 {
1169 if ( pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER) 1158 if ( pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER)
1170 v9 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID]; 1159 v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID);
1171 else 1160 else
1172 v9 = &pIcons_LOD->pTextures[pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID]; 1161 v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID);
1173 if ( pRenderer->pRenderD3D ) 1162 if ( pRenderer->pRenderD3D )
1174 pRenderer->DrawTextureIndexed(396u, 8u, v9); 1163 pRenderer->DrawTextureIndexed(396u, 8u, v9);
1175 else 1164 else
1176 pRenderer->DrawTextureTransparent(396u, 8u, v9); 1165 pRenderer->DrawTextureTransparent(396u, 8u, v9);
1177 } 1166 }
1190 if (player->pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].uExpireTime) 1179 if (player->pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].uExpireTime)
1191 pRenderer->DrawTextureIndexed(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] + 72, 444, pIcons_LOD->GetTexture(uTextureID_PlayerBuff_PainReflection)); 1180 pRenderer->DrawTextureIndexed(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] + 72, 444, pIcons_LOD->GetTexture(uTextureID_PlayerBuff_PainReflection));
1192 } 1181 }
1193 } 1182 }
1194 1183
1195
1196 //----- (00421626) --------------------------------------------------------
1197 GUIWindow *GameUI_InitializeCharacterWindow(unsigned int _this)
1198 {
1199 unsigned int v1; // edi@1
1200 GUIWindow *pWindow; // edi@3
1201
1202 ++pIcons_LOD->uTexturePacksCount;
1203 v1 = _this;
1204 if ( !pIcons_LOD->uNumPrevLoadedFiles )
1205 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
1206 pEventTimer->Pause();
1207 pAudioPlayer->StopChannels(-1, -1);
1208 bRingsShownInCharScreen = 0;
1209 CharacterUI_LoadPaperdollTextures();
1210 pCurrentScreen = v1;
1211
1212 pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0);
1213 pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308,
1214 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth,
1215 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight,
1216 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats
1217 pIcons_LOD->GetTexture(papredoll_dbrds[10]),
1218 pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0);
1219 pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308,
1220 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth,
1221 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight,
1222 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills
1223 pIcons_LOD->GetTexture(papredoll_dbrds[8]),
1224 pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0);
1225 pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308,
1226 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth,
1227 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight,
1228 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory
1229 pIcons_LOD->GetTexture(papredoll_dbrds[6]),
1230 pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0);
1231 pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308,
1232 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth,
1233 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight,
1234 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards
1235 pIcons_LOD->GetTexture(papredoll_dbrds[4]),
1236 pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0);
1237 pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308,
1238 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth,
1239 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight,
1240 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit
1241 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
1242 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
1243 pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
1244 pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0);
1245 pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
1246 pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
1247 pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
1248 pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
1249 pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
1250 pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0);
1251 FillAwardsData();
1252 return pWindow;
1253 }
1254 1184
1255 1185
1256 //----- (004921C1) -------------------------------------------------------- 1186 //----- (004921C1) --------------------------------------------------------
1257 void GameUI_DrawPortraits(unsigned int _this) 1187 void GameUI_DrawPortraits(unsigned int _this)
1258 { 1188 {
1455 //unsigned int v55; // [sp-8h] [bp-5Ch]@77 1385 //unsigned int v55; // [sp-8h] [bp-5Ch]@77
1456 unsigned int v56; // [sp-8h] [bp-5Ch]@100 1386 unsigned int v56; // [sp-8h] [bp-5Ch]@100
1457 //signed int v57; // [sp-4h] [bp-58h]@54 1387 //signed int v57; // [sp-4h] [bp-58h]@54
1458 //unsigned __int16 v58; // [sp-4h] [bp-58h]@77 1388 //unsigned __int16 v58; // [sp-4h] [bp-58h]@77
1459 unsigned __int16 v59; // [sp-4h] [bp-58h]@100 1389 unsigned __int16 v59; // [sp-4h] [bp-58h]@100
1460 unsigned __int16 v60; // [sp+10h] [bp-44h]@66 1390 //unsigned __int16 v60; // [sp+10h] [bp-44h]@66
1461 unsigned int v61; // [sp+10h] [bp-44h]@85 1391 //unsigned int v61; // [sp+10h] [bp-44h]@85
1462 unsigned int v63; // [sp+14h] [bp-40h]@85 1392 //unsigned int v63; // [sp+14h] [bp-40h]@85
1463 unsigned int v65; // [sp+18h] [bp-3Ch]@85 1393 //unsigned int v65; // [sp+18h] [bp-3Ch]@85
1464 unsigned int lPitch; // [sp+20h] [bp-34h]@1 1394 unsigned int lPitch; // [sp+20h] [bp-34h]@1
1465 unsigned int lPitcha; // [sp+20h] [bp-34h]@23 1395 unsigned int lPitcha; // [sp+20h] [bp-34h]@23
1466 char *lPitchb; // [sp+20h] [bp-34h]@106 1396 char *lPitchb; // [sp+20h] [bp-34h]@106
1467 unsigned int v69; // [sp+24h] [bp-30h]@23 1397 unsigned int v69; // [sp+24h] [bp-30h]@23
1468 signed int v70; // [sp+24h] [bp-30h]@37 1398 signed int v70; // [sp+24h] [bp-30h]@37
1469 unsigned __int16 uBlue; // [sp+28h] [bp-2Ch]@1 1399 //unsigned __int16 uBlue; // [sp+28h] [bp-2Ch]@1
1470 signed int uBluea; // [sp+28h] [bp-2Ch]@37 1400 signed int uBluea; // [sp+28h] [bp-2Ch]@37
1471 int v73; // [sp+2Ch] [bp-28h]@30 1401 int v73; // [sp+2Ch] [bp-28h]@30
1472 int v76; // [sp+34h] [bp-20h]@91 1402 int v76; // [sp+34h] [bp-20h]@91
1473 int v77; // [sp+34h] [bp-20h]@108 1403 int v77; // [sp+34h] [bp-20h]@108
1474 //int v79; // [sp+38h] [bp-1Ch]@72 1404 //int v79; // [sp+38h] [bp-1Ch]@72
1481 signed int uZg; // [sp+5Ch] [bp+8h]@105 1411 signed int uZg; // [sp+5Ch] [bp+8h]@105
1482 unsigned int uWa; // [sp+60h] [bp+Ch]@23 1412 unsigned int uWa; // [sp+60h] [bp+Ch]@23
1483 float uWb; // [sp+60h] [bp+Ch]@30 1413 float uWb; // [sp+60h] [bp+Ch]@30
1484 unsigned int uWd; // [sp+60h] [bp+Ch]@95 1414 unsigned int uWd; // [sp+60h] [bp+Ch]@95
1485 float uZooma; // [sp+64h] [bp+10h]@117 1415 float uZooma; // [sp+64h] [bp+10h]@117
1486 unsigned int flagsb; // [sp+68h] [bp+14h]@66 1416 //unsigned int flagsb; // [sp+68h] [bp+14h]@66
1487 Actor *flagsc; // [sp+68h] [bp+14h]@86 1417 Actor *flagsc; // [sp+68h] [bp+14h]@86
1488 unsigned int flagsd; // [sp+68h] [bp+14h]@105 1418 //unsigned int flagsd; // [sp+68h] [bp+14h]@105
1489 1419
1490 uCenterX = (uX + uZ) / 2; 1420 uCenterX = (uX + uZ) / 2;
1491 uCenterY = (uY + uW) / 2; 1421 uCenterY = (uY + uW) / 2;
1492 lPitch = pRenderer->uTargetSurfacePitch; 1422 lPitch = pRenderer->uTargetSurfacePitch;
1493 TargetColor(0, 0, 0); 1423 //TargetColor(0, 0, 0);
1494 uBlue = TargetColor(0, 0, 0xFFu); 1424 //uBlue = TargetColor(0, 0, 0xFFu);
1495 auto bWizardEyeActive = pParty->WizardEyeActive(); 1425 auto bWizardEyeActive = pParty->WizardEyeActive();
1496 auto uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel(); 1426 auto uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel();
1497 if (CheckHiredNPCSpeciality(Cartographer)) 1427 if (CheckHiredNPCSpeciality(Cartographer))
1498 { 1428 {
1499 bWizardEyeActive = true; 1429 bWizardEyeActive = true;
1658 - uZoom * pParty->vPosition.x) >> 16), 1588 - uZoom * pParty->vPosition.x) >> 16),
1659 uCenterY 1589 uCenterY
1660 - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom 1590 - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
1661 * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16) 1591 * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16)
1662 - uZoom * pParty->vPosition.y) >> 16), 1592 - uZoom * pParty->vPosition.y) >> 16),
1663 uBlue); 1593 ui_game_minimap_outline_color);
1664 } 1594 }
1665 } 1595 }
1666 1596
1667 1597
1668 assert(pParty->sRotationY >= 0); 1598 assert(pParty->sRotationY >= 0);
1670 const float two_pi = 2.0f * 3.14159f; 1600 const float two_pi = 2.0f * 3.14159f;
1671 1601
1672 uint arrow_idx = floorf(0.5f + 7 * angle); 1602 uint arrow_idx = floorf(0.5f + 7 * angle);
1673 pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx])); 1603 pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx]));
1674 1604
1675 flagsb = TargetColor(0, 0, 255); 1605 //flagsb = TargetColor(0, 0, 255);
1676 v60 = TargetColor(255, 0, 0); 1606 //v60 = TargetColor(255, 0, 0);
1677 if (bWizardEyeActive) 1607 if (bWizardEyeActive)
1678 { 1608 {
1679 //uZe = 0; 1609 //uZe = 0;
1680 if (uWizardEyeSkillLevel >= 2) 1610 if (uWizardEyeSkillLevel >= 2)
1681 for (uint i = 0; i < uNumSpriteObjects; ++i) 1611 for (uint i = 0; i < uNumSpriteObjects; ++i)
1698 continue; 1628 continue;
1699 1629
1700 assert(uZoom >= 512); 1630 assert(uZoom >= 512);
1701 if (pObjectList->pObjects[object->uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE) 1631 if (pObjectList->pObjects[object->uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE)
1702 { 1632 {
1703 pRenderer->RasterLine2D(v37, v38, 1633 pRenderer->RasterLine2D(v37, v38, v37, v38, ui_game_minimap_projectile_color);
1704 v37, v38, v60);
1705 } 1634 }
1706 else if (uZoom > 512) 1635 else if (uZoom > 512)
1707 { 1636 {
1708 pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, flagsb); 1637 pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, ui_game_minimap_treasure_color);
1709 pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, flagsb); 1638 pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, ui_game_minimap_treasure_color);
1710 pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, flagsb); 1639 pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, ui_game_minimap_treasure_color);
1711 pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, flagsb); 1640 pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, ui_game_minimap_treasure_color);
1712 pRenderer->RasterLine2D(v37 + 2, v38, 1641 pRenderer->RasterLine2D(v37 + 2, v38,
1713 v37 + 2, v38 + 1, flagsb); 1642 v37 + 2, v38 + 1, ui_game_minimap_treasure_color);
1714 } 1643 }
1715 else 1644 else
1716 { 1645 {
1717 pRenderer->RasterLine2D(v37 - 1, v38 - 1, 1646 pRenderer->RasterLine2D(v37 - 1, v38 - 1,
1718 v37 - 1, v38, flagsb); 1647 v37 - 1, v38, ui_game_minimap_treasure_color);
1719 pRenderer->RasterLine2D(v37, v38 - 1, 1648 pRenderer->RasterLine2D(v37, v38 - 1,
1720 v37, v38, flagsb); 1649 v37, v38, ui_game_minimap_treasure_color);
1721 } 1650 }
1722 //LABEL_82: 1651 //LABEL_82:
1723 //LABEL_83: 1652 //LABEL_83:
1724 //++uZe; 1653 //++uZe;
1725 //a2c += 112; 1654 //a2c += 112;
1730 //} 1659 //}
1731 } 1660 }
1732 1661
1733 1662
1734 LABEL_85: 1663 LABEL_85:
1735 v63 = TargetColor(255, 0, 0); 1664 //v63 = TargetColor(255, 0, 0);
1736 v61 = TargetColor(0, 255, 0); 1665 //v61 = TargetColor(0, 255, 0);
1737 v65 = TargetColor(255, 255, 0); 1666 //v65 = TargetColor(255, 255, 0);
1738 uZf = 0; 1667 uZf = 0;
1739 if ( (signed int)uNumActors > 0 ) 1668 if ( (signed int)uNumActors > 0 )
1740 { 1669 {
1741 flagsc = pActors;//[0].uAIState; 1670 flagsc = pActors;//[0].uAIState;
1742 do 1671 do
1752 v41 = uCenterY - v76; 1681 v41 = uCenterY - v76;
1753 if ( v40 >= pRenderer->raster_clip_x ) 1682 if ( v40 >= pRenderer->raster_clip_x )
1754 { 1683 {
1755 if ( v40 <= pRenderer->raster_clip_z && v41 >= pRenderer->raster_clip_y && v41 <= pRenderer->raster_clip_w ) 1684 if ( v40 <= pRenderer->raster_clip_z && v41 >= pRenderer->raster_clip_y && v41 <= pRenderer->raster_clip_w )
1756 { 1685 {
1757 uWd = v61; 1686 uWd = ui_game_minimap_actor_friendly_color;
1758 if ( BYTE3(flagsc->uAttributes) & 1 ) 1687 if ( BYTE3(flagsc->uAttributes) & 1 )
1759 uWd = v63; 1688 uWd = ui_game_minimap_actor_hostile_color;
1760 if ( flagsc->uAIState == 5 ) 1689 if ( flagsc->uAIState == Dead)
1761 uWd = v65; 1690 uWd = ui_game_minimap_actor_corpse_color;
1762 if ( (signed int)uZoom > 1024 ) 1691 if ( (signed int)uZoom > 1024 )
1763 { 1692 {
1764 pRenderer->RasterLine2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd); 1693 pRenderer->RasterLine2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd);
1765 pRenderer->RasterLine2D(v40, v41 - 2, v40, v41 + 2, uWd); 1694 pRenderer->RasterLine2D(v40, v41 - 2, v40, v41 + 2, uWd);
1766 pRenderer->RasterLine2D(v40 + 1, v41 - 2, v40 + 1, v41 + 2, uWd); 1695 pRenderer->RasterLine2D(v40 + 1, v41 - 2, v40 + 1, v41 + 2, uWd);
1792 while ( uZf < (signed int)uNumActors ); 1721 while ( uZf < (signed int)uNumActors );
1793 } 1722 }
1794 } 1723 }
1795 1724
1796 1725
1797 flagsd = TargetColor(255, 255, 255); 1726 //flagsd = TargetColor(255, 255, 255);
1798 uZg = 0; 1727 uZg = 0;
1799 if ( (signed int)uNumLevelDecorations > 0 ) 1728 if ( (signed int)uNumLevelDecorations > 0 )
1800 { 1729 {
1801 v45 = (char *)&pLevelDecorations[0].vPosition; 1730 v45 = (char *)&pLevelDecorations[0].vPosition;
1802 lPitchb = (char *)&pLevelDecorations[0].vPosition; 1731 lPitchb = (char *)&pLevelDecorations[0].vPosition;
1814 { 1743 {
1815 if ( (signed int)uZoom > 512 ) 1744 if ( (signed int)uZoom > 512 )
1816 { 1745 {
1817 v48 = v47 + 1; 1746 v48 = v47 + 1;
1818 v49 = v47 - 1; 1747 v49 = v47 - 1;
1819 pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, flagsd); 1748 pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, ui_game_minimap_decoration_color_1);
1820 pRenderer->RasterLine2D(v46, v49, v46, v48, flagsd); 1749 pRenderer->RasterLine2D(v46, v49, v46, v48, ui_game_minimap_decoration_color_1);
1821 pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, flagsd); 1750 pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, ui_game_minimap_decoration_color_1);
1822 v45 = lPitchb; 1751 v45 = lPitchb;
1823 } 1752 }
1824 else 1753 else
1825 { 1754 {
1826 pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, flagsd); 1755 pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, ui_game_minimap_decoration_color_1);
1827 } 1756 }
1828 } 1757 }
1829 } 1758 }
1830 } 1759 }
1831 ++uZg; 1760 ++uZg;