Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2008, 9:47:12 PM (16 years ago)
Author:
bknecht
Message:

tolua++ works now. A level will now be sent through lua, before getting loaded by tinyxml.

File:
1 edited

Legend:

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

    r871 r996  
    3333#include "Debug.h"
    3434#include "CoreIncludes.h"
     35#include "../script/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
    109116        try
    110117        {
     
    112119            COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
    113120
    114             ticpp::Document xmlfile(level->getFile());
    115             xmlfile.LoadFile();
     121            //ticpp::Document xmlfile(level->getFile());
     122            //xmlfile.LoadFile();
     123            //ticpp::Element myelement(*Script::getFileString());
     124            ticpp::Document xmlfile;
     125            //xmlfile.ToDocument();
     126            xmlfile.Parse(*Script::getFileString(), true);
    116127
    117128            for ( ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++ )
Note: See TracChangeset for help on using the changeset viewer.