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