Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
global.h
Go to the documentation of this file.
1 // * This file is part of the COLOBOT source code
2 // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
3 // *
4 // * This program is free software: you can redistribute it and/or modify
5 // * it under the terms of the GNU General Public License as published by
6 // * the Free Software Foundation, either version 3 of the License, or
7 // * (at your option) any later version.
8 // *
9 // * This program is distributed in the hope that it will be useful,
10 // * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // * GNU General Public License for more details.
13 // *
14 // * You should have received a copy of the GNU General Public License
15 // * along with this program. If not, see http://www.gnu.org/licenses/.
16 
22 #pragma once
23 
24 
29 enum Error
30 {
31  ERR_OK = 0,
34  ERR_STOP = 3,
35  ERR_CMD = 4,
36  ERR_MANIP_VEH = 100,
37  ERR_MANIP_FLY = 101,
39  ERR_MANIP_NIL = 103,
41  ERR_MANIP_OCC = 106,
46  ERR_BUILD_FLY = 120,
63  ERR_TERRA_VEH = 150,
68  ERR_FIRE_VEH = 160,
70  ERR_FIRE_FLY = 162,
80  ERR_GOTO_ITER = 211,
81  ERR_GOTO_BUSY = 212,
96  ERR_LABO_NULL = 350,
97  ERR_LABO_BAD = 351,
113  ERR_FLAG_FLY = 510,
123  ERR_TOOMANY = 702,
126 
127  INFO_FIRST = 10000,
128  INFO_BUILD = 10001,
129  INFO_CONVERT = 10002,
130  INFO_RESEARCH = 10003,
131  INFO_FACTORY = 10004,
132  INFO_LABO = 10005,
133  INFO_ENERGY = 10006,
134  INFO_NUCLEAR = 10007,
135  INFO_FINDING = 10008,
136  INFO_MARKPOWER = 10020,
138  INFO_MARKSTONE = 10022,
139  INFO_MARKKEYa = 10023,
140  INFO_MARKKEYb = 10024,
141  INFO_MARKKEYc = 10025,
142  INFO_MARKKEYd = 10026,
151  INFO_WIN = 10040,
152  INFO_LOST = 10041,
153  INFO_LOSTq = 10042,
154  INFO_WRITEOK = 10043,
155  INFO_DELETEPATH = 10050,
157  INFO_DELETEANT = 10101,
158  INFO_DELETEBEE = 10102,
159  INFO_DELETEWORM = 10103,
162 
164 };
165 
171 {
172  LANGUAGE_ENV = -1,
173  LANGUAGE_ENGLISH = 0,
174  LANGUAGE_FRENCH = 1,
175  LANGUAGE_GERMAN = 2,
176  LANGUAGE_POLISH = 3,
177  LANGUAGE_RUSSIAN = 4
178 };
179 
185 {
186  DIR_AI,
195 
197 };
198 
199 
207 {
208  BUILD_FACTORY = (1<<0),
209  BUILD_DERRICK = (1<<1),
210  BUILD_CONVERT = (1<<2),
211  BUILD_RADAR = (1<<3),
212  BUILD_ENERGY = (1<<4),
213  BUILD_NUCLEAR = (1<<5),
214  BUILD_STATION = (1<<6),
215  BUILD_REPAIR = (1<<7),
216  BUILD_TOWER = (1<<8),
217  BUILD_RESEARCH = (1<<9),
218  BUILD_LABO = (1<<10),
219  BUILD_PARA = (1<<11),
220  BUILD_INFO = (1<<12),
221  BUILD_DESTROYER = (1<<13),
222  BUILD_GFLAT = (1<<16),
223  BUILD_FLAG = (1<<17)
224 };
225 
231 {
232  RESEARCH_TANK = (1<<0),
233  RESEARCH_FLY = (1<<1),
234  RESEARCH_CANON = (1<<2),
235  RESEARCH_TOWER = (1<<3),
236  RESEARCH_ATOMIC = (1<<4),
237  RESEARCH_THUMP = (1<<5),
238  RESEARCH_SHIELD = (1<<6),
239  RESEARCH_PHAZER = (1<<7),
240  RESEARCH_iPAW = (1<<8),
241  RESEARCH_iGUN = (1<<9),
242  RESEARCH_RECYCLER = (1<<10),
243  RESEARCH_SUBM = (1<<11),
244  RESEARCH_SNIFFER = (1<<12)
245 };
246 
252 {
253  INPUT_SLOT_LEFT = 0,
254  INPUT_SLOT_RIGHT = 1,
255  INPUT_SLOT_UP = 2,
256  INPUT_SLOT_DOWN = 3,
257  INPUT_SLOT_GUP = 4,
258  INPUT_SLOT_GDOWN = 5,
259  INPUT_SLOT_CAMERA = 6,
260  INPUT_SLOT_DESEL = 7,
261  INPUT_SLOT_ACTION = 8,
262  INPUT_SLOT_NEAR = 9,
263  INPUT_SLOT_AWAY = 10,
264  INPUT_SLOT_NEXT = 11,
265  INPUT_SLOT_HUMAN = 12,
266  INPUT_SLOT_QUIT = 13,
267  INPUT_SLOT_HELP = 14,
268  INPUT_SLOT_PROG = 15,
269  INPUT_SLOT_VISIT = 16,
270  INPUT_SLOT_SPEED10 = 17,
271  INPUT_SLOT_SPEED15 = 18,
272  INPUT_SLOT_SPEED20 = 19,
273  INPUT_SLOT_SPEED30 = 20,
274  INPUT_SLOT_AIMUP = 21,
275  INPUT_SLOT_AIMDOWN = 22,
276  INPUT_SLOT_CBOT = 23,
277 
278  INPUT_SLOT_MAX
279 };
280 
286 {
287  JOY_AXIS_SLOT_X,
288  JOY_AXIS_SLOT_Y,
289  JOY_AXIS_SLOT_Z,
290 
291  JOY_AXIS_SLOT_MAX
292 };
293 
294 
295 // TODO: move to CRobotMain
296 extern long g_id; // unique identifier
297 extern int g_build; // constructible buildings
298 extern int g_researchDone; // research done
299 extern long g_researchEnable; // research available
300 extern float g_unit; // conversion factor
301 
&lt; built: can not produce this object in this mission
Definition: global.h:59
&lt; too close to the rocket
Definition: global.h:56
&lt; nuclear
Definition: global.h:237
&lt; goto destination occupied
Definition: global.h:82
&lt; research ended
Definition: global.h:147
&lt; factory
Definition: global.h:209
&lt; not enough flat ground
Definition: global.h:53
&lt; no battery
Definition: global.h:87
&lt; no energy underground
Definition: global.h:84
&lt; search ended
Definition: global.h:131
&lt; the wrong type of battery
Definition: global.h:89
&lt; ai scripts
Definition: global.h:187
&lt; lost immediately
Definition: global.h:154
&lt; built: not possible in movement
Definition: global.h:58
&lt; built: can not produce not researched object
Definition: global.h:60
&lt; insect killed
Definition: global.h:160
&lt; nothing to analyze
Definition: global.h:97
&lt; analyzes only organic ball
Definition: global.h:98
&lt; vehicle too close
Definition: global.h:106
JoyAxisSlot
Slots for joystick axes inputs.
Definition: global.h:285
&lt; insect killed
Definition: global.h:158
&lt; location for derrick found
Definition: global.h:140
&lt; vehicle too close
Definition: global.h:105
&lt; too many flags
Definition: global.h:118
&lt; location for derrick found
Definition: global.h:139
&lt; caterpillars
Definition: global.h:233
&lt; music
Definition: global.h:193
&lt; not enough energy
Definition: global.h:92
&lt; stops
Definition: global.h:35
&lt; not enough energy
Definition: global.h:65
&lt; factory of cells
Definition: global.h:213
&lt; textures
Definition: global.h:196
&lt; derrick
Definition: global.h:210
&lt; nuclear power plant
Definition: global.h:214
&lt; busy: location already occupied
Definition: global.h:42
&lt; no battery
Definition: global.h:85
&lt; not enough flat ground space
Definition: global.h:54
&lt; research ended
Definition: global.h:149
&lt; any error
Definition: global.h:33
&lt; record done
Definition: global.h:155
&lt; location for derrick found
Definition: global.h:138
&lt; metal available
Definition: global.h:130
&lt; cannon
Definition: global.h:235
&lt; building destroyed
Definition: global.h:123
&lt; no metal
Definition: global.h:104
&lt; not possible under water
Definition: global.h:48
&lt; transforms only the metal
Definition: global.h:94
&lt; insect killed
Definition: global.h:161
&lt; vehicle infected by a virus
Definition: global.h:108
&lt; nuclear battery available
Definition: global.h:136
&lt; insect killed
Definition: global.h:159
&lt; no information terminal
Definition: global.h:107
&lt; location occupied
Definition: global.h:55
&lt; you must be on spaceship
Definition: global.h:96
&lt; lightning protection
Definition: global.h:220
&lt; inappropriate vehicle
Definition: global.h:37
&lt; research ended
Definition: global.h:145
&lt; research ended
Definition: global.h:151
&lt; way mark deleted
Definition: global.h:156
&lt; lack of metal
Definition: global.h:93
&lt; not enough energy
Definition: global.h:73
&lt; location for derrick found
Definition: global.h:141
&lt; more energy
Definition: global.h:113
&lt; impossible in flight
Definition: global.h:38
&lt; location for station found
Definition: global.h:137
&lt; no battery
Definition: global.h:112
&lt; doors locked
Definition: global.h:95
&lt; find impossible
Definition: global.h:79
&lt; analysis ended
Definition: global.h:133
&lt; inappropriate ground
Definition: global.h:66
InputSlot
Available slots for input bindings.
Definition: global.h:251
&lt; not possible in flight
Definition: global.h:61
&lt; lost
Definition: global.h:153
&lt; nothing to deposit
Definition: global.h:46
BuildType
Construction actions (buildings, etc.) available to user.
Definition: global.h:206
&lt; inappropriate vehicle
Definition: global.h:72
&lt; radar
Definition: global.h:212
&lt; taking: already creating flag
Definition: global.h:117
&lt; not enough energy
Definition: global.h:70
&lt; analysis already made
Definition: global.h:99
ResearchType
Research actions available to user.
Definition: global.h:230
&lt; levels
Definition: global.h:191
&lt; defense tower
Definition: global.h:236
&lt; inappropriate vehicle
Definition: global.h:111
&lt; wings
Definition: global.h:234
&lt; legs of insects
Definition: global.h:241
&lt; taking: nothing has to take
Definition: global.h:40
&lt; base station
Definition: global.h:215
&lt; no energy underground
Definition: global.h:91
&lt; building infected by a virus
Definition: global.h:109
&lt; lack of metal
Definition: global.h:52
&lt; defense tower
Definition: global.h:217
&lt; research center
Definition: global.h:218
&lt; compulsory instruction missing
Definition: global.h:125
&lt; lack of ruin
Definition: global.h:74
&lt; win
Definition: global.h:152
&lt; insect killed
Definition: global.h:157
&lt; inappropriate vehicle
Definition: global.h:62
&lt; impossible in movement
Definition: global.h:116
&lt; models
Definition: global.h:192
&lt; thumper
Definition: global.h:238
&lt; busy: impossible to move
Definition: global.h:41
&lt; impossible during swimming
Definition: global.h:115
&lt; nothing to remove
Definition: global.h:120
&lt; buildings too close
Definition: global.h:57
&lt; not enough energy
Definition: global.h:101
&lt; research ended
Definition: global.h:144
&lt; fonts
Definition: global.h:188
&lt; recycler
Definition: global.h:243
&lt; no ore underground
Definition: global.h:83
&lt; icons &amp; images
Definition: global.h:190
&lt; not possible in flight
Definition: global.h:47
&lt; research ended
Definition: global.h:148
&lt; goto too complicated
Definition: global.h:81
DataDir
Directories in data directory.
Definition: global.h:184
&lt; use your SatCom
Definition: global.h:163
&lt; help files
Definition: global.h:189
&lt; more energy
Definition: global.h:88
&lt; flat floor
Definition: global.h:223
&lt; not found anything to destroy
Definition: global.h:110
&lt; research already done
Definition: global.h:90
&lt; repair center
Definition: global.h:216
&lt; no energy underground
Definition: global.h:100
&lt; transforms only uranium
Definition: global.h:103
&lt; not enough energy
Definition: global.h:49
&lt; move impossible
Definition: global.h:78
&lt; inappropriate vehicle
Definition: global.h:76
&lt; inappropriate vehicle
Definition: global.h:69
&lt; lack of metal (too far)
Definition: global.h:50
&lt; unknown command
Definition: global.h:36
&lt; taking: hands already occupied
Definition: global.h:39
&lt; instruction prohibited
Definition: global.h:127
Error
Type of error or info message.
Definition: global.h:29
&lt; not possible under water
Definition: global.h:45
&lt; ok
Definition: global.h:32
&lt; goto impossible
Definition: global.h:80
&lt; vehicle manufactured
Definition: global.h:132
&lt; information terminal
Definition: global.h:221
&lt; location for derrick found
Definition: global.h:142
&lt; impossible in movement
Definition: global.h:63
&lt; not possible in flight
Definition: global.h:71
&lt; too many objects
Definition: global.h:124
&lt; construction builded
Definition: global.h:129
&lt; submarine
Definition: global.h:244
&lt; laboratory
Definition: global.h:219
&lt; object too close
Definition: global.h:68
&lt; inappropriate vehicle
Definition: global.h:64
&lt; Destroyer
Definition: global.h:222
&lt; impossible because radioactive
Definition: global.h:44
&lt; converter
Definition: global.h:211
&lt; shield
Definition: global.h:239
&lt; impossible in flight
Definition: global.h:114
&lt; not enough energy
Definition: global.h:77
&lt; too close
Definition: global.h:119
&lt; location for derrick found
Definition: global.h:143
&lt; no other vehicle
Definition: global.h:43
&lt; phazer gun
Definition: global.h:240
&lt; first information
Definition: global.h:128
Language
Application language.
Definition: global.h:170
&lt; sounds
Definition: global.h:194
&lt; nuclear battery available
Definition: global.h:135
&lt; research ended
Definition: global.h:150
&lt; lack of metal (too close)
Definition: global.h:51
&lt; continues
Definition: global.h:34
&lt; more energy
Definition: global.h:86
&lt; vehicle destroyed
Definition: global.h:122
&lt; cannon of insects
Definition: global.h:242
&lt; building too close
Definition: global.h:67
&lt; battery available
Definition: global.h:134
&lt; no stone was transformed
Definition: global.h:75
&lt; Mission not completed
Definition: global.h:121
&lt; research ended
Definition: global.h:146
&lt; lack of uranium
Definition: global.h:102