Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9244 in orxonox.OLD


Ignore:
Timestamp:
Jul 6, 2006, 5:00:44 PM (18 years ago)
Author:
snellen
Message:

update

Location:
branches/scripting/src/lib/script_engine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/scripting/src/lib/script_engine/script.cc

    r9243 r9244  
    5050
    5151
     52Script::Script(const std::string& filename)
     53{
     54  this->setClassID(CL_SCRIPT, "Script");
     55
     56  returnCount = argumentCount = 0;
     57
     58  luaState = lua_open();
     59
     60  luaopen_base(luaState);
     61  luaopen_table(luaState);
     62  luaopen_io(luaState);
     63  luaopen_string(luaState);
     64  luaopen_math(luaState);
     65  luaopen_debug(luaState);
     66 
     67  this->loadFile(filename);
     68
     69}
     70
    5271Script::~Script()
    5372{
     
    6281  BaseObject::loadParams(root);
    6382
    64   LOAD_PARAM_START_CYCLE(root, object);
     83 LOAD_PARAM_START_CYCLE(root, object);
    6584  {
    6685    LoadParam_CYCLE(object, "object", this, Script, addObject)
    67         .describe("The name of an object that is needed by a script");
     86       .describe("The name of an object that is needed by a script");
    6887  }
    69   LOAD_PARAM_END_CYCLE(object);
     88 LOAD_PARAM_END_CYCLE(object);
    7089
    7190
  • branches/scripting/src/lib/script_engine/script.h

    r9235 r9244  
    2424  public:
    2525    Script(const TiXmlElement* root = NULL);
     26    Script(const std::string& filename);
    2627    ~Script();
    2728
Note: See TracChangeset for help on using the changeset viewer.