diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/cbottoken.cpp | 15 | ||||
-rw-r--r-- | src/script/cmdtoken.cpp | 3 | ||||
-rw-r--r-- | src/script/cmdtoken.h | 4 | ||||
-rw-r--r-- | src/script/script.cpp | 34 | ||||
-rw-r--r-- | src/script/script.h | 4 |
5 files changed, 19 insertions, 41 deletions
diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 4d33bca..a9cc599 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -15,20 +15,11 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -// #include <windows.h> -// #include <stdio.h> -// #include <d3d.h> -// -// #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" +#include "object/object.h" +#include <string.h> // Seeking the name of an object. diff --git a/src/script/cmdtoken.cpp b/src/script/cmdtoken.cpp index 0b441a4..d79fbf1 100644 --- a/src/script/cmdtoken.cpp +++ b/src/script/cmdtoken.cpp @@ -15,10 +15,11 @@ // * along with this program. If not, see http://www.gnu.org/licenses/. -#include "common/global.h" #include "script/cmdtoken.h" +#include "common/global.h" +#include <string.h> diff --git a/src/script/cmdtoken.h b/src/script/cmdtoken.h index 911bd55..e457d96 100644 --- a/src/script/cmdtoken.h +++ b/src/script/cmdtoken.h @@ -18,10 +18,6 @@ #pragma once - -// #include "old/d3denum.h" -// #include "old/d3dengine.h" -// #include "object/object.h" #include "graphics/engine/water.h" #include "graphics/engine/engine.h" #include "graphics/engine/pyro.h" diff --git a/src/script/script.cpp b/src/script/script.cpp index cbdbbf4..4f7f1ee 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -18,37 +18,27 @@ #include "script/script.h" -// #include <windows.h> -#include <stdio.h> -// #include <d3d.h> -// -#include "math/vector.h" -// #include "common/struct.h" -#include "math/geometry.h" -// #include "old/d3dengine.h" -// #include "old/d3dmath.h" + #include "common/global.h" -// #include "common/event.h" -// #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" -// #include "old/math3d.h" -#include "object/robotmain.h" #include "graphics/engine/terrain.h" #include "graphics/engine/water.h" #include "graphics/engine/text.h" +#include "math/geometry.h" +#include "math/vector.h" #include "object/object.h" +#include "object/robotmain.h" +#include "object/task/taskmanager.h" #include "physics/physics.h" +#include "script/cbottoken.h" #include "ui/interface.h" #include "ui/edit.h" #include "ui/list.h" #include "ui/displaytext.h" -#include "object/task/taskmanager.h" -// #include "object/task/task.h" -// #include "object/task/taskmanip.h" -// #include "object/task/taskgoto.h" -// #include "object/task/taskshield.h" -#include "script/cbottoken.h" + + +#include <stdio.h> @@ -3101,7 +3091,7 @@ bool CScript::Step(const Event &event) if ( !m_bStepMode ) return false; m_engine->SetPause(false); - m_engine->StepSimulation(0.01f); // advance of 10ms + // TODO: m_app StepSimulation??? m_engine->StepSimulation(0.01f); // advance of 10ms m_engine->SetPause(true); m_event = event; @@ -3650,7 +3640,7 @@ bool CScript::SendScript(char* text) // Reads a script as a text file. -bool CScript::ReadScript(char* filename) +bool CScript::ReadScript(const char* filename) { FILE* file; Ui::CEdit* edit; @@ -3685,7 +3675,7 @@ bool CScript::ReadScript(char* filename) // Writes a script as a text file. -bool CScript::WriteScript(char* filename) +bool CScript::WriteScript(const char* filename) { Ui::CEdit* edit; char name[100]; diff --git a/src/script/script.h b/src/script/script.h index 3cb1a85..5462a18 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -76,8 +76,8 @@ public: void New(Ui::CEdit* edit, char* name); bool SendScript(char* text); - bool ReadScript(char* filename); - bool WriteScript(char* filename); + bool ReadScript(const char* filename); + bool WriteScript(const char* filename); bool ReadStack(FILE *file); bool WriteStack(FILE *file); bool Compare(CScript* other); |