diff main.cc @ 7:c015109a6041

schedule add. 10% done.
author tkaito
date Tue, 29 Jun 2010 04:25:32 +0900
parents 661ec1e92042
children 7c60ef3fca5b
line wrap: on
line diff
--- a/main.cc	Sun Jun 27 22:58:57 2010 +0900
+++ b/main.cc	Tue Jun 29 04:25:32 2010 +0900
@@ -26,7 +26,7 @@
 const state status[50] = ENEMY_STATUS_TABLE;
 
 void
-init_charactor(Viewer *sgroot, ObjPropertyPtr charactor)
+init_charactor(Viewer *sgroot)
 {
   sgroot->createFromXMLfile("xml/mydandy.xml");
   sgroot->createFromXMLfile("xml/gameover.xml");
@@ -36,24 +36,25 @@
   sgroot->createFromXMLfile("xml/title2.xml");  
 
   for (int i = 0; i < ENEMY_NUM; i++) {
-    charactor[0].root  = (void*)sgroot->createSceneGraph(status[1].charano);
-    charactor[0].score = status[1].score;
-    charactor[0].vital = status[1].vital;
+    charactor[0].root  = (void*)sgroot->createSceneGraph(status[0].charano);
+    charactor[0].score = status[0].score;
+    charactor[0].vital = status[0].vital;
    }
 
 }
 
+ObjPropertyPtr charactor;
+
 MainLoopPtr
 dandy::init(Viewer *sgroot, int w, int h)
 {
-  ObjPropertyPtr charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjPropertyPtr)*16);
-  init_charactor(sgroot, charactor);
-  create_title(sgroot, w, h, charactor);
+  charactor = (ObjPropertyPtr)sgroot->manager->allocate(sizeof(ObjPropertyPtr)*16);
+  init_charactor(sgroot);
+  create_back(sgroot, w, h);
 
   return sgroot;
 }
 
-
 extern Application *
 application() {
     return new dandy();