view TaskManager/Test/test_render/snake_bg.cpp @ 153:70146cdec3d4 draft

画像のサイズテストを加える -sg = [2,3,4]
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 02 Dec 2008 19:39:36 +0900
parents 4a00bb4c6184
children
line wrap: on
line source

#include "SceneGraph.h"
#include "xml_file/snake576x384.h"
#include "xml_file/snake800x600.h"
#include "xml_file/1920x1080.h"

static void snake_move(SceneGraphPtr node, int screen_w, int screen_h);
static void snake_collision(SceneGraphPtr node, int screen_w, int screen_h,
			    SceneGraphPtr tree);

static void
snake_move(SceneGraphPtr node, int screen_w, int screen_h)
{
}

static void
snake_collision(SceneGraphPtr node, int screen_w, int screen_h,
	       SceneGraphPtr tree)
{
}

void
create_snake_bg(int bg)
{
    if (bg == 2) {
	SceneGraph::createFromXMLfile("xml_file/snake576x384.xml");
    } else if (bg == 3) {
	SceneGraph::createFromXMLfile("xml_file/snake800x600.xml");
    } else {
	SceneGraph::createFromXMLfile("xml_file/1920x1080.xml");
    }

    Plane->set_move_collision(snake_move, snake_collision);
}