view 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 source

#include "collision.h"

#if 0
void
opening()
{
    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
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 = 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;

    int size = sizeof(ObjProperty);
    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);
    sgroot->setSceneData(root);
}

#endif