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 
< built: can not produce this object in this mission
Definition: global.h:59
< too close to the rocket
Definition: global.h:56
< nuclear
Definition: global.h:237
< goto destination occupied
Definition: global.h:82
< research ended
Definition: global.h:147
< factory
Definition: global.h:209
< not enough flat ground
Definition: global.h:53
< no battery
Definition: global.h:87
< no energy underground
Definition: global.h:84
< search ended
Definition: global.h:131
< the wrong type of battery
Definition: global.h:89
< ai scripts
Definition: global.h:187
< lost immediately
Definition: global.h:154
< built: not possible in movement
Definition: global.h:58
< built: can not produce not researched object
Definition: global.h:60
< insect killed
Definition: global.h:160
< nothing to analyze
Definition: global.h:97
< analyzes only organic ball
Definition: global.h:98
< vehicle too close
Definition: global.h:106
JoyAxisSlot
Slots for joystick axes inputs.
Definition: global.h:285
< insect killed
Definition: global.h:158
< location for derrick found
Definition: global.h:140
< vehicle too close
Definition: global.h:105
< too many flags
Definition: global.h:118
< location for derrick found
Definition: global.h:139
< caterpillars
Definition: global.h:233
< music
Definition: global.h:193
< not enough energy
Definition: global.h:92
< stops
Definition: global.h:35
< not enough energy
Definition: global.h:65
< factory of cells
Definition: global.h:213
< textures
Definition: global.h:196
< derrick
Definition: global.h:210
< nuclear power plant
Definition: global.h:214
< busy: location already occupied
Definition: global.h:42
< no battery
Definition: global.h:85
< not enough flat ground space
Definition: global.h:54
< research ended
Definition: global.h:149
< any error
Definition: global.h:33
< record done
Definition: global.h:155
< location for derrick found
Definition: global.h:138
< metal available
Definition: global.h:130
< cannon
Definition: global.h:235
< building destroyed
Definition: global.h:123
< no metal
Definition: global.h:104
< not possible under water
Definition: global.h:48
< transforms only the metal
Definition: global.h:94
< insect killed
Definition: global.h:161
< vehicle infected by a virus
Definition: global.h:108
< nuclear battery available
Definition: global.h:136
< insect killed
Definition: global.h:159
< no information terminal
Definition: global.h:107
< location occupied
Definition: global.h:55
< you must be on spaceship
Definition: global.h:96
< lightning protection
Definition: global.h:220
< inappropriate vehicle
Definition: global.h:37
< research ended
Definition: global.h:145
< research ended
Definition: global.h:151
< way mark deleted
Definition: global.h:156
< lack of metal
Definition: global.h:93
< not enough energy
Definition: global.h:73
< location for derrick found
Definition: global.h:141
< more energy
Definition: global.h:113
< impossible in flight
Definition: global.h:38
< location for station found
Definition: global.h:137
< no battery
Definition: global.h:112
< doors locked
Definition: global.h:95
< find impossible
Definition: global.h:79
< analysis ended
Definition: global.h:133
< inappropriate ground
Definition: global.h:66
InputSlot
Available slots for input bindings.
Definition: global.h:251
< not possible in flight
Definition: global.h:61
< lost
Definition: global.h:153
< nothing to deposit
Definition: global.h:46
BuildType
Construction actions (buildings, etc.) available to user.
Definition: global.h:206
< inappropriate vehicle
Definition: global.h:72
< radar
Definition: global.h:212
< taking: already creating flag
Definition: global.h:117
< not enough energy
Definition: global.h:70
< analysis already made
Definition: global.h:99
ResearchType
Research actions available to user.
Definition: global.h:230
< levels
Definition: global.h:191
< defense tower
Definition: global.h:236
< inappropriate vehicle
Definition: global.h:111
< wings
Definition: global.h:234
< legs of insects
Definition: global.h:241
< taking: nothing has to take
Definition: global.h:40
< base station
Definition: global.h:215
< no energy underground
Definition: global.h:91
< building infected by a virus
Definition: global.h:109
< lack of metal
Definition: global.h:52
< defense tower
Definition: global.h:217
< research center
Definition: global.h:218
< compulsory instruction missing
Definition: global.h:125
< lack of ruin
Definition: global.h:74
< win
Definition: global.h:152
< insect killed
Definition: global.h:157
< inappropriate vehicle
Definition: global.h:62
< impossible in movement
Definition: global.h:116
< models
Definition: global.h:192
< thumper
Definition: global.h:238
< busy: impossible to move
Definition: global.h:41
< impossible during swimming
Definition: global.h:115
< nothing to remove
Definition: global.h:120
< buildings too close
Definition: global.h:57
< not enough energy
Definition: global.h:101
< research ended
Definition: global.h:144
< fonts
Definition: global.h:188
< recycler
Definition: global.h:243
< no ore underground
Definition: global.h:83
< icons & images
Definition: global.h:190
< not possible in flight
Definition: global.h:47
< research ended
Definition: global.h:148
< goto too complicated
Definition: global.h:81
DataDir
Directories in data directory.
Definition: global.h:184
< use your SatCom
Definition: global.h:163
< help files
Definition: global.h:189
< more energy
Definition: global.h:88
< flat floor
Definition: global.h:223
< not found anything to destroy
Definition: global.h:110
< research already done
Definition: global.h:90
< repair center
Definition: global.h:216
< no energy underground
Definition: global.h:100
< transforms only uranium
Definition: global.h:103
< not enough energy
Definition: global.h:49
< move impossible
Definition: global.h:78
< inappropriate vehicle
Definition: global.h:76
< inappropriate vehicle
Definition: global.h:69
< lack of metal (too far)
Definition: global.h:50
< unknown command
Definition: global.h:36
< taking: hands already occupied
Definition: global.h:39
< instruction prohibited
Definition: global.h:127
Error
Type of error or info message.
Definition: global.h:29
< not possible under water
Definition: global.h:45
< ok
Definition: global.h:32
< goto impossible
Definition: global.h:80
< vehicle manufactured
Definition: global.h:132
< information terminal
Definition: global.h:221
< location for derrick found
Definition: global.h:142
< impossible in movement
Definition: global.h:63
< not possible in flight
Definition: global.h:71
< too many objects
Definition: global.h:124
< construction builded
Definition: global.h:129
< submarine
Definition: global.h:244
< laboratory
Definition: global.h:219
< object too close
Definition: global.h:68
< inappropriate vehicle
Definition: global.h:64
< Destroyer
Definition: global.h:222
< impossible because radioactive
Definition: global.h:44
< converter
Definition: global.h:211
< shield
Definition: global.h:239
< impossible in flight
Definition: global.h:114
< not enough energy
Definition: global.h:77
< too close
Definition: global.h:119
< location for derrick found
Definition: global.h:143
< no other vehicle
Definition: global.h:43
< phazer gun
Definition: global.h:240
< first information
Definition: global.h:128
Language
Application language.
Definition: global.h:170
< sounds
Definition: global.h:194
< nuclear battery available
Definition: global.h:135
< research ended
Definition: global.h:150
< lack of metal (too close)
Definition: global.h:51
< continues
Definition: global.h:34
< more energy
Definition: global.h:86
< vehicle destroyed
Definition: global.h:122
< cannon of insects
Definition: global.h:242
< building too close
Definition: global.h:67
< battery available
Definition: global.h:134
< no stone was transformed
Definition: global.h:75
< Mission not completed
Definition: global.h:121
< research ended
Definition: global.h:146
< lack of uranium
Definition: global.h:102