Mercurial > mm7
annotate mm7_1.cpp @ 1345:b99aeb077d4f
Слияние
author | Ritor1 |
---|---|
date | Thu, 11 Jul 2013 17:47:33 +0600 |
parents | 65379a50e4eb |
children | cc9a3a24d61d |
rev | line source |
---|---|
1165
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1143
diff
changeset
|
1 #ifdef _MSC_VER |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1143
diff
changeset
|
2 #define _CRT_SECURE_NO_WARNINGS |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1143
diff
changeset
|
3 #endif |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1143
diff
changeset
|
4 |
0 | 5 /* This file has been generated by the Hex-Rays decompiler. |
6 Copyright (c) 2007-2011 Hex-Rays <info@hex-rays.com> | |
7 | |
8 Detected compiler: Visual C++ | |
9 */ | |
10 | |
11 //#include <defs.h> | |
373 | 12 #include <assert.h> |
13 | |
1262 | 14 #include "Texture.h" |
15 #include "mm7_data.h" | |
1016 | 16 #include "VideoPlayer.h" |
17 #include "BSPModel.h" | |
18 #include "Mouse.h" | |
19 | |
20 #include "Vis.h" | |
0 | 21 #include "MM7.h" |
22 #include "Game.h" | |
23 #include "GUIWindow.h" | |
24 #include "Party.h" | |
25 #include "AudioPlayer.h" | |
26 #include "Outdoor.h" | |
27 #include "Overlays.h" | |
28 #include "LOD.h" | |
29 #include "Actor.h" | |
30 #include "Allocator.h" | |
31 #include "Events.h" | |
32 #include "Viewport.h" | |
515
cb0ad52d6a26
LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
510
diff
changeset
|
33 #include "SpriteObject.h" |
0 | 34 #include "ObjectList.h" |
35 #include "Chest.h" | |
36 #include "DecorationList.h" | |
37 #include "stru123.h" | |
38 #include "Time.h" | |
39 #include "IconFrameTable.h" | |
40 #include "TurnEngine.h" | |
189 | 41 #include "texts.h" |
1299 | 42 #include "UI\UIHouses.h" |
1078 | 43 #include "stru367.h" |
0 | 44 |
45 int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); | |
46 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4); | |
47 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive); | |
48 bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine); | |
49 | |
791 | 50 |
51 //----- (004A1780) mm6_chinese--------------------------------------------- | |
52 int fixpoint_div(int a1, int a2) | |
53 { | |
54 return ((__int64)a1 << 16) / a2; | |
55 } | |
56 | |
871 | 57 int fixpoint_mul(int a1, int a2) |
58 { | |
59 return (((__int64)a1 << 16) * a2) >> 16; | |
60 } | |
61 | |
762 | 62 //----- (004453C0) mm6----------------------------------------------------- |
63 //----- (004A1760) mm6_chinese--------------------------------------------- | |
871 | 64 int fixpoint_sub0(int a1, int a2) |
762 | 65 { |
871 | 66 return ((__int64)a1 * (__int64)a2) >> 16; |
762 | 67 } |
68 | |
0 | 69 //----- (0041D20D) -------------------------------------------------------- |
1006 | 70 void __fastcall sub_41D20D_buff_remaining_time_string( int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2 ) |
71 { | |
0 | 72 unsigned int v4; // edi@1 |
73 unsigned int v5; // esi@1 | |
74 unsigned int v6; // ebp@1 | |
75 unsigned int v7; // ebx@1 | |
76 signed __int64 v8; // ST34_8@1 | |
77 signed __int64 v9; // kr00_8@1 | |
78 char *v10; // eax@2 | |
79 char *v11; // eax@7 | |
80 char *v12; // eax@13 | |
81 char *v13; // eax@19 | |
82 int uY; // [sp+0h] [bp-20h]@1 | |
83 GUIWindow *a1; // [sp+4h] [bp-1Ch]@1 | |
84 signed __int64 v17; // [sp+10h] [bp-10h]@1 | |
85 signed __int64 v18; // [sp+18h] [bp-8h]@1 | |
86 unsigned int v19; // [sp+24h] [bp+4h]@1 | |
87 | |
88 a1 = edx0; | |
89 uY = ecx0; | |
90 v4 = (unsigned __int64)(signed __int64)((double)a3 * 0.234375) >> 32; | |
91 v5 = (signed __int64)((double)a3 * 0.234375); | |
92 v6 = (unsigned __int64)((signed __int64)((double)a3 * 0.234375) / 60) >> 32; | |
93 v7 = (signed __int64)((double)a3 * 0.234375) / 60; | |
94 v8 = (signed __int64)((double)a3 * 0.234375) / 60 / 60; | |
95 v19 = (unsigned int)v8 / 0x18; | |
96 v18 = (signed __int64)__PAIR__(v4, v5) % 60; | |
97 v17 = (signed __int64)__PAIR__(v6, v7) % 60; | |
98 v9 = v8 % 24; | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
99 strcpy(pTmpBuf.data(), "\r020"); |
0 | 100 if ( (unsigned int)v8 / 0x18 ) |
101 { | |
102 v10 = pGlobalTXT_LocalizationStrings[57]; // Days | |
103 if ( v19 <= 1 ) | |
104 v10 = pGlobalTXT_LocalizationStrings[56]; // Day | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
105 sprintfex(pTmpBuf2.data(), "%d %s ", (int)v19, v10); |
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
106 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
0 | 107 } |
108 if ( v9 ) | |
109 { | |
110 if ( v9 <= 1 ) | |
111 v11 = pGlobalTXT_LocalizationStrings[109];// Hour | |
112 else | |
113 v11 = pGlobalTXT_LocalizationStrings[110];// Hours | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
114 sprintfex(pTmpBuf2.data(), "%d %s ", (int)v9, v11); |
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
115 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
0 | 116 } |
117 if ( v17 && !v19 ) | |
118 { | |
119 if ( v17 <= 1 ) | |
120 v12 = pGlobalTXT_LocalizationStrings[437];// Minute | |
121 else | |
122 v12 = pGlobalTXT_LocalizationStrings[436];// Minutes | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
123 sprintfex(pTmpBuf2.data(), "%d %s ", (int)v17, v12); |
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
124 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
0 | 125 } |
126 if ( v18 && !v9 ) | |
127 { | |
128 if ( v18 <= 1 ) | |
129 v13 = pGlobalTXT_LocalizationStrings[439];// Second | |
130 else | |
131 v13 = pGlobalTXT_LocalizationStrings[438];// Seconds | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
132 sprintfex(pTmpBuf2.data(), "%d %s ", (int)v18, v13); |
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
133 strcat(pTmpBuf.data(), pTmpBuf2.data()); |
0 | 134 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1195
diff
changeset
|
135 a1->DrawText(a2, 32, uY, 0, pTmpBuf.data(), 0, 0, 0); |
0 | 136 } |
137 | |
138 //----- (0042038D) -------------------------------------------------------- | |
139 void __cdecl sub_42038D() | |
140 { | |
141 POINT *v0; // esi@2 | |
142 int v1; // ecx@2 | |
143 const char *v2; // eax@3 | |
144 POINT v3; // [sp+0h] [bp-10h]@2 | |
145 POINT a2; // [sp+8h] [bp-8h]@1 | |
146 | |
1038 | 147 __debugbreak(); // invalid indexing |
0 | 148 if ( pMouse->GetCursorPos(&a2)->y < 350 ) |
149 { | |
150 v0 = pMouse->GetCursorPos(&a2); | |
151 v1 = pRenderer->pActiveZBuffer[v0->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v3)->y]]; | |
152 if ( v1 ) | |
153 { | |
154 auto _w = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C | |
526 | 155 + 18 * *((short *)&pChests[0].igChestItems[139].uExpireTime |
0 | 156 + v1 + 2662 * (unsigned int)pChestWindow->ptr_1C + 3)); |
702 | 157 |
158 _w = (ItemGen *)(&pChests[(unsigned int)pChestWindow->ptr_1C] -32 | |
159 + 18 * *((short *)&pChests[(unsigned int)pChestWindow->ptr_1C].igChestItems[139].uExpireTime + v1 + 3)); | |
0 | 160 v2 = _w->GetDisplayName(); |
994 | 161 GameUI_SetFooterString(v2); |
0 | 162 } |
163 } | |
164 } | |
165 | |
166 //----- (004226C2) -------------------------------------------------------- | |
265 | 167 bool PauseGameDrawing() |
0 | 168 { |
265 | 169 if ( pCurrentScreen != SCREEN_GAME |
151 | 170 && pCurrentScreen != SCREEN_NPC_DIALOGUE |
171 && pCurrentScreen != SCREEN_CHANGE_LOCATION ) | |
172 { | |
173 if ( pCurrentScreen == SCREEN_INPUT_BLV ) | |
0 | 174 return pVideoPlayer->pSmackerMovie != 0; |
151 | 175 if ( pCurrentScreen != SCREEN_BRANCHLESS_NPC_DIALOG ) |
265 | 176 return true; |
177 } | |
178 return false; | |
0 | 179 } |
180 // 4E28F8: using guessed type int pCurrentScreen; | |
181 | |
182 //----- (004226EF) -------------------------------------------------------- | |
373 | 183 void SetUserInterface(PartyAlignment align, bool bReplace) |
0 | 184 { |
185 unsigned int v3; // eax@7 | |
186 unsigned __int16 v4; // dx@7 | |
187 unsigned __int16 v5; // cx@7 | |
188 unsigned __int16 v6; // [sp-4h] [bp-14h]@7 | |
189 | |
373 | 190 |
983 | 191 extern void set_default_ui_skin(); |
192 set_default_ui_skin(); | |
193 | |
373 | 194 if (align == PartyAlignment_Evil) |
195 { | |
0 | 196 if ( bReplace ) |
197 { | |
198 pTexture_RightFrame->Reload("ib-r-C.pcx"); | |
199 pTexture_BottomFrame->Reload("ib-b-C.pcx"); | |
200 pTexture_TopFrame->Reload("ib-t-C.pcx"); | |
201 pTexture_LeftFrame->Reload("ib-l-C.pcx"); | |
202 pTexture_StatusBar->Reload("IB-Foot-c.pcx"); | |
203 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-C", 2); | |
204 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D8], "ib-autmask-c", 2); | |
205 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079B4], "IB-COMP-C", 2); | |
206 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2); | |
207 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2); | |
208 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2); | |
319 | 209 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2); |
210 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2); | |
211 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2); | |
212 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2); | |
995 | 213 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-C", 2); |
319 | 214 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-c", 2); |
215 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-c", 2); | |
216 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-c", 2); | |
217 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-c", 2); | |
569 | 218 |
219 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-c", 2); | |
220 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-c", 2); | |
221 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-c", 2); | |
222 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-c", 2); | |
223 | |
0 | 224 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); |
569 | 225 pIconsFrameTable->InitializeAnimation(pUIAnim_WizardEye->uIconID); |
0 | 226 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); |
569 | 227 pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID); |
228 | |
526 | 229 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-c", 2); |
0 | 230 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2); |
984 | 231 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-c", 2); |
0 | 232 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); |
233 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-c", 2); | |
234 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-c", 2); | |
235 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-c", 2); | |
236 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-c", 2); | |
237 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-c", 2); | |
238 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-c", 2); | |
239 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-c", 2); | |
240 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-c", 2); | |
241 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-c", 2); | |
242 } | |
243 else | |
244 { | |
245 pTexture_RightFrame->Load("ib-r-C.pcx", 0); | |
246 pTexture_BottomFrame->Load("ib-b-c.pcx", 0); | |
247 pTexture_TopFrame->Load("ib-t-C.pcx", 0); | |
248 pTexture_LeftFrame->Load("ib-l-C.pcx", 0); | |
249 pTexture_StatusBar->Load("IB-Foot-c.pcx", 0); | |
250 uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-C", TEXTURE_16BIT_PALETTE); | |
251 dword_5079D8 = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE); | |
252 dword_5079B4 = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE); | |
253 dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE); | |
254 dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE); | |
255 dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE); | |
319 | 256 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); |
257 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE); | |
328 | 258 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE); |
319 | 259 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE); |
995 | 260 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE); |
319 | 261 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-c", TEXTURE_16BIT_PALETTE); |
262 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-c", TEXTURE_16BIT_PALETTE); | |
263 uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-c", TEXTURE_16BIT_PALETTE); | |
264 uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE); | |
526 | 265 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE); |
569 | 266 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE); |
267 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE); | |
268 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-c", TEXTURE_16BIT_PALETTE); | |
269 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-c", TEXTURE_16BIT_PALETTE); | |
0 | 270 uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc-c", TEXTURE_16BIT_PALETTE); |
984 | 271 uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); |
0 | 272 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); |
273 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); | |
274 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); | |
275 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); | |
276 } | |
949 | 277 v3 = TargetColor(0xC8u, 0, 0); |
0 | 278 v4 = 0; |
279 v6 = 0; | |
280 v5 = 10; | |
281 } | |
373 | 282 else if (align == PartyAlignment_Neutral) |
0 | 283 { |
284 if ( bReplace ) | |
285 { | |
286 pTexture_RightFrame->Reload("ib-r-a.pcx"); | |
287 pTexture_BottomFrame->Reload("ib-b-a.pcx"); | |
288 pTexture_TopFrame->Reload("ib-t-a.pcx"); | |
289 pTexture_LeftFrame->Reload("ib-l-a.pcx"); | |
290 pTexture_StatusBar->Reload("IB-Foot-a.pcx"); | |
291 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-a", 2); | |
292 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D8], "ib-autmask-a", 2); | |
293 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079B4], "IB-COMP-a", 2); | |
294 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2); | |
295 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2); | |
296 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2); | |
319 | 297 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2); |
298 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2); | |
299 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2); | |
300 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2); | |
995 | 301 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2); |
319 | 302 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-a", 2); |
303 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-a", 2); | |
304 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-a", 2); | |
305 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-a", 2); | |
569 | 306 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-a", 2); |
307 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-a", 2); | |
308 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-a", 2); | |
309 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-a", 2); | |
0 | 310 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); |
311 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); | |
312 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); | |
313 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); | |
526 | 314 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-a", 2); |
0 | 315 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2); |
984 | 316 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven", 2); |
0 | 317 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); |
318 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll", 2); | |
319 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr", 2); | |
320 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul", 2); | |
321 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur", 2); | |
322 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm", 2); | |
323 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf", 2); | |
324 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt", 2); | |
325 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top", 2); | |
326 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap", 2); | |
327 } | |
328 else | |
329 { | |
330 pTexture_RightFrame->Load("ib-r-A.pcx", 0); | |
331 pTexture_BottomFrame->Load("ib-b-A.pcx", 0); | |
332 pTexture_TopFrame->Load("ib-t-A.pcx", 0); | |
333 pTexture_LeftFrame->Load("ib-l-A.pcx", 0); | |
334 pTexture_StatusBar->Load("IB-Foot-a.pcx", 0); | |
335 uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-A", TEXTURE_16BIT_PALETTE); | |
336 dword_5079D8 = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE); | |
337 dword_5079B4 = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE); | |
338 dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE); | |
339 dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE); | |
340 dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-a", TEXTURE_16BIT_PALETTE); | |
319 | 341 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE); |
342 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE); | |
995 | 343 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE); |
319 | 344 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE); |
345 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE); | |
346 uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-a", TEXTURE_16BIT_PALETTE); | |
347 uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE); | |
328 | 348 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE); |
319 | 349 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE); |
526 | 350 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE); |
569 | 351 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE); |
352 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE); | |
353 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-a", TEXTURE_16BIT_PALETTE); | |
354 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-a", TEXTURE_16BIT_PALETTE); | |
0 | 355 uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc", TEXTURE_16BIT_PALETTE); |
984 | 356 uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); |
0 | 357 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); |
358 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); | |
359 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); | |
360 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); | |
361 uTextureID_Parchment = pIcons_LOD->LoadTexture("parchment", TEXTURE_16BIT_PALETTE); | |
362 uTextureID_5076B4 = pIcons_LOD->LoadTexture("cornr_ll", TEXTURE_16BIT_PALETTE); | |
363 uTextureID_5076B0 = pIcons_LOD->LoadTexture("cornr_lr", TEXTURE_16BIT_PALETTE); | |
364 uTextureID_5076AC = pIcons_LOD->LoadTexture("cornr_ul", TEXTURE_16BIT_PALETTE); | |
365 uTextureID_5076A8 = pIcons_LOD->LoadTexture("cornr_ur", TEXTURE_16BIT_PALETTE); | |
366 uTextureID_5076A4 = pIcons_LOD->LoadTexture("edge_btm", TEXTURE_16BIT_PALETTE); | |
367 uTextureID_5076A0 = pIcons_LOD->LoadTexture("edge_lf", TEXTURE_16BIT_PALETTE); | |
368 uTextureID_50769C = pIcons_LOD->LoadTexture("edge_rt", TEXTURE_16BIT_PALETTE); | |
369 uTextureID_507698 = pIcons_LOD->LoadTexture("edge_top", TEXTURE_16BIT_PALETTE); | |
948 | 370 pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE); |
0 | 371 |
372 } | |
949 | 373 v3 = TargetColor(0xAu, 0, 0); |
0 | 374 v4 = 214; |
375 v5 = 230; | |
376 v6 = 193; | |
377 } | |
373 | 378 else if (align == PartyAlignment_Good) |
0 | 379 { |
380 if ( bReplace ) | |
381 { | |
382 pTexture_RightFrame->Reload("ib-r-B.pcx"); | |
383 pTexture_BottomFrame->Reload("ib-b-B.pcx"); | |
384 pTexture_TopFrame->Reload("ib-t-B.pcx"); | |
385 pTexture_LeftFrame->Reload("ib-l-B.pcx"); | |
386 pTexture_StatusBar->Reload("IB-Foot-b.pcx"); | |
387 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-B", 2); | |
388 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D8], "ib-autmask-b", 2); | |
389 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079B4], "IB-COMP-B", 2); | |
390 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-b", 2); | |
391 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-b", 2); | |
392 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-b", 2); | |
319 | 393 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-B", 2); |
394 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2); | |
395 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2); | |
396 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2); | |
995 | 397 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2); |
319 | 398 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-b", 2); |
399 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-b", 2); | |
400 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-b", 2); | |
401 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-b", 2); | |
569 | 402 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-b", 2); |
403 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-b", 2); | |
404 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-b", 2); | |
405 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-b", 2); | |
0 | 406 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeB"); |
407 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); | |
408 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchB"); | |
409 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); | |
526 | 410 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-b", 2); |
0 | 411 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-b", 2); |
984 | 412 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-b", 2); |
0 | 413 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); |
414 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-b", 2); | |
415 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-b", 2); | |
416 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-b", 2); | |
417 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-b", 2); | |
418 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-b", 2); | |
419 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-b", 2); | |
420 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-b", 2); | |
421 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-b", 2); | |
422 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-b", 2); | |
423 } | |
949 | 424 v3 = TargetColor(0, 0, 0xC8u); |
0 | 425 v5 = 255; |
426 v4 = 225; | |
427 v6 = 255; | |
428 } | |
373 | 429 else assert(false); |
430 | |
0 | 431 uGameUIFontMain = v3; |
949 | 432 uGameUIFontShadow = TargetColor(v5, v4, v6); |
0 | 433 } |
434 | |
1038 | 435 |
436 | |
437 | |
438 | |
0 | 439 //----- (00423AEE) -------------------------------------------------------- |
440 void __cdecl reset_some_strus_flt_2Cs() | |
441 { | |
442 float *v0; // eax@1 | |
443 signed int v1; // ecx@1 | |
444 signed int v2; // edx@1 | |
445 float *v3; // eax@3 | |
446 signed int v4; // edx@3 | |
447 float *v5; // eax@5 | |
448 signed int v6; // edx@5 | |
449 float *v7; // eax@7 | |
450 signed int v8; // edx@7 | |
451 float *v9; // eax@9 | |
452 | |
453 v0 = &array_50AC10[0].flt_2C; | |
454 v1 = 50; | |
455 v2 = 50; | |
456 do | |
457 { | |
458 *v0 = 0.0; | |
459 v0 += 12; | |
460 --v2; | |
461 } | |
462 while ( v2 ); | |
463 v3 = &array_50A2B0[0].flt_2C; | |
464 v4 = 50; | |
465 do | |
466 { | |
467 *v3 = 0.0; | |
468 v3 += 12; | |
469 --v4; | |
470 } | |
471 while ( v4 ); | |
472 v5 = &array_509950[0].flt_2C; | |
473 v6 = 50; | |
474 do | |
475 { | |
476 *v5 = 0.0; | |
477 v5 += 12; | |
478 --v6; | |
479 } | |
480 while ( v6 ); | |
481 v7 = &array_508FF0[0].flt_2C; | |
482 v8 = 50; | |
483 do | |
484 { | |
485 *v7 = 0.0; | |
486 v7 += 12; | |
487 --v8; | |
488 } | |
489 while ( v8 ); | |
490 v9 = &array_508690[0].flt_2C; | |
491 do | |
492 { | |
493 *v9 = 0.0; | |
494 v9 += 12; | |
495 --v1; | |
496 } | |
497 while ( v1 ); | |
498 } | |
499 | |
500 //----- (00423B4A) -------------------------------------------------------- | |
501 void __cdecl sub_423B4A() | |
502 { | |
503 float *v0; // eax@1 | |
504 signed int v1; // ecx@1 | |
505 | |
506 v0 = &array_507D30[0].flt_2C; | |
507 v1 = 50; | |
508 do | |
509 { | |
510 *v0 = 0.0; | |
511 v0 += 12; | |
512 --v1; | |
513 } | |
514 while ( v1 ); | |
515 } | |
516 | |
517 //----- (00424579) -------------------------------------------------------- | |
518 int __fastcall sub_424579(int uFaceID, stru320 *a2) | |
519 { | |
520 __debugbreak(); | |
521 return 0; | |
522 /*BLVFace *v2; // eax@1 | |
523 Vec3_short_ *v3; // ebx@1 | |
524 Vec3_short_ *v4; // esi@1 | |
525 unsigned int v5; // esi@3 | |
526 int v7; // ST1C_4@5 | |
527 int v8; // ST1C_4@5 | |
528 int v9; // ST1C_4@5 | |
529 int v10; // ST1C_4@5 | |
530 int v11; // esi@5 | |
531 int v12; // ST1C_4@5 | |
532 unsigned int v15; // ecx@8 | |
533 unsigned int v19; // ecx@13 | |
534 signed int v20; // ecx@16 | |
535 signed int result; // eax@20 | |
536 signed int v24; // edx@22 | |
537 unsigned int v25; // [sp+Ch] [bp-1Ch]@3 | |
538 float v26; // [sp+14h] [bp-14h]@3 | |
539 float v27; // [sp+1Ch] [bp-Ch]@3 | |
540 float v28; // [sp+20h] [bp-8h]@3 | |
541 signed int v29; // [sp+24h] [bp-4h]@3 | |
542 | |
543 v2 = &pIndoor->pFaces[uFaceID]; | |
544 v3 = pIndoor->pVertices; | |
545 v4 = &pIndoor->pVertices[*v2->pVertexIDs]; | |
546 if ( v2->pFacePlane_old.vNormal.x * ((signed __int16)*(int *)&v4->x - pBLVRenderParams->vPartyPos.x) | |
547 + v2->pFacePlane_old.vNormal.y * ((signed __int16)(*(int *)&v4->x >> 16) - pBLVRenderParams->vPartyPos.y) | |
548 + v2->pFacePlane_old.vNormal.z * (v4->z - pBLVRenderParams->vPartyPos.z) < 0 ) | |
549 { | |
1344 | 550 PortalFace.field_0 = 1; |
0 | 551 } |
552 else | |
553 { | |
1344 | 554 PortalFace.field_0 = 0; |
0 | 555 if ( !(v2->uAttributes & 1) ) |
556 return 0; | |
557 } | |
558 v29 = 0; | |
559 v5 = v2->uNumVertices; | |
560 __asm { fld pBLVRenderParams->fCosineY } | |
561 v28 = pBLVRenderParams->fSineY; | |
562 v26 = pBLVRenderParams->fCosineNegX; | |
563 v27 = pBLVRenderParams->fSineNegX; | |
564 v25 = v5; | |
565 if ( (signed int)v5 > 0 ) | |
566 { | |
567 _ECX = (char *)&array_50AC10[0].vWorldPosition.z; | |
568 do | |
569 { | |
570 v7 = v3[v2->pVertexIDs[v29]].x; | |
571 __asm | |
572 { | |
573 fild [ebp+var_10] | |
574 fstp dword ptr [ecx-8] | |
575 } | |
576 v8 = v3[v2->pVertexIDs[v29]].y; | |
577 __asm | |
578 { | |
579 fild [ebp+var_10] | |
580 fstp dword ptr [ecx-4] | |
581 } | |
582 v9 = v3[v2->pVertexIDs[v29]].z; | |
583 __asm | |
584 { | |
585 fild [ebp+var_10] | |
586 fstp dword ptr [ecx] | |
587 } | |
588 _ECX += 48; | |
589 v10 = a2->pDeltaUV[0] + v2->pVertexUIDs[v29]; | |
590 __asm | |
591 { | |
592 fild [ebp+var_10] | |
593 fstp dword ptr [ecx-14h] | |
594 } | |
595 v11 = a2->pDeltaUV[1] + v2->pVertexVIDs[v29++]; | |
596 v12 = v11; | |
597 v5 = v25; | |
598 __asm | |
599 { | |
600 fild [ebp+var_10] | |
601 fstp dword ptr [ecx-10h] | |
602 } | |
603 } | |
604 while ( v29 < (signed int)v25 ); | |
605 } | |
606 _EDX = (char *)&array_50AC10[0].vWorldViewPosition; | |
607 if ( pBLVRenderParams->sPartyRotX ) | |
608 { | |
609 if ( (signed int)v5 > 0 ) | |
610 { | |
611 __asm | |
612 { | |
613 fild pBLVRenderParams->vPartyPos.x | |
614 fild pBLVRenderParams->vPartyPos.y | |
615 fild pBLVRenderParams->vPartyPos.z | |
616 } | |
617 _EAX = (char *)&array_50AC10[0].vWorldPosition.z; | |
618 v15 = v5; | |
619 do | |
620 { | |
621 __asm | |
622 { | |
623 fld dword ptr [eax-8] | |
624 fsub st, st(3) | |
625 fld dword ptr [eax-4] | |
626 fsub st, st(3) | |
627 fld st(1) | |
628 fmul st, st(6) | |
629 fld st(1) | |
630 fmul [ebp+var_8] | |
631 fsubp st(1), st | |
632 fstp [ebp+var_4] | |
633 fld dword ptr [eax] | |
634 fsub st, st(3) | |
635 } | |
636 _EAX += 48; | |
637 --v15; | |
638 __asm | |
639 { | |
640 fstp [ebp+var_10] | |
641 fld [ebp+var_4] | |
642 fmul [ebp+var_14] | |
643 fld [ebp+var_10] | |
644 fmul [ebp+var_C] | |
645 fsubp st(1), st | |
646 fstp dword ptr [eax-2Ch] | |
647 fld st(1) | |
648 fmul [ebp+var_8] | |
649 fld st(1) | |
650 fmul st, st(7) | |
651 faddp st(1), st | |
652 fstp dword ptr [eax-28h] | |
653 fstp st | |
654 fstp st | |
655 fld [ebp+var_4] | |
656 fmul [ebp+var_C] | |
657 fld [ebp+var_10] | |
658 fmul [ebp+var_14] | |
659 faddp st(1), st | |
660 fstp dword ptr [eax-24h] | |
661 } | |
662 } | |
663 while ( v15 ); | |
664 LABEL_15: | |
665 __asm | |
666 { | |
667 fstp st | |
668 fstp st | |
669 fstp st | |
670 } | |
671 goto LABEL_16; | |
672 } | |
673 } | |
674 else | |
675 { | |
676 if ( (signed int)v5 > 0 ) | |
677 { | |
678 __asm | |
679 { | |
680 fild pBLVRenderParams->vPartyPos.x | |
681 fild pBLVRenderParams->vPartyPos.y | |
682 fild pBLVRenderParams->vPartyPos.z | |
683 } | |
684 _EAX = (char *)&array_50AC10[0].vWorldViewPosition; | |
685 v19 = v5; | |
686 do | |
687 { | |
688 __asm | |
689 { | |
690 fld dword ptr [eax-0Ch] | |
691 fsub st, st(3) | |
692 fld dword ptr [eax-8] | |
693 fsub st, st(3) | |
694 fld st(1) | |
695 fmul st, st(6) | |
696 fld st(1) | |
697 fmul [ebp+var_8] | |
698 fsubp st(1), st | |
699 fstp dword ptr [eax] | |
700 fld st(1) | |
701 fmul [ebp+var_8] | |
702 fld st(1) | |
703 fmul st, st(7) | |
704 } | |
705 _EAX += 48; | |
706 --v19; | |
707 __asm | |
708 { | |
709 faddp st(1), st | |
710 fstp dword ptr [eax-2Ch] | |
711 fstp st | |
712 fstp st | |
713 fld dword ptr [eax-34h] | |
714 fsub st, st(1) | |
715 fstp dword ptr [eax-28h] | |
716 } | |
717 } | |
718 while ( v19 ); | |
719 goto LABEL_15; | |
720 } | |
721 } | |
722 LABEL_16: | |
723 v20 = 0; | |
724 __asm { fstp st } | |
725 if ( (signed int)v5 <= 0 ) | |
726 return 0; | |
727 do | |
728 { | |
729 __asm | |
730 { | |
731 fld dword ptr [edx] | |
732 fcomp ds:flt_4D8524 | |
733 fnstsw ax | |
734 } | |
735 if ( !(HIBYTE(_AX) & 1) ) | |
736 break; | |
737 ++v20; | |
738 _EDX += 48; | |
739 } | |
740 while ( v20 < (signed int)v5 ); | |
741 if ( v20 >= (signed int)v5 ) | |
742 return 0; | |
743 result = sr_424CD7(v5); | |
744 if ( result > 0 ) | |
745 { | |
746 __asm { fild pBLVRenderParams->field_40 } | |
747 _ECX = (char *)&array_507D30[0].vWorldViewPosition; | |
748 v24 = result; | |
749 __asm | |
750 { | |
751 fmul ds:flt_4D84A4 | |
752 fild pBLVRenderParams->uViewportCenterX | |
753 fild pBLVRenderParams->uViewportCenterY | |
754 } | |
755 do | |
756 { | |
757 __asm | |
758 { | |
759 fld1 | |
760 fdiv dword ptr [ecx] | |
761 } | |
762 _ECX += 48; | |
763 --v24; | |
764 __asm | |
765 { | |
766 fld st | |
767 fmul dword ptr [ecx-2Ch] | |
768 fmul st, st(4) | |
769 fsubr st, st(3) | |
770 fstp dword ptr [ecx-24h] | |
771 fmul dword ptr [ecx-28h] | |
772 fmul st, st(3) | |
773 fsubr st, st(1) | |
774 fstp dword ptr [ecx-20h] | |
775 } | |
776 } | |
777 while ( v24 ); | |
778 __asm | |
779 { | |
780 fstp st | |
781 fstp st | |
782 fstp st | |
783 } | |
784 } | |
785 memcpy(&array_507D30[result], array_507D30, sizeof(array_507D30[result])); | |
786 return result;*/ | |
787 } | |
788 | |
1344 | 789 // 50B700: using guessed type int PortalFace.field_0; |
0 | 790 |
791 //----- (00424CD7) -------------------------------------------------------- | |
792 signed int __fastcall sr_424CD7(unsigned int uVertexID) | |
793 { | |
794 unsigned int v1; // edx@1 | |
795 signed int v2; // edi@1 | |
796 char *v3; // esi@4 | |
797 char *v4; // ecx@4 | |
798 unsigned int v5; // eax@4 | |
799 char *v6; // edx@4 | |
800 double v7; // st6@10 | |
801 double v8; // st5@10 | |
802 double v9; // st6@11 | |
803 unsigned __int8 v10; // c2@15 | |
804 unsigned __int8 v11; // c3@15 | |
805 RenderVertexSoft *v12; // edi@22 | |
806 char *v13; // eax@22 | |
807 double v14; // st6@22 | |
808 signed int result; // eax@24 | |
809 unsigned int v16; // [sp+8h] [bp-28h]@4 | |
810 bool v17; // [sp+Ch] [bp-24h]@6 | |
811 char *v18; // [sp+10h] [bp-20h]@4 | |
812 char *v19; // [sp+14h] [bp-1Ch]@4 | |
813 signed int v20; // [sp+18h] [bp-18h]@1 | |
814 RenderVertexSoft *v21; // [sp+1Ch] [bp-14h]@4 | |
815 char *v22; // [sp+20h] [bp-10h]@4 | |
816 char *v23; // [sp+24h] [bp-Ch]@4 | |
817 char *v24; // [sp+28h] [bp-8h]@4 | |
818 char *v25; // [sp+2Ch] [bp-4h]@4 | |
819 | |
820 v1 = uVertexID; | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
821 memcpy(&array_50AC10[uVertexID], array_50AC10, sizeof(array_50AC10[uVertexID])); |
0 | 822 v2 = 0; |
823 v20 = 0; | |
824 if ( array_50AC10[0].vWorldViewPosition.x >= 8.0 ) | |
825 v2 = 1; | |
826 if ( (signed int)(uVertexID + 1) <= 1 ) | |
827 return 0; | |
828 v3 = (char *)&array_507D30[0].vWorldViewPosition.z; | |
829 v4 = (char *)&array_507D30[0].vWorldViewPosition.y; | |
830 v5 = v1; | |
168 | 831 v23 = (char *)&array_507D30[0]._rhw; |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
832 v21 = array_507D30; |
0 | 833 v18 = (char *)&array_507D30[0].vWorldViewPosition.z; |
834 v19 = (char *)&array_507D30[0].vWorldViewPosition.y; | |
835 v22 = (char *)&array_507D30[0].vWorldViewPosition; | |
836 v24 = (char *)&array_507D30[0].v; | |
837 v25 = (char *)&array_507D30[0].u; | |
838 v6 = (char *)&array_50AC10[0].v; | |
839 v16 = v5; | |
840 do | |
841 { | |
842 v17 = *((float *)v6 + 5) >= 8.0; | |
843 if ( v2 != v17 ) | |
844 { | |
845 if ( v17 ) | |
846 { | |
847 v7 = (8.0 - *((float *)v6 - 7)) / (*((float *)v6 + 5) - *((float *)v6 - 7)); | |
848 *(float *)v4 = (*((float *)v6 + 6) - *((float *)v6 - 6)) * v7 + *((float *)v6 - 6); | |
849 *(float *)v3 = (*((float *)v6 + 7) - *((float *)v6 - 5)) * v7 + *((float *)v6 - 5); | |
850 *(float *)v25 = (*((float *)v6 + 11) - *((float *)v6 - 1)) * v7 + *((float *)v6 - 1); | |
851 v8 = (*((float *)v6 + 12) - *(float *)v6) * v7 + *(float *)v6; | |
852 } | |
853 else | |
854 { | |
855 v9 = (8.0 - *((float *)v6 + 5)) / (*((float *)v6 - 7) - *((float *)v6 + 5)); | |
856 *(float *)v4 = (*((float *)v6 - 6) - *((float *)v6 + 6)) * v9 + *((float *)v6 + 6); | |
857 *(float *)v3 = (*((float *)v6 - 5) - *((float *)v6 + 7)) * v9 + *((float *)v6 + 7); | |
858 *(float *)v25 = (*((float *)v6 - 1) - *((float *)v6 + 11)) * v9 + *((float *)v6 + 11); | |
859 v8 = (*(float *)v6 - *((float *)v6 + 12)) * v9 + *((float *)v6 + 12); | |
860 } | |
861 *(float *)v24 = v8; | |
862 *(float *)v22 = 8.0; | |
863 *(int *)v23 = 0x3E000000u; | |
864 if ( v2 ) | |
865 { | |
866 if ( 8.0 == *((float *)v6 - 7) && *(float *)v4 == *((float *)v6 - 6) ) | |
867 { | |
868 v10 = 0; | |
869 v11 = *(float *)v3 == *((float *)v6 - 5); | |
870 goto LABEL_19; | |
871 } | |
872 } | |
873 else | |
874 { | |
875 if ( 8.0 == *((float *)v6 + 5) && *(float *)v4 == *((float *)v6 + 6) ) | |
876 { | |
877 v10 = 0; | |
878 v11 = *(float *)v3 == *((float *)v6 + 7); | |
879 LABEL_19: | |
880 if ( v11 | v10 ) | |
881 goto LABEL_21; | |
882 goto LABEL_20; | |
883 } | |
884 } | |
885 LABEL_20: | |
886 ++v21; | |
887 v22 += 48; | |
888 v24 += 48; | |
889 v25 += 48; | |
890 v4 += 48; | |
891 v3 += 48; | |
892 ++v20; | |
893 v23 += 48; | |
894 v19 = v4; | |
895 v18 = v3; | |
896 } | |
897 LABEL_21: | |
898 if ( v17 ) | |
899 { | |
900 v12 = v21; | |
901 v13 = v23; | |
902 v19 += 48; | |
903 v18 += 48; | |
904 v14 = 1.0 / (*((float *)v6 + 5) + 0.0000001); | |
905 ++v20; | |
906 v25 += 48; | |
907 v24 += 48; | |
908 v22 += 48; | |
909 ++v21; | |
910 v23 += 48; | |
911 memcpy(v12, v6 + 8, 0x30u); | |
912 v4 = v19; | |
913 v3 = v18; | |
914 *(float *)v13 = v14; | |
915 } | |
916 v2 = v17; | |
917 v6 += 48; | |
918 --v16; | |
919 } | |
920 while ( v16 ); | |
921 result = v20; | |
922 if ( v20 < 3 ) | |
923 return 0; | |
924 return result; | |
925 } |