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