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,
127 
128  INFO_FIRST = 10000,
129  INFO_BUILD = 10001,
130  INFO_CONVERT = 10002,
131  INFO_RESEARCH = 10003,
132  INFO_FACTORY = 10004,
133  INFO_LABO = 10005,
134  INFO_ENERGY = 10006,
135  INFO_NUCLEAR = 10007,
136  INFO_FINDING = 10008,
137  INFO_MARKPOWER = 10020,
139  INFO_MARKSTONE = 10022,
140  INFO_MARKKEYa = 10023,
141  INFO_MARKKEYb = 10024,
142  INFO_MARKKEYc = 10025,
143  INFO_MARKKEYd = 10026,
152  INFO_WIN = 10040,
153  INFO_LOST = 10041,
154  INFO_LOSTq = 10042,
155  INFO_WRITEOK = 10043,
156  INFO_DELETEPATH = 10050,
158  INFO_DELETEANT = 10101,
159  INFO_DELETEBEE = 10102,
160  INFO_DELETEWORM = 10103,
163 
165 };
166 
172 {
173  LANGUAGE_ENV = -1,
174  LANGUAGE_ENGLISH = 0,
175  LANGUAGE_FRENCH = 1,
176  LANGUAGE_GERMAN = 2,
177  LANGUAGE_POLISH = 3,
178  LANGUAGE_RUSSIAN = 4
179 };
180 
181 
189 {
190  BUILD_FACTORY = (1<<0),
191  BUILD_DERRICK = (1<<1),
192  BUILD_CONVERT = (1<<2),
193  BUILD_RADAR = (1<<3),
194  BUILD_ENERGY = (1<<4),
195  BUILD_NUCLEAR = (1<<5),
196  BUILD_STATION = (1<<6),
197  BUILD_REPAIR = (1<<7),
198  BUILD_TOWER = (1<<8),
199  BUILD_RESEARCH = (1<<9),
200  BUILD_LABO = (1<<10),
201  BUILD_PARA = (1<<11),
202  BUILD_INFO = (1<<12),
203  BUILD_DESTROYER = (1<<13),
204  BUILD_GFLAT = (1<<16),
205  BUILD_FLAG = (1<<17)
206 };
207 
213 {
214  RESEARCH_TANK = (1<<0),
215  RESEARCH_FLY = (1<<1),
216  RESEARCH_CANON = (1<<2),
217  RESEARCH_TOWER = (1<<3),
218  RESEARCH_ATOMIC = (1<<4),
219  RESEARCH_THUMP = (1<<5),
220  RESEARCH_SHIELD = (1<<6),
221  RESEARCH_PHAZER = (1<<7),
222  RESEARCH_iPAW = (1<<8),
223  RESEARCH_iGUN = (1<<9),
224  RESEARCH_RECYCLER = (1<<10),
225  RESEARCH_SUBM = (1<<11),
226  RESEARCH_SNIFFER = (1<<12)
227 };
228 
234 {
235  INPUT_SLOT_LEFT = 0,
236  INPUT_SLOT_RIGHT = 1,
237  INPUT_SLOT_UP = 2,
238  INPUT_SLOT_DOWN = 3,
239  INPUT_SLOT_GUP = 4,
240  INPUT_SLOT_GDOWN = 5,
241  INPUT_SLOT_CAMERA = 6,
242  INPUT_SLOT_DESEL = 7,
243  INPUT_SLOT_ACTION = 8,
244  INPUT_SLOT_NEAR = 9,
245  INPUT_SLOT_AWAY = 10,
246  INPUT_SLOT_NEXT = 11,
247  INPUT_SLOT_HUMAN = 12,
248  INPUT_SLOT_QUIT = 13,
249  INPUT_SLOT_HELP = 14,
250  INPUT_SLOT_PROG = 15,
251  INPUT_SLOT_VISIT = 16,
252  INPUT_SLOT_SPEED10 = 17,
253  INPUT_SLOT_SPEED15 = 18,
254  INPUT_SLOT_SPEED20 = 19,
255  INPUT_SLOT_SPEED30 = 20,
256  INPUT_SLOT_AIMUP = 21,
257  INPUT_SLOT_AIMDOWN = 22,
258  INPUT_SLOT_CBOT = 23,
259 
260  INPUT_SLOT_MAX
261 };
262 
268 {
269  JOY_AXIS_SLOT_X,
270  JOY_AXIS_SLOT_Y,
271  JOY_AXIS_SLOT_Z,
272 
273  JOY_AXIS_SLOT_MAX
274 };
275 
276 
277 // TODO: move to CRobotMain
278 extern long g_id; // unique identifier
279 extern int g_build; // constructible buildings
280 extern int g_researchDone; // research done
281 extern long g_researchEnable; // research available
282 extern float g_unit; // conversion factor
283 
< 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:219
< goto destination occupied
Definition: global.h:82
< research ended
Definition: global.h:148
< factory
Definition: global.h:191
< 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:132
< the wrong type of battery
Definition: global.h:89
< lost immediately
Definition: global.h:155
< 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:161
< 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:267
< insect killed
Definition: global.h:159
< location for derrick found
Definition: global.h:141
< vehicle too close
Definition: global.h:105
< too many flags
Definition: global.h:118
< location for derrick found
Definition: global.h:140
< caterpillars
Definition: global.h:215
< 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:195
< derrick
Definition: global.h:192
< nuclear power plant
Definition: global.h:196
< 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:150
< any error
Definition: global.h:33
< record done
Definition: global.h:156
< location for derrick found
Definition: global.h:139
< metal available
Definition: global.h:131
< cannon
Definition: global.h:217
< 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:162
< vehicle infected by a virus
Definition: global.h:108
< nuclear battery available
Definition: global.h:137
< insect killed
Definition: global.h:160
< 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:202
< inappropriate vehicle
Definition: global.h:37
< research ended
Definition: global.h:146
< research ended
Definition: global.h:152
< way mark deleted
Definition: global.h:157
< lack of metal
Definition: global.h:93
< not enough energy
Definition: global.h:73
< location for derrick found
Definition: global.h:142
< more energy
Definition: global.h:113
< impossible in flight
Definition: global.h:38
< location for station found
Definition: global.h:138
< no battery
Definition: global.h:112
< doors locked
Definition: global.h:95
< find impossible
Definition: global.h:79
< analysis ended
Definition: global.h:134
< inappropriate ground
Definition: global.h:66
InputSlot
Available slots for input bindings.
Definition: global.h:233
< not possible in flight
Definition: global.h:61
< lost
Definition: global.h:154
< nothing to deposit
Definition: global.h:46
BuildType
Construction actions (buildings, etc.) available to user.
Definition: global.h:188
< inappropriate vehicle
Definition: global.h:72
< radar
Definition: global.h:194
< 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:212
< defense tower
Definition: global.h:218
< inappropriate vehicle
Definition: global.h:111
< wings
Definition: global.h:216
< legs of insects
Definition: global.h:223
< taking: nothing has to take
Definition: global.h:40
< base station
Definition: global.h:197
< 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:199
< research center
Definition: global.h:200
< compulsory instruction missing
Definition: global.h:125
< lack of ruin
Definition: global.h:74
< win
Definition: global.h:153
< insect killed
Definition: global.h:158
< inappropriate vehicle
Definition: global.h:62
< impossible in movement
Definition: global.h:116
< thumper
Definition: global.h:220
< instruction prohibited
Definition: global.h:126
< 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:145
< recycler
Definition: global.h:225
< no ore underground
Definition: global.h:83
< not possible in flight
Definition: global.h:47
< research ended
Definition: global.h:149
< goto too complicated
Definition: global.h:81
< use your SatCom
Definition: global.h:164
< more energy
Definition: global.h:88
< flat floor
Definition: global.h:205
< not found anything to destroy
Definition: global.h:110
< research already done
Definition: global.h:90
< repair center
Definition: global.h:198
< 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
< cannot aim at specified angle(s)
Definition: global.h:128
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:133
< information terminal
Definition: global.h:203
< location for derrick found
Definition: global.h:143
< 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:130
< submarine
Definition: global.h:226
< laboratory
Definition: global.h:201
< object too close
Definition: global.h:68
< inappropriate vehicle
Definition: global.h:64
< Destroyer
Definition: global.h:204
< impossible because radioactive
Definition: global.h:44
< converter
Definition: global.h:193
< shield
Definition: global.h:221
< 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:144
< no other vehicle
Definition: global.h:43
< phazer gun
Definition: global.h:222
< first information
Definition: global.h:129
Language
Application language.
Definition: global.h:171
< nuclear battery available
Definition: global.h:136
< research ended
Definition: global.h:151
< 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:224
< building too close
Definition: global.h:67
< battery available
Definition: global.h:135
< no stone was transformed
Definition: global.h:75
< Mission not completed
Definition: global.h:121
< research ended
Definition: global.h:147
< lack of uranium
Definition: global.h:102