Subversion Repositories spk

Rev

Rev 127 | Rev 130 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#ifndef __PACKAGES_H__
2
#define __PACKAGES_H__
3
 
4
#include "SpkFile.h"
5
#include "GameExe.h"
6
#include "XspFile.h"
7
#include "archive/unzip.h"
8
 
9
#include "MultiSpkFile.h"
10
#include "VirtualFileSystem.h"
88 cycrow 11
#include "Utils/StringList.h"
1 cycrow 12
 
93 cycrow 13
#include "spkdefines.h"
1 cycrow 14
 
15
class CFileIO;
16
 
93 cycrow 17
namespace SPK {
18
	class COriginalFiles;
19
}
1 cycrow 20
 
93 cycrow 21
using namespace SPK;
1 cycrow 22
 
23
class SPKEXPORT CPackages
24
{
25
public:
121 cycrow 26
	static Utils::String ConvertLanguage(int lang);
1 cycrow 27
	static SAvailablePackage *CreateAvailablePackageData(CBaseFile *package);
126 cycrow 28
	static Utils::String FormatAvailablePackageData(CBaseFile *package);
29
	static Utils::String FormatAvailablePackageData(SAvailablePackage *package);
1 cycrow 30
	static CyString CreateFromPackagerScript(CyString filename);
31
	static int GeneratePackageUpdateData(CyString dir, bool includeSingle = true);
32
 
33
	CPackages ();
34
	~CPackages ();
35
 
83 cycrow 36
	bool isOldDir(const Utils::String &dir);
121 cycrow 37
	bool Read(CyString dir, CProgressInfo *progress = NULL);
38
	bool read(const Utils::String &dir, CProgressInfo *progress = NULL);
1 cycrow 39
	void Startup(CyString dir, CyString tempDir, CyString myDoc, CyString mod = NullString);
127 cycrow 40
	void startup(const Utils::String &dir, const Utils::String &tempDir, const Utils::String &myDoc);
41
	void startup(const Utils::String &dir, const Utils::String &tempDir, const Utils::String &myDoc, const Utils::String &mod);
1 cycrow 42
 
129 cycrow 43
	bool extractAll(CBaseFile *baseFile, const Utils::String &dir, int game, bool includedir = true, CProgressInfo *progress = NULL) const;
127 cycrow 44
	bool generatePackagerScript(CBaseFile *baseFile, bool wildcard, Utils::CStringList *list, int game, bool datafile = false) const;
45
	CBaseFile *LoadPackagerScript(CyString filename, int compression, Utils::String (*askFunc)(const Utils::String &), CyStringList *malformedLines = NULL, CyStringList *unknownCommands = NULL, CyStringList *variables = NULL);
1 cycrow 46
	CyStringList *GetGlobals() { return &m_lGlobals; }
47
	CyStringList *GetFakePatchOrder() { return &m_lFakePatchOrder; }
125 cycrow 48
	Utils::String getCurrentDirectory() const;
79 cycrow 49
	static CyString GetTempDirectory() { return m_sTempDir; }
127 cycrow 50
	static const Utils::String &tempDirectory() { return m_sTempDir; }
1 cycrow 51
	CyString GetMyDocuments() { return m_sMyDoc; }
127 cycrow 52
	const Utils::String &myDocuments() { return m_sMyDoc; }
1 cycrow 53
	CGameExe *GetGameExe() { return &m_gameExe; }
54
	CLinkList<CBaseFile> *GetInstallPackageList() { return &m_lInstallList; }
55
 
56
	// installing/uninstalling
57
	bool		InstallPackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL, bool disabled = false );
58
	CBaseFile		*OpenPackage ( CyString file, int *error, CProgressInfo *progress = NULL, int readtype = SPKREAD_ALL, int flags = READFLAG_NONE );
59
	CMultiSpkFile	*OpenMultiPackage(CyString file, int *error, CProgressInfo *progress = NULL);
60
	bool		OpenMultiPackage ( CyString file, CLinkList<CBaseFile> *packageList, int *error, CProgressInfo *progress = NULL );
61
	int			CheckInstallPackage(CBaseFile *package, int check = IC_ALL);
62
	bool		RemoveFile(C_File *file, CyStringList *errors = NULL);
63
	void		PrepareUninstallPackage(CBaseFile *package);
