Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
cmdtoken.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 
25 #include "graphics/engine/water.h"
26 #include "graphics/engine/engine.h"
27 #include "graphics/engine/pyro.h"
28 
29 
30 
31 // Procedures.
32 
33 extern std::string GetCmd(char* line);
34 extern bool Cmd(char *line, const char *token);
35 extern char* SearchOp(char *line, const char *op);
36 
37 extern int GetInt(char *line, int rank, int def);
38 extern float GetFloat(char *line, int rank, float def);
39 extern void GetString(char *line, int rank, char *buffer);
40 extern ObjectType GetTypeObject(char *line, int rank, ObjectType def);
41 extern const char* GetTypeObject(ObjectType type);
42 extern Gfx::WaterType GetTypeWater(char *line, int rank, Gfx::WaterType def);
43 extern Gfx::EngineObjectType GetTypeTerrain(char *line, int rank, Gfx::EngineObjectType def);
44 extern int GetBuild(char *line, int rank);
45 extern int GetResearch(char *line, int rank);
46 extern Gfx::PyroType GetPyro(char *line, int rank);
47 extern Gfx::CameraType GetCamera(char *line, int rank);
48 extern const char* GetCamera(Gfx::CameraType type);
49 extern DriveType GetDrive(char *line, int rank);
50 extern const char* GetDrive(DriveType type);
51 extern ToolType GetTool(char *line, int rank);
52 extern const char* GetTool(ToolType type);
53 
54 extern int OpInt(char *line, const char *op, int def);
55 extern float OpFloat(char *line, const char *op, float def);
56 extern void OpString(char *line, const char *op, char *buffer);
57 extern ObjectType OpTypeObject(char *line, const char *op, ObjectType def);
58 extern Gfx::WaterType OpTypeWater(char *line, const char *op, Gfx::WaterType def);
59 extern Gfx::EngineObjectType OpTypeTerrain(char *line, const char *op, Gfx::EngineObjectType def);
60 extern int OpResearch(char *line, const char *op);
61 extern Gfx::PyroType OpPyro(char *line, const char *op);
62 extern Gfx::CameraType OpCamera(char *line, const char *op);
63 extern DriveType OpDrive(char *line, const char *op);
64 extern ToolType OpTool(char *line, const char *op);
65 extern int OpBuild(char *line, const char *op);
66 extern Math::Vector OpPos(char *line, const char *op);
67 extern Math::Vector OpDir(char *line, const char *op);
68 extern Gfx::Color OpColor(char *line, const char *op, Gfx::Color def);
69 
CameraType
Type of camera.
Definition: camera.h:42
Main graphics engine - CEngine class.
EngineObjectType
Class of graphics engine object.
Definition: engine.h:166
WaterType
Mode of water display.
Definition: water.h:89
Fire effect rendering - CPyro class.
PyroType
Type of pyro effect.
Definition: pyro.h:53
ObjectType
Type of game object.
Definition: object.h:46
3D (3x1) vector
Definition: vector.h:49
RGBA color.
Definition: color.h:35
Water rendering - CWater class.