From 844e11db4f394004258cdca8f8fd8bc95c41a985 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Mon, 17 Sep 2012 20:47:27 +0200 Subject: changes needeto to cimpile on windows. --- src/script/cmdtoken.cpp | 19 ++++++++++--------- src/script/cmdtoken.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'src/script') 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 +#include @@ -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); -- cgit v1.2.3-1-g7c22