64
	bool		UninstallPreparedPackages(CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *uninstalledPackages = NULL, CLinkList<CBaseFile> *disabledPackages = NULL);
65
	void		ConvertOldPackage(CBaseFile *p);
66
	void		PurgeUninstallScripts(CBaseFile *package, CyStringList *errors);
67
	int 		PrepareInstallPackage(CBaseFile *package, bool disabled = false, bool force = false, int check = IC_ALL);
68
	int			InstallPreparedPackages(CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *errored, CLinkList<CBaseFile> *installedList = NULL);
69
	void		RemovePreparedInstall(CBaseFile *package);
70
	int			GetNumPackagesInQueue() { return m_lInstallList.size(); }
71
	int			CheckOpenPackage(CyString file, int *error);
72
	int			GetMissingDependacies(CBaseFile *p, CyStringList *list, bool onlyEnabled = false, bool includePrepared = false);
73
	bool		CheckInstalledDependacy(CyString name, CyString author, CyString version, bool onlyEnabled = false, bool includePerpered = false);
74
	bool		CheckEnabledDependacy(CBaseFile *p);
75
	int			GetDependacyList(CBaseFile *package, CLinkList<CBaseFile> *list);
76
	int			PrepareMultiPackage ( CyString file, CLinkList<CBaseFile> *errorPackageList, int *error, CProgressInfo *progress = 0);
77
 
78
	bool		IsOldPluginManager() { return m_bOldPlugin; }
79
 
80
	// enable/disable
81
	bool EnablePackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL );
82
	bool DisablePackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL );
83
	bool DisablePreparedPackages ( CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *disabledPackages = NULL );
84
	bool PrepareEnablePackage(CBaseFile *package);
85
	bool PrepareDisablePackage(CBaseFile *package);
86
	bool EnablePreparedPackages ( CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *enabledPackages = NULL );
87
	int  GetNumPackagesInEnabledQueue() { return m_lEnableList.size(); }
88
	int  GetNumPackagesInDisabledQueue() { return m_lDisableList.size(); }
89
	bool PrepareDisableForVanilla();
90
	bool PrepareEnableLibrarys();
91
	bool PrepareEnableFromVanilla();
92
 
93
	void WriteData();
94
	bool CloseDir ( CyStringList *errors = 0, CProgressInfo *progress = NULL, bool removedir = false );
95
	bool RestoreFakePatch();
96
	bool ReadyFakePatch();
97
	bool CheckValidPluginManagerFile(CyString filename);
98
	bool CheckIfPluginManagerFile(CyString filename);
99
 
100
	// package control
101
	void UpdateUsedFiles(CLinkList<CBaseFile> *ignoreList = NULL, bool = true);
102
	void UpdateSigned();
103
	bool UpdatePackages(int doStatus = -1, bool individual = false);
104
	CBaseFile *FindXspPackage(CyString id);
105
	CBaseFile *FindSpkPackage(CyString name, CyString author);
106
	CArchiveFile *FindArchivePackage(CyString name);
107
	CBaseFile *FindPackage(CyString name, CyString author);
108
	CBaseFile *FindFirstPackageWithFile(C_File *f);
109
	CBaseFile *FindNextPackageWithFile(CBaseFile *p, C_File *f);
110
	CBaseFile *FindPackage(CBaseFile *package);
111
	C_File *FindFile(int filetype, CyString filename, CyString dir = NullString);
112
	CBaseFile *FirstPackage() { return m_lPackages.First(); }
113
	CBaseFile *NextPackage() { return m_lPackages.Next(); }
114
	CBaseFile *GetFirstPackage() { if ( m_lPackages.Front() ) return m_lPackages.Front()->Data(); return NULL; }
115
	CBaseFile *GetNextPackage(CBaseFile *from) 
116
	{ 
117
		bool found = false;
118
		for ( CListNode<CBaseFile> *node = m_lPackages.Front(); node; node = node->next() )
119
		{
120
			if ( !node->Data() ) continue;
121
			if ( node->Data() == from )
122
				found = true;
123
			else if ( found )
124
				return node->Data();
125
		}
126
		return NULL; 
127
	}
128
	void Reset();
129
	CBaseFile *GetPackageAt(int i) { return m_lPackages[i]; }
130
	CyString GetSelectedModName();
131
	CyString GetModKey();
132
	void SetupWares();
133
	void SetupShips();
134
	void PurgeGameObjects();
135
	void PurgeWares();
