view TaskManager/Test/test_render/panel.cpp @ 243:c4918a1fb6c9 draft

rm warning
author e065746@localhost.localdomain
date Sun, 31 May 2009 16:26:20 +0900
parents 0b0e0f323742
children ce86b0186a4a
line wrap: on
line source

#include "SceneGraphRoot.h"
#include "SGList.h"

static void panel_move(SceneGraphPtr node, int screen_w, int screen_h);
static void panel_collision(SceneGraphPtr node, int screen_w, int screen_h,
			    SceneGraphPtr tree);

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

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

void
panel_init(int bg)
{
    SceneGraphPtr panel;

    if (bg == 2) {
	sgroot->createFromXMLfile("xml_file/panel_512.xml");
	panel = sgroot->createSceneGraph(PANEL_512);
    } else if (bg == 3) {
	sgroot->createFromXMLfile("xml_file/panel_1024.xml");
	panel = sgroot->createSceneGraph(PANEL_1024);
    } else {
	sgroot->createFromXMLfile("xml_file/panel_2048.xml");
	panel = sgroot->createSceneGraph(PANEL_2048);
    }

    panel->set_move_collision(panel_move, panel_collision);
    panel->xyz[2] = 30.0f;
    sgroot->setSceneData(panel);
}