| Line 22... |
Line 22... |
| 22 |
#define GAME_X2 1
|
22 |
#define GAME_X2 1
|
| 23 |
#define GAME_X3 2
|
23 |
#define GAME_X3 2
|
| 24 |
#define GAME_X3TC 3
|
24 |
#define GAME_X3TC 3
|
| 25 |
#define GAME_X3AP 4
|
25 |
#define GAME_X3AP 4
|
| 26 |
#define GAME_X3FL 5
|
26 |
#define GAME_X3FL 5
|
| 27 |
#define GAME_XREBIRTH 6
|
27 |
#define GAME_MAX (GAME_X3FL)
|
| 28 |
#define GAME_MAX (GAME_XREBIRTH)
|
28 |
#define GAME_ALLNEW (1 << 31)
|
| 29 |
|
29 |
|
| 30 |
#define FILEVERSION 4.20f
|
30 |
#define FILEVERSION 4.30f
|
| 31 |
|
31 |
|
| 32 |
#define WRITECHUNK 50000
|
32 |
#define WRITECHUNK 50000
|
| 33 |
|
33 |
|
| 34 |
class CPackages;
|
34 |
class CPackages;
|
| 35 |
class CGameExe;
|
35 |
class CGameExe;
|
| Line 134... |
Line 134... |
| 134 |
C_File *GetNextFile(C_File *prev) const;
|
134 |
C_File *GetNextFile(C_File *prev) const;
|
| 135 |
C_File *GetPrevFile(C_File *next) const;
|
135 |
C_File *GetPrevFile(C_File *next) const;
|
| 136 |
|
136 |
|
| 137 |
virtual Utils::String CreateValuesLine () const;
|
137 |
virtual Utils::String CreateValuesLine () const;
|
| 138 |
|
138 |
|
| 139 |
virtual bool LoadPackageData(const Utils::String &sFfirst, const Utils::String &sRest, const Utils::String &sMainGame, Utils::CStringList &otherGames);
|
139 |
virtual bool LoadPackageData(const Utils::String &sFfirst, const Utils::String &sRest, const Utils::String &sMainGame, Utils::CStringList &otherGames, Utils::CStringList &gameAddons);
|
| 140 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::CStringList *list, int game, bool datafile = false);
|
140 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::CStringList *list, int game, const Utils::CStringList &gameAddons, bool datafile = false);
|
| 141 |
virtual bool GeneratePackagerScriptFile(bool wildcard, Utils::CStringList *list, int game);
|
141 |
virtual bool GeneratePackagerScriptFile(bool wildcard, Utils::CStringList *list, int game, const Utils::CStringList &gameAddons);
|
| 142 |
|
142 |
|
| 143 |
void ConvertNormalMod(C_File *f, CyString to);
|
143 |
void ConvertNormalMod(C_File *f, CyString to);
|
| 144 |
void ConvertFakePatch(C_File *f);
|
144 |
void ConvertFakePatch(C_File *f);
|
| 145 |
void ConvertAutoText(C_File *f);
|
145 |
void ConvertAutoText(C_File *f);
|
| 146 |
C_File *FindMatchingMod(C_File *f);
|
146 |
C_File *FindMatchingMod(C_File *f);
|
| Line 153... |
Line 153... |
| 153 |
void SetFileCompression ( int c ) { m_SHeader2.iFileCompression = c; }
|
153 |
void SetFileCompression ( int c ) { m_SHeader2.iFileCompression = c; }
|
| 154 |
void SetValueCompression( int c ) { m_SHeader.iValueCompression = c; }
|
154 |
void SetValueCompression( int c ) { m_SHeader.iValueCompression = c; }
|
| 155 |
void SetIcon ( C_File *file, CyString ext ) { if ( m_pIconFile ) delete m_pIconFile; m_sIconExt = ext; m_pIconFile = file; _changed(); }
|
155 |
void SetIcon ( C_File *file, CyString ext ) { if ( m_pIconFile ) delete m_pIconFile; m_sIconExt = ext; m_pIconFile = file; _changed(); }
|
| 156 |
void SetFtpAddr ( CyString str ) { m_sFtpAddr = str; }
|
156 |
void SetFtpAddr ( CyString str ) { m_sFtpAddr = str; }
|
| 157 |
|
157 |
|
| 158 |
void AddFileScript(int filetype, bool shared, CyString rest, const Utils::String &sMainGame, Utils::CStringList &otherGames);
|
158 |
void AddFileScript(FileType filetype, bool shared, CyString rest, const Utils::String &sMainGame, Utils::CStringList &otherGames, Utils::CStringList &gameAddons);
|
| 159 |
|
159 |
|
| 160 |
bool IsMod();
|
160 |
bool IsMod();
|
| 161 |
bool IsFakePatch() const;
|
161 |
bool IsFakePatch() const;
|
| 162 |
|
162 |
|
| 163 |
// error handling
|
163 |
// error handling
|
| Line 165... |
Line 165... |
| 165 |
int GetLastError () { return m_iLastError; }
|
165 |
int GetLastError () { return m_iLastError; }
|
| 166 |
CyString GetLastErrorString() { return m_sLastError; }
|
166 |
CyString GetLastErrorString() { return m_sLastError; }
|
| 167 |
|
167 |
|
| 168 |
// file handling
|
168 |
// file handling
|
| 169 |
void AddFile ( C_File *file );
|
169 |
void AddFile ( C_File *file );
|
| 170 |
C_File *AddFile ( CyString, CyString, int type, int game = 0 );
|
170 |
C_File *AddFile(CyString, CyString, int type, int game = 0);
|
| - |
|
171 |
C_File *addFile(const Utils::String &file, const Utils::String &dir, FileType type, int game = 0);
|
| 171 |
C_File *AppendFile ( CyString file, int type, int game, CyString dir = NullString, CProgressInfo *progress = NULL );
|
172 |
C_File *AppendFile ( CyString file, int type, int game, CyString dir = NullString, CProgressInfo *progress = NULL );
|
| 172 |
C_File *FindFile ( CyString, int, CyString = NullString, int game = 0 );
|
173 |
C_File *FindFile ( CyString, int, CyString = NullString, int game = 0 );
|
| 173 |
bool AddFileNow ( CyString, CyString, int type, CProgressInfo *progress = NULL );
|
174 |
bool AddFileNow ( CyString, CyString, int type, CProgressInfo *progress = NULL );
|
| 174 |
int CountFiles ( int filetype );
|
175 |
int CountFiles ( int filetype );
|
| 175 |
C_File *FindFileAt ( int filetype, int pos );
|
176 |
C_File *FindFileAt ( int filetype, int pos );
|