Mercurial > hg > Members > kono > Cerium
changeset 858:fdc24fbeaedc
Renderer/Test/aquarium init
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 17 Jun 2010 02:36:21 +0900 |
parents | f7276b509710 |
children | e39f320c4411 |
files | Renderer/Test/Makefile.cell Renderer/Test/Makefile.macosx Renderer/Test/aquarium.cc Renderer/Test/aquarium.h |
diffstat | 4 files changed, 67 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Test/Makefile.cell Thu Jun 10 23:21:51 2010 +0900 +++ b/Renderer/Test/Makefile.cell Thu Jun 17 02:36:21 2010 +0900 @@ -11,7 +11,7 @@ .cc.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ -ALL = spe-main ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum dynamic viewer SgRootChange property_test create_task property_universe chain_old property_chain +ALL = spe-main ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum dynamic viewer SgRootChange property_test create_task property_universe chain_old property_chain aquarium all: $(ALL) @@ -100,6 +100,11 @@ P_CHAIN_OBJ = property_chain.o property_chain : $(P_CHAIN_OBJ) $(CC) -o $@ $? $(LIBS) + +AQUARIUM_OBJ = aquarium.o +aquarium : $(AQUARIUM_OBJ) + $(CC) -o $@ $? $(LIBS) + debug: $(TARGET) sudo ppu-gdb ./$(TARGET)
--- a/Renderer/Test/Makefile.macosx Thu Jun 10 23:21:51 2010 +0900 +++ b/Renderer/Test/Makefile.macosx Thu Jun 17 02:36:21 2010 +0900 @@ -10,7 +10,7 @@ .cc.o: $(CC) $(CFLAGS) -c $< -o $@ -ALL = ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum property_test send_linda dynamic writer chain_old SgRootChange viewer +ALL = ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum property_test send_linda dynamic writer chain_old SgRootChange viewer aquarium oFLAGS=-g -O2 CFLAGt=-g -O2 @@ -84,6 +84,10 @@ viewer : $(VIEWER_OBJ) $(CC) -o $@ $? $(LIBS) +AQUARIUM_OBJ = aquarium.o +aquarium : $(AQUARIUM_OBJ) + $(CC) -o $@ $? $(LIBS) + run: $(TARGET) sudo ./$(TARGET) -width 576 -height 384 -bpp 32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Test/aquarium.cc Thu Jun 17 02:36:21 2010 +0900 @@ -0,0 +1,45 @@ +#include <stdio.h> +#include <string.h> +#include "SceneGraphRoot.h" +#include "lindaapi.h" +#include "aquarium.h" + +const char *aquarium::linda_server = "localhost"; +void TMend(TaskManager *manager); +const char *usr_help_str = "Usage: ./aquarium -linda LINDA_SERVER_NAME\n"; + +extern void task_initialize(); +extern int init(TaskManager *manager, int argc, char *argv[]); +extern Application * +application() { + return new aquarium(); +} + +MainLoopPtr +aquarium::init(Viewer *sgroot, int screen_w, int screen_h) +{ + return sgroot; +} + + +int +TMmain(TaskManager *manager, int argc, char *argv[]) +{ + task_initialize(); + manager->set_TMend(TMend); + + for (int i = 0; i < argc; i++) { + if (strcmp(argv[i],"-linda") == 0 && i + 1 <= argc) { + aquarium::linda_server = argv[i+1]; + } + } + return init(manager, argc, argv); +} + +void +TMend(TaskManager *manager) +{ + printf("aquarium end\n"); +} + +/* end */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Test/aquarium.h Thu Jun 17 02:36:21 2010 +0900 @@ -0,0 +1,11 @@ +#include <math.h> +#include <stdlib.h> +#include "SceneGraphRoot.h" +#include "Application.h" +#include "MainLoop.h" + +class aquarium : public Application { +public: + static const char *linda_server; + MainLoopPtr init(Viewer *viewer, int screen_w, int screen_h); +};