136
	void PurgeShips();
137
	void StartPackage() { m_pPackageNode = m_lPackages.Front(); }
138
	void UpdatePackage(CBaseFile *p);
139
	CBaseFile *GetCurrentPackage() { return (m_pPackageNode) ? m_pPackageNode->Data() : NULL; }
140
	bool RemoveCurrentDirectory();
141
	void RemoveCreatedFiles();
142
	bool AnyUnusedShared();
143
 
144
	// util functions
145
	void RemoveUnusedDirectories(CyStringList &dirs, CyStringList *errors = NULL);
146
	int  RemoveUninstallScripts(CyStringList *errors = 0, CProgressInfo *progress = NULL);
147
	bool RemoveUninstallFile(C_File *file, CyStringList *errors = 0);
148
	int  RemoveUnusedSharedFiles(CyStringList *errors = 0, CProgressInfo *progress = NULL);
149
	bool RemoveSharedFile(C_File *file, CyStringList *errors = NULL);
150
	void ShufflePatchTo(C_File *file, int to, CyStringList *errors);
151
	void ShuffleFakePatches(CyStringList *errors);
152
	void ShuffleTextFiles(CyStringList *errors);
153
	int  FindNextFakePatch(int start = 0, CyString dir = NullString);
125 cycrow 154
	int  FindNextTextFile(int start = 3, CyString dir = NullString);
1 cycrow 155
	int  FindLastFakePatch(int start = 99, CyString dir = NullString);
156
	int  FindLastTextFile(int start = 9999, CyString dir = NullString);
157
	int  FindLowestFakePatchInstalled();
158
	void ReadGameLanguage(bool force = true);
159
	int	 RemoveAllPackages(CyStringList *errors = NULL, CProgressInfo *progress = NULL);
160
	void AssignPackageNumbers();
161
	int  GetChildPackages(CBaseFile *package, CLinkList<CBaseFile> *children, bool recursive = false);
162
	int  GetAllPackageFiles(CBaseFile *package, CLinkList<C_File> *fileList, bool includeChild);
163
	int	 GetAllPackageFiles(CLinkList<CBaseFile> *list, CLinkList<C_File> *fileList, bool includeChild);
164
	void AddLogEntry(int type, CyString args, CyStringList *errors);
127 cycrow 165
	Utils::String findDataDir(const Utils::String &dir, const Utils::String &file);
1 cycrow 166
	int  CountPackages(int type, bool onlyEnabled);
167
	int  CountBuiltInPackages(bool onlyEnabled);
121 cycrow 168
	bool isCurrentDir(const Utils::String &dir) const;
1 cycrow 169
	bool CheckOtherPackage(CBaseFile *package);
170
	int CheckPreparedInstallRequired(CLinkList<CBaseFile> *list);
171
	static int ConvertWareType(char w);
172
	static char ConvertWareTypeBack(int w);
102 cycrow 173
	Utils::String logDirectory();
174
	Utils::String logDirectory(const Utils::String &gameExe);
175
	Utils::String saveDirectory();
126 cycrow 176
	void backupSaves() { backupSaves(m_bVanilla); }
177
	void backupSaves(bool vanilla);
178
	void restoreSaves() { restoreSaves(m_bVanilla); }
179
	void restoreSaves(bool vanilla);
1 cycrow 180
	bool UnPackFile(CyString filename, bool checkxml = true);
181
	bool PackFile(CyString filename);
182
	bool PackFile(CFileIO *File, CyString filename);
84 cycrow 183
	Utils::String ConvertTextString(const Utils::String &text);
1 cycrow 184
	void LoadVirtualFileSystem();
185
	bool CheckAccessRights(CyString dir);
186
	bool LoadShipData(CyString file, CyStringList *list);
35 cycrow 187
	bool LoadShipData(CVirtualFileSystem *pVfs, CyStringList *list);
1 cycrow 188
	bool ReadTextPage(CyString file, CyStringList *list, bool search, int page);
189
	CyStringList *LoadShipData(CyString file);
190
	CyStringList *ReadTextPage(CyString file, bool search, int page);
191
	int AdjustFileType(CyString name, int filetype);
35 cycrow 192
	CXspFile *extractShip(const Utils::String &sCatFile, const Utils::String &sId, CProgressInfo *progress = NULL);
1 cycrow 193
	CyString ReadShipData(CyString file, CyString entry);
