annotate mm7_1.cpp @ 1299:8c2f689b5f0b

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