Mercurial > hg > Members > kono > Cerium
changeset 560:1a2f015c42b2
gaplant... how to solve scenegraph id conflict?
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 19:23:13 +0900 |
parents | ccb33e5bcf89 |
children | 71b3363c16bf |
files | Renderer/Test/Makefile.macosx Renderer/Test/back_action.cc Renderer/Test/gaplant.cc Renderer/Test/gaplant_action.cc |
diffstat | 4 files changed, 47 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Test/Makefile.macosx Thu Oct 22 19:10:03 2009 +0900 +++ b/Renderer/Test/Makefile.macosx Thu Oct 22 19:23:13 2009 +0900 @@ -10,7 +10,7 @@ .cc.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ -all: ball_bound boss1_action direction +all: ball_bound boss1_action direction gaplant BALL_BOUND_OBJ = ball_bound.o @@ -39,6 +39,15 @@ xml_file/direction.xml.h : $(DIRECTION_XMLS) perl $(TOOL)/create_sglist.pl -o $@ $(DIRECTION_XMLS) +GAPLAN_OBJ = gaplant.o gaplant_action.o back_action.o +GAPLAN_XML = xml_file/gap_plane_test.xml +GAPLAN_XMLS = $(GAPLAN_XML) xml_file/Ball.xml +gaplant : $(GAPLAN_OBJ) xml_file/gap_plane_test.xml.o + $(CC) -o $@ $? $(LIBS) +gaplant.cc : xml_file/gap_plane_test.xml.h +xml_file/gap_plane_test.xml.h : $(GAPLAN_XMLS) + perl $(TOOL)/create_sglist.pl -o $@ $(GAPLAN_XMLS) + run: $(TARGET) sudo ./$(TARGET) -width 576 -height 384 -bpp 32
--- a/Renderer/Test/back_action.cc Thu Oct 22 19:10:03 2009 +0900 +++ b/Renderer/Test/back_action.cc Thu Oct 22 19:23:13 2009 +0900 @@ -1,6 +1,6 @@ #include <iostream> #include "SceneGraphRoot.h" -#include "SGList.h" +#include "xml_file/gap_plane_test.xml.h" #include "ball_action.h" using namespace std;
--- a/Renderer/Test/gaplant.cc Thu Oct 22 19:10:03 2009 +0900 +++ b/Renderer/Test/gaplant.cc Thu Oct 22 19:23:13 2009 +0900 @@ -1,15 +1,16 @@ #include "SceneGraphRoot.h" -#include "SGList.h" +#include "xml_file/gap_plane_test.xml.h" #include "gaplant_action.h" +#include "gaplant.h" #include "back_action.h" MainLoopPtr -gaplant::init_gaplant(Viewer *sgroot, int w, int h) +gaplant::init(Viewer *sgroot, int w, int h) { SceneGraphPtr back; SceneGraphPtr gaplant; - sgroot->createFromXMLfile(manager, "xml_file/gap_plane_test.xml"); - sgroot->createFromXMLfile(manager, "xml_file/Ball.xml"); + sgroot->createFromXMLfile("xml_file/gap_plane_test.xml"); + sgroot->createFromXMLfile("xml_file/Ball.xml"); back = sgroot->createSceneGraph(); back->set_move_collision(back_move, back_coll); @@ -29,3 +30,33 @@ sgroot->setSceneData(back); return sgroot; } + + + +extern Application * +application() { + return new gaplant(); +} + +const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; + +extern int init(TaskManager *manager, int argc, char *argv[]); +extern void task_initialize(); +static void TMend(TaskManager *manager); + +int +TMmain(TaskManager *manager, int argc, char *argv[]) +{ + task_initialize(); + manager->set_TMend(TMend); + return init(manager, argc, argv); + +} + +void +TMend(TaskManager *manager) +{ + printf("test_nogl end\n"); +} + +/* end */
--- a/Renderer/Test/gaplant_action.cc Thu Oct 22 19:10:03 2009 +0900 +++ b/Renderer/Test/gaplant_action.cc Thu Oct 22 19:23:13 2009 +0900 @@ -1,7 +1,7 @@ #include <iostream> #include <cmath> #include "SceneGraphRoot.h" -#include "SGList.h" +#include "xml_file/gap_plane_test.xml.h" #include "gaplant.h" using namespace std;