summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp24
-rw-r--r--src/object.h9
2 files changed, 21 insertions, 12 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 56e0d693..8f40c5c3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -21,6 +21,7 @@
* $Id$
*/
+#include <iostream>
#include "netsession.h"
#include "connectionhandler.h"
#include "accounthandler.h"
@@ -28,9 +29,17 @@
#include <SDL_net.h>
#ifdef SCRIPT_SUPPORT
-#define SCRIPT_SQUIRREL
+
#include "script.h"
-#include "script-sq.h"
+#define SCRIPT_SQUIRREL_SUPPORT
+
+#ifdef SCRIPT_SQUIRREL_SUPPORT
+#include "script-squirrel.h"
+#endif
+#ifdef SCRIPT_RUBY_SUPPORT
+#include "script-ruby.h"
+#endif
+std::string scriptLanguage = "squirrel";
#endif
#define TMW_WORLD_TICK SDL_USEREVENT
@@ -79,12 +88,11 @@ void initialize()
// Initialize scripting subsystem
#ifdef SCRIPT_SUPPORT
-#ifdef SCRIPT_SQUIRREL
- script = new ScriptSquirrel();
-#else
-#error Scripting enabled, but no language defined.
-#endif
- script->init();
+ if (scriptLanguage == "squirrel")
+ {
+ script = new ScriptSquirrel();
+ script->init();
+ }
#endif
}
diff --git a/src/object.h b/src/object.h
index 1135ef9a..55aa4613 100644
--- a/src/object.h
+++ b/src/object.h
@@ -36,9 +36,9 @@ class Object
};
/*
- * Generic Living Object
+ * Generic Being (Living Object)
*/
-class LivingObject : public Object
+class Being : public Object
{
//Object name
std::string name;
@@ -62,16 +62,17 @@ class LivingObject : public Object
//Equipment equipment;
public:
- ~LivingObject() { };
+ virtual ~Being() { };
void update() { };
};
/*
* Player object
*/
-class Player : public LivingObject
+class Player : public Being
{
//Player gender (male = true, female = false)
bool gender;
public:
};
+