Mercurial > mm7
annotate Texture.h @ 1235:7da06d00ad25
Слияние
author | Ritor1 |
---|---|
date | Sun, 09 Jun 2013 21:10:32 +0600 |
parents | 96a81634669e |
children | 0aeac0b9ca30 |
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 | |
128 | |
129 | |
1206
ab6560001f5b
arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents:
1119
diff
changeset
|
130 extern std::array<struct RGBTexture, 45> pSavegameThumbnails; |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
131 extern std::array<Texture *, 2> pTexture_LloydBeacons; |
0 | 132 extern Texture *pTexture_50635C; |
133 extern Texture *pTexture_506368; | |
134 extern Texture *pTexture_50636C; | |
135 extern Texture *pTexture_506370; | |
136 extern Texture *pTexture_506374; | |
137 extern Texture *pTexture_506378; | |
138 extern Texture *pTexture_50637C; | |
139 extern Texture *pTexture_506380; | |
140 extern Texture *pTexture_506384; | |
141 extern Texture *pTexture_506388; | |
142 extern Texture *pTexture_50638C; | |
143 extern Texture *pTexture_506390; | |
144 extern Texture *pTexture_506394; | |
145 extern Texture *pTex_tab_an_7a__zoot_off; | |
146 extern Texture *pTex_tab_an_6a__zoom_off; | |
147 extern Texture *pTex_tab_an_7b__zoot_on; | |
148 extern Texture *pTex_tab_an_6b__zoom_on; | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
149 extern std::array<Texture *, 6> pTexture_TownPortalIcons; // [0]Harmonale, [1]Pierpont, [2]Nighon, [3]Evenmorn Island, [4]Celestia, [5]The Pit |
948 | 150 |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
151 extern std::array<Texture *, 12> dword_5063D8; |
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
152 extern std::array<Texture *, 12> dword_506408; |
0 | 153 extern Texture *pTexture_50643C; // idb |
154 extern Texture *ptr_506440; | |
155 extern Texture *pTexture_506444; | |
156 extern Texture *pTexture_506448; // idb | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
157 extern std::array<std::array<Texture *, 2>, 9> pTextures_tabs; |
0 | 158 extern Texture *pTexture_mapbordr; // idb |
159 extern Texture *pTexture_pagemask; // idb | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
160 extern std::array<Texture *, 9> pSpellBookPagesTextr; |
688 | 161 extern Texture *pSpellBookPagesTextr_9; |
162 extern Texture *pSpellBookPagesTextr_10; | |
163 extern Texture *pSpellBookPagesTextr_11; | |
164 extern Texture *pSpellBookPagesTextr_12; | |
165 extern Texture *pSpellBookPagesTextr_13; | |
0 | 166 extern Texture *pTexture_AutonotesBook; |
167 extern Texture *pTexture_CurrentBook; | |
168 extern Texture *pTex_moon_new; | |
169 extern Texture *pTex_moon_4; | |
170 extern Texture *pTex_moon_2; | |
171 extern Texture *pTex_moon_2_2; | |
172 extern 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; | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
214 extern std::array<Texture *, 22> pPlayerPortraits; |
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
215 extern std::array<Texture *, 9> pTexture_IC_KNIGHT; |
0 | 216 extern Texture *pTexture_MAKESKY; |
217 extern Texture *pTexture_MAKETOP; | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
218 extern std::array<Texture *, 20> pTextures_arrowr; |
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
219 extern std::array<Texture *, 20> pTextures_arrowl; |
0 | 220 extern Texture *pTexture_presleft; |
221 extern Texture *pTexture_pressrigh; | |
222 extern Texture *pTexture_buttminu; | |
223 extern Texture *pTexture_buttplus; | |
362 | 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; | |
0 | 231 |
232 | |
233 extern unsigned int uTextureID_ib_td5_A; | |
234 extern unsigned int uTextureID_ib_td2_A; // weak | |
235 extern unsigned int uTextureID_ib_td1_A; | |
984 | 236 extern int uTextureID_CharacterUI_InventoryBackground; // weak |
0 | 237 extern int uTextureID_50795C; // weak |
238 | |
239 | |
319 | 240 extern unsigned int uTextureID_Btn_GameSettings; |
0 | 241 |
242 | |
319 | 243 extern unsigned int uTextureID_Btn_Rest; |
244 extern unsigned int uTextureID_Btn_CastSpell; | |
245 extern unsigned int uTextureID_Btn_ZoomIn; | |
246 extern unsigned int uTextureID_Btn_ZoomOut; | |
0 | 247 extern unsigned int uTextureID_FONTPAL; |
319 | 248 extern unsigned int uTextureID_Btn_NPCRight; |
249 extern unsigned int uTextureID_Btn_NPCLeft; | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
250 extern std::array<unsigned int, 8> pTextureIDs_pMapDirs; |
0 | 251 |
252 | |
253 extern unsigned int uTextureID_BarRed; | |
254 extern unsigned int uTextureID_BarYellow; | |
255 extern unsigned int uTextureID_BarGreen; | |
256 extern unsigned int uTextureID_BarBlue; | |
257 | |
258 | |
259 extern unsigned int uTextureID_right_panel; // weak | |
260 | |
261 | |
262 extern RGBTexture *pTexture_StatusBar; | |
263 extern RGBTexture *pTexture_LeftFrame; | |
264 extern RGBTexture *pTexture_TopFrame; | |
265 extern RGBTexture *pTexture_BottomFrame; | |
266 extern RGBTexture *pTexture_RightFrame; | |
267 | |
268 | |
910 | 269 extern unsigned int uTextureID_right_panel_loop; // weak |
0 | 270 |
271 | |
272 extern Texture *pTexture_Leather; | |
273 extern Texture *pTexture_RestUI_CurrentSkyFrame; // idb | |
274 extern Texture *pTexture_RestUI_CurrentHourglassFrame; // idb | |
275 | |
276 | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
277 extern std::array<unsigned int, 5> uTextureID_Optkb; |
0 | 278 |
279 extern unsigned int uTextureID_507C10; // weak | |
280 extern unsigned int uTextureID_507C14; // weak | |
281 extern unsigned int uTextureID_507C18; // weak | |
282 extern unsigned int uTextureID_507C1C; // weak | |
283 extern unsigned int uTextureID_507C20; // weak | |
284 extern unsigned int uTextureID_507C24; // weak | |
1207
96a81634669e
arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents:
1206
diff
changeset
|
285 extern std::array<unsigned int, 10> pTextureIDs_GammaPositions; |
0 | 286 extern unsigned int uTextureID_507C50; // weak |
287 extern unsigned int uTextureID_507C54; // weak | |
288 extern unsigned int uTextureID_507C58; // weak | |
948 | 289 |
290 | |
291 struct OptionsMenuSkin | |
292 { | |
293 OptionsMenuSkin(); | |
294 void Relaease(); | |
295 | |
296 unsigned int uTextureID_Background; // 507C60 | |
297 unsigned int uTextureID_TurnSpeed[3]; // 507C64 | |
298 unsigned int uTextureID_ArrowLeft; // 507C70 | |
299 unsigned int uTextureID_ArrowRight; // 507C74 | |
300 unsigned int uTextureID_unused_0; // 507C78 | |
301 unsigned int uTextureID_unused_1; // 507C7C | |
302 unsigned int uTextureID_unused_2; // 507C80 | |
303 unsigned int uTextureID_FlipOnExit; // 507C84 | |
304 unsigned int uTextureID_SoundLevels[10]; // 507C88 | |
305 unsigned int uTextureID_AlwaysRun; // 507CB0 | |
306 unsigned int uTextureID_WalkSound; // 507CB4 | |
307 unsigned int uTextureID_ShowDamage; // 507CB8 | |
308 }; | |
309 extern OptionsMenuSkin options_menu_skin; // 507C60 | |
0 | 310 |
311 | |
910 | 312 extern unsigned int uTextureID_detaliz_close_button; // weak |
0 | 313 extern unsigned int uTextureID_MAGNIF_B; // weak |
314 extern unsigned int uTextureID_BACKDOLL; // weak | |
315 extern unsigned int uTextureID_BACKHAND; // weak | |
316 | |
317 | |
318 extern Texture pTex_F7CE30; | |
319 | |
320 | |
321 extern RGBTexture stru_5773C4; // idb | |
322 | |
323 | |
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(); | |
350 bool _450DF1(const stru355 *p1, const stru355 *p2); | |
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 | |
357 stru355 field_0; | |
358 stru355 field_20; | |
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) |