194
	bool IsSamePackage(CBaseFile *p1, CBaseFile *p2);
195
	void ApplyFakePatchOrder(CyStringList *list);
196
	CBaseFile *CreateFromArchive(CyString filename, bool toInstall = false );
197
	void ReadArchiveData(const char *buf, size_t len, CBaseFile *archive);
198
	void ReadArchiveData(CyString filename, CBaseFile *archive);
199
	int VerifyInstalledFiles(CyStringList *missingFiles = NULL, bool getPackages = true);
88 cycrow 200
	Utils::String empWaresForGame(int *maxsize = NULL);
201
	void addEMPPriceOverride(int empId, int price);
202
	void addEMPNotoOverride(int empId, int noto);
203
	void addBuiltInWarePriceOverride(int empId, int price);
204
	void addBuiltInWareNotoOverride(int empId, int noto);
205
	void addCustomWarePriceOverride(const Utils::String &id, int price);
206
	void addCustomWareNotoOverride(const Utils::String &id, int noto);
1 cycrow 207
 
208
	int GetCurrentGameFlags() { return m_iGameFlags; }
209
 
125 cycrow 210
	void SetCurrentDir(CyString dir);
1 cycrow 211
 
212
	// merge mods
124 cycrow 213
	void getMergedFiles(Utils::CStringList &list, CCatFile *cat1, CCatFile *cat2);
58 cycrow 214
	bool CanWeMerge(const Utils::String &file) const;
1 cycrow 215
	bool MergeMods(CCatFile *mod1, CCatFile *mod2, CyString outFile, CyStringList *cantMerge);
216
	bool NeedToMerge(CyString file);
217
	CyStringList MergeTextFiles(CyStringList *files, CCatFile *mod1, CCatFile *mod2);
218
	bool GetModCompatabilityList(C_File *file, CyStringList *list = NULL);
219
	bool CheckCompatabilityBetweenModFiles(C_File *from, C_File *to, CyStringList *list = NULL);
220
	bool CheckCompatabilityBetweenMods(CBaseFile *from, CBaseFile *to, CyStringList *list = NULL);
221
	int CheckCompatabilityAgainstPackages(CBaseFile *newFile, CyStringList *list = NULL, CLinkList<CBaseFile> *packages = NULL);
222
 
121 cycrow 223
	CyString GetLanguageName() const;
1 cycrow 224
 
121 cycrow 225
	int	GetGameLanguage() const;
226
	int	GetGameLanguage(const Utils::String &dir) const;
227
	int      GetGameAddons(Utils::CStringList &exes);
228
	int      GetGameAddons(Utils::CStringList &exes, const Utils::String &dir);
229
	Utils::String getGameName() const;
230
	Utils::String getGameName(const Utils::String &dir) const;
1 cycrow 231
	CyString GetGameName(CyString dir = NullString);
232
	CyString GetGameVersionFromType(int game, int version, CyString sVersion);
233
	CyString GetGameNameFromType(int game);
234
	CyString GetGameTypesString(CBaseFile *package, bool includeVersion);
235
	CyString GetGameVersionString(CBaseFile *package);
121 cycrow 236
	Utils::String GetGameRunExe(const Utils::String &dir);
1 cycrow 237
	CyString GetProperDir(CyString dir = NullString);
238
	CyString GetAddonDir(CyString dir = NullString);
121 cycrow 239
	Utils::String GetGameRunExe();
240
	Utils::String getProperDir() const;
241
	Utils::String getProperDir(const Utils::String &dir) const;
242
	Utils::String getAddonDir() const;
243
	Utils::String getAddonDir(const Utils::String &dir) const;
1 cycrow 244
 
245
	// text files
246
	void CreateLanguageTextFiles(CyStringList *errors = 0);
247
	bool RenameTextFile(CyString textid, int languageid, CyStringList *errors);
248
	void AddTextFileToScripts(C_File *file, CyString textid);
249
	void CreatePluginManagerText();
87 cycrow 250
	void createPluginManagerOpenText();
1 cycrow 251
 
252
	// game control
65 cycrow 253
	void CreateEMPFile(CyString progDir = NullString);
1 cycrow 254
	void CreateWareFiles();
255
	int ExtractGameFile(CyString aFilename, CyString aTo, CyString dir = NullString, CyString addon = NullString);
256
	void CreateDummies();
257
	void CreateComponants();
