Mercurial > hg > Game > Cerium
diff TaskManager/Test/test_render/main.cpp @ 397:ce86b0186a4a draft
delete manager (in kernel/ppe/TaskManager.h)
don't move.
author | game@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sun, 20 Sep 2009 18:55:26 +0900 |
parents | ef6b225f6f40 |
children |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/main.cpp Fri Sep 18 18:28:56 2009 +0900 +++ b/TaskManager/Test/test_render/main.cpp Sun Sep 20 18:55:26 2009 +0900 @@ -5,14 +5,15 @@ #include "Func.h" /* prototype */ -static int init(int argc, char *argv[]); -static void TMend(void); +static int init(TaskManager *manager, int argc, char *argv[]); +static void TMend(TaskManager *manager); extern void task_initialize(); -Viewer *screen; +// 帯域変数は禁止 +//static Viewer *screen; +static int sg_number = 0; -static int sg_number = 0; const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n\ -cpu Number of SPE (default 1)\n\ @@ -27,7 +28,7 @@ 6 以降: キューブが跳ね返りながら、勝手にキューブが増えて行く\n"; int -init(int argc, char *argv[]) +init(TaskManager *manager, int argc, char *argv[]) { int bpp = 32; int width = 640; @@ -66,14 +67,17 @@ } } + Viewer *screen; if (vtype == VTYPE_SDL) { - screen = new ViewerSDL(bpp, width, height, spenum); + screen = new ViewerSDL(manager, bpp, width, height, spenum); } else if (vtype == VTYPE_FB) { - screen = new ViewerFB(bpp, width, height, spenum); + screen = new ViewerFB(manager, bpp, width, height, spenum); + }else{ + screen = new ViewerSDL(manager, bpp, width, height, spenum); } - screen->video_init(); - screen->run_init(xml, sg_number); + screen->video_init(manager); + screen->run_init(manager, xml, sg_number); manager->set_TMend(TMend); @@ -81,17 +85,16 @@ } int -TMmain(int argc, char *argv[]) +TMmain(TaskManager *manager, int argc, char *argv[]) { task_initialize(); - - return init(argc, argv); + return init(manager, argc, argv); //return 0; } void -TMend(void) +TMend(TaskManager *manager) { printf("test_nogl end\n"); }