Index: branches/script_engine/src/defs/include_paths.am
===================================================================
--- branches/script_engine/src/defs/include_paths.am	(revision 8092)
+++ branches/script_engine/src/defs/include_paths.am	(revision 8093)
@@ -27,4 +27,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/newmat
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/sound
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/script_engine
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/defs
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/font
Index: branches/script_engine/src/lib/BuildLibs.am
===================================================================
--- branches/script_engine/src/lib/BuildLibs.am	(revision 8092)
+++ branches/script_engine/src/lib/BuildLibs.am	(revision 8093)
@@ -22,3 +22,4 @@
                 $(LIB_PREFIX)/shell/libORXshell.a \
                 $(LIB_PREFIX)/math/libORXmath.a \
-                $(LIB_PREFIX)/libORXlibs.a
+                $(LIB_PREFIX)/libORXlibs.a \
+                $(LIB_PREFIX)/script_engine/libORXscript.a
Index: branches/script_engine/src/lib/script_engine/Makefile.am
===================================================================
--- branches/script_engine/src/lib/script_engine/Makefile.am	(revision 8092)
+++ branches/script_engine/src/lib/script_engine/Makefile.am	(revision 8093)
@@ -10,7 +10,7 @@
 AM_CPPFLAGS= @LUA_INCLUDES@
 
-bin_PROGRAMS = account
-account_SOURCES = \
-                account.cc\
+bin_PROGRAMS = example
+example_SOURCES = \
+                example.cc\
                 script.cc\
                 script_manager.cc
@@ -18,5 +18,5 @@
 
 
-account_LDADD = libORXscript.a -L../../../extern_libs @LUA_LIBS@
+example_LDADD = libORXscript.a -L../../../extern_libs @LUA_LIBS@
 
 #main_LDFLAGS =
