Changeset 346 for code/branches/FICN/src/loader
- Timestamp:
- Nov 29, 2007, 4:21:30 PM (17 years ago)
- 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
-
Property
svn:ignore
set to
-
code/branches/FICN/src/loader/LevelLoader.cc
r341 r346 15 15 dir.append("/"); 16 16 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"); 18 18 // TODO: Error handling 19 19 20 20 // 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(); 24 24 25 25 this->loadingScreen(); 26 26 27 27 // Assign sub-nodes 28 if (rootNode.nChildNode( "LightManager")==1)28 if (rootNode.nChildNode((const wchar_t*)"LightManager")==1) 29 29 { 30 30 // Init Luightmanager... -
code/branches/FICN/src/loader/Light.cc
r341 r346 9 9 10 10 } 11 12 Light::~Light() 13 { 14 } 11 15 12 16 Light::Light(XMLNode xml) … … 18 22 { 19 23 // 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"); 22 26 } 23 27 } -
code/branches/FICN/src/loader/Light.h
r341 r346 7 7 namespace light 8 8 { 9 class Light ()9 class Light 10 10 { 11 11 public: -
code/branches/FICN/src/loader/LightManager.cc
r341 r346 7 7 LightManager::LightManager() 8 8 { 9 vector<Light> this->elements_ = new vector<Light>;9 std::vector<Light> elements_ = *(new std::vector<Light>); 10 10 } 11 11 … … 14 14 if (!xml.isEmpty()) 15 15 { 16 int nLights = xml.nChildNode( "light");16 int nLights = xml.nChildNode((const wchar_t*)"light"); 17 17 for (int i=0; i<nLights;i++) 18 18 { 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); 21 21 } 22 22 } -
code/branches/FICN/src/loader/LightManager.h
r341 r346 9 9 namespace light 10 10 { 11 class LightManager ()11 class LightManager 12 12 { 13 13 public: … … 20 20 float ambient_g_; 21 21 float ambient_b_; 22 22 std::vector<Light> elements_; 23 23 }; 24 24 }
Note: See TracChangeset
for help on using the changeset viewer.