diff stage_init.cc @ 24:a131729d6e4d

not working.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Wed, 24 Nov 2010 19:24:04 +0900
parents 3fb8a6a34e24
children 34fde39c0a31
line wrap: on
line diff
--- a/stage_init.cc	Tue Oct 26 17:28:56 2010 +0900
+++ b/stage_init.cc	Wed Nov 24 19:24:04 2010 +0900
@@ -1,82 +1,43 @@
-#include "dandy.h"
+#include "collision.h"
 
+#if 0
 void
-create_crab(SchedTask *s, void *charactor_, void *b)
+opening()
 {
-    ObjPropertyPtr charactor = (ObjPropertyPtr)charactor_;
-    SceneGraphPtr crab = (SceneGraphPtr)charactor->root;
-
-    crab->xyz[0] = charactor->x;
-    crab->xyz[1] = charactor->y;
+    PutSprite(700, 480, 53); //  put `push start' string on screen.                                                                              
+    PutSprite(224, 776, 119); //  put `super dandy'                                                                                              
+//  Cerium に拡大縮小機能がないので
+//    PutSpriteEx(190, 800, 264, 2, 2, 5);
+    PutSprite(800, 264, 190);
+    PutSprite(396, 432, 191);
+    PutSprite(640, 640, 192);
 }
 
 void
-create_title(SchedTask *s, void *charactor_, void *b)
-{
-    ObjPropertyPtr charactor = (ObjPropertyPtr)charactor_;
-    SceneGraphPtr title = (SceneGraphPtr)charactor->root;
-
-    if (charactor->flag == 1) {
-      title->remove();
-      charactor->flag = 0;
-    }
-}
-
-void
-create_title_back(Viewer *sgroot_, int w, int h) 
+init_game(Viewer *sgroot_, int w, int h) 
 { 
     Viewer *sgroot = sgroot_;
     SceneGraphPtr root = sgroot->createSceneGraph();
 
     SceneGraphPtr title = (SceneGraphPtr)charactor[0].root;
+    title->set_move_collision(title_collision);
     charactor[0].x = w/2;
     charactor[0].y = h/2;
-    charactor[0].vx = 0.0;
-    charactor[0].vy = 0.0;
+    charactor[0].vx = 1.0;
+    charactor[0].vy = 1.0;
     charactor[0].flag = 0;
     charactor[0].parent = (void*)root;
     
     title->xyz[0] = charactor[0].x;
     title->xyz[1] = charactor[0].y;
 
-    SceneGraphPtr crab = (SceneGraphPtr)charactor[1].root;
-    charactor[1].x = w/2;
-    charactor[1].y = h/2;
-    charactor[1].vx = 1.0;
-    charactor[1].vy = 1.0;
-    charactor[1].flag = 0;
-    charactor[1].parent = (void*)root;
-    
-    crab->xyz[0] = charactor[1].x;
-    crab->xyz[1] = charactor[1].y;
-    crab->flag_drawable = 0;
-
     int size = sizeof(ObjProperty);
-    sgroot->task_array_init(TITLE_MOVE, TASK_NUM, PARAMETER, INDATA_NUM, OUTDATA_NUM);
-    sgroot->set_pad_task(title, TITLE_MOVE, (void*)&charactor[0], size, create_title);
-    sgroot->set_pad_task(crab, CRAB_MOVE, (void*)&charactor[1], size, create_crab);
+    sgroot->set_pad_task(title, TITLE_MOVE, (void*)&charactor[0], size);
+//    sgroot->set_pad_task(crab, CRAB_MOVE, (void*)&charactor[1], size);
     
     root->addChild(title);
-    root->addChild(crab);
+//    root->addChild(crab);
     sgroot->setSceneData(root);
 }
 
-
-void
-create_stage(void *sgroot_, int w, int h, ObjPropertyPtr charactor) 
-{
-    SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
-
-    SceneGraphPtr stage = sgroot->createSceneGraph();
-    SceneGraphPtr mydandy = sgroot->createSceneGraph("mydandy"); 
-    
-    //mydandy->set_move_collision(dandy_move, dandy_coll);
-    //stage->set_move_collision(stage_move, stage_coll);
-    
-    mydandy->xyz[0] = w/2;
-    mydandy->xyz[1] = h*0.9;
-    mydandy->xyz[2] = 0.0f;
-    
-    stage->addChild(mydandy);
-    sgroot->setSceneData(stage);
-}
+#endif