258
	void CreateCutData();
259
	void CreateBodies();
260
	void CreateGlobals();
261
	void CreateAnimations();
262
	void CreateTShips();
263
	CyStringList *CreateCockpits();
264
	void CreateCustomStarts();
265
	void AddCreatedFile(CyString file);
88 cycrow 266
 
1 cycrow 267
	bool ReadGlobals(CyStringList &globals);
89 cycrow 268
	bool readWares(int iLang, CLinkList<SWareEntry> &list);
269
	bool readCommands(int iLang, CLinkList<SCommandSlot> &list);
270
	bool readWingCommands(int iLang, CLinkList<SCommandSlot> &list);
88 cycrow 271
	int  empOveridePrice(int id);
272
	bool empOverideNoto(int id, int *noto);
273
	int  builtInWareOveridePrice(int id);
274
	bool builtInWareOverideNoto(int id, int *noto);
275
	int  customWareOveridePrice(const Utils::String &id);
276
	bool customWareOverideNoto(const Utils::String &id, int *noto);
277
	void removeEmpOverride(int pos);
278
	void removeBuiltinWareOverride(int pos);
279
	void removeCustomWareOverride(const Utils::String &id);
1 cycrow 280
 
281
	// install text
282
	CyString GetInstallBeforeText(CBaseFile *package);
283
	CyString GetInstallAfterText(CBaseFile *package);
284
	CyString GetUninstallBeforeText(CBaseFile *package);
285
	CyString GetUninstallAfterText(CBaseFile *package);
286
 
287
	//setting functions
288
	void SetRenameText(bool b) { m_bRenameText = b; }
289
	void SetLanguage(int i) { m_iLanguage = i; }
290
	void SetAutoEnable(bool b) { m_bAutoEnableChild = b; }
291
	void SetForceModInstall(bool b) { m_bForceModInstall = b; }
118 cycrow 292
	void setTempDirectory(const Utils::String &s) { m_sTempDir = s; }
127 cycrow 293
	void setMyDocuments(const Utils::String &s) { m_sMyDoc = s; }
1 cycrow 294
	void SetForceEMP(bool b) { m_bForceEMP = b; }
295
	void SetSurpressProtectedWarning(bool b) { m_bSurpressProtectedWarning = b; }
296
	void SurpressProtectedWarning() { m_bSurpressProtectedWarning = true; }
297
	bool IsSupressProtectedWarning() { return m_bSurpressProtectedWarning; }
298
 
299
	int GetLanguage() { return m_iLanguage; }
300
	int GetGame() { return m_iGame; }
301
	bool IsLoaded() { return m_bLoaded; }
302
	bool IsVanilla() { return m_bVanilla; }
303
	void SetVanilla(bool b);
304
 
305
	CyString GetSetMod() { return m_sSetMod; }
306
	void SetMod(CyString mod) { 
307
		if ( mod != "PluginManager" )
308
			m_sSetMod = mod; 
309
	}
126 cycrow 310
	void setSaveGameManager(bool managed);
1 cycrow 311
 
312
	CBaseFile *GetEnabledMod() { return m_pEnabledMod; }
313
 
314
	//errors
315
	void ClearError() { m_iError = PKERR_NONE; }
316
	int  GetError() { return m_iError; }
317
 
318
	CLinkList<CBaseFile> *PackageList() { return &m_lPackages; }
319
	CLinkList<SAvailablePackage> *GetAvailablePackageList() { return &m_lAvailablePackages; }
320
	bool AnyAvailablePackages(int type = -1);
321
	bool AddAvailablePackage(SAvailablePackage *package);
322
	void ParseAvailablePackage(CyString str, CyString webaddress = NullString);
126 cycrow 323
	SAvailablePackage *FindAvailablePackage(const Utils::String &filename);
1 cycrow 324
	int FindAllServers(CyStringList *list);
325
 
326
	CBaseFile *FindScriptByAuthor(CyString author, CBaseFile *prev = NULL);
327
	void RemoveFailedFiles();
328
 
329
private:
85 cycrow 330
	bool _checkForDisable(CBaseFile *package, bool disabled, CBaseFile *oldPackage);
43 cycrow 331
	CBaseFile *_archive_fromRar(CyString filename, bool toInstall);
332
	CBaseFile *_archive_fromZip(CyString filename, bool toInstall);
