2496
|
1 #pragma once
|
|
2 #include <stdio.h>
|
2518
|
3 #include <array>
|
2496
|
4
|
|
5
|
|
6
|
|
7 /* 194 */
|
|
8 #pragma pack(push, 1)
|
|
9 struct RGBTexture
|
|
10 {
|
|
11 RGBTexture();
|
|
12 void Release();
|
|
13 int LoadPCXFile(const char *Filename, unsigned int a3);
|
|
14 unsigned int LoadFromFILE(FILE *pFile, unsigned int mode, unsigned int bCloseFile);
|
|
15 int DecodePCX(char *pPcx, unsigned __int16 *pOutPixels, unsigned int uNumPixels);
|
|
16 int Load(const char *pContainer, int mode);
|
|
17 int Reload(const char *pContainer);
|
|
18
|
|
19 char pName[16];
|
|
20 unsigned int uNumPixels;
|
|
21 unsigned __int16 uWidth;
|
|
22 unsigned __int16 uHeight;
|
|
23 __int16 field_18;
|
|
24 __int16 field_1A;
|
|
25 __int16 field_1C;
|
|
26 __int16 field_1E;
|
|
27 int _allocation_flags; // & 1 - malloc, else custom allocator
|
|
28 unsigned __int16 *pPixels;
|
2518
|
29
|
|
30 struct ID3D11ShaderResourceView *d3d11_srv;
|
|
31 struct D3D11_TEXTURE2D_DESC *d3d11_desc;
|
2496
|
32 };
|
|
33 #pragma pack(pop)
|
|
34
|
|
35
|
|
36
|
|
37 #pragma pack(push, 1)
|
|
38 struct Texture
|
|
39 {
|
|
40 Texture();
|
|
41 void Release();
|
|
42 void *UnzipPalette();
|
|
43
|
|
44 char pName[16];
|
|
45 unsigned int uSizeOfMaxLevelOfDetail;
|
|
46 unsigned int uTextureSize;
|
|
47 unsigned __int16 uTextureWidth;
|
|
48 unsigned __int16 uTextureHeight;
|
|
49 __int16 uWidthLn2;
|
|
50 __int16 uHeightLn2;
|
|
51 __int16 uWidthMinus1;
|
|
52 __int16 uHeightMinus1;
|
|
53 short palette_id1;
|
|
54 short palette_id2;
|
|
55 unsigned int uDecompressedSize;
|
|
56 int pBits;
|
|
57 unsigned __int8 *pLevelOfDetail0_prolly_alpha_mask;
|
|
58 unsigned __int8 *pLevelOfDetail1;
|
2524
|
59 /*unsigned __int8 *pLevelOfDetail2;*/ struct ID3D11ShaderResourceView *d3d11_srv; // replace ol SW stuff with new fields to keep data integrity
|
|
60 /*unsigned __int8 *pLevelOfDetail3;*/ struct D3D11_TEXTURE2D_DESC *d3d11_desc;
|
2496
|
61 unsigned __int16 *pPalette16;
|
|
62 unsigned __int8 *pPalette24;
|
|
63 };
|
|
64 #pragma pack(pop)
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82 /* 323 */
|
|
83 enum TEXTURE_FRAME_TABLE_FLAGS
|
|
84 {
|
|
85 TEXTURE_FRAME_TABLE_MORE_FRAMES = 0x1,
|
|
86 TEXTURE_FRAME_TABLE_FIRST = 0x2,
|
|
87 };
|
|
88
|
|
89
|
|
90
|
|
91 /* 41 */
|
|
92 #pragma pack(push, 1)
|
|
93 struct TextureFrame
|
|
94 {
|
|
95 char pTextureName[12];
|
|
96 __int16 uTextureID;
|
|
97 __int16 uAnimTime;
|
|
98 __int16 uAnimLength;
|
|
99 __int16 uFlags;
|
|
100 };
|
|
101 #pragma pack(pop)
|
|
102
|
|
103 /* 40 */
|
|
104 #pragma pack(push, 1)
|
|
105 struct TextureFrameTable
|
|
106 {
|
|
107 //----- (0044D4C9) --------------------------------------------------------
|
|
108 inline TextureFrameTable()
|
|
109 {
|
|
110 pTextures = 0;
|
|
111 sNumTextures = 0;
|
|
112 }
|
|
113 int FromFileTxt(const char *Args);
|
|
114 void ToFile();
|
|
115 void FromFile(void *data_mm6, void *data_mm7, void *data_mm8);
|
|
116 void LoadAnimationSequenceAndPalettes(signed int uIconID);
|
|
117 int GetFrameTexture(int uFrameID, int time);
|
|
118 signed int FindTextureByName(const char *Str2);
|
|
119
|
|
120
|
|
121 signed int sNumTextures;
|
|
122 struct TextureFrame *pTextures;
|
|
123 };
|
|
124 #pragma pack(pop)
|
|
125
|
|
126 extern struct TextureFrameTable *pTextureFrameTable;
|
|
127
|
|
128
|
|
129
|
|
130 extern std::array<struct RGBTexture, 45> pSavegameThumbnails;
|
|
131 extern std::array<struct Texture *, 2> pTexture_LloydBeacons;
|
|
132 extern struct Texture *pTexture_50635C;
|
|
133 extern struct Texture *pTex_book_button8_off;
|
|
134 extern struct Texture *pTex_book_button8_on;
|
|
135 extern struct Texture *pTex_book_button7_off;
|
|
136 extern struct Texture *pTex_book_button7_on;
|
|
137 extern struct Texture *pTex_book_button6_off;
|
|
138 extern struct Texture *pTex_book_button6_on;
|
|
139 extern struct Texture *pTex_book_button5_off;
|
|
140 extern struct Texture *pTex_book_button5_on;
|
|
141 extern struct Texture *pTex_book_button4_off;
|
|
142 extern struct Texture *pTex_book_button4_on;
|
|
143 extern struct Texture *pTex_book_button3_off;
|
|
144 extern struct Texture *pTex_book_button3_on;
|
|
145 extern struct Texture *pTex_book_button2_off;
|
|
146 extern struct Texture *pTex_book_button1_off;
|
|
147 extern struct Texture *pTex_book_button2_on;
|
|
148 extern struct Texture *pTex_book_button1_on;
|
|
149 extern std::array<struct Texture *, 6> pTexture_TownPortalIcons; // [0]Harmonale, [1]Pierpont, [2]Nighon, [3]Evenmorn Island, [4]Celestia, [5]The Pit
|
|
150
|
|
151 extern std::array<struct Texture *, 12> SBPageCSpellsTextureList;
|
|
152 extern std::array<struct Texture *, 12> SBPageSSpellsTextureList;
|
|
153 extern struct Texture *pSBQuickSpellBtnTextr;
|
|
154 extern struct Texture *pSpellBookClickCloseBtnTextr;
|
|
155 extern struct Texture *pSBClickQuickSpellBtnTextr;
|
|
156 extern struct Texture *pSpellBookCloseBtnTextr;
|
|
157 extern std::array<std::array<struct Texture *, 2>, 9> pTextures_tabs;
|
|
158 extern struct Texture *pTexture_mapbordr; // idb
|
|
159 extern struct Texture *pTexture_pagemask; // idb
|
|
160 extern std::array<struct Texture *, 9> pSpellBookPagesTextr;
|
|
161 extern struct Texture *pSpellBookPagesTextr_9;
|
|
162 extern struct Texture *pSpellBookPagesTextr_10;
|
|
163 extern struct Texture *pSpellBookPagesTextr_11;
|
|
164 extern struct Texture *pSpellBookPagesTextr_12;
|
|
165 extern struct Texture *pSpellBookPagesTextr_13;
|
|
166 extern struct Texture *pTexture_AutonotesBook;
|
|
167 extern struct Texture *pTexture_CurrentBook;
|
|
168 extern struct Texture *pTex_moon_new;
|
|
169 extern struct Texture *pTex_moon_4;
|
|
170 extern struct Texture *pTex_moon_2;
|
|
171 extern struct Texture *pTex_moon_2_2;
|
|
172 extern struct Texture *pTex_moon_ful;
|
|
173
|
|
174
|
|
175
|
|
176 extern RGBTexture stru_506E40; // weak
|
|
177 extern RGBTexture pTexture_PCX;
|
|
178
|
|
179
|
|
180 extern int uTextureID_RestUI_restb4; // weak
|
|
181 extern int uTextureID_RestUI_restexit; // weak
|
|
182 extern int uTextureID_RestUI_restb3; // weak
|
|
183 extern int uTextureID_RestUI_restb1; // weak
|
|
184 extern int uTextureID_RestUI_restb2; // weak
|
|
185 extern int uTextureID_RestUI_restmain; // weak
|
|
186 extern unsigned int uTextureID_Leather;
|
|
187 extern int uTextureID_ar_dn_dn; // weak
|
|
188 extern int uTextureID_ar_dn_up; // weak
|
|
189 extern int uTextureID_ar_up_dn; // weak
|
|
190 extern int uTextureID_ar_up_up; // weak
|
|
191
|
|
192
|
|
193 extern int uTextureID_507698; // weak
|
|
194 extern int uTextureID_50769C; // weak
|
|
195 extern int uTextureID_5076A0; // weak
|
|
196 extern int uTextureID_5076A4; // weak
|
|
197 extern int uTextureID_5076A8; // weak
|
|
198 extern int uTextureID_5076AC; // weak
|
|
199 extern int uTextureID_5076B0; // weak
|
|
200 extern int uTextureID_5076B4; // weak
|
|
201 extern int uTextureID_Parchment; // weak
|
|
202 extern unsigned int uTextureID_mhp_yel;
|
|
203 extern unsigned int uTextureID_mhp_red;
|
|
204 extern unsigned int uTextureID_mhp_grn;
|
|
205 extern unsigned int uTextureID_mhp_capr;
|
|
206 extern unsigned int uTextureID_mhp_capl;
|
|
207 extern unsigned int uTextureID_mhp_bd;
|
|
208 extern unsigned int uTextureID_BUTTDESC2;
|
|
209 extern unsigned int uTextureID_x_x_u;
|
|
210 extern unsigned int uTextureID_BUTTMAKE2;
|
|
211 extern unsigned int uTextureID_BUTTMAKE;
|
|
212 extern unsigned int uTextureID_BUTTYES2;
|
|
213 extern unsigned int uTextureID_x_ok_u;
|
|
214 extern std::array<struct Texture *, 22> pPlayerPortraits;
|
|
215 extern std::array<struct Texture *, 9> pTexture_IC_KNIGHT;
|
|
216 extern struct Texture *pTexture_MAKESKY;
|
|
217 extern struct Texture *pTexture_MAKETOP;
|
|
218 extern std::array<struct Texture *, 20> pTextures_arrowr;
|
|
219 extern std::array<struct Texture *, 20> pTextures_arrowl;
|
|
220 extern struct Texture *pTexture_presleft;
|
|
221 extern struct Texture *pTexture_pressrigh;
|
|
222 extern struct Texture *pTexture_buttminu;
|
|
223 extern struct Texture *pTexture_buttplus;
|
|
224 extern unsigned int uTextureID_Quit1;
|
|
225 extern unsigned int uTextureID_Resume1;
|
|
226 extern unsigned int uTextureID_Controls1;
|
|
227 extern unsigned int uTextureID_Save1;
|
|
228 extern unsigned int uTextureID_Load1;
|
|
229 extern unsigned int uTextureID_New1;
|
|
230 extern unsigned int uTextureID_Options;
|
|
231
|
|
232
|
|
233 extern unsigned int uTextureID_ib_td5_A;
|
|
234 extern unsigned int uTextureID_ib_td4_A;
|
|
235 extern unsigned int uTextureID_ib_td3_A;
|
|
236 extern unsigned int uTextureID_ib_td2_A;
|
|
237 extern unsigned int uTextureID_ib_td1_A;
|
|
238 extern int uTextureID_CharacterUI_InventoryBackground; // weak
|
|
239 extern int uTextureID_50795C; // weak
|
|
240
|
|
241
|
|
242 extern unsigned int uTextureID_Btn_GameSettings;
|
|
243
|
|
244
|
|
245 extern unsigned int uTextureID_Btn_Rest;
|
|
246 extern unsigned int uTextureID_Btn_CastSpell;
|
|
247 extern unsigned int uTextureID_Btn_ZoomIn;
|
|
248 extern unsigned int uTextureID_Btn_ZoomOut;
|
|
249 extern unsigned int uTextureID_FONTPAL;
|
|
250 extern unsigned int uTextureID_Btn_NPCRight;
|
|
251 extern unsigned int uTextureID_Btn_NPCLeft;
|
|
252 extern std::array<unsigned int, 8> pTextureIDs_pMapDirs;
|
|
253
|
|
254
|
|
255 extern unsigned int uTextureID_BarRed;
|
|
256 extern unsigned int uTextureID_BarYellow;
|
|
257 extern unsigned int uTextureID_BarGreen;
|
|
258 extern unsigned int uTextureID_BarBlue;
|
|
259
|
|
260
|
|
261 extern unsigned int uTextureID_right_panel; // weak
|
|
262
|
|
263
|
|
264 extern RGBTexture *pTexture_StatusBar;
|
|
265 extern RGBTexture *pTexture_LeftFrame;
|
|
266 extern RGBTexture *pTexture_TopFrame;
|
|
267 extern RGBTexture *pTexture_BottomFrame;
|
|
268 extern RGBTexture *pTexture_RightFrame;
|
|
269
|
|
270
|
|
271 extern unsigned int uTextureID_right_panel_loop; // weak
|
|
272
|
|
273
|
|
274 extern struct Texture *pTexture_Leather;
|
|
275 extern struct Texture *pTexture_RestUI_CurrentSkyFrame; // idb
|
|
276 extern struct Texture *pTexture_RestUI_CurrentHourglassFrame; // idb
|
|
277
|
|
278
|
|
279 extern std::array<unsigned int, 5> uTextureID_Optkb;
|
|
280
|
|
281 extern unsigned int optvid_base_texture_id;
|
|
282 extern unsigned int bloodsplats_texture_id;
|
|
283 extern unsigned int us_colored_lights_texture_id;
|
|
284 extern unsigned int tinting_texture_id;
|
|
285 extern unsigned int uTextureID_507C20; // weak
|
|
286 extern unsigned int uTextureID_507C24; // weak
|
|
287 extern std::array<unsigned int, 10> pTextureIDs_GammaPositions;
|
|
288 extern unsigned int not_available_bloodsplats_texture_id;
|
|
289 extern unsigned int not_available_us_colored_lights_texture_id;
|
|
290 extern unsigned int not_available_tinting_texture_id;
|
|
291
|
|
292
|
|
293 struct OptionsMenuSkin
|
|
294 {
|
|
295 OptionsMenuSkin();
|
|
296 void Relaease();
|
|
297
|
|
298 unsigned int uTextureID_Background; // 507C60
|
|
299 unsigned int uTextureID_TurnSpeed[3]; // 507C64
|
|
300 unsigned int uTextureID_ArrowLeft; // 507C70
|
|
301 unsigned int uTextureID_ArrowRight; // 507C74
|
|
302 unsigned int uTextureID_unused_0; // 507C78
|
|
303 unsigned int uTextureID_unused_1; // 507C7C
|
|
304 unsigned int uTextureID_unused_2; // 507C80
|
|
305 unsigned int uTextureID_FlipOnExit; // 507C84
|
|
306 unsigned int uTextureID_SoundLevels[10]; // 507C88
|
|
307 unsigned int uTextureID_AlwaysRun; // 507CB0
|
|
308 unsigned int uTextureID_WalkSound; // 507CB4
|
|
309 unsigned int uTextureID_ShowDamage; // 507CB8
|
|
310 };
|
|
311 extern OptionsMenuSkin options_menu_skin; // 507C60
|
|
312
|
|
313
|
|
314 extern unsigned int uTextureID_detaliz_close_button; // weak
|
|
315 extern unsigned int uTextureID_MAGNIF_B; // weak
|
|
316 extern unsigned int uTextureID_BACKDOLL; // weak
|
|
317 extern unsigned int uTextureID_BACKHAND; // weak
|
|
318
|
|
319
|
|
320 extern struct Texture pTex_F7CE30;
|
|
321
|
|
322
|
|
323 extern RGBTexture stru_5773C4; // idb
|
|
324
|
|
325 extern struct stru355 stru_4E82A4;// = {0x20, 0x41, 0, 0x20, 0xFF0000, 0xFF00, 0xFF, 0xFF000000}; moved to texture.h
|
|
326 extern struct stru355 stru_4EFCBC;// = {0x20, 0x41, 0, 0x10, 0x7C00, 0x3E0, 0x1F, 0x8000}; moved to texture.h
|
|
327
|
|
328
|
|
329
|
|
330
|
|
331
|
|
332
|
|
333
|
|
334
|
|
335
|
|
336 struct stru355
|
|
337 {
|
|
338 int field_0;
|
|
339 int field_4;
|
|
340 int field_8;
|
|
341 int field_C;
|
|
342 int field_10;
|
|
343 int field_14;
|
|
344 int field_18;
|
|
345 int field_1C;
|
|
346 };
|
|
347
|
|
348 /* 390 */
|
|
349 #pragma pack(push, 1)
|
|
350 struct stru350
|
|
351 {
|
|
352 stru350 *_450DDE();
|
|
353 bool _450DF1(const struct stru355 *p1, const struct stru355 *p2);
|
|
354 unsigned int _450F55(int a2);
|
|
355 int _450FB1(int a2);
|
|
356 int sub_451007_scale_image_bicubic(unsigned short *pSrc, int srcWidth, int srcHeight, int srcPitch,
|
|
357 unsigned short *pDst, int dstWidth, int dstHeight, int dstPitch,
|
|
358 int a9, int a10);
|
|
359
|
|
360 struct stru355 field_0;
|
|
361 struct stru355 field_20;
|
|
362 int field_40;
|
|
363 int field_44;
|
|
364 int field_48;
|
|
365 int field_4C;
|
|
366 int field_50;
|
|
367 int field_54;
|
|
368 int field_58;
|
|
369 int field_5C;
|
|
370 };
|
|
371 #pragma pack(pop)
|
|
372
|