annotate LOD.h @ 2192:c13ae8d8471f

PLAYER_SKILL_BLASTER
author Ritor1
date Thu, 30 Jan 2014 20:13:23 +0600
parents 47ac9e87690c
children d6887ee81068
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include <stdio.h>
Ritor1
parents:
diff changeset
3 #include <memory.h>
Ritor1
parents:
diff changeset
4
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
5 #include "Log.h"
0
Ritor1
parents:
diff changeset
6 #include "Texture.h"
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1541
diff changeset
7 #include "ErrorHandling.h"
0
Ritor1
parents:
diff changeset
8
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1006
diff changeset
9 class Sprite;
0
Ritor1
parents:
diff changeset
10
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
11
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
12 #define MAX_LOD_TEXTURES 1000
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
13 #define MAX_LOD_SPRITES 1500
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
14
0
Ritor1
parents:
diff changeset
15 /* 354 */
Ritor1
parents:
diff changeset
16 enum TEXTURE_TYPE
Ritor1
parents:
diff changeset
17 {
Ritor1
parents:
diff changeset
18 TEXTURE_DEFAULT = 0,
Ritor1
parents:
diff changeset
19 TEXTURE_24BIT_PALETTE = 0x1,
Ritor1
parents:
diff changeset
20 TEXTURE_16BIT_PALETTE = 0x2,
Ritor1
parents:
diff changeset
21 };
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23 namespace LOD
Ritor1
parents:
diff changeset
24 {
Ritor1
parents:
diff changeset
25 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
26 struct FileHeader
Ritor1
parents:
diff changeset
27 {
982
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
28 //----- (004617B6) --------------------------------------------------------
0
Ritor1
parents:
diff changeset
29 inline FileHeader()
Ritor1
parents:
diff changeset
30 {
Ritor1
parents:
diff changeset
31 memset(pSignature, 0, 4);
Ritor1
parents:
diff changeset
32 memset(LodVersion, 0, 80);
Ritor1
parents:
diff changeset
33 memset(LodDescription, 0, 80);
Ritor1
parents:
diff changeset
34 memset(array_0000B0, 0, 28);
Ritor1
parents:
diff changeset
35 memset(array_0000CC, 0, 52);
982
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
36
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
37 pSignature[0] = 0;
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
38 LodVersion[0] = 0;
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
39 LodDescription[0] = 0;
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
40 LODSize = 0;
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
41 dword_0000A8 = 0;
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
42 uNumIndices = 0;
0
Ritor1
parents:
diff changeset
43 }
Ritor1
parents:
diff changeset
44
Ritor1
parents:
diff changeset
45 char pSignature[4];
Ritor1
parents:
diff changeset
46 char LodVersion[80];
Ritor1
parents:
diff changeset
47 //char field_C[32];
Ritor1
parents:
diff changeset
48 //char field_2C[40];
Ritor1
parents:
diff changeset
49 char LodDescription[80];
Ritor1
parents:
diff changeset
50 int LODSize;
Ritor1
parents:
diff changeset
51 int dword_0000A8;
Ritor1
parents:
diff changeset
52 unsigned int uNumIndices;
Ritor1
parents:
diff changeset
53 char array_0000B0[28];
Ritor1
parents:
diff changeset
54 char array_0000CC[52];
Ritor1
parents:
diff changeset
55 };
Ritor1
parents:
diff changeset
56 #pragma pack(pop)
Ritor1
parents:
diff changeset
57
Ritor1
parents:
diff changeset
58
Ritor1
parents:
diff changeset
59 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
60 struct Directory
Ritor1
parents:
diff changeset
61 {
Ritor1
parents:
diff changeset
62 Directory();
Ritor1
parents:
diff changeset
63
982
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
64 char pFilename[15];
08fd1436ef35 enums & lod
Nomad
parents: 945
diff changeset
65 char field_F;
0
Ritor1
parents:
diff changeset
66 unsigned int uOfsetFromSubindicesStart;
Ritor1
parents:
diff changeset
67 unsigned int uDataSize;
Ritor1
parents:
diff changeset
68 int dword_000018;
Ritor1
parents:
diff changeset
69 unsigned __int16 uNumSubIndices;
Ritor1
parents:
diff changeset
70 __int16 word_00001E;
Ritor1
parents:
diff changeset
71 };
Ritor1
parents:
diff changeset
72 #pragma pack(pop)
Ritor1
parents:
diff changeset
73
Ritor1
parents:
diff changeset
74
Ritor1
parents:
diff changeset
75 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
76 struct File
Ritor1
parents:
diff changeset
77 {
Ritor1
parents:
diff changeset
78 File();
Ritor1
parents:
diff changeset
79 virtual ~File();
Ritor1
parents:
diff changeset
80 void *LoadRaw(const char *pContainer, int a3);
Ritor1
parents:
diff changeset
81 FILE *FindContainer(const char *pContainerName, bool bLinearSearch);
Ritor1
parents:
diff changeset
82 bool DoesContainerExist(const char *pContainer);
Ritor1
parents:
diff changeset
83 int CalcIndexFast(int startIndex, int maxIndex, const char *pContainerName);
Ritor1
parents:
diff changeset
84 bool LoadHeader(const char *pFilename, bool bWriting);
Ritor1
parents:
diff changeset
85 int LoadSubIndices(const char *pContainer);
Ritor1
parents:
diff changeset
86 void AllocSubIndicesAndIO(unsigned int uNumSubIndices, unsigned int uBufferSize);
Ritor1
parents:
diff changeset
87 void FreeSubIndexAndIO();
Ritor1
parents:
diff changeset
88 bool AppendDirectory(LOD::Directory *pDir, const void *pData);
Ritor1
parents:
diff changeset
89 void ResetSubIndices();
Ritor1
parents:
diff changeset
90 void Close();
Ritor1
parents:
diff changeset
91
Ritor1
parents:
diff changeset
92 FILE *pFile;
Ritor1
parents:
diff changeset
93 char pLODName[256];
2165
47ac9e87690c isFileOpened
Ritor1
parents: 2154
diff changeset
94 bool isFileOpened;
0
Ritor1
parents:
diff changeset
95 unsigned __int8 *pIOBuffer;
Ritor1
parents:
diff changeset
96 unsigned int uIOBufferSize;
Ritor1
parents:
diff changeset
97 struct FileHeader header;
Ritor1
parents:
diff changeset
98 struct Directory *pRoot;
Ritor1
parents:
diff changeset
99 char pContainerName[16];
Ritor1
parents:
diff changeset
100 unsigned int uCurrentIndexDir;
Ritor1
parents:
diff changeset
101 unsigned int uLODDataSize;
837
bebc19f3d2af Save/load work with some problems
Gloval
parents: 810
diff changeset
102 unsigned int uNumSubDirs;
0
Ritor1
parents:
diff changeset
103 struct Directory *pSubIndices;
Ritor1
parents:
diff changeset
104 unsigned int uOffsetToSubIndex;
Ritor1
parents:
diff changeset
105 FILE *pOutputFileHandle;
Ritor1
parents:
diff changeset
106 };
Ritor1
parents:
diff changeset
107 #pragma pack(pop)
Ritor1
parents:
diff changeset
108 };
Ritor1
parents:
diff changeset
109
Ritor1
parents:
diff changeset
110
Ritor1
parents:
diff changeset
111
Ritor1
parents:
diff changeset
112
Ritor1
parents:
diff changeset
113
Ritor1
parents:
diff changeset
114
Ritor1
parents:
diff changeset
115 /* 6 */
Ritor1
parents:
diff changeset
116 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
117 struct LODWriteableFile: public LOD::File
Ritor1
parents:
diff changeset
118 {
Ritor1
parents:
diff changeset
119 bool LoadFile(const char *pFilename, bool bWriting);
Ritor1
parents:
diff changeset
120 unsigned int Write(const LOD::Directory *pDir, const void *pDirData, int a4);
Ritor1
parents:
diff changeset
121 void CloseWriteFile();
Ritor1
parents:
diff changeset
122 int CreateTempFile();
837
bebc19f3d2af Save/load work with some problems
Gloval
parents: 810
diff changeset
123 int FixDirectoryOffsets();
0
Ritor1
parents:
diff changeset
124 bool _4621A7();
837
bebc19f3d2af Save/load work with some problems
Gloval
parents: 810
diff changeset
125 int CreateNewLod(LOD::FileHeader *pHeader, LOD::Directory *pDir, const char *Source);
0
Ritor1
parents:
diff changeset
126
Ritor1
parents:
diff changeset
127 /*FILE *pFile;
Ritor1
parents:
diff changeset
128 char pLODName[256];
Ritor1
parents:
diff changeset
129 unsigned int isFileOpened;
Ritor1
parents:
diff changeset
130 unsigned __int8 *pIOBuffer;
Ritor1
parents:
diff changeset
131 unsigned int uIOBufferSize;
Ritor1
parents:
diff changeset
132 struct LOD::FileHeader header;
Ritor1
parents:
diff changeset
133 struct LOD::Directory *pRoot;
Ritor1
parents:
diff changeset
134 unsigned __int8 pContainerName[16];
Ritor1
parents:
diff changeset
135 unsigned int uCurrentIndexDir;
Ritor1
parents:
diff changeset
136 unsigned int uLODDataSize;
Ritor1
parents:
diff changeset
137 unsigned int uNumSubIndices;
Ritor1
parents:
diff changeset
138 struct LOD::Directory *pSubIndices;
Ritor1
parents:
diff changeset
139 unsigned int uOffsetToSubIndex;
Ritor1
parents:
diff changeset
140 FILE *pOutputFileHandle;*/
Ritor1
parents:
diff changeset
141 };
Ritor1
parents:
diff changeset
142 #pragma pack(pop)
Ritor1
parents:
diff changeset
143
Ritor1
parents:
diff changeset
144
Ritor1
parents:
diff changeset
145
Ritor1
parents:
diff changeset
146
Ritor1
parents:
diff changeset
147 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
148 struct LODFile_IconsBitmaps: public LOD::File
Ritor1
parents:
diff changeset
149 {
Ritor1
parents:
diff changeset
150 LODFile_IconsBitmaps();
Ritor1
parents:
diff changeset
151 virtual ~LODFile_IconsBitmaps();
1006
e865f349aa41 ui cleanup
Gloval
parents: 982
diff changeset
152 void SyncLoadedFilesCount();
0
Ritor1
parents:
diff changeset
153 unsigned int FindTextureByName(const char *pName);
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
154 bool Load(const char *pFilename, const char *pFolderName);
0
Ritor1
parents:
diff changeset
155 void ReleaseAll();
Ritor1
parents:
diff changeset
156 unsigned int LoadTexture(const char *pContainer, enum TEXTURE_TYPE uTextureType = TEXTURE_DEFAULT);
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1103
diff changeset
157 struct Texture *LoadTexturePtr(const char *pContainer, enum TEXTURE_TYPE uTextureType = TEXTURE_DEFAULT);
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1103
diff changeset
158 int LoadTextureFromLOD(struct Texture *pOutTex, const char *pContainer, enum TEXTURE_TYPE eTextureType);
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1103
diff changeset
159 int ReloadTexture(struct Texture *pDst, const char *pContainer, int mode);
0
Ritor1
parents:
diff changeset
160 void ReleaseHardwareTextures();
Ritor1
parents:
diff changeset
161 void ReleaseLostHardwareTextures();
Ritor1
parents:
diff changeset
162 void _410423_move_textures_to_device();
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1103
diff changeset
163 int _410522(struct Texture *pDst, const char *pContainer, unsigned int uTextureType);
0
Ritor1
parents:
diff changeset
164 void SetupPalettes(unsigned int uTargetRBits, unsigned int uTargetGBits, unsigned int uTargetBBits);
Ritor1
parents:
diff changeset
165 void ReleaseAll2();
1405
c0b273d33338 RemoveTexturesPackFromTextureList and RemoveTexturesFromTextureList
Ritor1
parents: 1404
diff changeset
166 void RemoveTexturesPackFromTextureList();
c0b273d33338 RemoveTexturesPackFromTextureList and RemoveTexturesFromTextureList
Ritor1
parents: 1404
diff changeset
167 void RemoveTexturesFromTextureList();
762
cf2fbac6edc9 Misc cleaning
Nomad
parents: 733
diff changeset
168 void _inlined_sub0();
cf2fbac6edc9 Misc cleaning
Nomad
parents: 733
diff changeset
169 void _inlined_sub1();
cf2fbac6edc9 Misc cleaning
Nomad
parents: 733
diff changeset
170 void _inlined_sub2();
0
Ritor1
parents:
diff changeset
171
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
172 inline int LoadDummyTexture()
434
137c59c3dbc4 Temple of Moon and Dragon Lair can now be entered.
Nomad
parents: 33
diff changeset
173 {
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
174 for (unsigned int i = 0; i < uNumLoadedFiles; ++i)
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
175 if (!strcmp(pTextures[i].pName, "pending"))
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
176 return i;
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
177 return LoadTextureFromLOD(&pTextures[uNumLoadedFiles], "pending", TEXTURE_16BIT_PALETTE);
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
178 }
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
179
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
180 inline Texture *GetTexture(int idx)
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
181 {
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
182 Assert(idx < MAX_LOD_TEXTURES, "Texture index out of bounds (%u)", idx);
1464
Ritor1
parents: 1405
diff changeset
183 if (idx == -1)
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
184 {
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
185 //Log::Warning(L"Texture id = %d missing", idx);
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
186 return pTextures + LoadDummyTexture();
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
187 }
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
188 return pTextures + idx;
434
137c59c3dbc4 Temple of Moon and Dragon Lair can now be entered.
Nomad
parents: 33
diff changeset
189 }
137c59c3dbc4 Temple of Moon and Dragon Lair can now be entered.
Nomad
parents: 33
diff changeset
190
0
Ritor1
parents:
diff changeset
191
Ritor1
parents:
diff changeset
192 /*FILE *pFile;
Ritor1
parents:
diff changeset
193 unsigned __int8 pLODName[256];
Ritor1
parents:
diff changeset
194 unsigned int isFileOpened;
Ritor1
parents:
diff changeset
195 unsigned __int8 *pIOBuffer;
Ritor1
parents:
diff changeset
196 unsigned int uIOBufferSize;
Ritor1
parents:
diff changeset
197 struct LOD::FileHeader header;
Ritor1
parents:
diff changeset
198 struct LOD::Directory *pRoot;
Ritor1
parents:
diff changeset
199 unsigned __int8 pContainerName[16];
Ritor1
parents:
diff changeset
200 unsigned int uCurrentIndexDir;
Ritor1
parents:
diff changeset
201 unsigned int uLODDataSize;
Ritor1
parents:
diff changeset
202 unsigned int uNumSubIndices;
Ritor1
parents:
diff changeset
203 struct LOD::Directory *pSubIndices;
Ritor1
parents:
diff changeset
204 unsigned int uOffsetToSubIndex;
Ritor1
parents:
diff changeset
205 FILE *pOutputFileHandle;*/
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
206 Texture pTextures[MAX_LOD_TEXTURES];
0
Ritor1
parents:
diff changeset
207 unsigned int uNumLoadedFiles;
Ritor1
parents:
diff changeset
208 int dword_11B80;
Ritor1
parents:
diff changeset
209 int dword_11B84;
Ritor1
parents:
diff changeset
210 int dword_11B88;
Ritor1
parents:
diff changeset
211 int uTextureRedBits;
Ritor1
parents:
diff changeset
212 int uTextureGreenBits;
Ritor1
parents:
diff changeset
213 int uTextureBlueBits;
Ritor1
parents:
diff changeset
214 int uNumPrevLoadedFiles;
Ritor1
parents:
diff changeset
215 int uTexturePacksCount;
33
a9e9c6989d04 20.01.13
Ritor1
parents: 0
diff changeset
216 int pFacesLock;
0
Ritor1
parents:
diff changeset
217 int dword_011BA4;
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 1632
diff changeset
218 //int can_load_hardware_sprites;
0
Ritor1
parents:
diff changeset
219 struct IDirectDrawSurface **pHardwareSurfaces;
Ritor1
parents:
diff changeset
220 struct IDirect3DTexture2 **pHardwareTextures;
Ritor1
parents:
diff changeset
221 char *ptr_011BB4;
Ritor1
parents:
diff changeset
222 };
Ritor1
parents:
diff changeset
223 #pragma pack(pop)
Ritor1
parents:
diff changeset
224
Ritor1
parents:
diff changeset
225
Ritor1
parents:
diff changeset
226
Ritor1
parents:
diff changeset
227
Ritor1
parents:
diff changeset
228
Ritor1
parents:
diff changeset
229
Ritor1
parents:
diff changeset
230 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
231 struct LODSprite
Ritor1
parents:
diff changeset
232 {
Ritor1
parents:
diff changeset
233 //----- (0046244C) --------------------------------------------------------
Ritor1
parents:
diff changeset
234 inline LODSprite()
Ritor1
parents:
diff changeset
235 {
Ritor1
parents:
diff changeset
236 uHeight = 0;
Ritor1
parents:
diff changeset
237 uPaletteId = 0;
Ritor1
parents:
diff changeset
238 word_1A = 0;
Ritor1
parents:
diff changeset
239 pSpriteLines = nullptr;
Ritor1
parents:
diff changeset
240 pDecompressedBytes = nullptr;
Ritor1
parents:
diff changeset
241 }
Ritor1
parents:
diff changeset
242 ~LODSprite();
Ritor1
parents:
diff changeset
243
Ritor1
parents:
diff changeset
244 void Release();
733
700b58aac975 MonsterPopup preview doll fixed
Nomad
parents: 670
diff changeset
245 int DrawSprite_sw(struct RenderBillboardTransform_local0 *a2, char a3);
0
Ritor1
parents:
diff changeset
246 int _4AD2D1(struct RenderBillboardTransform_local0 *a2, int a3);
Ritor1
parents:
diff changeset
247
670
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
248 char pName[12]; //0
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
249 int uSpriteSize; //C
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
250 __int16 uWidth; //10
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
251 __int16 uHeight; //12
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
252 __int16 uPaletteId; //14
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
253 __int16 word_16; //16
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
254 __int16 uTexturePitch; //18
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
255 __int16 word_1A; //1a
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
256 int uDecompressedSize; //1c
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
257 struct LODSprite_stru0 *pSpriteLines; //20
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
258 void *pDecompressedBytes; //24
0
Ritor1
parents:
diff changeset
259 };
Ritor1
parents:
diff changeset
260 #pragma pack(pop)
Ritor1
parents:
diff changeset
261
Ritor1
parents:
diff changeset
262 /* 15 */
Ritor1
parents:
diff changeset
263 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
264 struct LODFile_Sprites: public LOD::File
Ritor1
parents:
diff changeset
265 {
Ritor1
parents:
diff changeset
266 LODFile_Sprites();
Ritor1
parents:
diff changeset
267 virtual ~LODFile_Sprites();
Ritor1
parents:
diff changeset
268
Ritor1
parents:
diff changeset
269 void DeleteSomeSprites();
Ritor1
parents:
diff changeset
270 void DeleteSpritesRange(int uStartIndex, int uStopIndex);
Ritor1
parents:
diff changeset
271 int _461397();
Ritor1
parents:
diff changeset
272 void DeleteSomeOtherSprites();
Ritor1
parents:
diff changeset
273 int LoadSpriteFromFile(LODSprite *pSpriteHeader, const char *pContainer);
Ritor1
parents:
diff changeset
274 bool LoadSprites(const char *pFilename);
Ritor1
parents:
diff changeset
275 int LoadSprite(const char *pContainerName, unsigned int uPaletteID);
Ritor1
parents:
diff changeset
276 void ReleaseLostHardwareSprites();
Ritor1
parents:
diff changeset
277 void ReleaseAll();
Ritor1
parents:
diff changeset
278 void MoveSpritesToVideoMemory();
762
cf2fbac6edc9 Misc cleaning
Nomad
parents: 733
diff changeset
279 void _inlined_sub0();
cf2fbac6edc9 Misc cleaning
Nomad
parents: 733
diff changeset
280 void _inlined_sub1();
0
Ritor1
parents:
diff changeset
281
Ritor1
parents:
diff changeset
282
Ritor1
parents:
diff changeset
283 /*FILE *pFile;
Ritor1
parents:
diff changeset
284 unsigned __int8 pLODName[256];
Ritor1
parents:
diff changeset
285 unsigned int isFileOpened;
Ritor1
parents:
diff changeset
286 unsigned __int8 *pIOBuffer;
Ritor1
parents:
diff changeset
287 unsigned int uIOBufferSize;
Ritor1
parents:
diff changeset
288 struct LOD::FileHeader header;
Ritor1
parents:
diff changeset
289 struct LOD::Directory *pRoot;
Ritor1
parents:
diff changeset
290 unsigned __int8 pContainerName[16];
Ritor1
parents:
diff changeset
291 unsigned int uCurrentIndexDir;
Ritor1
parents:
diff changeset
292 unsigned int uLODDataSize;
Ritor1
parents:
diff changeset
293 unsigned int uNumSubIndices;
Ritor1
parents:
diff changeset
294 struct LOD::Directory *pSubIndices;
Ritor1
parents:
diff changeset
295 unsigned int uOffsetToSubIndex;
Ritor1
parents:
diff changeset
296 FILE *pOutputFileHandle;*/
1632
69ab7593e7af Out of bounds (id 65536) texture fixed.
Nomad
parents: 1545
diff changeset
297 struct LODSprite pSpriteHeaders[MAX_LOD_SPRITES];
670
9824e2eeee30 fixed decorations animation
Gloval
parents: 434
diff changeset
298 signed int uNumLoadedSprites;
0
Ritor1
parents:
diff changeset
299 int field_ECA0;
Ritor1
parents:
diff changeset
300 int field_ECA4;
Ritor1
parents:
diff changeset
301 int field_ECA8;
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 1632
diff changeset
302 //int can_load_hardware_sprites;
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1006
diff changeset
303 Sprite *pHardwareSprites;
0
Ritor1
parents:
diff changeset
304 int field_ECB4;
Ritor1
parents:
diff changeset
305 };
Ritor1
parents:
diff changeset
306 #pragma pack(pop)
Ritor1
parents:
diff changeset
307
Ritor1
parents:
diff changeset
308 /* 17 */
Ritor1
parents:
diff changeset
309 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
310 struct LODSprite_stru0
Ritor1
parents:
diff changeset
311 {
Ritor1
parents:
diff changeset
312 int dword_0;
Ritor1
parents:
diff changeset
313 void *ptr_4;
Ritor1
parents:
diff changeset
314 };
Ritor1
parents:
diff changeset
315 #pragma pack(pop)
Ritor1
parents:
diff changeset
316
Ritor1
parents:
diff changeset
317
Ritor1
parents:
diff changeset
318
Ritor1
parents:
diff changeset
319
Ritor1
parents:
diff changeset
320 extern LODFile_IconsBitmaps *pEvents_LOD;
1541
86cb7398d2a8 mm8 icons
Nomad
parents: 1477
diff changeset
321
0
Ritor1
parents:
diff changeset
322 extern LODFile_IconsBitmaps *pIcons_LOD;
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
323 extern LODFile_IconsBitmaps *pIcons_LOD_mm6;
1541
86cb7398d2a8 mm8 icons
Nomad
parents: 1477
diff changeset
324 extern LODFile_IconsBitmaps *pIcons_LOD_mm8;
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
325
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
326 extern LODFile_IconsBitmaps *pBitmaps_LOD;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
327 extern LODFile_IconsBitmaps *pBitmaps_LOD_mm6;
1541
86cb7398d2a8 mm8 icons
Nomad
parents: 1477
diff changeset
328 extern LODFile_IconsBitmaps *pBitmaps_LOD_mm8;
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
329
0
Ritor1
parents:
diff changeset
330 extern LODFile_Sprites *pSprites_LOD;
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1464
diff changeset
331 extern LODFile_Sprites *pSprites_LOD_mm6;
1541
86cb7398d2a8 mm8 icons
Nomad
parents: 1477
diff changeset
332 extern LODFile_Sprites *pSprites_LOD_mm8;
0
Ritor1
parents:
diff changeset
333
Ritor1
parents:
diff changeset
334 extern LODWriteableFile *pNew_LOD;
Ritor1
parents:
diff changeset
335 extern LODWriteableFile *pGames_LOD;
Ritor1
parents:
diff changeset
336
Ritor1
parents:
diff changeset
337
Ritor1
parents:
diff changeset
338
Ritor1
parents:
diff changeset
339
Ritor1
parents:
diff changeset
340 extern int _6A0CA4_lod_binary_search; // weak
Ritor1
parents:
diff changeset
341 extern int _6A0CA8_lod_unused; // weak