50 cycrow 333
	void _addToFakePatch(CBaseFile *pPackage);
56 cycrow 334
	int _gameTextNumber() const;
88 cycrow 335
	void _addWareOverride(enum WareTypes type, int pos, const Utils::String &id, int value, bool noto);
336
	int _warePriceOverride(enum WareTypes type, int pos, const Utils::String &id);
337
	bool _wareNotoOverride(enum WareTypes type, int pos, const Utils::String &id, int *noto);
338
	void _removeWareOverride(enum WareTypes type, int pos, const Utils::String &id);
43 cycrow 339
 
340
private:
1 cycrow 341
	CyString	m_sCurrentDir;
118 cycrow 342
	static Utils::String	m_sTempDir;
127 cycrow 343
	Utils::String			m_sMyDoc;
1 cycrow 344
	CyString	m_sSetMod;
126 cycrow 345
	Utils::String _sSaveDir;
125 cycrow 346
	GameDirectory *_pCurrentDir;
1 cycrow 347
 
348
	// global files list
349
	CLinkList<C_File>		m_lFiles;
350
	CLinkList<CBaseFile>	m_lPackages;
351
	CLinkList<C_File>		m_lUninstallFiles;
352
	CLinkList<SGameWare>	m_lGameWares[WAREBUFFERS];
353
	CLinkList<SGameShip>	m_lGameShips;
88 cycrow 354
	CLinkList<SWarePriceOverride>	m_lWarePrices;
93 cycrow 355
	COriginalFiles		   *_pOriginalFiles;
1 cycrow 356
 
357
	// prepared lists
358
	CLinkList<CBaseFile>	m_lInstallList; // install/uninstalling packages
359
	CLinkList<CBaseFile>	m_lEnableList;  // enable packages
360
	CLinkList<CBaseFile>	m_lDisableList; // disable packages
361
 
362
	CyStringList			m_lCreatedFiles; // list of files we've created
363
	CyStringList			m_lNonRemovedFiles; // list of fiels that couldn't be removed for some reason
364
	CyStringList			m_lGlobals; // global settigns that we want changed
365
	CyStringList			m_lFakePatchOrder; // ordered fake patches
366
	CLinkList<SAvailablePackage> m_lAvailablePackages; // list of available packages online
367
 
368
	CVirtualFileSystem		m_pGameVFS; // Games Virtual File System
369
 
370
	CGameExe				m_gameExe;
56 cycrow 371
	SGameExe				*m_pCurrentGameExe;
1 cycrow 372
	CBaseFile			   *m_pEnabledMod;
373
 
374
	// settings
375
	bool		m_bRenameText;  // rename text files
376
	bool		m_bAutoEnableChild;	// auto enable all children
377
	bool		m_bForceModInstall; // allowsm ultiple mods to be installed
378
	bool		m_bOldPlugin;		// if its loading data from the old plugin manager
379
	bool		m_bLoadVFS;			// if we should load the virtual filesystem
380
	int			m_iLanguage;	// Language id to use
381
	int			m_iSaveGameManager; // Save game manager
382
	bool		m_bSurpressProtectedWarning; // prevent checking for protected directory
383
 
384
	int			m_iGame;		// the game the directory is
385
	int			m_iGameVersion; // the version of the game (version position)
386
	CyString	m_sGameVersion; // the version of the game (full version)
387
	int			m_iGameFlags;	// the flags for the game from SGameExe
388
	int			m_iMaxPatch;	// the maximum patch for the game
389
 
390
	int			m_iSaveGame;
391
	int			m_iError;
392
	int			m_iLastUpdated;
393
	int			m_iFakePatch;		// The current fake patch
394
 
395
	bool		m_bVanilla;		// currently in vanilla mode, dont allow unsigned packages to be installed
396
 
397
	bool		m_bLoaded;
398
	bool		m_bRedo;
399
	bool		m_bUsedWare;	// if we have used the ware files in the directory, not in a patch
400
	bool		m_bRemoveDir;	// shall we remove direcotires;
401
 
402
	int			m_iWareBuffer[WAREBUFFERS];	//Ware Buffers
403
	int			m_iShipBuffer; //Ship Buffers
404
 
405
	bool		m_bDisableVanilla;
406
	bool		m_bForceEMP;
407
 
408
	CListNode<CBaseFile>	*m_pPackageNode;
409
};
410
 
411
#endif // __PACKAGES_H__