Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2007, 4:21:30 PM (17 years ago)
Author:
rgrieder
Message:
  • adjusted the entire source to compile under windows visual studio too:
  • added some ugly conversions
  • changed some illegal code pieces (gcc however accepted it)
  • added a few files from reto's framework to evade linker errors (no more dynamic linking)
  • inserted some 'return true' to justify the return type
  • excluded the levelLoader in the orxonox.cc (couldn't make it work, parsing error)
  • wrote about 5 code #branches to compensate for missing usleep() under windows
Location:
code/branches/FICN
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN

    • Property svn:ignore set to
      FICN.sln
      FICN.ncb
      FICN.vcproj
      FICN.vcproj.RGRIEDERT60.rgrieder.user
      FICN.suo
      obj
  • code/branches/FICN/src/loader/LevelLoader.cc

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

    r341 r346  
    99               
    1010        }
     11
     12  Light::~Light()
     13  {
     14  }
    1115       
    1216        Light::Light(XMLNode xml)
     
    1822        {
    1923                // Here comes the tricky part... convert strings to int
    20                 const char* diffuse = xml.getAttribute("diffuse-color");
    21                 const char* coor = xml.getAttribute("abs-coor");
     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");
    2226        }
    2327}
  • code/branches/FICN/src/loader/Light.h

    r341 r346  
    77namespace light
    88{
    9         class Light()
     9        class Light
    1010        {
    1111        public:     
  • code/branches/FICN/src/loader/LightManager.cc

    r341 r346  
    77        LightManager::LightManager()
    88        {
    9                 vector<Light> this->elements_ = new vector<Light>;
     9    std::vector<Light> elements_ = *(new std::vector<Light>);
    1010        }
    1111       
     
    1414                if (!xml.isEmpty())
    1515                {
    16                         int nLights = xml.nChildNode("light");
     16                        int nLights = xml.nChildNode((const wchar_t*)"light");
    1717                        for (int i=0; i<nLights;i++)
    1818                        {
    19                                 Light l = new Light(xml.getChildNode("light",i));
    20                                 this->elements_.append(l);
     19                                Light l = *(new Light(xml.getChildNode((const wchar_t*)"light",i)));
     20        this->elements_.insert(elements_.end(),l);
    2121                        }
    2222                }               
  • code/branches/FICN/src/loader/LightManager.h

    r341 r346  
    99namespace light
    1010{
    11         class LightManager()
     11        class LightManager
    1212        {     
    1313        public:
     
    2020                float ambient_g_;
    2121                float ambient_b_;
    22                 vector<Light> elements_;
     22    std::vector<Light> elements_;
    2323        };
    2424}
Note: See TracChangeset for help on using the changeset viewer.