Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2007, 4:32:22 PM (17 years ago)
Author:
rgrieder
Message:
  • fixed a bug: under windows, XML uses wchar_t instead of char, but can use char —> commented a line in xml/xmlParser.h according to description in that file
  • was able to add the xml parser again to orxonox.cc thanks to the above modification
Location:
code/branches/FICN/src/loader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/loader/LevelLoader.cc

    r346 r347  
    1515        dir.append("/");
    1616        dir.append(file);       
    17         rootNode = XMLNode::openFileHelper((const wchar_t*)dir.c_str(),(const wchar_t*)"WorldDataFile");
     17        rootNode = XMLNode::openFileHelper(dir.c_str(),"WorldDataFile");
    1818        // TODO: Error handling
    1919
    2020        // Assing general level infos to class variables
    21         this->name_ = (const char*)rootNode.getChildNode((const wchar_t*)"name").getText();
    22         this->description_ = (const char*)rootNode.getChildNode((const wchar_t*)"description").getText();
    23         this->image_ = (const char*)rootNode.getChildNode((const wchar_t*)"image").getText();
     21        this->name_ = rootNode.getChildNode("name").getText();
     22        this->description_ = rootNode.getChildNode("description").getText();
     23        this->image_ = rootNode.getChildNode("image").getText();
    2424 
    2525        this->loadingScreen();
    2626 
    2727  // Assign sub-nodes
    28   if (rootNode.nChildNode((const wchar_t*)"LightManager")==1)
     28  if (rootNode.nChildNode("LightManager")==1)
    2929  {
    3030        // Init Luightmanager...
  • code/branches/FICN/src/loader/Light.cc

    r346 r347  
    2222        {
    2323                // Here comes the tricky part... convert strings to int
    24                 const char* diffuse = (const char*)xml.getAttribute((const wchar_t*)"diffuse-color");
    25                 const char* coor = (const char*)xml.getAttribute((const wchar_t*)"abs-coor");
     24                const char* diffuse = xml.getAttribute("diffuse-color");
     25                const char* coor = xml.getAttribute("abs-coor");
    2626        }
    2727}
  • code/branches/FICN/src/loader/LightManager.cc

    r346 r347  
    1414                if (!xml.isEmpty())
    1515                {
    16                         int nLights = xml.nChildNode((const wchar_t*)"light");
     16                        int nLights = xml.nChildNode("light");
    1717                        for (int i=0; i<nLights;i++)
    1818                        {
    19                                 Light l = *(new Light(xml.getChildNode((const wchar_t*)"light",i)));
     19                                Light l = *(new Light(xml.getChildNode("light",i)));
    2020        this->elements_.insert(elements_.end(),l);
    2121                        }
Note: See TracChangeset for help on using the changeset viewer.