Index: branches/script_engine/src/lib/script_engine/account.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/account.cc	(revision 8092)
+++ 	(revision )
@@ -1,150 +1,0 @@
-
-#include <iostream>
-
-#include "luaincl.h"
-#include "lunar.h"
-#include "script.h"
-
-    class Account {
-      lua_Number m_balance;
-    public:
-      static const char className[];
-      static Lunar<Account>::RegType methods[];
-
-      Account(lua_State *L)      { m_balance = luaL_checknumber(L, 1); }
-      Account(double balance=0)    : m_balance(balance) { }
-      int deposit (lua_State *L) { m_balance += luaL_checknumber(L, 1); return 0; }
-      int withdraw(lua_State *L) { m_balance -= luaL_checknumber(L, 1); return 0; }
-      int balance (lua_State *L) { lua_pushnumber(L, m_balance); return 1; }
-      ~Account() { printf("deleted Account (%p)\n", this); }
-    };
-
-    const char Account::className[] = "Account";
-
-
-    #define method(class, name) {#name, &class::name}
-
-    Lunar<Account>::RegType Account::methods[] = {
-      method(Account, deposit),
-      method(Account, withdraw),
-      method(Account, balance),
-      {0,0}
-    };
-
-
-    class Object {
-      public:
-        static const char className[];
-        static Lunar<Object>::RegType methods[];
-
-        Object(lua_State* L) {callCount = 0; }
-        Object(){callCount = 0;};
-        ~Object() { printf("deleted Object (%p)\n", this); }
-
-        //lua Interface
-        //function that returns a value to lua
-        int getCallCount(lua_State* L)
-        {
-         int calls = getCallCount();
-         lua_pushnumber(L,(lua_Number)calls); 
-         return 1; // return number of values that the function wants to return to lua
-        }
-
-         //function that takes an argument from lua
-         int takeParam(lua_State* L)
-         { 
-          int param = (int)lua_tonumber(L,-1);
-          takeParam(param);
-          return 0; 
-         }
-
-        //meber functions
-        void takeParam(int i)
-        {
-         printf("Lua passed %i to c++\n",i);
-        }
-
-        int printName(lua_State* L)
-        {
-          callCount ++;
-          printf("Hi i'm object %p ! This is the %i. call.\n",this,callCount);
-          return 0;
-        }
-
-        int getCallCount(){return callCount;}
-
-      private:
-        int callCount;
-
-    };
-
-    const char Object::className[] = "Object";
-
-    Lunar<Object>::RegType Object::methods[] = {
-      method(Object, printName),
-      method(Object, getCallCount),
-      method(Object, takeParam),
-      {0,0}
-    };
-
-    int main(int argc, char *argv[])
-    {
-      Script script;
-      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-
-      // Register classes with the script
-      Lunar<Account>::Register(&script);
-      Lunar<Object>::Register(&script);
-
-      Object* obj= new Object();
-      Account a;
-      Account *b = new Account(30);
-
-      // Add instances to the script
-      Lunar<Object>::insertObject(&script,obj,"Obj",true);
-      Lunar<Account>::insertObject(&script,&a,"a",false);
-      Lunar<Account>::insertObject(&script,b,"b",true);
-       printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-      //Load a file
-      std::string file(argv[1]);
-
-      if(script.loadFile(file))
-        printf("File %s succefully loaded\n", file.c_str());
-      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-      //execute a function
-      printf("----------- main -----------\n");
-      std::string main("main");
-      if( script.selectFunction(main,3))
-       printf("function %s selected\n",main.c_str());
-
-      script.pushParam(3.14159,main);
-      script.executeFunction();
-
-      float retf = script.getReturnedFloat();
-      printf("main returned %f\n",retf);
-      
-
-      if(script.getReturnedBool())
-       printf("main returned true\n");
-      else
-       printf("main returned false\n");
-
-      int ret = script.getReturnedInt();
-      printf("main returned %i\n",ret);
-
-      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-      //execute a 2nd function
-      printf("----------- test -----------\n");
-      std::string test("test");
-      if( script.selectFunction(test,0))
-       printf("function %s selected\n",test.c_str());
-
-      script.executeFunction();
-
-      
-      //if(argc>1) lua_dofile(script.getLuaState(), argv[1]);
-      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-
-      return 0;
-    }
-
Index: branches/script_engine/src/lib/script_engine/example.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/example.cc	(revision 8093)
+++ branches/script_engine/src/lib/script_engine/example.cc	(revision 8093)
@@ -0,0 +1,150 @@
+
+#include <iostream>
+
+#include "luaincl.h"
+#include "lunar.h"
+#include "script.h"
+
+    class Account {
+      lua_Number m_balance;
+    public:
+      static const char className[];
+      static Lunar<Account>::RegType methods[];
+
+      Account(lua_State *L)      { m_balance = luaL_checknumber(L, 1); }
+      Account(double balance=0)    : m_balance(balance) { }
+      int deposit (lua_State *L) { m_balance += luaL_checknumber(L, 1); return 0; }
+      int withdraw(lua_State *L) { m_balance -= luaL_checknumber(L, 1); return 0; }
+      int balance (lua_State *L) { lua_pushnumber(L, m_balance); return 1; }
+      ~Account() { printf("deleted Account (%p)\n", this); }
+    };
+
+    const char Account::className[] = "Account";
+
+
+    #define method(class, name) {#name, &class::name}
+
+    Lunar<Account>::RegType Account::methods[] = {
+      method(Account, deposit),
+      method(Account, withdraw),
+      method(Account, balance),
+      {0,0}
+    };
+
+
+    class Object {
+      public:
+        static const char className[];
+        static Lunar<Object>::RegType methods[];
+
+        Object(lua_State* L) {callCount = 0; }
+        Object(){callCount = 0;};
+        ~Object() { printf("deleted Object (%p)\n", this); }
+
+        //lua Interface
+        //function that returns a value to lua
+        int getCallCount(lua_State* L)
+        {
+         int calls = getCallCount();
+         lua_pushnumber(L,(lua_Number)calls); 
+         return 1; // return number of values that the function wants to return to lua
+        }
+
+         //function that takes an argument from lua
+         int takeParam(lua_State* L)
+         { 
+          int param = (int)lua_tonumber(L,-1);
+          takeParam(param);
+          return 0; 
+         }
+
+        //meber functions
+        void takeParam(int i)
+        {
+         printf("Lua passed %i to c++\n",i);
+        }
+
+        int printName(lua_State* L)
+        {
+          callCount ++;
+          printf("Hi i'm object %p ! This is the %i. call.\n",this,callCount);
+          return 0;
+        }
+
+        int getCallCount(){return callCount;}
+
+      private:
+        int callCount;
+
+    };
+
+    const char Object::className[] = "Object";
+
+    Lunar<Object>::RegType Object::methods[] = {
+      method(Object, printName),
+      method(Object, getCallCount),
+      method(Object, takeParam),
+      {0,0}
+    };
+
+    int main(int argc, char *argv[])
+    {
+      Script script;
+      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
+
+      // Register classes with the script
+      Lunar<Account>::Register(&script);
+      Lunar<Object>::Register(&script);
+
+      Object* obj= new Object();
+      Account a;
+      Account *b = new Account(30);
+
+      // Add instances to the script
+      Lunar<Object>::insertObject(&script,obj,"Obj",true);
+      Lunar<Account>::insertObject(&script,&a,"a",false);
+      Lunar<Account>::insertObject(&script,b,"b",true);
+       printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
+      //Load a file
+      std::string file(argv[1]);
+
+      if(script.loadFile(file))
+        printf("File %s succefully loaded\n", file.c_str());
+      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
+      //execute a function
+      printf("----------- main -----------\n");
+      std::string main("main");
+      if( script.selectFunction(main,3))
+       printf("function %s selected\n",main.c_str());
+
+      script.pushParam(3.14159,main);
+      script.executeFunction();
+
+      float retf = script.getReturnedFloat();
+      printf("main returned %f\n",retf);
+      
+
+      if(script.getReturnedBool())
+       printf("main returned true\n");
+      else
+       printf("main returned false\n");
+
+      int ret = script.getReturnedInt();
+      printf("main returned %i\n",ret);
+
+      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
+      //execute a 2nd function
+      printf("----------- test -----------\n");
+      std::string test("test");
+      if( script.selectFunction(test,0))
+       printf("function %s selected\n",test.c_str());
+
+      script.executeFunction();
+
+      
+      //if(argc>1) lua_dofile(script.getLuaState(), argv[1]);
+      printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
+
+      return 0;
+    }
+
Index: branches/script_engine/src/lib/script_engine/script.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script.h	(revision 8092)
+++ branches/script_engine/src/lib/script_engine/script.h	(revision 8093)
@@ -23,9 +23,9 @@
     bool executeFunction();
     // push parameters for luafunction
