annotate UiGame.cpp @ 1004:eac5af72b614

UI cleans
author Nomad
date Thu, 16 May 2013 15:14:58 +0200
parents 5876a9cafa3e
children 9ac94d00012e
rev   line source
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1 #include <assert.h>
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
3 #include "MM7.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
4
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
5 #include "MapInfo.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
6 #include "Game.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
7 #include "GUIWindow.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
8 #include "GUIFont.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
9 #include "GUIProgressBar.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
10 #include "Party.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
11 #include "AudioPlayer.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
12 #include "Outdoor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
13 #include "IndoorCamera.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
14 #include "Overlays.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
15 #include "Monsters.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
16 #include "Arcomage.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
17 #include "LOD.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
18 #include "Actor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
19 #include "Allocator.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
20 #include "Events.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
21 #include "Viewport.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
22 #include "FrameTableInc.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
23 #include "Math.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
24 #include "SpriteObject.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
25 #include "ObjectList.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
26 #include "Chest.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
27 #include "PaletteManager.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
28 #include "DecorationList.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
29 #include "PlayerFrameTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
30 #include "SaveLoad.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
31 #include "stru123.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
32 #include "Time.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
33 #include "IconFrameTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
34 #include "Awards.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
35 #include "Autonotes.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
36 #include "stru160.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
37 #include "TurnEngine.h"
924
a78f08dbeb88 CastSpellInfo
Ritor1
parents: 920
diff changeset
38 #include "CastSpellInfo.h"
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
39 #include "Weather.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
40 #include "stru298.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
41 #include "StorylineTextTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
42 #include "Events2D.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
43 #include "texts.h"
747
585490c29945 House dialogue ids appended
Nomad
parents: 727
diff changeset
44 #include "UIHouses.h"
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
45
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
46 #include "mm7_data.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
47
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
48
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
50
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
51 int uTextureID_GameUI_CharSelectionFrame; // 50C98C
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
52
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
53
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
54 //----- (0041D3B7) --------------------------------------------------------
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
55 void GameUI_CharacterQuickRecord_Draw(GUIWindow *window, Player *player)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
56 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
57 //Player *pPlayer; // esi@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
58 int v6; // eax@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
59 int v7; // ebx@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
60 //unsigned int v8; // ecx@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
61 int v9; // ebx@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
62 //unsigned int v10; // eax@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
63 //int v11; // eax@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
64 //unsigned int v12; // ecx@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
65 Texture *v13; // eax@6
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
66 unsigned int v14; // eax@12
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
67 PlayerFrame *v15; // eax@12
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
68 //unsigned int v16; // eax@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
69 unsigned int v20; // eax@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
70 unsigned int v24; // eax@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
71 unsigned int v25; // eax@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
72 unsigned __int8 v28; // al@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
73 char *v29; // eax@16
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
74 __int64 v35; // ST38_8@22
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
75 int v36; // esi@22
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
76 unsigned int v38; // eax@22
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
77 char *v39; // eax@24
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
78 signed int uFramesetID; // [sp+20h] [bp-8h]@9
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
79 int uFramesetIDa; // [sp+20h] [bp-8h]@18
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
80
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
81 uint numActivePlayerBuffs = 0;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
82 for (uint i = 0; i < 24; ++i)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
83 if (player->pPlayerBuffs[i].uExpireTime > 0)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
84 ++numActivePlayerBuffs;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
85
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
86 v6 = pFontArrus->uFontHeight + 162;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
87 v7 = (numActivePlayerBuffs - 1) * pFontArrus->uFontHeight;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
88 v9 = v6 + v7;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
89 window->uFrameHeight = v9;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
90 window->uFrameZ = window->uFrameWidth + window->uFrameX - 1;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
91 window->uFrameW = v9 + window->uFrameY - 1;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
92 window->DrawMessageBox(0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
93
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
94 if (player->Eradicated())
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
95 v13 = pTexture_PlayerFaceEradicated;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
96 else if (player->Dead())
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
97 v13 = pTexture_PlayerFaceDead;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
98 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
99 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
100 uFramesetID = pPlayerFrameTable->GetFrameIdByExpression(player->expression);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
101 if ( !uFramesetID )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
102 uFramesetID = 1;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
103 if ( player->expression == CHARACTER_EXPRESSION_21)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
104 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
105 v15 = pPlayerFrameTable->GetFrameBy_y(&player->_expression21_frameset, &player->_expression21_animtime, pMiscTimer->uTimeElapsed);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
106 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
107 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
108 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
109 v14 = pMiscTimer->Time();
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
110 v15 = pPlayerFrameTable->GetFrameBy_x(uFramesetID, v14);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
111 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
112 player->field_1AA2 = v15->uTextureID - 1;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
113 v13 = pTextures_PlayerFaces[(unsigned int)window->ptr_1C][v15->uTextureID - 1];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
114 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
115
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
116 pRenderer->DrawTextureTransparent(window->uFrameX + 24, window->uFrameY + 24, v13);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
117
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
118 sprintfex(pTmpBuf, "\f%05d", ui_character_header_text_color);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
119 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]); // "%s the %s"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
120 strcat(pTmpBuf, pTmpBuf2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
121 strcat(pTmpBuf, "\f00000\n");
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
122
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
123 v20 = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth());
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
124 sprintf(pTmpBuf2, "%s : \f%05u%d\f00000 / %d\n",
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
125 pGlobalTXT_LocalizationStrings[108], // "Hit Points"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
126 v20, player->sHealth, player->GetMaxHealth());
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
127 strcat(pTmpBuf, pTmpBuf2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
128
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
129 v24 = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana());
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
130 sprintf(pTmpBuf2, "%s : \f%05u%d\f00000 / %d\n",
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
131 pGlobalTXT_LocalizationStrings[212], // "Spell Points"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
132 v24, player->sMana, player->GetMaxMana());
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
133 strcat(pTmpBuf, pTmpBuf2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
134
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
135 v25 = player->GetMajorConditionIdx();
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
136 sprintf(pTmpBuf2, "%s: \f%05d%s\f00000\n",
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
137 pGlobalTXT_LocalizationStrings[47], // "Condition
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
138 GetConditionDrawColor(v25), aCharacterConditionNames[v25]);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
139 strcat(pTmpBuf, pTmpBuf2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
140
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
141 v28 = player->uQuickSpell;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
142 if ( v28 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
143 v29 = pSpellStats->pInfos[v28].pShortName;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
144 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
145 v29 = pGlobalTXT_LocalizationStrings[153];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
146 sprintfex(pTmpBuf2, "%s: %s", pGlobalTXT_LocalizationStrings[172], v29); // "Quick Spell"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
147 strcat(pTmpBuf, pTmpBuf2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
148
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
149 window->DrawText(pFontArrus, 120, 22, 0, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
150
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
151 uFramesetIDa = 0;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
152 for (uint i = 0; i < 24; ++i)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
153 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
154 auto buff = player->pPlayerBuffs + i;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
155 if (buff->uExpireTime > 0)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
156 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
157 v35 = buff->uExpireTime - pParty->uTimePlayed;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
158 v36 = uFramesetIDa++ * pFontComic->uFontHeight + 134;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
159 v38 = ui_game_character_record_playerbuff_colors[i];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
160 window->DrawText(pFontComic, 52, v36, v38, aSpellNames[20 + i], 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
161 sub_41D20D_buff_remaining_time_string(v36, window, v35, pFontComic);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
162 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
163 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
164
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
165 v39 = "";
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
166 if ( uFramesetIDa == 0 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
167 v39 = pGlobalTXT_LocalizationStrings[153]; // "None"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
168 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[450], v39); // "Active Spells: %s"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
169 window->DrawText(pFontArrus, 14, 114, 0, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
170 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
171
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
172
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
173
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
174 //----- (0041A57E) --------------------------------------------------------
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
175 void GameUI_QuickRef_Draw()
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
176 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
177 //unsigned int v0; // ebx@1
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
178 //unsigned int v1; // eax@1
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
179 //Player *pPlayer; // ebp@2
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
180 //int v3; // eax@6
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
181 //int v4; // edi@6
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
182 unsigned int v5; // eax@7
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
183 unsigned int v6; // edi@9
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
184 unsigned int v7; // edi@11
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
185 //signed int v8; // eax@13
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
186 unsigned int v9; // eax@13
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
187 unsigned int v10; // edi@13
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
188 //int v11; // eax@15
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
189 unsigned int v12; // eax@15
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
190 unsigned int v13; // edi@15
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
191 //int v14; // eax@17
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
192 //int v15; // ST18_4@17
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
193 //int v16; // ebx@17
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
194 //int v17; // eax@17
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
195 unsigned int v18; // eax@17
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
196 unsigned int v19; // edi@17
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
197 //int v20; // eax@19
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
198 unsigned int v21; // edi@19
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
199 char *v22; // eax@21
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
200 unsigned int v23; // edi@21
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
201 //int v24; // eax@23
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
202 unsigned int v25; // edi@23
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
203 char *v26; // eax@25
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
204 unsigned int v27; // edi@25
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
205 int v28; // ecx@27
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
206 char *v29; // eax@27
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
207 signed int v30; // edx@27
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
208 unsigned int v31; // edi@31
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
209 unsigned int v32; // edi@33
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
210 const char *v33; // ST10_4@35
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
211 unsigned int v34; // eax@35
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
212 unsigned int v35; // edi@35
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
213 //unsigned __int8 v36; // al@37
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
214 char *v37; // eax@38
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
215 int v38; // eax@41
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
216 signed int v39; // edi@42
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
217 //char *v40; // eax@45
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
218 //unsigned int v41; // eax@45
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
219 signed int v43; // [sp+10h] [bp-1Ch]@1
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
220 unsigned int v44; // [sp+14h] [bp-18h]@2
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
221 int v45; // [sp+18h] [bp-14h]@1
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
222 //unsigned int v46; // [sp+1Ch] [bp-10h]@1
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
223 //unsigned int v47; // [sp+20h] [bp-Ch]@1
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
224 unsigned int v48; // [sp+24h] [bp-8h]@33
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
225 //unsigned int v49; // [sp+28h] [bp-4h]@1
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
226
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
227 //v0 = 0;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
228 //v47 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
229 //v49 = TargetColor(0xFFu, 0, 0);
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
230 //v46 = TargetColor(0, 0xFFu, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
231 //v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE);
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
232 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("quikref", TEXTURE_16BIT_PALETTE));
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
233 v43 = 0;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
234 v45 = LOBYTE(pFontArrus->uFontHeight) + 1;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
235 do
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
236 {
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
237 auto player = &pParty->pPlayers[v43];
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
238 v44 = 94 * v43 + 89;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
239 if ( v43 == 0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
240 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, 0, pGlobalTXT_LocalizationStrings[149], 60, 0);//Name
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
241 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, ui_character_header_text_color, player->pName, 84, 0);
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
242 if ( v43 == 0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
243 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, 0, pGlobalTXT_LocalizationStrings[131], 60, 0); //Óðîâ.
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
244 sprintf(pTmpBuf, "%lu", player->GetActualLevel());
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
245 if ( player->GetActualLevel() <= player->GetBaseLevel())
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
246 v5 = player->GetExperienceDisplayColor();
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
247 else
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
248 v5 = ui_character_bonus_text_color;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
249 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
250 v6 = v45 + 47;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
251 if ( v43 == 0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
252 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, 0, pGlobalTXT_LocalizationStrings[41], 60, 0);//Êëàññ
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
253 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, 0, pClassNames[player->classType], 84, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
254 v7 = v45 + v6;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
255 if ( v43 == 0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
256 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v7, 0, pGlobalTXT_LocalizationStrings[107], 60, 0);//Çäîð.
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
257 sprintf(pTmpBuf, "%d", player->sHealth);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
258 v9 = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth());
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
259 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v7, v9, pTmpBuf, 84, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
260 v10 = v45 + v7;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
261 if ( v43 == 0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
262 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v10, 0, pGlobalTXT_LocalizationStrings[209], 60, 0);//Ìàíà
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
263 sprintf(pTmpBuf, "%d", player->sMana);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
264 v12 = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana());
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
265 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v10, v12, pTmpBuf, 84, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
266 v13 = v45 + v10;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
267 if ( v43 == 0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
268 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v13, 0, pGlobalTXT_LocalizationStrings[0], 60, 0);//Êëàññ áðîíè
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
269 sprintf(pTmpBuf, "%d", player->GetActualAC());
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
270 v18 = UI_GetHealthManaStringColor(player->GetActualAC(), player->GetBaseAC());
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
271 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v13, v18, pTmpBuf, 84, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
272 v19 = v45 + v13;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
273 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
274 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v19, 0, pGlobalTXT_LocalizationStrings[18], 60, 0);//Àòàêà
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
275 sprintf(pTmpBuf, "%+d", player->GetActualAttack(0));
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
276 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v19, 0, pTmpBuf, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
277 v21 = v45 + v19;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
278 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
279 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v21, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Ïîâð.
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
280 v22 = player->GetMeleeDamageString();
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
281 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v21, 0, v22, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
282 v23 = v45 + v21;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
283 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
284 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v23, 0, pGlobalTXT_LocalizationStrings[203], 60, 0);// Ñòðåëÿòü
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
285 sprintf(pTmpBuf, "%+d", player->GetRangedAttack());
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
286 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v23, 0, pTmpBuf, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
287 v25 = v45 + v23;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
288 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
289 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v25, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Ïîâð.
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
290 v26 = player->GetRangedDamageString();
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
291 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v25, 0, v26, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
292 v27 = v45 + v25;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
293 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
294 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v27, 0, pGlobalTXT_LocalizationStrings[205], 60, 0);//Íàâûêè
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
295 v28 = 0;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
296 v29 = (char *)player->pActiveSkills;
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
297 v30 = 36;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
298 do
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
299 {
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
300 if ( *(short *)v29 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
301 ++v28;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
302 v29 += 2;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
303 --v30;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
304 }
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
305 while ( v30 );
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
306 sprintf(pTmpBuf, "%lu", v28);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
307 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
308 v31 = v45 + v27;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
309 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
310 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Î÷êè
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
311 sprintf(pTmpBuf, "%lu", player->uSkillPoints);
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
312 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, pTmpBuf, 84, 0);
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
313 v32 = v45 + v31;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
314 v48 = player->GetMajorConditionIdx();
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
315 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
316 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Ñîñò.
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
317 v33 = aCharacterConditionNames[v48];
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
318 v34 = GetConditionDrawColor(v48);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
319 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v32, v34, v33, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
320 v35 = v45 + v32;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
321 if ( !v43 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
322 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v35, 0, pGlobalTXT_LocalizationStrings[170], 60, 0);//Á.Ïðèì.
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
323 if (player->uQuickSpell)
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
324 v37 = pSpellStats->pInfos[player->uQuickSpell].pShortName;
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
325 else
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
326 v37 = pGlobalTXT_LocalizationStrings[153];//Íåò
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
327 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v35, 0, v37, 84, 0);
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
328 ++v43;
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
329 }
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
330 while ( v43 < 4 );
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
331
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
332 v38 = GetPartyReputation();
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
333 if ( v38 >= 0 )
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
334 {
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
335 if ( v38 <= 5 )
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
336 v39 = ui_character_default_text_color;
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
337 else
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
338 v39 = ui_character_bonus_text_color_neg;
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
339 }
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
340 else
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
341 v39 = ui_character_bonus_text_color;
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
342
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
343 sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, GetReputationString(v38));//Reputation
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
344 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0);
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
345
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
346 sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], pParty->GetPartyFame());// Fame Ñëàâà
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
347 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 0, 323, 0, pTmpBuf, 0, 0, 0);
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
348 }
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
349
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
350
991
c5d8ea1e6ccb CharacterUI cleanings.
Nomad
parents: 960
diff changeset
351
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
352 //----- (0041AD6E) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
353 void GameUI_DrawRightPanelItems()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
354 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
355 if (GameUI_RightPanel_BookFlashTimer > pParty->uTimePlayed)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
356 GameUI_RightPanel_BookFlashTimer = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
357
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
358 if (pParty->uTimePlayed - GameUI_RightPanel_BookFlashTimer > 128)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
359 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
360 GameUI_RightPanel_BookFlashTimer = pParty->uTimePlayed;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
361
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
362 static bool byte_50697C = false; // 50697C
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
363 byte_50697C = !byte_50697C;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
364 if ( byte_50697C && pCurrentScreen != SCREEN_REST )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
365 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
366 if (bFlashQuestBook) pRenderer->DrawTextureTransparent(493, 355, pIcons_LOD->GetTexture(uTextureID_ib_td1_A));
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
367 if (bFlashAutonotesBook) pRenderer->DrawTextureTransparent(527, 353, pIcons_LOD->GetTexture(uTextureID_ib_td2_A));
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
368 if (bFlashHistoryBook) pRenderer->DrawTextureTransparent(600, 361, pIcons_LOD->GetTexture(uTextureID_ib_td5_A));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
369 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
370 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
371 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
372 pRenderer->DrawTextureRGB(468, 0, pTexture_RightFrame);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
373 GameUI_DrawHiredNPCs();
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
374 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
375 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
376 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
377
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
378 //----- (0041AEBB) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
379 void GameUI_DrawFoodAndGold()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
380 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
381 int v2; // esi@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
382
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
383 if ( uGameState != GAME_STATE_FINAL_WINDOW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
384 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
385 v2 = sub_44100D() != 0 ? 381 : 322;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
386 sprintf(pTmpBuf, "\r087%lu", pParty->uNumFoodRations);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
387 pPrimaryWindow->DrawText(pFontSmallnum, 0, v2, uGameUIFontMain, pTmpBuf, 0, 0, uGameUIFontShadow);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
388 sprintf(pTmpBuf, "\r028%lu", pParty->uNumGold);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
389 pPrimaryWindow->DrawText(pFontSmallnum, 0, v2, uGameUIFontMain, pTmpBuf, 0, 0, uGameUIFontShadow);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
390 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
391 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
392
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
393
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
394 //----- (0041B0C9) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
395 void GameUI_DrawLifeManaBars()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
396 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
397 double v3; // st7@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
398 double v7; // st7@25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
399 Texture *v9; // [sp-4h] [bp-30h]@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
400 Texture *v10; // [sp+Ch] [bp-20h]@1
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
401
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
402
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
403 v10 = pIcons_LOD->GetTexture(uTextureID_BarBlue);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
404
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
405 for (uint i = 0; i < 4; ++i)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
406 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
407 auto player = pParty->pPlayers + i;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
408
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
409 if (player->sHealth > 0)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
410 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
411 int v17 = 0;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
412 if (i == 2 || i == 3)
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
413 v17 = 2;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
414
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
415 v3 = (double)player->sHealth / (double)player->GetMaxHealth();
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
416 if( v3 > 0.5 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
417 {
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
418 if ( v3 > 1.0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
419 v3 = 1.0;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
420 v9 = pIcons_LOD->GetTexture(uTextureID_BarGreen);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
421 }
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
422 else if ( v3 > 0.25 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
423 v9 = pIcons_LOD->GetTexture(uTextureID_BarYellow);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
424 else if ( v3 > 0.0 )
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
425 v9 = pIcons_LOD->GetTexture(uTextureID_BarRed);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
426
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
427
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
428 if( v3 > 0.0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
429 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
430 pRenderer->SetTextureClipRect(v17 + pHealthBarPos[i],
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
431 (signed __int64)((1.0 - v3) * v9->uTextureHeight) + 402,
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
432 v17 + pHealthBarPos[i] + v9->uTextureWidth,
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
433 v9->uTextureHeight + 402);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
434
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
435 pRenderer->DrawTextureIndexed(v17 + pHealthBarPos[i], 402, v9);
727
da130dd3092a Big time Travel ouverhaul
Nomad
parents: 710
diff changeset
436 pRenderer->ResetTextureClipRect();
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
437 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
438 }
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
439
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
440
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
441 if (player->sMana > 0)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
442 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
443 v7 = player->sMana / (double)player->GetMaxMana();
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
444 if ( v7 > 1.0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
445 v7 = 1.0;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
446
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
447 int v17 = 0;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
448 if (i == 2)
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
449 v17 = 1;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
450
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
451 pRenderer->SetTextureClipRect(v17 + pManaBarPos[i],
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
452 (signed __int64)((1.0 - v7) * v10->uTextureHeight) + 402,
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
453 v17 + pManaBarPos[i] + v10->uTextureWidth,
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
454 v10->uTextureHeight + 402);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
455 pRenderer->DrawTextureIndexed(v17 + pManaBarPos[i], 402, v10);
727
da130dd3092a Big time Travel ouverhaul
Nomad
parents: 710
diff changeset
456 pRenderer->ResetTextureClipRect();
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
457 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
458 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
459 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
460
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
461 //----- (0041B3B6) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
462 void GameUI_DrawRightPanel()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
463 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
464 pRenderer->DrawTextureTransparent(pViewport->uViewportBR_X, 0,
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
465 pIcons_LOD->GetTexture(uTextureID_right_panel));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
466 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
467
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
468 //----- (0041B3E2) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
469 void GameUI_DrawRightPanelFrames()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
470 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
471 pRenderer->DrawTextureRGB(0, 0, pTexture_TopFrame);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
472 pRenderer->DrawTextureRGB(0, 8, pTexture_LeftFrame);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
473 pRenderer->DrawTextureRGB(468, 0, pTexture_RightFrame);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
474 pRenderer->DrawTextureRGB(0, 352, pTexture_BottomFrame);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
475 GameUI_DrawFoodAndGold();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
476 GameUI_DrawRightPanelItems();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
477 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
478
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
479
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
480 //----- (0041C047) --------------------------------------------------------
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
481 void GameUI_Footer_2()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
482 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
483 char *v1; // edx@2
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
484 int v5; // eax@5
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
485
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
486 pRenderer->DrawTextureRGB(0, 352, pTexture_StatusBar);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
487 if (GameUI_Footer_TimeLeft)
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
488 v1 = GameUI_Footer_TimedString;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
489 else
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
490 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
491 if (!pFooterString[0])
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
492 return;
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
493 v1 = pFooterString;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
494 }
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
495
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
496 v5 = pFontLucida->AlignText_Center(450, v1);
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
497 pPrimaryWindow->DrawText(pFontLucida, v5 + 11, 357, uGameUIFontMain, v1, 0, 0, uGameUIFontShadow);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
498 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
499
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
500 //----- (0041C0B8) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
501 void GameUI_SetFooterString(const char *pStr)
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
502 {
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
503 const char *v1; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
504 int i; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
505 int j; // eax@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
506
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
507 v1 = pStr;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
508 if ( pStr && strcmp(pStr, "test") && !IsBadStringPtrA(v1, 1) && (*v1 || GameUI_Footer_TimeLeft) )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
509 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
510 if ( GameUI_Footer_TimeLeft )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
511 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
512 for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
513 i > 450;
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
514 i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString) )
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
515 byte_5C3427[strlen(GameUI_Footer_TimedString)] = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
516 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
517 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
518 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
519 strcpy(pFooterString, v1);
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
520 for ( j = pFontLucida->GetLineWidth(pFooterString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
521 j > 450;
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
522 j = pFontLucida->GetLineWidth(pFooterString) )
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
523 GameUI_Footer_TimedString[strlen(pFooterString) + 199] = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
524 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
525 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
526 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
527
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
528 //----- (0041C179) --------------------------------------------------------
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
529 void GameUI_Footer()
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
530 {
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
531 //unsigned int v0; // ebp@1
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
532 char *v1; // edi@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
533 int v2; // eax@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
534 unsigned int v3; // esi@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
535 size_t v4; // eax@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
536 GUIFont *v5; // ecx@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
537 int v6; // eax@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
538 size_t v7; // eax@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
539 GUIFont *v8; // ecx@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
540 char v9; // zf@12
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
541 //unsigned int v10; // ST08_4@13
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
542 int v11; // eax@13
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
543
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
544 if ( pFooterString[0] || GameUI_Footer_TimeLeft || bForceDrawFooter )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
545 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
546 pRenderer->DrawTextureRGB(0, 352u, pTexture_StatusBar);
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
547 if ( GameUI_Footer_TimeLeft )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
548 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
549 v1 = GameUI_Footer_TimedString;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
550 v2 = pFontLucida->GetLineWidth(GameUI_Footer_TimedString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
551 v3 = 450;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
552 while ( v2 > 450 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
553 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
554 v4 = strlen(GameUI_Footer_TimedString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
555 v5 = pFontLucida;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
556 byte_5C3427[v4] = 0;
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
557 v2 = pFontLucida->GetLineWidth(GameUI_Footer_TimedString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
558 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
559 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
560 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
561 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
562 v1 = pFooterString;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
563 v6 = pFontLucida->GetLineWidth(pFooterString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
564 v3 = 450;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
565 while ( v6 > 450 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
566 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
567 v7 = strlen(pFooterString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
568 v8 = pFontLucida;
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
569 GameUI_Footer_TimedString[v7 + 199] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
570 v6 = pFontLucida->GetLineWidth(pFooterString);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
571 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
572 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
573 v9 = *v1 == 0;
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
574 bForceDrawFooter = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
575 if ( !v9 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
576 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
577 v11 = pFontLucida->AlignText_Center(v3, v1);
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
578 pPrimaryWindow->DrawText(pFontLucida, v11 + 11, 357, uGameUIFontMain, v1, 0, 0, uGameUIFontShadow);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
579 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
580 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
581 }
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
582 // 5C35BC: using guessed type int bForceDrawFooter;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
583
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
584
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
585 //----- (00420EFF) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
586 void __cdecl GameUI_WritePointedObjectStatusString()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
587 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
588 int v1; // ebx@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
589 GUIWindow *pWindow; // edi@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
590 GUIButton *pButton; // ecx@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
591 Player *pPlayer; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
592 char v5; // cl@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
593 unsigned int v6; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
594 int v7; // ecx@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
595 __int16 v8; // fps@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
596 unsigned __int8 v9; // c0@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
597 unsigned __int8 v10; // c3@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
598 enum UIMessageType pMessageType1; // esi@24
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
599 //int v12; // edx@25
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
600 char *v13; // ecx@28
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
601 int v14; // eax@41
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
602 ItemGen *pItemGen; // ecx@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
603 int v16; // ecx@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
604 const char *v17; // eax@49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
605 signed int v18; // eax@55
867
54f191fc5e1e missed file
zipi
parents: 848
diff changeset
606 signed int v18b;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
607 signed int v19; // ecx@63
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
608 BLVFace *pFace; // eax@69
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
609 __int16 v21; // ax@70
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
610 const char *v22; // eax@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
611 LevelDecoration *v23; // ecx@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
612 LevelDecoration *v24; // esi@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
613 __int16 v25; // ax@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
614 const char *v26; // ecx@79
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
615 Actor *pActor; // ecx@82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
616 char *v28; // esi@82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
617 int v29; // eax@82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
618 signed int v30; // ecx@88
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
619 const char *v31; // eax@91
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
620 __int16 v32; // fps@109
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
621 //unsigned __int8 v33; // c0@109
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
622 //unsigned __int8 v34; // c3@109
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
623 enum UIMessageType pMessageType2; // esi@110
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
624 //int v36; // edx@111
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
625 enum UIMessageType pMessageType3; // edx@117
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
626 //int v38; // ecx@118
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
627 const char *v39; // [sp-8h] [bp-E8h]@20
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
628 char *v40; // [sp-8h] [bp-E8h]@83
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
629 int v41; // [sp-4h] [bp-E4h]@20
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
630 char Str1[200]; // [sp+Ch] [bp-D4h]@129
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
631 unsigned int pX; // [sp+D4h] [bp-Ch]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
632 unsigned int pY; // [sp+D8h] [bp-8h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
633 unsigned int v45; // [sp+DCh] [bp-4h]@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
634
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
635 v13 = nullptr;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
636
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
637 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
638 pMouse->GetClickPos(&pX, &pY);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
639 if ( pX < 0 || (signed int)pX > 639 || pY < 0 || (signed int)pY > 479 )//( (pX & 0x80000000u) != 0 || (signed int)pX > 639 || (pY & 0x80000000u) != 0 || (signed int)pY > 479 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
640 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
641 if (pCurrentScreen == SCREEN_GAME)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
642 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
643 if ( (signed int)pX > 467 || (signed int)pY > 351 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
644 goto _click_on_game_ui;
871
710cf848ad24 Particle engine made working.
Nomad
parents: 832
diff changeset
645 if ( pRenderer->pRenderD3D ) // inlined mm8::4C1E01
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
646 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
647 v18 = pGame->pVisInstance->get_picked_object_zbuf_val();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
648 if ( (signed int)pX < (signed int)pViewport->uScreen_TL_X
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
649 || (signed int)pX > (signed int)pViewport->uScreen_BR_X
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
650 || (signed int)pY < (signed int)pViewport->uScreen_TL_Y
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
651 || (signed int)pY > (signed int)pViewport->uScreen_BR_Y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
652 v18 = -1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
653 if ( v18 == -1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
654 //goto LABEL_61;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
655 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
656 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
657 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
658 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
659 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
660 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
661 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
662 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
663 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
664 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
665 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
666 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
667 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
668 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
669 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
670 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
671 v18 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
672 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
673 pMouse->uPointingObjectID = (unsigned __int16)v18;
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
674 v19 = (signed)PID_ID(v18);
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
675 if (PID_TYPE(v18) == OBJECT_Item)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
676 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
677 v30 = v19;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
678 if ( pObjectList->pObjects[pSpriteObjects[v30].uObjectDescID].uFlags & 0x10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
679 //goto LABEL_73;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
680 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
681 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
682 //goto LABEL_50;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
683 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
684 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
685 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
686 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
687 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
688 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
689 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
690 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
691 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
692 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
693 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
694 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
695 if ( v18 >= (signed int)0x2000000u || pParty->pPickedItem.uItemID )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
696 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
697 v22 = pSpriteObjects[v30].stru_24.GetDisplayName();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
698 //LABEL_93:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
699 v26 = v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
700 //goto LABEL_87;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
701 GameUI_SetFooterString(v26);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
702 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
703 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
704 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
705 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
706 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
707 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
708 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
709 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
710 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
711 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
712 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
713 v31 = pSpriteObjects[v30].stru_24.GetDisplayName();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
714 v28 = pTmpBuf;
809
7bb33867d2cb Pv[] in sprintfex
Ritor1
parents: 783
diff changeset
715 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[470], v31);// "Get %s"
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
716 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
717 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
718 {
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
719 if (PID_TYPE(v18) != OBJECT_Actor)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
720 {
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
721 if (PID_TYPE(v18) == OBJECT_Decoration)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
722 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
723 v23 = &pLevelDecorations[v19];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
724 v24 = v23;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
725 v25 = v23->field_16_event_id;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
726 if ( !v25 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
727 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
728 if ( v23->IsInteractive() )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
729 v26 = pNPCTopics[stru_5E4C90._decor_events[v24->_idx_in_stru123 - 75] + 379].pTopic;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
730 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
731 v26 = pDecorationList->pDecorations[v24->uDecorationDescID].field_20;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
732 //goto LABEL_87;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
733 GameUI_SetFooterString(v26);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
734 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
735 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
736 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
737 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
738 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
739 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
740 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
741 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
742 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
743 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
744 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
745 v22 = GetEventHintString(v25);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
746 if ( !v22 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
747 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
748 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
749 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
750 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
751 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
752 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
753 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
754 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
755 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
756 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
757 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
758 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
759 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
760 //goto LABEL_93;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
761 v26 = v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
762 //goto LABEL_87;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
763 GameUI_SetFooterString(v26);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
764 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
765 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
766 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
767 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
768 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
769 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
770 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
771 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
772 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
773 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
774 }
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
775 if (PID_TYPE(v18) == OBJECT_BModel)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
776 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
777 if ( v18 < (signed int)0x2000000u )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
778 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
779 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
780 {
867
54f191fc5e1e missed file
zipi
parents: 848
diff changeset
781 v18b = (signed int)(unsigned __int16)v18 >> 9;
54f191fc5e1e missed file
zipi
parents: 848
diff changeset
782 v21 = pOutdoor->pBModels[v18b].pFaces[v19 & 0x3F].sCogTriggeredID;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
783 //goto LABEL_71;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
784 if ( !v21 || (v22 = GetEventHintString(v21)) == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
785 //goto LABEL_73;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
786 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
787 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
788 //goto LABEL_50;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
789 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
790 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
791 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
792 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
793 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
794 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
795 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
796 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
797 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
798 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
799 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
800 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
801 //goto LABEL_93;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
802 v26 = v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
803 //goto LABEL_87;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
804 GameUI_SetFooterString(v26);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
805 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
806 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
807 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
808 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
809 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
810 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
811 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
812 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
813 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
814 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
815 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
816 pFace = &pIndoor->pFaces[v19];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
817 if ( BYTE3(pFace->uAttributes) & 6 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
818 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
819 v21 = pIndoor->pFaceExtras[pFace->uFaceExtraID].uEventID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
820 //LABEL_71:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
821 if ( !v21 || (v22 = GetEventHintString(v21)) == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
822 //goto LABEL_73;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
823 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
824 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
825 //goto LABEL_50;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
826 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
827 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
828 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
829 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
830 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
831 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
832 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
833 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
834 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
835 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
836 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
837 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
838 //goto LABEL_93;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
839 v26 = v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
840 //goto LABEL_87;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
841 GameUI_SetFooterString(v26);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
842 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
843 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
844 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
845 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
846 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
847 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
848 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
849 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
850 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
851 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
852 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
853 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
854 //LABEL_73:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
855 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
856 //goto LABEL_50;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
857 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
858 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
859 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
860 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
861 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
862 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
863 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
864 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
865 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
866 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
867 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
868 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
869 //LABEL_61:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
870 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
871 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
872 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
873 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
874 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
875 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
876 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
877 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
878 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
879 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
880 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
881 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
882 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
883 if ( v18 >= 335544320 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
884 //goto LABEL_61;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
885 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
886 pMouse->uPointingObjectID = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
887 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
888 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
889 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
890 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
891 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
892 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
893 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
894 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
895 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
896 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
897 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
898 pActor = &pActors[v19];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
899 v28 = pTmpBuf;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
900 v29 = pActor->dword_000334_unique_name;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
901 if ( v29 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
902 v40 = pMonsterStats->pPlaceStrings[v29];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
903 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
904 v40 = pMonsterStats->pInfos[pActor->pMonsterInfo.uID].pName;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
905 strncpy(pTmpBuf, v40, 0x7D0u);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
906 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
907 v26 = v28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
908 //LABEL_87:
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
909 GameUI_SetFooterString(v26);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
910 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
911 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
912 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
913 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
914 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
915 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
916 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
917 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
918 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
919 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
920 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
921 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
922 v1 = uNumVisibleWindows;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
923 if ( uNumVisibleWindows > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
924 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
925 while ( 1 ) // some other fullscreen ui
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
926 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
927 pWindow = &pWindowList[pVisibleWindowsIdxs[v1] - 1];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
928 if ( (signed int)pX >= (signed int)pWindow->uFrameX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
929 && (signed int)pX <= (signed int)pWindow->uFrameZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
930 && (signed int)pY >= (signed int)pWindow->uFrameY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
931 && (signed int)pY <= (signed int)pWindow->uFrameW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
932 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
933 for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
934 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
935 if ( !pButton )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
936 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
937 if ( pButton->uButtonType == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
938 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
939 if ( (signed int)pX >= (signed int)pButton->uX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
940 && (signed int)pX <= (signed int)pButton->uZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
941 && (signed int)pY >= (signed int)pButton->uY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
942 && (signed int)pY <= (signed int)pButton->uW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
943 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
944 //LABEL_24:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
945 pMessageType1 = (UIMessageType)pButton->field_1C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
946 if ( pMessageType1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
947 {
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
948 pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
949 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
950 //LABEL_28:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
951 v13 = pButton->pButtonName;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
952 //_set_status_and_ret:
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
953 GameUI_SetFooterString(v13);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
954 //LABEL_131:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
955 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
956 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
957 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
958 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
959 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
960 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
961 if ( pButton->uButtonType == 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
962 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
963 v45 = pX - pButton->uX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
964 v45 = pY - pButton->uY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
965 if ( (double)(signed int)pButton->uWidth != 0.0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
966 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
967 if ( (double)(signed int)pButton->uHeight != 0.0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
968 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
969 pMessageType1 = (UIMessageType)pButton->field_1C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
970 if ( pMessageType1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
971 {
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
972 pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
973 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
974 v13 = pButton->pButtonName;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
975 GameUI_SetFooterString(v13);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
976 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
977 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
978 //}
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
979 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
980 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
981 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
982 else // click on skill
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
983 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
984 if ( pButton->uButtonType == 3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
985 && (signed int)pX >= (signed int)pButton->uX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
986 && (signed int)pX <= (signed int)pButton->uZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
987 && (signed int)pY >= (signed int)pButton->uY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
988 && (signed int)pY <= (signed int)pButton->uW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
989 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
990 //LABEL_19:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
991 pPlayer = pPlayers[uActiveCharacter];
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
992 v5 = LOBYTE(pPlayer->pActiveSkills[pButton->msg_param]);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
993 v6 = pPlayer->uSkillPoints;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
994 v7 = (v5 & 0x3F) + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
995 if ( v6 < v7 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
996 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
997 v41 = v7 - v6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
998 v39 = pGlobalTXT_LocalizationStrings[469];// "You need %d more Skill Points to advance here"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
999 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1000 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1001 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1002 v41 = v7;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1003 v39 = pGlobalTXT_LocalizationStrings[468];// "Clicking here will spend %d Skill Points"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1004 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1005 sprintf(Str1, v39, v41);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1006 v13 = Str1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1007 //goto _set_status_and_ret;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1008 GameUI_SetFooterString(v13);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1009 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1010 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1011 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1012 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1013 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1014 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1015 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1016 if ( pWindow->uFrameHeight == 480 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1017 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1018 --v1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1019 if ( v1 <= 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1020 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1021 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1022 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1023 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1024 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1025 if ( uNumVisibleWindows <= 0 || (uNumVisibleWindows > 0 && pWindow->uFrameHeight != 480 && v1 <= 0))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1026 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1027 if ( pCurrentScreen == SCREEN_CHEST )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1028 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1029 sub_42038D();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1030 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1031 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1032 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1033 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1034 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1035 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1036 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1037 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1038 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1039 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1040 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1041 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1042 if ( pCurrentScreen == SCREEN_HOUSE )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1043 {
747
585490c29945 House dialogue ids appended
Nomad
parents: 727
diff changeset
1044 if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1045 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1046 || v16 == -65536 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1047 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1048 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1049 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1050 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1051 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1052 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1053 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1054 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1055 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1056 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1057 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1058 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1059 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1060 pItemGen = (ItemGen *)((char *)&pParty->pPickedItem + 36 * (v16 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1061 //LABEL_49:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1062 v17 = pItemGen->GetDisplayName();
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1063 GameUI_SetFooterString(v17);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1064 //LABEL_50:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1065 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1066 //_return:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1067 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1068 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1069 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1070 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1071 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1072 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1073 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1074 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1075 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1076 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1077 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1078 if ( (signed int)pY < 350 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1079 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1080 v14 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1081 if ( v14 == 0 || v14 == -65536 || (unsigned int)v14 >= 0x1388 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1082 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1083 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1084 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1085 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1086 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1087 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1088 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1089 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1090 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1091 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1092 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1093 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1094 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1095 pItemGen = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v14-1];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1096 //goto LABEL_49;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1097 v17 = pItemGen->GetDisplayName();
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1098 GameUI_SetFooterString(v17);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1099 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1100 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1101 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1102 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1103 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1104 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1105 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1106 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1107 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1108 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1109 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1110 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1111 _click_on_game_ui:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1112 if ( (signed int)pX >= (signed int)pWindowList[0].uFrameX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1113 && (signed int)pX <= (signed int)pWindowList[0].uFrameZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1114 && (signed int)pY >= (signed int)pWindowList[0].uFrameY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1115 && (signed int)pY <= (signed int)pWindowList[0].uFrameW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1116 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1117 for ( pButton = pWindowList[0].pControlsHead; pButton != (GUIButton *)0; pButton = pButton->pNext )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1118 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1119 if ( pButton->uButtonType == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1120 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1121 if ( (signed int)pX >= (signed int)pButton->uX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1122 && (signed int)pX <= (signed int)pButton->uZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1123 && (signed int)pY >= (signed int)pButton->uY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1124 && (signed int)pY <= (signed int)pButton->uW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1125 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1126 pMessageType3 = (UIMessageType)pButton->field_1C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1127 if ( pMessageType3 == 0 ) // For books
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1128 //goto LABEL_28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1129 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1130 v13 = pButton->pButtonName;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1131 GameUI_SetFooterString(v13);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1132 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1133 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1134 }
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
1135
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
1136 pMessageQueue_50CBD0->AddMessage(pMessageType3, pButton->msg_param, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1137 //goto LABEL_131;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1138 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1139 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1140 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1141 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1142 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1143 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1144 if ( pButton->uButtonType == 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1145 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1146 v45 = pX - pButton->uX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1147 v45 = pY - pButton->uY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1148
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1149 if (pX >= pButton->uX && pX <= pButton->uZ &&
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1150 pY >= pButton->uY && pY <= pButton->uW)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1151 if ( (double)(signed int)pButton->uWidth != 0.0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1152 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1153 if ( (double)(signed int)pButton->uHeight != 0.0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1154 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1155 //UNDEF(v32);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1156 //if ( v33 | v34 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1157 //{
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1158 pMessageType2 = (UIMessageType)pButton->field_1C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1159 if ( pMessageType2 != 0 )
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
1160 pMessageQueue_50CBD0->AddMessage(pMessageType2, pButton->msg_param, 0);
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
1161
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1162 //goto LABEL_28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1163 v13 = pButton->pButtonName;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1164 GameUI_SetFooterString(v13);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1165 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1166 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1167 //}
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1168 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1169 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1170 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1171 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1172 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1173 if ( pButton->uButtonType == 3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1174 && (signed int)pX >= (signed int)pButton->uX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1175 && (signed int)pX <= (signed int)pButton->uZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1176 && (signed int)pY >= (signed int)pButton->uY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1177 && (signed int)pY <= (signed int)pButton->uW )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1178 //goto LABEL_19;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1179 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1180 pPlayer = pPlayers[uActiveCharacter];
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
1181 v5 = LOBYTE(pPlayer->pActiveSkills[pButton->msg_param]);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1182 v6 = pPlayer->uSkillPoints;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1183 v7 = (v5 & 0x3F) + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1184 if ( v6 < v7 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1185 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1186 v41 = v7 - v6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1187 v39 = pGlobalTXT_LocalizationStrings[469];// "You need %d more Skill Points to advance here"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1188 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1189 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1190 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1191 v41 = v7;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1192 v39 = pGlobalTXT_LocalizationStrings[468];// "Clicking here will spend %d Skill Points"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1193 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1194 sprintf(Str1, v39, v41);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1195 v13 = Str1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1196 //goto _set_status_and_ret;
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1197 GameUI_SetFooterString(v13);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1198 uLastPointedObjectID = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1199 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1200 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1201 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1202 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1203 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1204 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1205 pMouse->uPointingObjectID = sub_46A99B();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1206 //goto _return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1207 if ( pMouse->uPointingObjectID == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1208 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1209 if ( uLastPointedObjectID != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1210 {
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1211 pFooterString[0] = 0;
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 747
diff changeset
1212 bForceDrawFooter = 1;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1213 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1214 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1215 uLastPointedObjectID = pMouse->uPointingObjectID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1216 return;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1217 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1218 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1219
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1220
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1221 //----- (0044158F) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1222 void GameUI_DrawCharacterSelectionFrame()
920
34ed2d5e7cfb MagicShopDialog clean and other
Ritor1
parents: 910
diff changeset
1223 {
34ed2d5e7cfb MagicShopDialog clean and other
Ritor1
parents: 910
diff changeset
1224 if ( uActiveCharacter )
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1225 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[uActiveCharacter - 1] - 9, 380,
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1226 pIcons_LOD->GetTexture(uTextureID_GameUI_CharSelectionFrame));
920
34ed2d5e7cfb MagicShopDialog clean and other
Ritor1
parents: 910
diff changeset
1227 }
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1228
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1229
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1230
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1231 //----- (0044162D) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1232 void GameUI_DrawPartySpells()
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1233 {
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1234 unsigned int v0; // ebp@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1235 //signed int v1; // edi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1236 //int v2; // eax@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1237 //int v3; // ecx@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1238 //__int16 *v4; // ebx@25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1239 //Player *v5; // edi@26
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1240 //unsigned int v6; // [sp-4h] [bp-1Ch]@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1241 Texture *v7; // [sp-4h] [bp-1Ch]@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1242 //unsigned int v8; // [sp-4h] [bp-1Ch]@20
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1243 Texture *v9; // [sp-4h] [bp-1Ch]@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1244 //Player **v10; // [sp+10h] [bp-8h]@25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1245
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1246 v0 = (signed __int64)((double)GetTickCount() * 0.050000001);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1247 //v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1248 for (uint i = 0; i < 14; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1249 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1250 //v2 = byte_4E5DD8[v1];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1251 if (pParty->pPartyBuffs[byte_4E5DD8[i]].uExpireTime)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1252 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1253 auto tex = pIcons_LOD->GetTexture(pTextureIDs_PartyBuffIcons[i]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1254 //v3 = pTextureIDs_PartyBuffIcons[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1255 pRenderer->_4A65CC(pPartySpellbuffsUI_XYs[i][0],
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1256 pPartySpellbuffsUI_XYs[i][1], tex, tex,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1257 v0 + 20 * pPartySpellbuffsUI_smthns[i], 0, 63);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1258 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1259 //++v1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1260 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1261 //while ( v1 < 14 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1262
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1263 if (pCurrentScreen == SCREEN_GAME || pCurrentScreen == SCREEN_NPC_DIALOGUE)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1264 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1265 if (pParty->FlyActive())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1266 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1267 if ( pParty->bFlying )
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1268 v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, v0)->uTextureID);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1269 else
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1270 v7 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_FlySpell, 0)->uTextureID);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1271 if ( pRenderer->pRenderD3D )
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1272 pRenderer->DrawTextureIndexed(8, 8, v7);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1273 else
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1274 pRenderer->DrawTextureTransparent(8, 8, v7);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1275 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1276 if (pParty->WaterWalkActive())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1277 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1278 if ( pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER)
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1279 v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, v0)->uTextureID);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1280 else
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1281 v9 = pIcons_LOD->GetTexture(pIconsFrameTable->GetFrame(uIconIdx_WaterWalk, 0)->uTextureID);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1282 if ( pRenderer->pRenderD3D )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1283 pRenderer->DrawTextureIndexed(396u, 8u, v9);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1284 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1285 pRenderer->DrawTextureTransparent(396u, 8u, v9);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1286 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1287 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1288
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1289 for (uint i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1290 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1291 auto player = pParty->pPlayers + i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1292
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1293 if (player->pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].uExpireTime)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1294 pRenderer->DrawTextureIndexed(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] + 72, 427, pIcons_LOD->GetTexture(uTextureID_PlayerBuff_Hammerhands));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1295 if (player->pPlayerBuffs[PLAYER_BUFF_BLESS].uExpireTime)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1296 pRenderer->DrawTextureIndexed(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] + 72, 393, pIcons_LOD->GetTexture(uTextureID_PlayerBuff_Bless));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1297 if (player->pPlayerBuffs[PLAYER_BUFF_PRESERVATION].uExpireTime)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1298 pRenderer->DrawTextureIndexed(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] + 72, 410, pIcons_LOD->GetTexture(uTextureID_PlayerBuff_Preservation));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1299 if (player->pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].uExpireTime)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1300 pRenderer->DrawTextureIndexed(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] + 72, 444, pIcons_LOD->GetTexture(uTextureID_PlayerBuff_PainReflection));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1301 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1302 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1303
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1304
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1305
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1306 //----- (004921C1) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1307 void GameUI_DrawPortraits(unsigned int _this)
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 828
diff changeset
1308 {
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1309 Texture *pFace; // eax@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1310 unsigned int v7; // eax@17
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1311 PlayerFrame *pFrame; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1312 unsigned int v9; // eax@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1313 bool v10; // eax@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1314 bool v11; // edi@40
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1315 bool v12; // edx@43
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1316 bool v13; // ecx@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1317 int v16; // eax@57
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1318 int v19; // eax@62
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1319 Texture *pPortrait; // [sp-4h] [bp-1Ch]@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1320 unsigned int v22; // [sp+14h] [bp-4h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1321
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1322 v22 = _this;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1323 if ( qword_A750D8 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1324 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1325 qword_A750D8 -= (signed int)pMiscTimer->uTimeElapsed;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1326 if ( qword_A750D8 <= 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1327 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1328 if ( pPlayers[word_A750E2]->CanAct() )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1329 pPlayers[word_A750E2]->PlaySound((PlayerSpeech)word_A750E0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1330 qword_A750D8 = 0i64;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1331 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1332 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1333
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1334 for (uint i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1335 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1336 auto pPlayer = pParty->pPlayers + i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1337
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1338 if (pPlayer->Eradicated())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1339 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1340 pFace = pTexture_PlayerFaceEradicated;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1341 pPortrait = pFace;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1342 v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1343 if ( pParty->pPartyBuffs[11].uExpireTime )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1344 pRenderer->_4A6E7E(v9, 0x183u, pPortrait);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1345 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1346 pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1347 auto _v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1348 v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1349 if (pPlayer->pPlayerBuffs[1].uExpireTime > 0)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1350 _v1 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1351 v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1352 v12 = pPlayer->pPlayerBuffs[7].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1353 v13 = pPlayer->pPlayerBuffs[13].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1354 if ( v13 | v12 | v11 | _v1 | v10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1355 sub_441A4E(i);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1356 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1357 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1358 if (pPlayer->Dead())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1359 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1360 pFace = pTexture_PlayerFaceDead;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1361 pPortrait = pFace;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1362 v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1363 if ( pParty->pPartyBuffs[11].uExpireTime )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1364 pRenderer->_4A6E7E(v9, 0x183u, pPortrait);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1365 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1366 pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1367 auto _v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1368 v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1369 if (pPlayer->pPlayerBuffs[1].uExpireTime > 0)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1370 _v1 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1371 v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1372 v12 = pPlayer->pPlayerBuffs[7].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1373 v13 = pPlayer->pPlayerBuffs[13].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1374 if ( v13 | v12 | v11 | _v1 | v10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1375 sub_441A4E(i);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1376 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1377 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1378 v7 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1379 for (uint j = 0; j < pPlayerFrameTable->uNumFrames; ++j)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1380 if (pPlayerFrameTable->pFrames[j].expression == pPlayer->expression)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1381 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1382 v7 = j;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1383 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1384 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1385 if ( v7 == 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1386 v7 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1387 if (pPlayer->expression == CHARACTER_EXPRESSION_21)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1388 pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->_expression21_frameset, &pPlayer->_expression21_animtime, pMiscTimer->uTimeElapsed);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1389 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1390 pFrame = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1391 if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1392 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1393 pPlayer->field_1AA2 = pFrame->uTextureID - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1394 pFace = (Texture *)pTextures_PlayerFaces[i][pPlayer->field_1AA2];//pFace = (Texture *)pTextures_PlayerFaces[i][pFrame->uTextureID];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1395 pPortrait = pFace;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1396 v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1397 if ( pParty->pPartyBuffs[11].uExpireTime )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1398 pRenderer->_4A6E7E(v9, 0x183u, pPortrait);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1399 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1400 pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1401 auto _v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1402 v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1403 if (pPlayer->pPlayerBuffs[1].uExpireTime > 0)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1404 _v1 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1405 v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1406 v12 = pPlayer->pPlayerBuffs[7].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1407 v13 = pPlayer->pPlayerBuffs[13].uExpireTime > 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1408 if ( v13 | v12 | v11 | _v1 | v10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1409 sub_441A4E(i);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1410 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1411 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1412 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1413 if ( pParty->bTurnBasedModeOn == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1414 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1415 if ( pTurnEngine->field_4 != 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1416 {
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
1417 if (PID_TYPE(pTurnEngine->pQueue[0].uPackedID) == OBJECT_Player)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1418 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1419 //v14 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1420 if ( pTurnEngine->uActorQueueSize > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1421 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1422 //v15 = (char *)pTurnEngine->pQueue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1423 for (uint i = 0; i < pTurnEngine->uActorQueueSize; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1424 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1425 auto pElem = pTurnEngine->pQueue + i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1426
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 809
diff changeset
1427 if (PID_TYPE(pElem->uPackedID) != OBJECT_Player)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1428 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1429 v16 = dword_5079D0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1430 if ( pParty->uFlags & 0x10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1431 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1432 v16 = dword_5079CC;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1433 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1434 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1435 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1436 if ( pParty->uFlags & 0x20 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1437 v16 = dword_5079C8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1438 }
948
5a2dbb00c399 Code cleaning.
Nomad
parents: 939
diff changeset
1439 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[PID_ID(pElem->uPackedID)] - 4, 0x181u, pIcons_LOD->GetTexture(v16));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1440 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1441 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1442 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1443 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1444 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1445 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1446 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1447 for (uint i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1448 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1449 auto pPlayer = pParty->pPlayers + i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1450 if (pPlayer->CanAct() && !pPlayer->uTimeToRecovery)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1451 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1452 v19 = dword_5079D0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1453 if ( pParty->uFlags & 0x10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1454 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1455 v19 = dword_5079CC;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1456 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1457 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1458 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1459 if ( pParty->uFlags & 0x20 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1460 v19 = dword_5079C8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1461 }
948
5a2dbb00c399 Code cleaning.
Nomad
parents: 939
diff changeset
1462 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4, 0x181u, pIcons_LOD->GetTexture(v19));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1463 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1464 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1465 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1466 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1467
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1468 //----- (00441D38) --------------------------------------------------------
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1469 void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1470 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1471 int uHeight; // ebx@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1472 __int16 v11; // cx@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1473 unsigned int v14; // ebx@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1474 int v15; // eax@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1475 __int16 v17; // di@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1476 double v18; // st7@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1477 float v19; // ST38_4@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1478 double v20; // st7@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1479 double v21; // st6@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1480 double v22; // st5@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1481 signed int v27; // eax@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1482 unsigned __int16 *v28; // ecx@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1483 signed int v29; // edi@40
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1484 //signed int v33; // ebx@50
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1485 //unsigned int v34; // eax@50
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1486 //signed int v35; // ecx@50
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1487 //unsigned __int16 v36; // di@66
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1488 int v37; // edi@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1489 int v38; // ebx@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1490 __int16 v39; // ax@87
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1491 int v40; // edi@91
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1492 int v41; // ebx@91
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1493 unsigned int v42; // eax@101
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1494 unsigned int v43; // ebx@101
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1495 unsigned int v44; // ST30_4@101
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1496 char *v45; // ebx@106
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1497 int v46; // edi@108
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1498 int v47; // eax@108
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1499 unsigned int v48; // ebx@114
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1500 unsigned int v49; // ST64_4@114
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1501 //unsigned int v51; // [sp-10h] [bp-64h]@79
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1502 unsigned int v52; // [sp-10h] [bp-64h]@100
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1503 //unsigned int v53; // [sp-Ch] [bp-60h]@79
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1504 unsigned int v54; // [sp-Ch] [bp-60h]@100
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1505 //unsigned int v55; // [sp-8h] [bp-5Ch]@77
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1506 unsigned int v56; // [sp-8h] [bp-5Ch]@100
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1507 //signed int v57; // [sp-4h] [bp-58h]@54
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1508 //unsigned __int16 v58; // [sp-4h] [bp-58h]@77
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1509 unsigned __int16 v59; // [sp-4h] [bp-58h]@100
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1510 //unsigned __int16 v60; // [sp+10h] [bp-44h]@66
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1511 //unsigned int v61; // [sp+10h] [bp-44h]@85
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1512 //unsigned int v63; // [sp+14h] [bp-40h]@85
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1513 //unsigned int v65; // [sp+18h] [bp-3Ch]@85
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1514 unsigned int lPitch; // [sp+20h] [bp-34h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1515 unsigned int lPitcha; // [sp+20h] [bp-34h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1516 char *lPitchb; // [sp+20h] [bp-34h]@106
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1517 unsigned int v69; // [sp+24h] [bp-30h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1518 signed int v70; // [sp+24h] [bp-30h]@37
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1519 //unsigned __int16 uBlue; // [sp+28h] [bp-2Ch]@1
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1520 signed int uBluea; // [sp+28h] [bp-2Ch]@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1521 int v73; // [sp+2Ch] [bp-28h]@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1522 int v76; // [sp+34h] [bp-20h]@91
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1523 int v77; // [sp+34h] [bp-20h]@108
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1524 //int v79; // [sp+38h] [bp-1Ch]@72
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1525 //char *a2c; // [sp+40h] [bp-14h]@68
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1526 signed int uCenterY; // [sp+48h] [bp-Ch]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1527 signed int uCenterX; // [sp+4Ch] [bp-8h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1528 signed int uWidth; // [sp+5Ch] [bp+8h]@30
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1529 //signed int uZe; // [sp+5Ch] [bp+8h]@67
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1530 signed int uZf; // [sp+5Ch] [bp+8h]@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1531 signed int uZg; // [sp+5Ch] [bp+8h]@105
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1532 unsigned int uWa; // [sp+60h] [bp+Ch]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1533 float uWb; // [sp+60h] [bp+Ch]@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1534 unsigned int uWd; // [sp+60h] [bp+Ch]@95
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1535 float uZooma; // [sp+64h] [bp+10h]@117
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1536 //unsigned int flagsb; // [sp+68h] [bp+14h]@66
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1537 Actor *flagsc; // [sp+68h] [bp+14h]@86
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1538 //unsigned int flagsd; // [sp+68h] [bp+14h]@105
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1539
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1540 uCenterX = (uX + uZ) / 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1541 uCenterY = (uY + uW) / 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1542 lPitch = pRenderer->uTargetSurfacePitch;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1543 //TargetColor(0, 0, 0);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1544 //uBlue = TargetColor(0, 0, 0xFFu);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1545 auto bWizardEyeActive = pParty->WizardEyeActive();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1546 auto uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1547 if (CheckHiredNPCSpeciality(Cartographer))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1548 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1549 bWizardEyeActive = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1550 uWizardEyeSkillLevel = 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1551 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1552 bWizardEyeActive = true;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1553 uWizardEyeSkillLevel = 3;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1554 pRenderer->SetRasterClipRect(uX, uY, uZ - 1, uW - 1);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1555 uHeight = uW - uY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1556 uWidth = uZ - uX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1557
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1558 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1559 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1560 v17 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2;
710
735dab8d3c9a Town portal screen + misc gui const replacements
Nomad
parents: 709
diff changeset
1561 auto pMapLod0 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1562 auto pPal = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1563 v73 = (1 << (v17 + 16)) / (signed int)uZoom;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1564 v18 = (double)(1 << (16 - v17));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1565 v19 = v18;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1566 v20 = (double)(pParty->vPosition.x + 32768) / v18;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1567 v21 = (double)(32768 - pParty->vPosition.y) / v19;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1568 uWb = v21;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1569 switch (uZoom)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1570 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1571 case 512:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1572 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1573 v20 = v20 - (double)(uWidth / 2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1574 v22 = (double)(uHeight / 2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1575 uWb = v21 - v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1576 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1577 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1578
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1579 case 1024:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1580 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1581 v20 = v20 - (double)(uWidth / 4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1582 v22 = (double)(uHeight / 4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1583 uWb = v21 - v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1584 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1585 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1586
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1587 case 2048:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1588 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1589 v20 = v20 - (double)(uWidth / 8);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1590 v22 = (double)(uHeight / 8);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1591 uWb = v21 - v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1592 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1593 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1594
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1595 default: assert(false);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1596 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1597 assert(sizeof(pOdmMinimap) == 137 * 117 * sizeof(short));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1598
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1599 v70 = floorf(v20 * 65536.0 + 0.5f);//LODWORD(v24);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1600 uBluea = floorf(uWb * 65536.0 + 0.5f);//LODWORD(v25);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1601 v27 = uBluea >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1602 v28 = &pRenderer->pTargetSurface[uX + uY * lPitch];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1603 if (pMapLod0 && bRedrawOdmMinimap)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1604 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1605 assert(uWidth == 137 && uHeight == 117);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1606 //auto pMinimap = (unsigned __int16 *)pOdmMinimap;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1607
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1608 auto mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1609
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1610 v29 = v70 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1611
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1612 for (int y = 0; y < uHeight; ++y)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1613 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1614 auto pMapLod0Line = &pMapLod0[v27 * mapWidth];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1615 for (int x = 0; x < uWidth; ++x)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1616 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1617 //*pMinimap++ = pPal[pMapLod0Line[v29]];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1618 pOdmMinimap[y][x] = pPal[pMapLod0Line[v29]];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1619 v29 = (v70 + x * v73) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1620 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1621
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1622 v29 = v70 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1623 v28 += 137 - uWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1624 uBluea += v73;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1625 v27 = uBluea >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1626 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1627 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1628
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1629 for (int y = 0; y < 117; ++y)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1630 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1631 for (int x = 0; x < 137; ++x)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1632 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1633 *v28++ = pOdmMinimap[y][x];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1634 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1635 v28 += lPitch - 137;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1636 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1637 uNumBlueFacesInBLVMinimap = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1638 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1639 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1640 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1641 pRenderer->FillRectFast(uX, uY, uZ - uX, uHeight, 0xF);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1642 uNumBlueFacesInBLVMinimap = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1643
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1644 for (uint i = 0; i < pIndoor->pMapOutlines->uNumOutlines; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1645 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1646 auto pOutline = &pIndoor->pMapOutlines->pOutlines[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1647
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1648 auto pFace1 = pIndoor->pFaces + pOutline->uFace1ID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1649 auto pFace2 = pIndoor->pFaces + pOutline->uFace2ID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1650 //v9 = pIndoor->pFaces[pMapVertex->uFace1ID].uAttributes;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1651 //v10 = pIndoor->pFaces[pMapVertex->uFace2ID].uAttributes;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1652 if (pFace1->Visible() && pFace2->Visible())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1653 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1654 v11 = pOutline->uFlags;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1655 if ( v11 & 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1656 goto LABEL_15;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1657 if (pFace1->uAttributes & 0x80 || pFace2->uAttributes & 0x80u != 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1658 goto LABEL_ABC;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1659
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1660 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1661 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1662
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1663 LABEL_ABC:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1664 pOutline->uFlags = v11 | 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1665 pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1666
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1667 LABEL_15:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1668 //v12 = &pIndoor->pFaces[pOutline->uFace1ID];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1669 if (bWizardEyeActive && uWizardEyeSkillLevel >= 3 &&
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1670 (pFace1->uAttributes & 0x2000000 || pFace2->uAttributes & 0x2000000) &&
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1671 (pIndoor->pFaceExtras[pFace1->uFaceExtraID].uEventID || pIndoor->pFaceExtras[pFace2->uFaceExtraID].uEventID))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1672 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1673 if (uNumBlueFacesInBLVMinimap < 49)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1674 pBlueFacesInBLVMinimapIDs[uNumBlueFacesInBLVMinimap++] = i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1675 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1676 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1677 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1678 auto _a = (uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1679 auto _b = ((unsigned int)((unsigned __int64)_a >> 16) << 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1680 auto _c = ((signed int)(_b - uZoom * pParty->vPosition.x) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1681 v69 = uCenterX + _c;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1682 v69 = uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1683 lPitcha = uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1684 uWa = uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1685 v14 = uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1686 v15 = abs(pOutline->sZ - pParty->vPosition.z) / 8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1687 if ( v15 > 100 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1688 v15 = 100;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1689 pRenderer->RasterLine2D(v69, lPitcha, uWa, v14, viewparams->pPalette[-v15 + 200]);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1690 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1691 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1692
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1693
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1694 for (uint i = 0; i < uNumBlueFacesInBLVMinimap; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1695 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1696 //v16 = (uint *)&pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[uZb]];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1697 auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]];
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1698 pRenderer->RasterLine2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1699 * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1700 - uZoom * pParty->vPosition.x) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1701 uCenterY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1702 - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1703 * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1704 - uZoom * pParty->vPosition.y) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1705 uCenterX
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1706 + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1707 * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1708 - uZoom * pParty->vPosition.x) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1709 uCenterY
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1710 - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1711 * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1712 - uZoom * pParty->vPosition.y) >> 16),
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1713 ui_game_minimap_outline_color);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1714 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1715 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1716
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1717
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1718 assert(pParty->sRotationY >= 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1719 float angle = (pParty->sRotationY % 2048) / 2048.0f;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1720 const float two_pi = 2.0f * 3.14159f;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1721
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1722 uint arrow_idx = floorf(0.5f + 7 * angle);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1723 pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx]));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1724
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1725 //flagsb = TargetColor(0, 0, 255);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1726 //v60 = TargetColor(255, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1727 if (bWizardEyeActive)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1728 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1729 //uZe = 0;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1730 if (uWizardEyeSkillLevel >= 2)
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1731 for (uint i = 0; i < uNumSpriteObjects; ++i)
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1732 //if (uNumSpriteObjects > 0)
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1733 {
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1734 auto object = pSpriteObjects + i;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1735
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1736 //a2c = (char *)&pSpriteObjects[0].uObjectDescID;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1737 //while ( 1 )
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1738 //{
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1739 if (!object->uType || !object->uObjectDescID)
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1740 continue;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1741 //if (uWizardEyeSkillLevel == 1
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1742 v37 = uCenterX + ((unsigned __int64)((object->vPosition.x - pParty->vPosition.x) * (signed __int64)uZoom) >> 16);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1743 //v79 = (unsigned __int64)((object->vPosition.y - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1744 //v38 = uCenterY - v79;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1745 v38 = uCenterY - ((signed __int64)((object->vPosition.y - pParty->vPosition.y) * (signed __int64)uZoom) >> 16);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1746 if (v37 < pRenderer->raster_clip_x || v37 > pRenderer->raster_clip_z ||
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1747 v38 < pRenderer->raster_clip_y || v38 > pRenderer->raster_clip_w)
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1748 continue;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1749
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1750 assert(uZoom >= 512);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1751 if (pObjectList->pObjects[object->uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1752 {
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1753 pRenderer->RasterLine2D(v37, v38, v37, v38, ui_game_minimap_projectile_color);
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1754 }
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1755 else if (uZoom > 512)
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1756 {
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1757 pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, ui_game_minimap_treasure_color);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1758 pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, ui_game_minimap_treasure_color);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1759 pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, ui_game_minimap_treasure_color);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1760 pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, ui_game_minimap_treasure_color);
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1761 pRenderer->RasterLine2D(v37 + 2, v38,
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1762 v37 + 2, v38 + 1, ui_game_minimap_treasure_color);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1763 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1764 else
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1765 {
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1766 pRenderer->RasterLine2D(v37 - 1, v38 - 1,
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1767 v37 - 1, v38, ui_game_minimap_treasure_color);
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1768 pRenderer->RasterLine2D(v37, v38 - 1,
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1769 v37, v38, ui_game_minimap_treasure_color);
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1770 }
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1771 //LABEL_82:
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1772 //LABEL_83:
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1773 //++uZe;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1774 //a2c += 112;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1775 //if ( uZe >= (signed int)uNumSpriteObjects )
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1776 //{
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1777 //goto LABEL_85;
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1778 //}
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1779 //}
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1780 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1781
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1782
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1783 LABEL_85:
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1784 //v63 = TargetColor(255, 0, 0);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1785 //v61 = TargetColor(0, 255, 0);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1786 //v65 = TargetColor(255, 255, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1787 uZf = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1788 if ( (signed int)uNumActors > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1789 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1790 flagsc = pActors;//[0].uAIState;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1791 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1792 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1793 v39 = flagsc->uAIState;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1794 if ( flagsc->uAIState != 11 && v39 != 19 && (v39 == 5 || BYTE1(flagsc->uAttributes) & 0x80) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1795 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1796 v40 = ((unsigned __int64)(( flagsc->vPosition.x - pParty->vPosition.x)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1797 * (signed __int64)(signed int)uZoom) >> 16)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1798 + uCenterX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1799 v76 = (unsigned __int64)(( flagsc->vPosition.y - pParty->vPosition.y)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1800 * (signed __int64)(signed int)uZoom) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1801 v41 = uCenterY - v76;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1802 if ( v40 >= pRenderer->raster_clip_x )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1803 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1804 if ( v40 <= pRenderer->raster_clip_z && v41 >= pRenderer->raster_clip_y && v41 <= pRenderer->raster_clip_w )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1805 {
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1806 uWd = ui_game_minimap_actor_friendly_color;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1807 if ( BYTE3(flagsc->uAttributes) & 1 )
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1808 uWd = ui_game_minimap_actor_hostile_color;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1809 if ( flagsc->uAIState == Dead)
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1810 uWd = ui_game_minimap_actor_corpse_color;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1811 if ( (signed int)uZoom > 1024 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1812 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1813 pRenderer->RasterLine2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1814 pRenderer->RasterLine2D(v40, v41 - 2, v40, v41 + 2, uWd);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1815 pRenderer->RasterLine2D(v40 + 1, v41 - 2, v40 + 1, v41 + 2, uWd);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1816 v42 = v41 + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1817 v43 = v41 - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1818 v44 = v42;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1819 pRenderer->RasterLine2D(v40 - 2, v43, v40 - 2, v42, uWd);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1820 v40 += 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1821 v59 = uWd;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1822 v56 = v44;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1823 v54 = v40;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1824 v52 = v43;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1825 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1826 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1827 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1828 pRenderer->RasterLine2D(v40 - 1, v41 - 1, v40 - 1, uCenterY - v76, uWd);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1829 v59 = uWd;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1830 v56 = uCenterY - v76;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1831 v54 = v40;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1832 v52 = v41 - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1833 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1834 pRenderer->RasterLine2D(v40, v52, v54, v56, v59);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1835 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1836 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1837 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1838 ++uZf;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1839 ++flagsc;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1840 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1841 while ( uZf < (signed int)uNumActors );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1842 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1843 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1844
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1845
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1846 //flagsd = TargetColor(255, 255, 255);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1847 uZg = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1848 if ( (signed int)uNumLevelDecorations > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1849 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1850 v45 = (char *)&pLevelDecorations[0].vPosition;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1851 lPitchb = (char *)&pLevelDecorations[0].vPosition;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1852 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1853 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1854 if ( *(v45 - 2) & 8 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1855 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1856 v46 = ((unsigned __int64)((*(int *)v45 - pParty->vPosition.x) * (signed __int64)(signed int)uZoom) >> 16)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1857 + uCenterX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1858 v77 = (unsigned __int64)((*((int *)v45 + 1) - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1859 v47 = uCenterY - v77;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1860 if ( v46 >= pRenderer->raster_clip_x )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1861 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1862 if ( v46 <= pRenderer->raster_clip_z && v47 >= pRenderer->raster_clip_y && v47 <= pRenderer->raster_clip_w )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1863 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1864 if ( (signed int)uZoom > 512 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1865 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1866 v48 = v47 + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1867 v49 = v47 - 1;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1868 pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, ui_game_minimap_decoration_color_1);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1869 pRenderer->RasterLine2D(v46, v49, v46, v48, ui_game_minimap_decoration_color_1);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1870 pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, ui_game_minimap_decoration_color_1);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1871 v45 = lPitchb;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1872 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1873 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1874 {
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 994
diff changeset
1875 pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, ui_game_minimap_decoration_color_1);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1876 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1877 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1878 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1879 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1880 ++uZg;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1881 v45 += 32;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1882 lPitchb = v45;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1883 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1884 while ( uZg < (signed int)uNumLevelDecorations );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1885 }
948
5a2dbb00c399 Code cleaning.
Nomad
parents: 939
diff changeset
1886 pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(dword_5079D8));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1887 uZooma = (double)pParty->sRotationY * 0.1171875;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1888 //v50 = uZooma + 6.7553994e15;
727
da130dd3092a Big time Travel ouverhaul
Nomad
parents: 710
diff changeset
1889 pRenderer->SetTextureClipRect(541, 0, 567, 480);
948
5a2dbb00c399 Code cleaning.
Nomad
parents: 939
diff changeset
1890 pRenderer->DrawTextureIndexed(floorf(uZooma + 0.5f) + 285, 136, pIcons_LOD->GetTexture(dword_5079B4));
727
da130dd3092a Big time Travel ouverhaul
Nomad
parents: 710
diff changeset
1891 pRenderer->ResetTextureClipRect();
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1892 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1893
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1894 //----- (00441498) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1895 void __cdecl GameUI_DrawTorchlightAndWizardEye()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1896 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1897 if (pCurrentScreen == SCREEN_GAME
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1898 || pCurrentScreen == SCREEN_MENU
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1899 || pCurrentScreen == SCREEN_OPTIONS
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1900 || pCurrentScreen == SCREEN_REST
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1901 || pCurrentScreen == SCREEN_SPELL_BOOK
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1902 || pCurrentScreen == SCREEN_CHEST
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1903 || pCurrentScreen == SCREEN_SAVEGAME
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1904 || pCurrentScreen == SCREEN_LOADGAME
987
9e132060ada3 UIMSG_CHEST_ClickItem
Ritor1
parents: 960
diff changeset
1905 || pCurrentScreen == SCREEN_CHEST_INVENTORY
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1906 || pCurrentScreen == SCREEN_BOOKS
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1907 || pCurrentScreen == SCREEN_BRANCHLESS_NPC_DIALOG )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1908 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1909 if (pParty->TorchlightActive())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1910 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1911 auto icon = pIconsFrameTable->GetFrame((signed __int16)pUIAnum_Torchlight->uIconID, pEventTimer->Time());
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1912 pRenderer->DrawTextureTransparent(pUIAnum_Torchlight->x, pUIAnum_Torchlight->y, pIcons_LOD->GetTexture(icon->uTextureID));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1913 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1914 if (pParty->WizardEyeActive())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1915 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1916 auto icon = pIconsFrameTable->GetFrame((signed __int16)pUIAnim_WizardEye->uIconID, pEventTimer->Time());
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1917 pRenderer->DrawTextureTransparent(pUIAnim_WizardEye->x, pUIAnim_WizardEye->y, pIcons_LOD->GetTexture(icon->uTextureID));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1918 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1919 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1920 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1921 // 4E28F8: using guessed type int pCurrentScreen;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1922
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1923
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1924 //----- (00491F87) --------------------------------------------------------
994
3431f6abc786 GameUI clean
Nomad
parents: 992
diff changeset
1925 void GameUI_DrawHiredNPCs()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1926 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1927 //int v6; // eax@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1928 char v7; // al@17
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1929 unsigned int v8; // eax@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1930 int v9; // esi@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1931 int v10; // eax@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1932 unsigned int v11; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1933 unsigned int v12; // esi@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1934 unsigned int v13; // eax@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1935 IconFrame *v14; // eax@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1936 unsigned int v15; // eax@26
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1937 char pContainer[20]; // [sp+Ch] [bp-30h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1938 unsigned int v17; // [sp+20h] [bp-1Ch]@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1939 signed int uFrameID; // [sp+24h] [bp-18h]@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1940 //int i; // [sp+28h] [bp-14h]@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1941 unsigned int v20; // [sp+2Ch] [bp-10h]@20
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1942 unsigned int v21; // [sp+30h] [bp-Ch]@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1943 int v22; // [sp+34h] [bp-8h]@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1944 unsigned __int8 v23; // [sp+3Bh] [bp-1h]@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1945
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1946 if ( bNoNPCHiring != 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1947 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1948 v23 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1949 v22 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1950 /*for (uint i = 0; i < 2; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1951 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1952 if (pParty->pHirelings[i].pName)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1953 pTmpBuf[v22++] = i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1954 }*/
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1955 if (pParty->pHirelings[0].pName)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1956 pTmpBuf[v22++] = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1957 if (pParty->pHirelings[1].pName)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1958 pTmpBuf[v22++] = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1959
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1960 for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1961 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1962 if (pNPCStats->pNewNPCData[i].uFlags & 128)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1963 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1964 if (!pParty->pHirelings[0].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[0].pName))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1965 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1966 if (!pParty->pHirelings[1].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[1].pName))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1967 pTmpBuf[v22++] = i + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1968 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1969 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1970 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1971
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1972 //v6 = (unsigned __int8)pParty->field_709;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1973 for ( int i = (unsigned __int8)pParty->field_709; i < v22 && v23 < 2; i++ )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1974 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1975 v7 = pTmpBuf[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1976 if ( (unsigned __int8)v7 >= 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1977 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1978 sprintf(pContainer, "NPC%03d", pNPCStats->pNPCData[(unsigned __int8)v7 + 499].uPortraitID);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1979 v15 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
948
5a2dbb00c399 Code cleaning.
Nomad
parents: 939
diff changeset
1980 pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], pIcons_LOD->GetTexture(v15));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1981 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1982 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1983 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1984 sprintf(pContainer, "NPC%03d", pParty->pHirelings[(unsigned __int8)v7].uPortraitID);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1985 v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1986 v9 = v23;
948
5a2dbb00c399 Code cleaning.
Nomad
parents: 939
diff changeset
1987 pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v9], pHiredNPCsIconsOffsetsY[v9], pIcons_LOD->GetTexture(v8));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1988 v10 = (unsigned __int8)pTmpBuf[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1989 if ( pParty->pHirelings[v10].evt_A == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1990 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1991 uFrameID = pParty->pHirelings[v10].evt_B;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1992 v11 = pHiredNPCsIconsOffsetsX[v9];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1993 v12 = pHiredNPCsIconsOffsetsY[v9];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1994 v17 = v11;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1995 v21 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1996 if ( (signed int)pIconsFrameTable->uNumIcons <= 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1997 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1998 LABEL_23:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1999 v13 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2000 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2001 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2002 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2003 v20 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2004 while ( _strcmpi("spell96", pIconsFrameTable->pIcons[v20 / 0x20].pAnimationName) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2005 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2006 ++v21;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2007 v20 += 32;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2008 if ( (signed int)v21 >= (signed int)pIconsFrameTable->uNumIcons )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2009 goto LABEL_23;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2010 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2011 v13 = v21;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2012 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2013 v14 = pIconsFrameTable->GetFrame(v13, uFrameID);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2014 pRenderer->DrawTextureTransparent(v17, v12, &pIcons_LOD->pTextures[v14->uTextureID]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2015 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2016 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2017 ++v23;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2018 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2019 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2020 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2021 // 6BE3C5: using guessed type char bNoNPCHiring;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2022