Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 10, 2008, 5:03:34 PM (16 years ago)
Author:
bknecht
Message:

merged back that script-branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/core/Loader.cc

    r871 r1021  
    3333#include "Debug.h"
    3434#include "CoreIncludes.h"
     35#include "Script.h"
    3536
    3637#include "util/tinyxml/ticpp.h"
     
    107108        Loader::currentMask_s = level->getMask() * mask;
    108109
     110        // let Lua work this out:
     111        //Script* lua;
     112        /*Script::loadFile(level->getFile(), true);
     113        Script::init(Script::getLuaState());
     114        Script::run();*/
     115        Script* lua = Script::getInstance();
     116        lua->loadFile(level->getFile(), true);
     117        lua->run();
     118
    109119        try
    110120        {
     
    112122            COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
    113123
    114             ticpp::Document xmlfile(level->getFile());
    115             xmlfile.LoadFile();
     124            //ticpp::Document xmlfile(level->getFile());
     125            //xmlfile.LoadFile();
     126            //ticpp::Element myelement(*Script::getFileString());
     127            ticpp::Document xmlfile;
     128            //xmlfile.ToDocument();
     129            xmlfile.Parse(lua->getLuaOutput(), true);
    116130
    117131            for ( ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++ )
Note: See TracChangeset for help on using the changeset viewer.