Subversion Repositories spk

Rev

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