UFO: Alien Invasion
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
save_base.h
Go to the documentation of this file.
1
6
/*
7
Copyright (C) 2002-2020 UFO: Alien Invasion.
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
*/
24
25
#pragma once
26
27
#define SAVE_BASES_BASES "bases"
28
29
#define SAVE_BASES_BASE "base"
30
#define SAVE_BASES_IDX "idx"
31
#define SAVE_BASES_NAME "name"
32
#define SAVE_BASES_POS "pos"
33
#define SAVE_BASES_BASESTATUS "baseStatus"
34
#define SAVE_BASES_ALIENINTEREST "alienInterest"
35
36
#define SAVE_BASES_BUILDINGSPACE "buildingSpace"
37
#define SAVE_BASES_BUILDING "building"
38
#define SAVE_BASES_X "x"
39
#define SAVE_BASES_Y "y"
40
#define SAVE_BASES_BUILDINGINDEX "buildingIDX"
41
#define SAVE_BASES_BLOCKED "blocked"
42
43
#define SAVE_BASES_BUILDINGS "buildings"
44
#define SAVE_BASES_BUILDINGTYPE "buildingType"
45
#define SAVE_BASES_BUILDING_PLACE "buildingPlace"
46
#define SAVE_BASES_BUILDINGSTATUS "buildingStatus"
47
#define SAVE_BASES_BUILDINGTIMESTART "buildingTimeStart"
48
#define SAVE_BASES_BUILDINGBUILDTIME "buildingBuildTime"
49
#define SAVE_BASES_BUILDINGLEVEL "buildingLevel"
50
51
#define SAVE_BASES_BATTERIES "batteries"
52
#define SAVE_BASES_LASERS "lasers"
53
#define SAVE_BASES_WEAPON "weapon"
54
#define SAVE_BASES_AUTOFIRE "autoFire"
55
#define SAVE_BASES_TARGET "target"
56
57
#define SAVE_BASES_STORAGE "storage"
58
#define SAVE_BASES_ITEM "item"
59
#define SAVE_BASES_ODS_ID "id"
60
#define SAVE_BASES_NUM "num"
61
#define SAVE_BASES_NUMLOOSE "numLoose"
62
63
#define SAVE_BASES_RADARRANGE "radarRange"
64
#define SAVE_BASES_TRACKINGRANGE "trackingRange"
65
66
#define SAVE_BASES_ALIENCONTAINMENT "alienContainment"
67
68
#define SAVE_BASESTATUS_NAMESPACE "savebaseStatus"
69
#define SAVE_BUILDINGSTATUS_NAMESPACE "savebuildingStatus"
70
static
const
constListEntry_t
saveBaseConstants
[] = {
71
{
SAVE_BASESTATUS_NAMESPACE
"::underattack"
,
BASE_UNDER_ATTACK
},
72
{
SAVE_BASESTATUS_NAMESPACE
"::working"
,
BASE_WORKING
},
73
/* other base statuses (notused, destroyed) should not appear in savegames */
74
{
SAVE_BUILDINGSTATUS_NAMESPACE
"::construction"
,
B_STATUS_UNDER_CONSTRUCTION
},
75
{
SAVE_BUILDINGSTATUS_NAMESPACE
"::built"
,
B_STATUS_CONSTRUCTION_FINISHED
},
76
{
SAVE_BUILDINGSTATUS_NAMESPACE
"::working"
,
B_STATUS_WORKING
},
77
{
SAVE_BUILDINGSTATUS_NAMESPACE
"::down"
,
B_STATUS_DOWN
},
78
79
{
nullptr
, -1}
80
};
81
82
/*
83
DTD:
84
85
<!ELEMENT bases base+>
86
<!ELEMENT base pos buildingSpace buildings batteries lasers alienContainment?>
87
<!ATTLIST base
88
idx CDATA #REQUIRED
89
name CDATA #IMPLIED
90
baseStatus (underattack,
91
working) #REQUIRED
92
alienInterest CDATA '0'
93
currentAircraftIDX CDATA #IMPLIED
94
radarRange CDATA '0'
95
trackingRange CDATA '0'
96
>
97
98
<!ELEMENT pos EMPTY>
99
<!ATTLIST pos
100
x CDATA '0.0'
101
y CDATA '0.0'
102
z CDATA '0.0'
103
>
104
105
<!ELEMENT buildingSpace building+>
106
<!ELEMENT building EMPTY>
107
<!ATTLIST building
108
x CDATA '0'
109
y CDATA '0'
110
buildingIDX CDATA #IMPLIED
111
blocked CDATA 'false'
112
>
113
114
<!ELEMENT buildings building*>
115
<!ELEMENT building pos>
116
<!ATTLIST building
117
buildingType CDATA #REQUIRED
118
buildingPlace CDATA
119
buildingStatus (
120
121
122
)
123
buildingTimeStart CDATA '0'
124
buildingBuildTime CDATA '0'
125
buildingLevel CDATA '0'
126
>
127
128
<!ELEMENT batteries weapon*>
129
<!ELEMENT lasers weapon*>
130
<!ELEMENT weapon EMPTY>
131
<!ATTLIST weapon
132
autoFire CDATA 'true'
133
target CDATA #IMPLIED
134
...
135
>
136
**Note: more ATTLIST of weapon is defined in save_fightequip.h
137
138
<!ELEMENT storage item*>
139
140
<!ELEMENT item EMPTY>
141
<!ATTLIST item
142
id CDATA #REQUIRED
143
num CDATA '0'
144
numLoose CDATA '0'
145
>
146
*/
constListEntry_s
list of script aliases to register
Definition:
scripts.h:232
saveBaseConstants
static const constListEntry_t saveBaseConstants[]
Definition:
save_base.h:70
B_STATUS_CONSTRUCTION_FINISHED
Definition:
cp_building.h:34
B_STATUS_WORKING
Definition:
cp_building.h:36
BASE_UNDER_ATTACK
Definition:
cp_base.h:63
B_STATUS_DOWN
Definition:
cp_building.h:37
SAVE_BUILDINGSTATUS_NAMESPACE
#define SAVE_BUILDINGSTATUS_NAMESPACE
Definition:
save_base.h:69
BASE_WORKING
Definition:
cp_base.h:64
B_STATUS_UNDER_CONSTRUCTION
Definition:
cp_building.h:33
SAVE_BASESTATUS_NAMESPACE
#define SAVE_BASESTATUS_NAMESPACE
Definition:
save_base.h:68
src
client
cgame
campaign
save
save_base.h
Generated on Mon Feb 24 2020 05:28:04 for UFO: Alien Invasion by
1.8.8