| Line 2... |
Line 2... |
| 2 |
#define _XSPFILE_H__
|
2 |
#define _XSPFILE_H__
|
| 3 |
|
3 |
|
| 4 |
#include "BaseFile.h"
|
4 |
#include "BaseFile.h"
|
| 5 |
#include "ShipData.h"
|
5 |
#include "ShipData.h"
|
| 6 |
#include "StringList.h"
|
6 |
#include "StringList.h"
|
| - |
|
7 |
#include "VirtualFileSystem.h"
|
| 7 |
|
8 |
|
| 8 |
class CCatFile;
|
9 |
class CCatFile;
|
| 9 |
|
10 |
|
| 10 |
#define SHIPYARD_NONE 0
|
11 |
#define SHIPYARD_NONE 0
|
| 11 |
#define SHIPYARD_ARGON 1
|
12 |
#define SHIPYARD_ARGON 1
|
| Line 61... |
Line 62... |
| 61 |
CyString sCockpit;
|
62 |
CyString sCockpit;
|
| 62 |
CLinkList<SWeaponMask> lWeaponMask;
|
63 |
CLinkList<SWeaponMask> lWeaponMask;
|
| 63 |
int iIndex;
|
64 |
int iIndex;
|
| 64 |
} SCockpit;
|
65 |
} SCockpit;
|
| 65 |
|
66 |
|
| - |
|
67 |
using namespace SPK;
|
| 66 |
|
68 |
|
| 67 |
class SPKEXPORT CXspFile : public CBaseFile
|
69 |
class SPKEXPORT CXspFile : public CBaseFile
|
| 68 |
{
|
70 |
{
|
| 69 |
public:
|
71 |
public:
|
| 70 |
CXspFile ();
|
72 |
CXspFile ();
|
| Line 173... |
Line 175... |
| 173 |
bool AnyCutData() { return !m_lCutData.Empty(); }
|
175 |
bool AnyCutData() { return !m_lCutData.Empty(); }
|
| 174 |
bool AnyBodies() { return !m_lBodies.Empty(); }
|
176 |
bool AnyBodies() { return !m_lBodies.Empty(); }
|
| 175 |
bool AnyAnimations() { return !m_lAnimations.Empty(); }
|
177 |
bool AnyAnimations() { return !m_lAnimations.Empty(); }
|
| 176 |
|
178 |
|
| 177 |
CyString GetShipClass();
|
179 |
CyString GetShipClass();
|
| 178 |
|
- |
|
| 179 |
// ship extraction
|
- |
|
| 180 |
bool StartExtractShip(CyString catFile, CyString secondCatFile, CyString id, CProgressInfo *progress);
|
- |
|
| 181 |
bool StartExtractShip(CCatFile *catFile, CCatFile *secondCatFile, CyString id, CProgressInfo *progress);
|
- |
|
| 182 |
bool ExtractShip(CCatFile *catFile, CyString id, CProgressInfo *progress);
|
- |
|
| 183 |
bool ExtractShip(CyString catFile, CyString id, CProgressInfo *progress);
|
- |
|
| 184 |
C_File *ExtractFileToPackage(CCatFile *catFile, CyString file, int type, CyString addAs = NullString);
|
- |
|
| 185 |
|
- |
|
| 186 |
bool ExtractSceneFiles(CCatFile *catFile, CCatFile *secondCatFile);
|
- |
|
| 187 |
bool ExtractSceneFiles(CyString catFile, CyString secondCatFile);
|
- |
|
| 188 |
|
- |
|
| 189 |
bool ProcessSceneFileSection(int section, CCatFile *catFile, CCatFile *secondCatFile, CyStringList *lModels, CProgressInfo *progress);
|
- |
|
| 190 |
bool ProcessSceneFiles(CCatFile *catFile, CCatFile *secondCatFile, CProgressInfo *progress);
|
- |
|
| 191 |
bool ProcessSceneFiles(CyString catFile, CyString secondCatFile, CProgressInfo *progress);
|
- |
|
| 192 |
|
- |
|
| 193 |
bool UpdateSigned(bool updateFiles) { m_bSigned = false; return false; }
|
180 |
bool UpdateSigned(bool updateFiles) { m_bSigned = false; return false; }
|
| - |
|
181 |
|
| - |
|
182 |
// ship extraction
|
| - |
|
183 |
bool startExtractShip(CVirtualFileSystem *pVfs, const Utils::String &sId, CProgressInfo *pProgress);
|
| - |
|
184 |
bool extractShip(CVirtualFileSystem *pVfs, const Utils::String &sId, CProgressInfo *progress);
|
| - |
|
185 |
bool extractSceneFiles(CVirtualFileSystem *pVfs);
|
| - |
|
186 |
void extractComponants(CVirtualFileSystem *pVfs, CyStringList *sceneModels);
|
| - |
|
187 |
void extractDummies(CVirtualFileSystem *pVfs, CyStringList *sceneModels, bool add);
|
| - |
|
188 |
void extractTextures(CVirtualFileSystem *pVfs);
|
| - |
|
189 |
bool extractBodies(CVirtualFileSystem *pVfs, CyStringList *sceneModels);
|
| - |
|
190 |
bool extractCockpits(CVirtualFileSystem *pVfs);
|
| - |
|
191 |
|
| - |
|
192 |
bool processSceneFileSection(int section, CVirtualFileSystem *pVfs, CyStringList *lModels, CProgressInfo *progress);
|
| - |
|
193 |
bool processSceneFiles(CVirtualFileSystem *pVfs, CProgressInfo *progress);
|
| - |
|
194 |
|
| 194 |
void PackAllFiles();
|
195 |
void PackAllFiles();
|
| 195 |
CyStringList *ReadSceneModels();
|
196 |
CyStringList *ReadSceneModels();
|
| 196 |
void ExtractComponants(CCatFile *catFile, CyStringList *sceneModels);
|
- |
|
| 197 |
void ExtractDummies(CCatFile *catFile, CCatFile *secondCat, CyStringList *sceneModels, bool add);
|
- |
|
| - |
|
197 |
|
| 198 |
void ExtractTextures(CCatFile *catFile, CCatFile *secondCatFile);
|
198 |
//TODO: convert this
|
| 199 |
bool GetTextureList(CyStringList *list, const unsigned char *olddata, size_t size);
|
- |
|
| 200 |
void ExtractTexts(CCatFile *catFile, CCatFile *secondCatFile, int textId);
|
199 |
void ExtractTexts(CCatFile *catFile, CCatFile *secondCatFile, int textId);
|
| - |
|
200 |
|
| - |
|
201 |
bool GetTextureList(CyStringList *list, const unsigned char *olddata, size_t size);
|
| 201 |
bool AddTextFromFile(FILE *id, int textId = -1);
|
202 |
bool AddTextFromFile(FILE *id, int textId = -1);
|
| 202 |
bool AddTextFromFile(CyString file, int textId = -1);
|
203 |
bool AddTextFromFile(CyString file, int textId = -1);
|
| 203 |
bool ExtractBodies(CCatFile *catFile, CCatFile *secondCatFile, CyStringList *sceneModels);
|
- |
|
| 204 |
bool ImportBodies(CyStringList *sceneModels, CyString filename);
|
204 |
bool ImportBodies(CyStringList *sceneModels, CyString filename);
|
| 205 |
bool ExtractCockpits(CCatFile *catFile, CCatFile *secondCatFile);
|
- |
|
| 206 |
bool ImportCockpits(CyString filename);
|
205 |
bool ImportCockpits(CyString filename);
|
| 207 |
CyString FormatShipData(CyStringList *cockpits, int *text, int game);
|
206 |
CyString FormatShipData(CyStringList *cockpits, int *text, int game);
|
| 208 |
|
207 |
|
| 209 |
virtual bool LoadPackageData(const Utils::String &sFfirst, const Utils::String &sRest);
|
208 |
virtual bool LoadPackageData(const Utils::String &sFfirst, const Utils::String &sRest);
|
| 210 |
virtual bool GeneratePackagerScript(bool wildcard, CyStringList *list, bool datafile = false);
|
209 |
virtual bool GeneratePackagerScript(bool wildcard, CyStringList *list, bool datafile = false);
|
| Line 233... |
Line 232... |
| 233 |
CLinkList<SWeaponMask> m_lWeaponMasks;
|
232 |
CLinkList<SWeaponMask> m_lWeaponMasks;
|
| 234 |
CLinkList<SWeaponMask> m_lMissileMasks;
|
233 |
CLinkList<SWeaponMask> m_lMissileMasks;
|
| 235 |
|
234 |
|
| 236 |
int m_iShipyard;
|
235 |
int m_iShipyard;
|
| 237 |
};
|
236 |
};
|
| 238 |
|
- |
|
| 239 |
|
237 |
|
| 240 |
#endif //_XSPFILE_H__
|
238 |
#endif //_XSPFILE_H__
|
| 241 |
|
239 |
|