annotate LOD.h @ 135:fcf3209727a4

15.11.12 home
author Ritor1
date Thu, 15 Nov 2012 18:08:01 +0600
parents a64b244da76c
children 062e8a8e09bc
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #pragma once
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include <stdio.h>
113
9a99c386885a 2012/11/7
Nomad
parents: 103
diff changeset
3 #include <memory.h>
115
75faebd0a975 lod fix
Nomad
parents: 114
diff changeset
4
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "Texture.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 /* 354 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 enum TEXTURE_TYPE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 TEXTURE_DEFAULT = 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 TEXTURE_24BIT_PALETTE = 0x1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 TEXTURE_16BIT_PALETTE = 0x2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 namespace LOD
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 struct FileHeader
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 {
103
142de719a3ea LOD initializations
Nomad
parents: 3
diff changeset
24 inline FileHeader()
142de719a3ea LOD initializations
Nomad
parents: 3
diff changeset
25 {
117
a64b244da76c some things lod
Nomad
parents: 115
diff changeset
26 memset(LodVersion, 0, 8);
a64b244da76c some things lod
Nomad
parents: 115
diff changeset
27 memset(field_2C, 0, 40);
103
142de719a3ea LOD initializations
Nomad
parents: 3
diff changeset
28 memset(array_0000B0, 0, 28);
142de719a3ea LOD initializations
Nomad
parents: 3
diff changeset
29 memset(array_0000CC, 0, 52);
142de719a3ea LOD initializations
Nomad
parents: 3
diff changeset
30 }
142de719a3ea LOD initializations
Nomad
parents: 3
diff changeset
31
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 void Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33
117
a64b244da76c some things lod
Nomad
parents: 115
diff changeset
34 char pSignature[4];
a64b244da76c some things lod
Nomad
parents: 115
diff changeset
35 char LodVersion[8];
a64b244da76c some things lod
Nomad
parents: 115
diff changeset
36 char field_C[32];
a64b244da76c some things lod
Nomad
parents: 115
diff changeset
37 char field_2C[40];
108
d543bd89a31e 6.11.12
Ritor1
parents: 3
diff changeset
38 char LodDescription[80];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 int dword_0000A4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 int dword_0000A8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 unsigned int uNumIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 char array_0000B0[28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 char array_0000CC[52];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 struct Directory
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 Directory();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 Directory *Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
55 char pFilename[16];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 unsigned int uOfsetFromSubindicesStart;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 unsigned int uDataSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 int dword_000018;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 unsigned __int16 uNumSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 __int16 word_00001E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 struct File
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 File();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 virtual ~File();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 void *LoadRaw(const char *pContainer, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 FILE *FindContainer(const char *pContainerName, bool bLinearSearch);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 bool DoesContainerExist(const char *pContainer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 int CalcIndexFast(int startIndex, int maxIndex, const char *pContainerName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 bool LoadHeader(const char *pFilename, bool bWriting);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 int LoadSubIndices(const char *pContainer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 void AllocSubIndicesAndIO(unsigned int uNumSubIndices, unsigned int uBufferSize);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 void FreeSubIndexAndIO();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 bool AppendDirectory(LOD::Directory *pDir, const void *pData);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 void ResetSubIndices();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 void Close();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 FILE *pFile;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 char pLODName[256];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 unsigned int isFileOpened;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 unsigned __int8 *pIOBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 unsigned int uIOBufferSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 struct FileHeader header;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 struct Directory *pRoot;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 char pContainerName[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 unsigned int uCurrentIndexDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 unsigned int uLODDataSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 unsigned int uNumSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 struct Directory *pSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 unsigned int uOffsetToSubIndex;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 FILE *pOutputFileHandle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 /* 6 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 struct LODWriteableFile: public LOD::File
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 bool LoadFile(const char *pFilename, bool bWriting);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 unsigned int Write(const LOD::Directory *pDir, const void *pDirData, int a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 void CloseWriteFile();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 int CreateTempFile();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 int Save();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 bool _4621A7();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 int _461492(LOD::FileHeader *pHeader, LOD::Directory *pDir, const char *Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
117 /*FILE *pFile;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 char pLODName[256];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 unsigned int isFileOpened;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 unsigned __int8 *pIOBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 unsigned int uIOBufferSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 struct LOD::FileHeader header;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 struct LOD::Directory *pRoot;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 unsigned __int8 pContainerName[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 unsigned int uCurrentIndexDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 unsigned int uLODDataSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 unsigned int uNumSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 struct LOD::Directory *pSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 unsigned int uOffsetToSubIndex;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
130 FILE *pOutputFileHandle;*/
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 struct LODFile_IconsBitmaps: public LOD::File
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 LODFile_IconsBitmaps();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 virtual ~LODFile_IconsBitmaps();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 int _40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 unsigned int FindTextureByName(const char *pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 bool LoadBitmaps(const char *pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 bool LoadIconsOrEvents(const char *pLODFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 void ReleaseAll();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 unsigned int LoadTexture(const char *pContainer, enum TEXTURE_TYPE uTextureType = TEXTURE_DEFAULT);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
148 Texture *LoadTexturePtr(const char *pContainer, enum TEXTURE_TYPE uTextureType = TEXTURE_DEFAULT);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 int LoadTextureFromLOD(Texture *pOutTex, const char *pContainer, enum TEXTURE_TYPE eTextureType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 int ReloadTexture(Texture *pDst, const char *pContainer, int mode);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 void ReleaseHardwareTextures();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 void ReleaseLostHardwareTextures();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 void _410423_move_textures_to_device();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 int _410522(Texture *pDst, const char *pContainer, unsigned int uTextureType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 void SetupPalettes(unsigned int uTargetRBits, unsigned int uTargetGBits, unsigned int uTargetBBits);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 void ReleaseAll2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 void _4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 void _4355F7();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
161 /*FILE *pFile;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 unsigned __int8 pLODName[256];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 unsigned int isFileOpened;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 unsigned __int8 *pIOBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 unsigned int uIOBufferSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 struct LOD::FileHeader header;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 struct LOD::Directory *pRoot;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 unsigned __int8 pContainerName[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 unsigned int uCurrentIndexDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 unsigned int uLODDataSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 unsigned int uNumSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 struct LOD::Directory *pSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 unsigned int uOffsetToSubIndex;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
174 FILE *pOutputFileHandle;*/
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 struct Texture pTextures[1000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 unsigned int uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 int dword_11B80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 int dword_11B84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 int dword_11B88;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 int uTextureRedBits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 int uTextureGreenBits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 int uTextureBlueBits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 int uNumPrevLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 int uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 int dword_011BA0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 int dword_011BA4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 int dword_011BA8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 struct IDirectDrawSurface **pHardwareSurfaces;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 struct IDirect3DTexture2 **pHardwareTextures;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 char *ptr_011BB4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 struct LODSprite
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 //----- (0046244C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 inline LODSprite()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 uHeight = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 uPaletteId = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 word_1A = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 pSpriteLines = nullptr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 pDecompressedBytes = nullptr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 ~LODSprite();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 void Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 int _4ACC38(struct RenderBillboardTransform_local0 *a2, char a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 int _4AD2D1(struct RenderBillboardTransform_local0 *a2, int a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 char pName[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 int uSpriteSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 __int16 uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 __int16 uHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 __int16 uPaletteId;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 __int16 word_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 __int16 uTexturePitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 __int16 word_1A;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 int uDecompressedSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 struct LODSprite_stru0 *pSpriteLines;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 void *pDecompressedBytes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 /* 15 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 struct LODFile_Sprites: public LOD::File
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 LODFile_Sprites();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 virtual ~LODFile_Sprites();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 void DeleteSomeSprites();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 void DeleteSpritesRange(int uStartIndex, int uStopIndex);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 int _461397();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 void DeleteSomeOtherSprites();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 int LoadSpriteFromFile(LODSprite *pSpriteHeader, const char *pContainer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 bool LoadSprites(const char *pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 int LoadSprite(const char *pContainerName, unsigned int uPaletteID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 void ReleaseLostHardwareSprites();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 void ReleaseAll();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 void MoveSpritesToVideoMemory();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
250 /*FILE *pFile;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 unsigned __int8 pLODName[256];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 unsigned int isFileOpened;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 unsigned __int8 *pIOBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 unsigned int uIOBufferSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 struct LOD::FileHeader header;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 struct LOD::Directory *pRoot;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 unsigned __int8 pContainerName[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 unsigned int uCurrentIndexDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 unsigned int uLODDataSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 unsigned int uNumSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 struct LOD::Directory *pSubIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 unsigned int uOffsetToSubIndex;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
263 FILE *pOutputFileHandle;*/
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 struct LODSprite pSpriteHeaders[1500];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 unsigned int uNumLoadedSprites;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 int field_ECA0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 int field_ECA4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 int field_ECA8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 int field_ECAC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 struct Sprite *pHardwareSprites;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 int field_ECB4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 /* 17 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 struct LODSprite_stru0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 int dword_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 void *ptr_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 extern LODFile_IconsBitmaps *pEvents_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 extern LODFile_IconsBitmaps *pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 extern LODFile_Sprites *pSprites_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 extern LODFile_IconsBitmaps *pBitmaps_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 extern LODWriteableFile *pNew_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 extern LODWriteableFile *pGames_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 extern int _6A0CA4_lod_binary_search; // weak
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 extern int _6A0CA8_lod_unused; // weak