changeset 1251:6da91e7cbffb draft

improve create From COLLADA
author Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
date Fri, 11 Nov 2011 18:17:26 +0900
parents c41f10c1e138
children 7ee76065ec12
files Renderer/Engine/SceneGraphRoot.cc Renderer/Engine/SceneGraphRoot.h
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraphRoot.cc	Fri Nov 11 18:07:53 2011 +0900
+++ b/Renderer/Engine/SceneGraphRoot.cc	Fri Nov 11 18:17:26 2011 +0900
@@ -226,7 +226,7 @@
 }
 
 void
-SceneGraphRoot::createFromCOLLADAfile(Taskmanager *manager, const char *xmlColladafile)
+SceneGraphRoot::createFromCOLLADAfile(TaskManager *manager, const char *xmlColladafile)
 {
 	/*make parse dom*/
 	xmlDocPtr doc;
@@ -237,8 +237,8 @@
 	cur = xmlDocGetRootElement(doc);
 
 	/*エラー処理……だけど何書けばいいのか謎。とりあえず-1返してみる*/
-	if(xmlStrcmp(cur-name, (xmlChar*)"COLLADA")){
-		return -1;
+	if(xmlStrcmp(cur->name, (xmlChar*)"COLLADA")){
+		return ;
 	};
 
 	/* node analyze */
--- a/Renderer/Engine/SceneGraphRoot.h	Fri Nov 11 18:07:53 2011 +0900
+++ b/Renderer/Engine/SceneGraphRoot.h	Fri Nov 11 18:17:26 2011 +0900
@@ -91,6 +91,7 @@
     void createStringFont(TaskManager *manager, SceneGraphPtr root,const char *string, int pixeles, int screen_w,int screen_h, Uint32 color);
     void createFont(TaskManager *manager,const char *font,int pixels,Uint32 color,const char *filename, int len, char **obj_name);    
     void createFromXMLfile(TaskManager *manager, const char *);
+    void createFromCOLLADAfile(TaskManager *manager, const char *);
     void createFromXMLmemory(TaskManager *manager, SceneGraph * node, char *data, int len);
     SceneGraphPtr createSceneGraph(int id);
     SceneGraphPtr createSceneGraph();