Subversion Repositories spk

Rev

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