# HG changeset patch # User Shinji KONO # Date 1256187924 -32400 # Node ID 12135dde3b87fb3083b9577d5f9aae5965c68d6e # Parent c5e09e9bbfa5f7fac1dc3c1a340f57704c1a5dc9 Cerium no error. diff -r c5e09e9bbfa5 -r 12135dde3b87 Renderer/Engine/main.cc --- a/Renderer/Engine/main.cc Tue Oct 20 22:29:27 2009 +0900 +++ b/Renderer/Engine/main.cc Thu Oct 22 14:05:24 2009 +0900 @@ -5,16 +5,17 @@ #include "Application.h" /* prototype */ -static int init(TaskManager *manager, int argc, char *argv[]); +extern int init(TaskManager *manager, int argc, char *argv[]); static void TMend(TaskManager *manager); extern void task_initialize(); extern Application *application(); +extern int init(TaskManager *manager, int argc, char *argv[]); -// 帯域変数は禁止 +// 大域変数は禁止 //static Viewer *screen; - +/* const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n\ -cpu Number of SPE (default 1)\n\ -width, -height window size (default 640x480)\n\ @@ -26,6 +27,7 @@ 4: テクスチャテスト:2048x1536\n\ 5: 地球が動き、その周りを月が自転、公転する\n\ 6 以降: キューブが跳ね返りながら、勝手にキューブが増えて行く\n"; + */ int init(TaskManager *manager, int argc, char *argv[]) @@ -72,18 +74,18 @@ screen->video_init(manager); screen->run_init(manager, application()); - manager->set_TMend(TMend); return 0; } +#if 0 int TMmain(TaskManager *manager, int argc, char *argv[]) { task_initialize(); + manager->set_TMend(TMend); return init(manager, argc, argv); - //return 0; } void @@ -91,3 +93,5 @@ { printf("test_nogl end\n"); } + +#endif diff -r c5e09e9bbfa5 -r 12135dde3b87 Renderer/Test/Makefile.cell --- a/Renderer/Test/Makefile.cell Tue Oct 20 22:29:27 2009 +0900 +++ b/Renderer/Test/Makefile.cell Thu Oct 22 14:05:24 2009 +0900 @@ -1,23 +1,36 @@ include ./Makefile.def -LIBS += -lFifoManager -lCerium +LIBS += -lCerium -lCellManager -lspe2 -lpthread CFLAGS += `sdl-config --cflags` `xml2-config --cflags` -LIBS += `sdl-config --libs` `xml2-config --libs` -lSDL_image -Wl,-framework,OpenGL +LIBS += `sdl-config --libs` -lSDL_image -lGL `xml2-config --libs` + .SUFFIXES: .cc .o .xml .cc.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ -all: ball_bound +all: ball_bound spe-main cell: make -f Makefile.cell +speobject: + cd spe; $(MAKE) + +run: $(TARGET) + sudo ./$(TARGET) -width 576 -height 384 -bpp 32 +run-hd: $(TARGET) + sudo /usr/sbin/ps3-video-mode -v 133 + sudo ./$(TARGET) -video fb -width 1920 -height 1080 -bpp 32 + BALL_BOUND_OBJ = ball_bound.o BALL_BOUND_XML = xml_file/Ball.xml +spe-main: + ln -s ../Engine/spe-main . + ball_bound : $(BALL_BOUND_OBJ) $(BALL_BOUND_XML).o $(CC) -o $@ $< $(BALL_BOUND_XML).o $(LIBS) @@ -27,9 +40,6 @@ perl $(TOOL)/create_sglist.pl -o $@ $(BALL_BOUND_XML) -run: $(TARGET) - sudo ./$(TARGET) -width 576 -height 384 -bpp 32 - debug: $(TARGET) sudo ppu-gdb ./$(TARGET) diff -r c5e09e9bbfa5 -r 12135dde3b87 Renderer/Test/ball_bound.cc --- a/Renderer/Test/ball_bound.cc Tue Oct 20 22:29:27 2009 +0900 +++ b/Renderer/Test/ball_bound.cc Thu Oct 22 14:05:24 2009 +0900 @@ -5,6 +5,7 @@ #include "xml_file/Ball.xml.h" #include "ball_bound.h" + // prototype static void ball_move(SceneGraphPtr node, int screen_w, int screen_h); static void ball_collision(SceneGraphPtr node, int screen_w, int screen_h, SceneGraphPtr tree); @@ -109,6 +110,8 @@ return new ball_bound(); } +const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; + MainLoopPtr ball_bound::init(Viewer *viewer, int screen_w, int screen_h) { @@ -136,4 +139,23 @@ return viewer; } +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 c5e09e9bbfa5 -r 12135dde3b87 TaskManager/kernel/ppe/TaskManager.h --- a/TaskManager/kernel/ppe/TaskManager.h Tue Oct 20 22:29:27 2009 +0900 +++ b/TaskManager/kernel/ppe/TaskManager.h Thu Oct 22 14:05:24 2009 +0900 @@ -5,6 +5,7 @@ #include "Random.h" #include "MemList.h" #include "Scheduler.h" +#include "HTask.h" class TaskManager { public: