Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOTypes.h
Go to the documentation of this file.
1/*
2
3OOTypes.h
4
5Various simple types that don't require us to pull in the associated class
6headers.
7
8Oolite
9Copyright (C) 2004-2013 Giles C Williams and contributors
10
11This program is free software; you can redistribute it and/or
12modify it under the terms of the GNU General Public License
13as published by the Free Software Foundation; either version 2
14of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
24MA 02110-1301, USA.
25
26*/
27
29#include "OOCocoa.h"
30
31
38
39
40#define ENTRY(label, value) label,
41
42typedef enum
43{
44 #include "OOViewID.tbl"
45
46 kOOViewIDDefault = VIEW_NONE
48
49typedef enum
50{
51 #include "OOLongRangeChartMode.tbl"
52
53 kOOLongRangeChartModeDefault = OOLRC_MODE_UNKNOWN
55
56#undef ENTRY
57
58
66
67
79
80/*
81enum
82{
83 COMMODITY_UNDEFINED = -1,
84
85 // FIXME: hard-coded commodity types are used in OOJSManifest. Everything else is data-driven.
86 COMMODITY_FOOD, // = 0
87 COMMODITY_TEXTILES,
88 COMMODITY_RADIOACTIVES,
89 COMMODITY_SLAVES,
90 COMMODITY_LIQUOR_WINES,
91 COMMODITY_LUXURIES,
92 COMMODITY_NARCOTICS,
93 COMMODITY_COMPUTERS,
94 COMMODITY_MACHINERY,
95 COMMODITY_ALLOYS,
96 COMMODITY_FIREARMS,
97 COMMODITY_FURS,
98 COMMODITY_MINERALS,
99 COMMODITY_GOLD,
100 COMMODITY_PLATINUM,
101 COMMODITY_GEM_STONES,
102 COMMODITY_ALIEN_ITEMS
103};
104typedef NSInteger OOCommodityType;
105*/
106typedef NSString* OOCommodityType;
107
120
121
128
129
140
141
142#define ENTRY(label, value) label = value,
143
144typedef enum
145{
146 #include "OOCompassMode.tbl"
148
149enum
150{
151 kOOCompassModeDefault = COMPASS_MODE_BASIC
153
154#undef ENTRY
155
156typedef enum
157{
158#define DIFF_STRING_ENTRY(label, string) label,
159 #include "OOLegalStatusReason.tbl"
160#undef DIFF_STRING_ENTRY
161
162 kOOLegalStatusReasonDefault = kOOLegalStatusReasonUnknown
164
165
174
175
176typedef uint32_t OOCargoQuantity;
177typedef int32_t OOCargoQuantityDelta;
178
179typedef uint16_t OOFuelQuantity;
180
181
182typedef uint64_t OOCreditsQuantity;
183#define kOOMaxCredits ULLONG_MAX
184
185
186typedef uint16_t OOKeyCode;
187
188
189typedef uint16_t OOUniversalID; // Valid IDs range from 100 to 1000.
190
191enum
192{
198
199
200enum
201{
204typedef NSUInteger OOTechLevelID; // 0..14, 99 is special. NSNotFound is used, so NSUInteger required.
205
206typedef uint8_t OOGovernmentID; // 0..7
207typedef uint8_t OOEconomyID; // 0..7
208
209
210typedef uint8_t OOGalaxyID; // 0..7
211typedef int16_t OOSystemID; // 0..255, -1 for interstellar space (?)
212
213
214enum
215{
221
222
223typedef double OOTimeAbsolute;
224typedef double OOTimeDelta;
225
226
236
237typedef uint8_t OOWeaponFacingSet; // May have multiple bits set.
238
239#define VALID_WEAPON_FACINGS (WEAPON_FACING_NONE | WEAPON_FACING_FORWARD | WEAPON_FACING_AFT | WEAPON_FACING_PORT | WEAPON_FACING_STARBOARD)
240
241
OOLongRangeChartMode
Definition OOTypes.h:50
@ kOOLongRangeChartModeDefault
Definition OOTypes.h:53
uint16_t OOKeyCode
Definition OOTypes.h:186
uint16_t OOFuelQuantity
Definition OOTypes.h:179
uint8_t OOWeaponFacingSet
Definition OOTypes.h:237
NSString * OOCommodityType
Definition OOTypes.h:106
OOAegisStatus
Definition OOTypes.h:60
@ AEGIS_IN_DOCKING_RANGE
Definition OOTypes.h:64
@ AEGIS_CLOSE_TO_MAIN_PLANET
Definition OOTypes.h:63
@ AEGIS_CLOSE_TO_ANY_PLANET
Definition OOTypes.h:62
@ AEGIS_NONE
Definition OOTypes.h:61
OORouteType
Definition OOTypes.h:33
@ OPTIMIZED_BY_NONE
Definition OOTypes.h:34
@ OPTIMIZED_BY_JUMPS
Definition OOTypes.h:35
@ OPTIMIZED_BY_TIME
Definition OOTypes.h:36
OOGraphicsDetail
Definition OOTypes.h:243
@ DETAIL_LEVEL_EXTRAS
Definition OOTypes.h:247
@ DETAIL_LEVEL_SHADERS
Definition OOTypes.h:246
@ DETAIL_LEVEL_MAXIMUM
Definition OOTypes.h:251
@ DETAIL_LEVEL_MINIMUM
Definition OOTypes.h:244
@ DETAIL_LEVEL_NORMAL
Definition OOTypes.h:245
OOLegalStatusReason
Definition OOTypes.h:157
@ kOOLegalStatusReasonDefault
Definition OOTypes.h:162
OOViewID
Definition OOTypes.h:43
@ kOOViewIDDefault
Definition OOTypes.h:46
uint64_t OOCreditsQuantity
Definition OOTypes.h:182
@ kOOVariableTechLevel
Definition OOTypes.h:202
uint16_t OOUniversalID
Definition OOTypes.h:189
NSUInteger OOTechLevelID
Definition OOTypes.h:204
int16_t OOSystemID
Definition OOTypes.h:211
OOCompassMode
Definition OOTypes.h:145
int32_t OOCargoQuantityDelta
Definition OOTypes.h:177
OOCargoType
Definition OOTypes.h:69
@ CARGO_RANDOM
Definition OOTypes.h:75
@ CARGO_NOT_CARGO
Definition OOTypes.h:70
@ CARGO_THARGOID
Definition OOTypes.h:74
@ CARGO_CHARACTER
Definition OOTypes.h:77
@ CARGO_SLAVES
Definition OOTypes.h:71
@ CARGO_ALLOY
Definition OOTypes.h:72
@ CARGO_SCRIPTED_ITEM
Definition OOTypes.h:76
@ CARGO_MINERALS
Definition OOTypes.h:73
uint8_t OOGalaxyID
Definition OOTypes.h:210
uint32_t OOCargoQuantity
Definition OOTypes.h:176
OOMassUnit
Definition OOTypes.h:123
@ UNITS_TONS
Definition OOTypes.h:124
@ UNITS_GRAMS
Definition OOTypes.h:126
@ UNITS_KILOGRAMS
Definition OOTypes.h:125
double OOTimeDelta
Definition OOTypes.h:224
@ kOOMaximumSystemID
Definition OOTypes.h:217
@ kOOMaximumGalaxyID
Definition OOTypes.h:216
@ kOOSystemIDInterstellarSpace
Definition OOTypes.h:219
@ kOOMinimumSystemID
Definition OOTypes.h:218
OOCargoFlag
Definition OOTypes.h:109
@ CARGO_FLAG_FULL_CONTRABAND
Definition OOTypes.h:114
@ CARGO_FLAG_FULL_SCARCE
Definition OOTypes.h:112
@ CARGO_FLAG_FULL_PLENTIFUL
Definition OOTypes.h:111
@ CARGO_FLAG_PIRATE
Definition OOTypes.h:115
@ CARGO_FLAG_CANISTERS
Definition OOTypes.h:117
@ CARGO_FLAG_FULL_UNIFORM
Definition OOTypes.h:116
@ CARGO_FLAG_FULL_MEDICAL
Definition OOTypes.h:113
@ CARGO_FLAG_FULL_PASSENGERS
Definition OOTypes.h:118
@ CARGO_FLAG_NONE
Definition OOTypes.h:110
uint8_t OOGovernmentID
Definition OOTypes.h:206
OODockingClearanceStatus
Definition OOTypes.h:167
@ DOCKING_CLEARANCE_STATUS_TIMING_OUT
Definition OOTypes.h:172
@ DOCKING_CLEARANCE_STATUS_NOT_REQUIRED
Definition OOTypes.h:169
@ DOCKING_CLEARANCE_STATUS_GRANTED
Definition OOTypes.h:171
@ DOCKING_CLEARANCE_STATUS_NONE
Definition OOTypes.h:168
@ DOCKING_CLEARANCE_STATUS_REQUESTED
Definition OOTypes.h:170
double OOTimeAbsolute
Definition OOTypes.h:223
@ MIN_ENTITY_UID
Definition OOTypes.h:195
@ MAX_ENTITY_UID
Definition OOTypes.h:196
@ UNIVERSE_MAX_ENTITIES
Definition OOTypes.h:193
@ NO_TARGET
Definition OOTypes.h:194
OOWeaponFacing
Definition OOTypes.h:228
@ WEAPON_FACING_FORWARD
Definition OOTypes.h:229
@ WEAPON_FACING_NONE
Definition OOTypes.h:234
@ WEAPON_FACING_AFT
Definition OOTypes.h:230
@ WEAPON_FACING_PORT
Definition OOTypes.h:231
@ WEAPON_FACING_STARBOARD
Definition OOTypes.h:232
OOEnergyUnitType
Definition OOTypes.h:131
@ ENERGY_UNIT_NORMAL
Definition OOTypes.h:137
@ ENERGY_UNIT_NAVAL_DAMAGED
Definition OOTypes.h:134
@ ENERGY_UNIT_NAVAL
Definition OOTypes.h:138
@ OLD_ENERGY_UNIT_NORMAL
Definition OOTypes.h:135
@ ENERGY_UNIT_NONE
Definition OOTypes.h:132
@ OLD_ENERGY_UNIT_NAVAL
Definition OOTypes.h:136
@ ENERGY_UNIT_NORMAL_DAMAGED
Definition OOTypes.h:133
uint8_t OOEconomyID
Definition OOTypes.h:207
@ kOOCompassModeDefault
Definition OOTypes.h:151