Line 77... |
Line 77... |
77 |
bool isAnotherMod() const { if ((m_sOtherName.empty()) || (m_sOtherAuthor.empty())) return false; return true; }
|
77 |
bool isAnotherMod() const { if ((m_sOtherName.empty()) || (m_sOtherAuthor.empty())) return false; return true; }
|
78 |
bool IsForceProfile() const { return m_bForceProfile; }
|
78 |
bool IsForceProfile() const { return m_bForceProfile; }
|
79 |
int GetScriptType() const { return m_iScriptType; }
|
79 |
int GetScriptType() const { return m_iScriptType; }
|
80 |
int GetPackageType() const { return m_iPackageType; }
|
80 |
int GetPackageType() const { return m_iPackageType; }
|
81 |
|
81 |
|
82 |
virtual bool readWares(int iLang, CLinkList<SWareEntry> &list, const Utils::String &empWares);
|
82 |
virtual bool readWares(int iLang, CLinkList<SWareEntry> &list, const Utils::WString &empWares);
|
83 |
|
83 |
|
84 |
// Custom Start
|
84 |
// Custom Start
|
85 |
Utils::String GetCustomStartName() const;
|
85 |
Utils::WString customStartName() const;
|
86 |
|
86 |
|
87 |
// set functions
|
87 |
// set functions
|
88 |
void setScriptType ( const Utils::WString &str ) { m_sScriptType = str; _changed(); }
|
88 |
void setScriptType ( const Utils::WString &str ) { m_sScriptType = str; _changed(); }
|
89 |
void setAnotherMod ( const Utils::WString &name, const Utils::WString &author ) { m_sOtherName = name; m_sOtherAuthor = author; _changed(); }
|
89 |
void setAnotherMod ( const Utils::WString &name, const Utils::WString &author ) { m_sOtherName = name; m_sOtherAuthor = author; _changed(); }
|
90 |
void SetForceProfile ( bool p ) { m_bForceProfile = p; _changed(); }
|
90 |
void SetForceProfile ( bool p ) { m_bForceProfile = p; _changed(); }
|
Line 112... |
Line 112... |
112 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::WStringList *list, int game, const Utils::WStringList &gameAddons, bool datafile = false) override;
|
112 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::WStringList *list, int game, const Utils::WStringList &gameAddons, bool datafile = false) override;
|
113 |
|
113 |
|
114 |
CSpkFile();
|
114 |
CSpkFile();
|
115 |
virtual ~CSpkFile();
|
115 |
virtual ~CSpkFile();
|
116 |
|
116 |
|
117 |
bool IsMatchingMod(const Utils::String &mod) const;
|
117 |
bool isMatchingMod(const Utils::WString &mod) const;
|
118 |
|
118 |
|
119 |
/// reading of files
|
119 |
/// reading of files
|
120 |
virtual bool parseValueLine(const Utils::WString &line) override;
|
120 |
virtual bool parseValueLine(const Utils::WString &line) override;
|
121 |
|
121 |
|
122 |
// writing of files
|
122 |
// writing of files
|
123 |
virtual Utils::WString createValuesLine() const override;
|
123 |
virtual Utils::WString createValuesLine() const override;
|
124 |
bool writeHeader(CFileIO &file, int iHeader, int iLength) const override;
|
124 |
bool writeHeader(CFileIO &file, int iHeader, int iLength) const override;
|
125 |
|
125 |
|
126 |
SWares *FindWare(const Utils::String &id) const;
|
126 |
SWares *findWare(const Utils::WString &id) const;
|
127 |
void AddWare(const Utils::String &sWareLine);
|
127 |
void addWare(const Utils::WString &sWareLine);
|
128 |
void addWareText(const Utils::WString &sText);
|
128 |
void addWareText(const Utils::WString &sText);
|
129 |
void AddWare(SWares *pWare);
|
129 |
void addWare(SWares *pWare);
|
130 |
void addWareText(SWares *pWare, int iLang, const Utils::WString &sName, const Utils::WString &sDesc);
|
130 |
void addWareText(SWares *pWare, int iLang, const Utils::WString &sName, const Utils::WString &sDesc);
|
131 |
void RemoveWare(const Utils::String &sWare);
|
131 |
void removeWare(const Utils::WString &sWare);
|
132 |
void RemoveWareText(const Utils::String &sName, int iLang);
|
132 |
void removeWareText(const Utils::WString &sName, int iLang);
|
133 |
void ClearWareText(SWares *pWare);
|
133 |
void clearWareText(SWares *pWare);
|
134 |
void ClearWareText(const Utils::String &sWare);
|
134 |
void clearWareText(const Utils::WString &sWare);
|
135 |
void ClearWares ();
|
135 |
void clearWares ();
|
136 |
bool AnyWares() const { return !m_lWares.empty(); }
|
136 |
bool anyWares() const { return !m_lWares.empty(); }
|
137 |
|
137 |
|
138 |
int CheckValidCustomStart () const;
|
138 |
int CheckValidCustomStart () const;
|
139 |
|
139 |
|
140 |
virtual bool computeSigned(bool updateFiles) const override;
|
140 |
virtual bool computeSigned(bool updateFiles) const override;
|
141 |
|
141 |
|
Line 156... |
Line 156... |
156 |
virtual BaseFileType type() const override { return BaseFileType::TYPE_SPK; }
|
156 |
virtual BaseFileType type() const override { return BaseFileType::TYPE_SPK; }
|
157 |
|
157 |
|
158 |
void MergePackage(CBaseFile *p);
|
158 |
void MergePackage(CBaseFile *p);
|
159 |
|
159 |
|
160 |
// old conversion functions
|
160 |
// old conversion functions
|
161 |
bool convertOld(const Utils::String &sOldFilename);
|
161 |
bool convertOld(const Utils::WString &sOldFilename);
|
162 |
static CSpkFile *convertFromOld(const Utils::String &sOldFilename);
|
162 |
static CSpkFile *convertFromOld(const Utils::WString &sOldFilename);
|
163 |
|
163 |
|
164 |
protected:
|
164 |
protected:
|
165 |
virtual void Delete ();
|
165 |
virtual void Delete ();
|
166 |
virtual void SetDefaults ();
|
166 |
virtual void SetDefaults ();
|
167 |
virtual bool _checkHeader(const Utils::WString &header) const override;
|
167 |
virtual bool _checkHeader(const Utils::WString &header) const override;
|
168 |
|
168 |
|
169 |
// old conversion functions
|
169 |
// old conversion functions
|
170 |
unsigned char *_convert_uncompressFile(const Utils::String &sOldFilename, int *pLen);
|
170 |
unsigned char *_convert_uncompressFile(const Utils::WString &sOldFilename, int *pLen);
|
171 |
void _convert_parse(const Utils::String &sCmd, const Utils::String &sRest);
|
171 |
void _convert_parse(const Utils::WString &sCmd, const Utils::WString &sRest);
|
172 |
Utils::String _convert_fileEndString(const Utils::String &sFile);
|
172 |
Utils::WString _convert_fileEndString(const Utils::WString &sFile);
|
173 |
FileType _convert_fileType(const Utils::String &sFile);
|
173 |
FileType _convert_fileType(const Utils::WString &sFile);
|
174 |
Utils::String _convert_parseFilename(const Utils::String &sRest, float fVersion, Utils::String *pDir);
|
174 |
Utils::WString _convert_parseFilename(const Utils::WString &sRest, float fVersion, Utils::WString *pDir);
|
175 |
unsigned char *_convert_parseFile(const Utils::String &s_Cmd, const Utils::String &s_Rest, float fVersion, unsigned char *d);
|
175 |
unsigned char *_convert_parseFile(const Utils::WString &s_Cmd, const Utils::WString &s_Rest, float fVersion, unsigned char *d);
|
176 |
|
176 |
|
177 |
// varibles
|
177 |
// varibles
|
178 |
Utils::WString m_sOtherAuthor;
|
178 |
Utils::WString m_sOtherAuthor;
|
179 |
Utils::WString m_sOtherName;
|
179 |
Utils::WString m_sOtherName;
|
180 |
Utils::WString m_sScriptType;
|
180 |
Utils::WString m_sScriptType;
|