Subversion Repositories spk

Rev

Rev 214 | Details | Compare with Previous | Last modification | View Log | RSS feed

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