-    bool  pushParam(int param, std::string& toFunction);//overload this function to add different types
+    bool  pushParam(int param, std::string& toFunction);
     bool  pushParam(float param, std::string& toFunction);
     bool  pushParam(double param, std::string& toFunction);
     // get returned values the last return value in lua is the first in c.
-    int   getReturnedInt();//overload this function to get different types
+    int   getReturnedInt();
     bool  getReturnedBool();
     float getReturnedFloat();
Index: branches/script_engine/src/lib/script_engine/script_manager.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_manager.cc	(revision 8092)
+++ branches/script_engine/src/lib/script_engine/script_manager.cc	(revision 8093)
@@ -1,3 +1,34 @@
+#include <string>
+#include <list>
 
 #include "script.h"
 #include "script_manager.h"
+
+
+
+ScriptManager::ScriptManager()
+{
+  this->init();
+
+}
+
+ScriptManager::~ScriptManager()
+{
+
+
+}
+
+
+void ScriptManager::init()
+{
+
+
+}
+
+
+
+void ScriptManager::loadParams(const TiXmlElement* root)
+{
+
+}
+
Index: branches/script_engine/src/lib/script_engine/script_manager.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script_manager.h	(revision 8092)
+++ branches/script_engine/src/lib/script_engine/script_manager.h	(revision 8093)
@@ -4,20 +4,22 @@
 
 #include <string>
+
 #include "base_object.h"
-
 #include "luaincl.h"
+#include "loading/load_param.h"
 
 
 
-class ScriptManager
+class ScriptManager //: public BaseObject
 {
  public:
-  init();
+  ScriptManager();
+  virtual ~ScriptManager();
 
-
+  virtual void loadParams(const TiXmlElement* root);
 
 
  private:
-
+  void  init();
 
 
