Subversion Repositories spk

Rev

Rev 93 | Rev 126 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 93 Rev 94
Line 1... Line 1...
1
#pragma once
1
#pragma once
-
 
2
 
-
 
3
#include "spkdll.h"
-
 
4
#include "Utils/String.h"
-
 
5
#include "lists.h"
-
 
6
#include "CyString.h"
-
 
7
#include "StringList.h"
-
 
8
 
-
 
9
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 
10
// Forward Class declarations
-
 
11
 
-
 
12
class CXspFile;
-
 
13
class CBaseFile;
2
 
14
 
3
namespace SPK {
15
namespace SPK {
-
 
16
 
-
 
17
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 
18
// Enumerations
4
 
19
 
5
enum {INSTALLERR_NONE, INSTALLERR_VERSION, INSTALLERR_INVALID, INSTALLERR_NOMULTI, INSTALLERR_NOSHIP, INSTALLERR_UNKNOWN, INSTALLERR_NOEXIST, INSTALLERR_OLD};
20
enum {INSTALLERR_NONE, INSTALLERR_VERSION, INSTALLERR_INVALID, INSTALLERR_NOMULTI, INSTALLERR_NOSHIP, INSTALLERR_UNKNOWN, INSTALLERR_NOEXIST, INSTALLERR_OLD};
6
enum {INSTALLCHECK_OK, INSTALLCHECK_OLDVERSION, INSTALLCHECK_NOOTHERMOD, INSTALLCHECK_ALREADYQUEUED, INSTALLCHECK_WRONGGAME, INSTALLCHECK_WRONGVERSION, INSTALLCHECK_MODIFIED, INSTALLCHECK_NOSHIP};
21
enum {INSTALLCHECK_OK, INSTALLCHECK_OLDVERSION, INSTALLCHECK_NOOTHERMOD, INSTALLCHECK_ALREADYQUEUED, INSTALLCHECK_WRONGGAME, INSTALLCHECK_WRONGVERSION, INSTALLCHECK_MODIFIED, INSTALLCHECK_NOSHIP};
7
enum {PROGRESS_ENABLEFILE, PROGRESS_SHUFFLEFAKE, PROGRESS_DISABLEFILE};
22
enum {PROGRESS_ENABLEFILE, PROGRESS_SHUFFLEFAKE, PROGRESS_DISABLEFILE};
8
enum {PKERR_NONE, PKERR_NOPARENT, PKERR_MODIFIED, PKERR_MISSINGDEP, PKERR_NOOUTPUT, PKERR_DONTEXIST, PKERR_UNABLETOOPEN};
23
enum {PKERR_NONE, PKERR_NOPARENT, PKERR_MODIFIED, PKERR_MISSINGDEP, PKERR_NOOUTPUT, PKERR_DONTEXIST, PKERR_UNABLETOOPEN};
9
enum {WARETYPE_NONE, WARETYPE_DELETED, WARETYPE_ADDED, WARETYPE_DISABLED};
24
enum {WARETYPE_NONE, WARETYPE_DELETED, WARETYPE_ADDED, WARETYPE_DISABLED};
10
enum {WARES_BIO, WARES_ENERGY, WARES_FOOD, WARES_MINERAL, WARES_TECH, WARES_NATURAL, WAREBUFFERS};
25
enum {WARES_BIO, WARES_ENERGY, WARES_FOOD, WARES_MINERAL, WARES_TECH, WARES_NATURAL, WAREBUFFERS};
-
 
26
enum WareTypes {
-
 
27
	Ware_BuiltIn,
-
 
28
	Ware_EMP,
-
 
29
	Ware_Custom
-
 
30
};
11
 
31
 
-
 
32
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 
33
// Defines
-
 
34
 
12
#define IC_WRONGGAME		1
35
#define IC_WRONGGAME		1
13
#define IC_WRONGVERSION		2
36
#define IC_WRONGVERSION		2
14
#define IC_OLDVERSION		4
37
#define IC_OLDVERSION		4
15
#define IC_MODIFIED			8
38
#define IC_MODIFIED			8
16
#define IC_ALL				15
39
#define IC_ALL				15
Line 19... Line 42...
19
 
42
 
20
#define SHIPSTARTTEXT		500000
43
#define SHIPSTARTTEXT		500000
21
#define WARETEXTSTART		400000
44
#define WARETEXTSTART		400000
22
 
45
 
23
#define SafeDelete(a) if (a) delete a; a = NULL;
46
#define SafeDelete(a) if (a) delete a; a = NULL;
-
 
47
#define tstruct typedef struct SPKEXPORT
-
 
48
#define tclass class SPKEXPORT 
-
 
49
 
-
 
50
// text pages
-
 
51
#define TEXTPAGE_RACE		1266
-
 
52
#define TEXTPAGE_OBJECTS	17
-
 
53
#define TEXTPAGE_CLASS		2006
-
 
54
#define TEXTPAGE_CARGOCLASS	1999
-
 
55
 
-
 
56
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 
57
// Structures
-
 
58
 
-
 
59
tstruct SWareEntry {
-
 
60
	Utils::String name;
-
 
61
	Utils::String description;
-
 
62
	enum WareTypes type;
-
 
63
	Utils::String id;
-
 
64
	int			  relval;
-
 
65
	int			  notority;
-
 
66
	int			  position;
-
 
67
	CBaseFile	 *package;
-
 
68
} SWareEntry;
-
 
69
 
-
 
70
tstruct SCommandSlot {
-
 
71
	Utils::String name;
-
 
72
	Utils::String id;
-
 
73
	Utils::String info;
-
 
74
	Utils::String shortName;
-
 
75
	int			  slot;
-
 
76
	CBaseFile    *package;
-
 
77
} SCommandSlot;
-
 
78
 
-
 
79
 
-
 
80
tstruct SWaresText {
-
 
81
	int		iLang;
-
 
82
	Utils::String  sName;
-
 
83
	Utils::String  sDesc;
-
 
84
} SWaresText;
-
 
85
 
-
 
86
tstruct SWares {
-
 
87
	Utils::String  sID;
-
 
88
	char    cType;
-
 
89
	long	iPrice;
-
 
90
	int		iSize;
-
 
91
	int		iVolumn;
-
 
92
	int		iNotority;
-
 
93
	bool	bEnabled;
-
 
94
	int		iPosID;
-
 
95
	int		iDescID;
-
 
96
	int		iTextID;
-
 
97
	int		iTextPage;
-
 
98
	CLinkList<SWaresText> lText;
-
 
99
	int		iUsed;
-
 
100
} SWares;
-
 
101
 
-
 
102
tstruct SSettingType {
-
 
103
	Utils::String	sKey;
-
 
104
	int		iType;
-
 
105
} SSettingType;
24
 
106
 
25
tstruct SGameWare {
107
tstruct SGameWare {
26
	char cType;
108
	char cType;
27
	int iType;
109
	int iType;
28
	int iText;
110
	int iText;
Line 43... Line 125...
43
tstruct SBodies {
125
tstruct SBodies {
44
	CyString	 sNumbers;
126
	CyString	 sNumbers;
45
	CyString	 sSection;
127
	CyString	 sSection;
46
	CyStringList lEntries;
128
	CyStringList lEntries;
47
} SBodes;
129
} SBodes;
-
 
130
 
-
 
131
tstruct SNeededLibrary {
-
 
132
	Utils::String	sName;
-
 
133
	Utils::String	sAuthor;
-
 
134
	Utils::String	sMinVersion;
-
 
135
} SNeededLibrary;
-
 
136
 
-
 
137
tstruct SGameCompat {
-
 
138
	int			iGame;
-
 
139
	Utils::String	sVersion;
-
 
140
	int			iVersion;
-
 
141
} SGameCompat;
-
 
142
 
-
 
143
typedef struct SNames {
-
 
144
	int iLanguage;
-
 
145
	Utils::String sName;
-
 
146
} SNames;
48
 
147
 
49
tstruct SAvailablePackage {
148
tstruct SAvailablePackage {
50
	CLinkList<SGameCompat> lGames;
149
	CLinkList<SGameCompat> lGames;
51
	int			iType;
150
	int			iType;
52
	int			iPluginType;
151
	int			iPluginType;
Line 60... Line 159...
60
	int			iRec;
159
	int			iRec;
61
	CyString	sFilename;
160
	CyString	sFilename;
62
	int			iScriptType;
161
	int			iScriptType;
63
	bool		bSigned;
162
	bool		bSigned;
64
} SAvailablePackage;
163
} SAvailablePackage;
65
 
164
 
66
tstruct SWarePriceOverride {
165
tstruct SWarePriceOverride {
67
	enum WareTypes type;
166
	enum WareTypes type;
68
	int			   pos;
167
	int			   pos;
69
	Utils::String  id;
168
	Utils::String  id;
70
	int			   relval;
169
	int			   relval;
71
	int			   notority;
170
	int			   notority;
72
	bool		   bNotority;
171
	bool		   bNotority;
73
} SWarePriceOverride;
172
} SWarePriceOverride;
-
 
173
 
74
 
174
 
75
}
175
}