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