summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorZaba999 <zaba.marcin@gmail.com>2012-09-17 20:47:27 +0200
committerZaba999 <zaba.marcin@gmail.com>2012-09-17 20:47:27 +0200
commit844e11db4f394004258cdca8f8fd8bc95c41a985 (patch)
tree5d593dd3105a3fe0a07894933f2d7af688397c2a /src/script
parent050f9d25428d8298b010c73e9721d7b7203ef31f (diff)
downloadcolobot-844e11db4f394004258cdca8f8fd8bc95c41a985.tar.gz
colobot-844e11db4f394004258cdca8f8fd8bc95c41a985.tar.bz2
colobot-844e11db4f394004258cdca8f8fd8bc95c41a985.zip
changes needeto to cimpile on windows.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/cmdtoken.cpp19
-rw-r--r--src/script/cmdtoken.h18
2 files changed, 19 insertions, 18 deletions
diff --git a/src/script/cmdtoken.cpp b/src/script/cmdtoken.cpp
index d79fbf1..e44f82d 100644
--- a/src/script/cmdtoken.cpp
+++ b/src/script/cmdtoken.cpp
@@ -20,6 +20,7 @@
#include "common/global.h"
#include <string.h>
+#include <cstdio>
@@ -816,7 +817,7 @@ float OpFloat(char *line, const char *op, float def)
// Returns a string.
-void OpString(char *line, char *op, char *buffer)
+void OpString(char *line, const char *op, char *buffer)
{
line = SearchOp(line, op);
if ( *line == 0 )
@@ -831,7 +832,7 @@ void OpString(char *line, char *op, char *buffer)
// Returns the type of an object.
-ObjectType OpTypeObject(char *line, char *op, ObjectType def)
+ObjectType OpTypeObject(char *line, const char *op, ObjectType def)
{
line = SearchOp(line, op);
if ( *line == 0 ) return def;
@@ -840,7 +841,7 @@ ObjectType OpTypeObject(char *line, char *op, ObjectType def)
// Returns the type of a water.
-Gfx::WaterType OpTypeWater(char *line, char *op, Gfx::WaterType def)
+Gfx::WaterType OpTypeWater(char *line, const char *op, Gfx::WaterType def)
{
line = SearchOp(line, op);
if ( *line == 0 ) return def;
@@ -849,7 +850,7 @@ Gfx::WaterType OpTypeWater(char *line, char *op, Gfx::WaterType def)
// Returns the type of a terrain.
-Gfx::EngineObjectType OpTypeTerrain(char *line, char *op, Gfx::EngineObjectType def)
+Gfx::EngineObjectType OpTypeTerrain(char *line, const char *op, Gfx::EngineObjectType def)
{
line = SearchOp(line, op);
if ( *line == 0 ) return def;
@@ -858,7 +859,7 @@ Gfx::EngineObjectType OpTypeTerrain(char *line, char *op, Gfx::EngineObjectType
// Returns the type of research.
-int OpResearch(char *line, char *op)
+int OpResearch(char *line, const char *op)
{
line = SearchOp(line, op);
if ( *line == 0 ) return 0;
@@ -867,7 +868,7 @@ int OpResearch(char *line, char *op)
// Returns the type of pyrotechnic effect.
-Gfx::PyroType OpPyro(char *line, char *op)
+Gfx::PyroType OpPyro(char *line, const char *op)
{
line = SearchOp(line, op);
if ( *line == 0 ) return Gfx::PT_NULL;
@@ -885,7 +886,7 @@ Gfx::CameraType OpCamera(char *line, const char *op)
// Returns the type of a building.
-int OpBuild(char *line, char *op)
+int OpBuild(char *line, const char *op)
{
line = SearchOp(line, op);
if ( *line == 0 ) return 0;
@@ -894,7 +895,7 @@ int OpBuild(char *line, char *op)
// Returns a position in the XZ plane (top view).
-Math::Vector OpPos(char *line, char *op)
+Math::Vector OpPos(char *line, const char *op)
{
Math::Vector pos;
@@ -929,7 +930,7 @@ Math::Vector OpDir(char *line, const char *op)
}
// Reads a color (-1 .. 1).
-Gfx::Color OpColor(char *line, char *op, Gfx::Color def)
+Gfx::Color OpColor(char *line, const char *op, Gfx::Color def)
{
Gfx::Color color;
diff --git a/src/script/cmdtoken.h b/src/script/cmdtoken.h
index e457d96..812cec7 100644
--- a/src/script/cmdtoken.h
+++ b/src/script/cmdtoken.h
@@ -44,15 +44,15 @@ extern const char* GetCamera(Gfx::CameraType type);
extern int OpInt(char *line, const char *op, int def);
extern float OpFloat(char *line, const char *op, float def);
-extern void OpString(char *line, char *op, char *buffer);
-extern ObjectType OpTypeObject(char *line, char *op, ObjectType def);
-extern Gfx::WaterType OpTypeWater(char *line, char *op, Gfx::WaterType def);
-extern Gfx::EngineObjectType OpTypeTerrain(char *line, char *op, Gfx::EngineObjectType def);
-extern int OpResearch(char *line, char *op);
-extern Gfx::PyroType OpPyro(char *line, char *op);
+extern void OpString(char *line, const char *op, char *buffer);
+extern ObjectType OpTypeObject(char *line, const char *op, ObjectType def);
+extern Gfx::WaterType OpTypeWater(char *line, const char *op, Gfx::WaterType def);
+extern Gfx::EngineObjectType OpTypeTerrain(char *line, const char *op, Gfx::EngineObjectType def);
+extern int OpResearch(char *line, const char *op);
+extern Gfx::PyroType OpPyro(char *line, const char *op);
extern Gfx::CameraType OpCamera(char *line, const char *op);
-extern int OpBuild(char *line, char *op);
-extern Math::Vector OpPos(char *line, char *op);
+extern int OpBuild(char *line, const char *op);
+extern Math::Vector OpPos(char *line, const char *op);
extern Math::Vector OpDir(char *line, const char *op);
-extern Gfx::Color OpColor(char *line, char *op, Gfx::Color def);
+extern Gfx::Color OpColor(char *line, const char *op, Gfx::Color def);