From 479a67a731be5a5e8035ea7acce0344c7c605814 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Mon, 10 Sep 2012 23:29:38 +0200 Subject: Merge with changes from Zaba999 fork. --- src/script/cbottoken.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/script/cbottoken.cpp') diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 223da4d..b0bf67b 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -15,25 +15,25 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include -#include -#include - -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/d3dmath.h" -#include "common/language.h" -#include "common/global.h" -#include "common/event.h" +// #include +// #include +// #include +// +// #include "common/struct.h" +// #include "old/d3dengine.h" +// #include "old/d3dmath.h" +// #include "common/language.h" +// #include "common/global.h" +// #include "common/event.h" #include "object/object.h" -#include "script/cbottoken.h" +// #include "script/cbottoken.h" // Seeking the name of an object. -char* RetObjectName(ObjectType type) +const char* GetObjectName(ObjectType type) { if ( type == OBJECT_PORTICO ) return "Portico"; if ( type == OBJECT_BASE ) return "SpaceShip"; @@ -126,7 +126,7 @@ char* RetObjectName(ObjectType type) // Seeking the name of a secondary object. // (because Otto thinks that Germans do not like nuclear power) -char* RetObjectAlias(ObjectType type) +const char* GetObjectAlias(ObjectType type) { if ( type == OBJECT_NUCLEAR ) return "FuelCellPlant"; if ( type == OBJECT_URANIUM ) return "PlatinumOre"; @@ -139,7 +139,7 @@ char* RetObjectAlias(ObjectType type) // Returns the help file to use for the object. -char* RetHelpFilename(ObjectType type) +const char* GetHelpFilename(ObjectType type) { if ( type == OBJECT_BASE ) return "help\\object\\base.txt"; if ( type == OBJECT_DERRICK ) return "help\\object\\derrick.txt"; @@ -224,7 +224,7 @@ char* RetHelpFilename(ObjectType type) // Returns the help file to use for instruction. -char* RetHelpFilename(const char *token) +const char* GetHelpFilename(const char *token) { if ( strcmp(token, "if" ) == 0 ) return "help\\cbot\\if.txt"; if ( strcmp(token, "else" ) == 0 ) return "help\\cbot\\if.txt"; @@ -436,7 +436,7 @@ bool IsFunction(const char *token) // Returns using a compact instruction. -char* RetHelpText(const char *token) +const char* GetHelpText(const char *token) { if ( strcmp(token, "if" ) == 0 ) return "if ( condition ) { bloc }"; if ( strcmp(token, "else" ) == 0 ) return "else { bloc }"; -- cgit v1.2.3-1-g7c22 From 01cc0fbc49696a19a56dfdd8359d4bb77e868925 Mon Sep 17 00:00:00 2001 From: erihel Date: Tue, 11 Sep 2012 12:49:41 +0200 Subject: * latest changes * all files except studio, map and maindialog should compile * did some code cleanup --- src/script/cbottoken.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script/cbottoken.cpp') diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 223da4d..788dba2 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -33,7 +33,7 @@ // Seeking the name of an object. -char* RetObjectName(ObjectType type) +char* GetObjectName(ObjectType type) { if ( type == OBJECT_PORTICO ) return "Portico"; if ( type == OBJECT_BASE ) return "SpaceShip"; @@ -126,7 +126,7 @@ char* RetObjectName(ObjectType type) // Seeking the name of a secondary object. // (because Otto thinks that Germans do not like nuclear power) -char* RetObjectAlias(ObjectType type) +char* GetObjectAlias(ObjectType type) { if ( type == OBJECT_NUCLEAR ) return "FuelCellPlant"; if ( type == OBJECT_URANIUM ) return "PlatinumOre"; @@ -139,7 +139,7 @@ char* RetObjectAlias(ObjectType type) // Returns the help file to use for the object. -char* RetHelpFilename(ObjectType type) +char* GetHelpFilename(ObjectType type) { if ( type == OBJECT_BASE ) return "help\\object\\base.txt"; if ( type == OBJECT_DERRICK ) return "help\\object\\derrick.txt"; @@ -224,7 +224,7 @@ char* RetHelpFilename(ObjectType type) // Returns the help file to use for instruction. -char* RetHelpFilename(const char *token) +char* GetHelpFilename(const char *token) { if ( strcmp(token, "if" ) == 0 ) return "help\\cbot\\if.txt"; if ( strcmp(token, "else" ) == 0 ) return "help\\cbot\\if.txt"; @@ -436,7 +436,7 @@ bool IsFunction(const char *token) // Returns using a compact instruction. -char* RetHelpText(const char *token) +char* GetHelpText(const char *token) { if ( strcmp(token, "if" ) == 0 ) return "if ( condition ) { bloc }"; if ( strcmp(token, "else" ) == 0 ) return "else { bloc }"; -- cgit v1.2.3-1-g7c22 From a397922e8d53c6f7ff469d38e5139fd003c705b5 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Tue, 18 Sep 2012 00:01:00 +0200 Subject: warnings fight in progress. --- src/script/cbottoken.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script/cbottoken.cpp') diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index a9cc599..0bb368c 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -24,7 +24,7 @@ // Seeking the name of an object. -char* GetObjectName(ObjectType type) +const char* GetObjectName(ObjectType type) { if ( type == OBJECT_PORTICO ) return "Portico"; if ( type == OBJECT_BASE ) return "SpaceShip"; @@ -117,7 +117,7 @@ char* GetObjectName(ObjectType type) // Seeking the name of a secondary object. // (because Otto thinks that Germans do not like nuclear power) -char* GetObjectAlias(ObjectType type) +const char* GetObjectAlias(ObjectType type) { if ( type == OBJECT_NUCLEAR ) return "FuelCellPlant"; if ( type == OBJECT_URANIUM ) return "PlatinumOre"; @@ -130,7 +130,7 @@ char* GetObjectAlias(ObjectType type) // Returns the help file to use for the object. -char* GetHelpFilename(ObjectType type) +const char* GetHelpFilename(ObjectType type) { if ( type == OBJECT_BASE ) return "help\\object\\base.txt"; if ( type == OBJECT_DERRICK ) return "help\\object\\derrick.txt"; @@ -215,7 +215,7 @@ char* GetHelpFilename(ObjectType type) // Returns the help file to use for instruction. -char* GetHelpFilename(const char *token) +const char* GetHelpFilename(const char *token) { if ( strcmp(token, "if" ) == 0 ) return "help\\cbot\\if.txt"; if ( strcmp(token, "else" ) == 0 ) return "help\\cbot\\if.txt"; @@ -427,7 +427,7 @@ bool IsFunction(const char *token) // Returns using a compact instruction. -char* GetHelpText(const char *token) +const char* GetHelpText(const char *token) { if ( strcmp(token, "if" ) == 0 ) return "if ( condition ) { bloc }"; if ( strcmp(token, "else" ) == 0 ) return "else { bloc }"; -- cgit v1.2.3-1-g7c22