# HG changeset patch # User Shinji KONO # Date 1256206993 -32400 # Node ID 1a2f015c42b263904761e2a7d5d5240631992690 # Parent ccb33e5bcf89c8d2674244e1cf532fb7fe72a6e2 gaplant... how to solve scenegraph id conflict? diff -r ccb33e5bcf89 -r 1a2f015c42b2 Renderer/Test/Makefile.macosx --- 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 diff -r ccb33e5bcf89 -r 1a2f015c42b2 Renderer/Test/back_action.cc --- 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 #include "SceneGraphRoot.h" -#include "SGList.h" +#include "xml_file/gap_plane_test.xml.h" #include "ball_action.h" using namespace std; diff -r ccb33e5bcf89 -r 1a2f015c42b2 Renderer/Test/gaplant.cc --- 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 */ diff -r ccb33e5bcf89 -r 1a2f015c42b2 Renderer/Test/gaplant_action.cc --- 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 #include #include "SceneGraphRoot.h" -#include "SGList.h" +#include "xml_file/gap_plane_test.xml.h" #include "gaplant.h" using namespace std;