Mercurial > hg > Game > Cerium
changeset 534:4c7125468f69 draft
fix
author | aaa |
---|---|
date | Thu, 22 Oct 2009 21:26:19 +0900 |
parents | bf9c44b21d67 (current diff) a89fbccde345 (diff) |
children | b4e47b4eb6b8 |
files | TaskManager/Test/test_render/Application/dynamic_create.cc TaskManager/Test/test_render/SceneGraphRoot.cc TaskManager/Test/test_render/viewer.cc |
diffstat | 11 files changed, 248 insertions(+), 80 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Application/Chain.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/Chain.cc Thu Oct 22 21:26:19 2009 +0900 @@ -213,8 +213,7 @@ // 未実装 char *data = {"1"}; int len = 0; - sgroot->createFromXMLmemory(manager, data, len); - //sgroot->createFromXMLmemory(manager, "xml_file/chain.xml"); + sgroot->createFromXMLfile(manager, "xml_file/chain.xml"); /* SPE に送る property の配列の領域確保 */ properties[0] = (ChainPropertyPtr)manager->allocate(sizeof(ChainProperty)*CHAIN_LEN);
--- a/TaskManager/Test/test_render/Application/ball_bound.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/ball_bound.cc Thu Oct 22 21:26:19 2009 +0900 @@ -111,12 +111,10 @@ // random な値が欲しいなら、man random に方法が書いてあります。 srandom(100); - // 未実装 char *data = {"1"}; int len = 0; - sgroot->createFromXMLmemory(manager, data, len); - //sgroot->createFromXMLmemory(manager, "xml_file/Ball.xml"); + sgroot->createFromXMLfile(manager, "xml_file/Ball.xml"); ball = sgroot->createSceneGraph("Ball"); ball->set_move_collision(ball_move, ball_collision);
--- a/TaskManager/Test/test_render/Application/dynamic_create.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/dynamic_create.cc Thu Oct 22 21:26:19 2009 +0900 @@ -6,11 +6,14 @@ #include <sys/mman.h> #include <sys/stat.h> #include <unistd.h> +#include <arpa/inet.h> #include "SceneGraphRoot.h" #include "lindaapi/lindaapi.h" #define PORT 10000 +#define SERIAL_REGIST_TUPLE_NO 1 + /* typedef struct { caddr_t file_mmap; @@ -18,12 +21,63 @@ } st_mmap_t; */ +typedef struct client_ { + int id; + SceneGraphPtr sgp; + struct client_ *next; +} client_t; + typedef struct { int tid; + int sid; int read_id; SceneGraphPtr node; + TaskManager *manager; + client_t *clist; } callback_arg; + +void +client_list_init(TaskManager* manager, client_t *clist) +{ + clist->id = -1; + clist->next = clist; +} + +void +client_list_update(TaskManager *manager, client_t *clist, int id, SceneGraphPtr sgp) +{ + //client_t *c; + // for (c = clist->next; c != clist; c = c->next) { + // if (c->id == id) { + // c->sgp = sgp; + // return; + // } + // } + + // c->next = (client_t *)manager->allocate(sizeof(client_t)); + // c->next->id = id; + // c->next->sgp = sgp; + // c->next->next = clist; +} + +void +client_list_delete(TaskManager *manager, client_t *clist, int id) +{ + client_t *c, *prev; + for (c = clist->next, prev = clist; c->next != clist; c = c->next) { + if (c->id == id) { + prev->next = c->next; + return; + } + prev = clist; + } + if (c->id == id) { + prev->next = c->next; + return; + } +} + int fix_byte(int size,int fix_byte_size) { @@ -79,7 +133,7 @@ static void moon_move(SceneGraphPtr node, int screen_w, int screen_h) { - node->angle[0] += 3.0f; + //node->angle[0] += 3.0f; node->xyz[1] += 1.0f; } @@ -87,20 +141,20 @@ static void earth_move(SceneGraphPtr node, int screen_w, int screen_h) { - node->angle[1] += 1.0f; - if (node->angle[1] > 360.0f) { - node->angle[1] = 0.0f; - } + // node->angle[1] += 1.0f; + // if (node->angle[1] > 360.0f) { + // node->angle[1] = 0.0f; + // } - node->xyz[0] += node->stack_xyz[0]; - if ((int)node->xyz[0] > screen_w || (int)node->xyz[0] < 0) { - node->stack_xyz[0] = -node->stack_xyz[0]; - } - - node->xyz[1] += node->stack_xyz[1]; - if ((int)node->xyz[1] > screen_h || (int)node->xyz[1] < 0) { - node->stack_xyz[1] = -node->stack_xyz[1]; - } + // node->xyz[0] += node->stack_xyz[0]; + // if ((int)node->xyz[0] > screen_w || (int)node->xyz[0] < 0) { + // node->stack_xyz[0] = -node->stack_xyz[0]; + // } + + // node->xyz[1] += node->stack_xyz[1]; + // if ((int)node->xyz[1] > screen_h || (int)node->xyz[1] < 0) { + // node->stack_xyz[1] = -node->stack_xyz[1]; + // } //Pad *pad = sgroot->getController(); @@ -124,49 +178,88 @@ psx_sync_n(); } -void -create_sg(SceneGraphPtr node, unsigned char *data, int len) +SceneGraphPtr +create_sg(TaskManager *manager, SceneGraphPtr node, unsigned char *data, int len, int serial_id) { - SceneGraphPtr earth; + SceneGraphPtr earth; //sgroot->createFromXMLmemory(sgroot->tmanager, "xml_file/universe.xml"); const char *objname = sgroot->createFromXMLmemory(sgroot->tmanager, (char *)data, len); earth = sgroot->createSceneGraph(objname); + earth->id = serial_id; earth->set_move_collision(moon_move, moon_collision); node->addChild(earth); - + + return earth; +} + +void +del_callback(unsigned char *data, void *arg) +{ + free(data); +} + +void +psx_del(int t, int id) +{ + psx_callback_in(t, id, del_callback, NULL); +} + +static void +callback_get_xml(unsigned char *xml_tuple, void *arg) { + int xml_len = psx_get_datalength(xml_tuple); + callback_arg *carg = (callback_arg *)arg; + unsigned char *xml_data = xml_tuple+LINDA_HEADER_SIZE; + SceneGraphPtr sgp; + // ここで create + sgp = create_sg(carg->manager, carg->node, xml_data, xml_len, carg->sid); + client_list_update(carg->manager, carg->clist, carg->sid, sgp); + free(arg); + free(xml_tuple); } static void callbacker(unsigned char *tuple, void *arg) { - int len; + int serial_id, xml_id; + unsigned char *data; callback_arg *carg = (callback_arg *)arg; - - len = psx_get_datalength(tuple); + // 最初の4byteデータは使わない data = tuple+LINDA_HEADER_SIZE; - - // ここで create - create_sg(carg->node, data, len); + // clientのSerialIDを取得 + serial_id = ntohl(*(int *)data); + + // タプルを解放 + psx_del(carg->tid, SERIAL_REGIST_TUPLE_NO); + + // xml fileを取得する もうすでにxml fileが送信済みである事を期待 + // つまり、送信者がserial_idを送る前にxml fileを送信していなくてはならない + xml_id = serial_id * 10; + callback_arg *copy_arg = (callback_arg *)carg->manager->allocate(sizeof(callback_arg)); + *copy_arg = *carg; + copy_arg->sid = serial_id; + psx_callback_in(carg->tid, xml_id, callback_get_xml, (void *)copy_arg); /* dataは'\0'で終わっている事を期待 (writerで保証する) */ //printf("get data[%d]: `%s'\n", len, data); - free(tuple); + free(tuple); psx_callback_wait_rd(carg->tid, carg->read_id, callbacker, arg); } - void -linda_init(TaskManager *manager, SceneGraphPtr node) +linda_init(TaskManager *manager, client_t *clist, SceneGraphPtr node) { init_linda(); callback_arg *carg = (callback_arg *)manager->allocate(sizeof(callback_arg)); - //carg->tid = open_linda_java("133.13.59.231", PORT); + carg->tid = open_linda_java("localhost", PORT); - carg->read_id = 10; + carg->read_id = SERIAL_REGIST_TUPLE_NO; + carg->node = node; + carg->manager = manager; + carg->clist = clist; psx_callback_wait_rd(carg->tid, carg->read_id, callbacker, carg); } @@ -175,7 +268,10 @@ { //SceneGraphPtr earth; sgroot->tmanager = manager; + client_t *clist; + clist = (client_t *)manager->allocate(sizeof(client_t)); + client_list_init(manager, clist); #if 0 // テスト用に mmap したデータを第2引数に渡す予定でした sgroot->createFromXMLmemory(manager, "xml_file/universe.xml"); @@ -186,9 +282,10 @@ SceneGraphPtr parent; parent = sgroot->createSceneGraph(); parent->set_move_collision(earth_move, earth_collision); + parent->xyz[0] += 300; #endif - linda_init(manager, parent); + linda_init(manager, clist, parent); // SceneGraphRoot に、使用する SceneGraph を設定する // このとき、ユーザーが記述した SceneGraph の root を渡す。
--- a/TaskManager/Test/test_render/Application/gaplant.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/gaplant.cc Thu Oct 22 21:26:19 2009 +0900 @@ -2,32 +2,116 @@ #include "gaplant_action.h" #include "back_action.h" +SceneGraphPtr +create_gaplant() { + SceneGraphPtr base; + SceneGraphPtr p; + + base = sgroot->createSceneGraph(); + +p = sgroot->createSceneGraph("arm_L_D" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_L_B" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_L_E" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_L_C" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_L_C" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_L_G" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_L_E" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_F" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_E" ), base->addChild(p); +p = sgroot->createSceneGraph("shoulder_R_C" ), base->addChild(p); +p = sgroot->createSceneGraph("shoulder_R_B" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_L_A" ), base->addChild(p); +p = sgroot->createSceneGraph("shoulder_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("head_E" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_L_E" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_L_D" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_R_D" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_L_A" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_C" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_B" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_L_C" ), base->addChild(p); +p = sgroot->createSceneGraph("eye" ), base->addChild(p); +p = sgroot->createSceneGraph("booster_B" ), base->addChild(p); +p = sgroot->createSceneGraph("booster_A" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_center_A" ), base->addChild(p); +p = sgroot->createSceneGraph("shoulder_L_A" ), base->addChild(p); +p = sgroot->createSceneGraph("body_A" ), base->addChild(p); +p = sgroot->createSceneGraph("body_B" ), base->addChild(p); +p = sgroot->createSceneGraph("body_C" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_center_B" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_R_C" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_L_C" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_L_B" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_R_B" ), base->addChild(p); +p = sgroot->createSceneGraph("west_D" ), base->addChild(p); +p = sgroot->createSceneGraph("west_A" ), base->addChild(p); +p = sgroot->createSceneGraph("west_B" ), base->addChild(p); +p = sgroot->createSceneGraph("body_L_A" ), base->addChild(p); +p = sgroot->createSceneGraph("body_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_center_C" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_B" ), base->addChild(p); +p = sgroot->createSceneGraph("head_C" ), base->addChild(p); +p = sgroot->createSceneGraph("head_F" ), base->addChild(p); +p = sgroot->createSceneGraph("head_D" ), base->addChild(p); +p = sgroot->createSceneGraph("head_R_B" ), base->addChild(p); +p = sgroot->createSceneGraph("head_L_B" ), base->addChild(p); +p = sgroot->createSceneGraph("head_L_A" ), base->addChild(p); +p = sgroot->createSceneGraph("head_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("head_B" ), base->addChild(p); +p = sgroot->createSceneGraph("head_A" ), base->addChild(p); +p = sgroot->createSceneGraph("shoulder_L_B" ), base->addChild(p); +p = sgroot->createSceneGraph("shoulder_L_C" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_L_A" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_L_B" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_D" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_L_F" ), base->addChild(p); +p = sgroot->createSceneGraph("arm_R_G" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_R_C" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_R_E" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_L_B" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_R_B" ), base->addChild(p); +p = sgroot->createSceneGraph("shield_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("west_C" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_L_D" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_R_D" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_L_F" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_R_F" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_R_C" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_R_E" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_R_A" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_R_B" ), base->addChild(p); +p = sgroot->createSceneGraph("chest_A" ), base->addChild(p); +p = sgroot->createSceneGraph("foot_L_A" ), base->addChild(p); + + return base; +} + void init_gaplant(TaskManager *manager, int w, int h) { SceneGraphPtr back; SceneGraphPtr gaplant; - //sgroot->createFromXMLmemory(manager, "xml_file/gap_plane_test.xml"); - //sgroot->createFromXMLmemory(manager, "xml_file/Ball.xml"); - // 未実装 - char *data = {"1"}; + sgroot->createFromXMLfile(manager, "xml_file/gap_plane_test.xml"); + sgroot->createFromXMLfile(manager, "xml_file/Ball.xml"); int len = 0; - sgroot->createFromXMLmemory(manager, data, len); back = sgroot->createSceneGraph(); back->set_move_collision(back_move, back_coll); - gaplant = sgroot->createSceneGraph(); + gaplant = create_gaplant(); + /* + for (int i = arm_L_D; i <= foot_L_A; i++) { + SceneGraphPtr p = sgroot->createSceneGraph(i); + gaplant->addChild(p); + } + */ gaplant->xyz[0] = 200; gaplant->angle[0] = -60; gaplant->angle[1] = 0; gaplant->angle[2] = 0; gaplant->set_move_collision(gaplant_move, gaplant_coll); -#if 0 - for (int i = arm_L_D; i <= foot_L_A; i++) { - SceneGraphPtr p = sgroot->createSceneGraph(i); - gaplant->addChild(p); - } -#endif back->addChild(gaplant); sgroot->setSceneData(back); } +
--- a/TaskManager/Test/test_render/Application/gaplant_action.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/gaplant_action.cc Thu Oct 22 21:26:19 2009 +0900 @@ -77,22 +77,20 @@ void gaplant_coll(SceneGraphPtr node, int w, int h, SceneGraphPtr tree) { - //SceneGraphIteratorPtr it = sgroot->getIterator(tree); - //static int damage = 0; -#if 0 - for (; it->hasNext(Ball);) { - it->next(Ball); + SceneGraphIteratorPtr it = sgroot->getIterator(tree); + static int damage = 0; + for (; it->hasNext(sgroot->sglist->get("Ball")->id);) { + it->next(sgroot->sglist->get("Ball")->id); SceneGraphPtr ball = it->get(); double dis_x = node->xyz[0] - ball->xyz[0]; double dis_y = node->xyz[1] - ball->xyz[1]; double dis_z = node->xyz[2] - ball->xyz[2]; double distance = sqrt(dis_x*dis_x + dis_y*dis_y + dis_z*dis_z); - + if (distance < CHECK_HIT_RAD + BALL_RAD) { cout << "今からもっと細かく判定するよ ^q^\n"; ball->remove(); } } -#endif }
--- a/TaskManager/Test/test_render/Application/universe.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/universe.cc Thu Oct 22 21:26:19 2009 +0900 @@ -46,11 +46,10 @@ SceneGraphPtr earth; SceneGraphPtr moon; - //sgroot->createFromXMLmemory(manager, "xml_file/universe.xml"); + sgroot->createFromXMLfile(manager, "xml_file/universe.xml"); // 未実装 char *data = {"1"}; int len = 0; - sgroot->createFromXMLmemory(manager, data, len); // SGList.h にある SceneGraph ID から SceneGraph を生成する earth = sgroot->createSceneGraph("Earth");
--- a/TaskManager/Test/test_render/Application/untitled.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/untitled.cc Thu Oct 22 21:26:19 2009 +0900 @@ -86,11 +86,9 @@ SceneGraphPtr test08; SceneGraphPtr test09; - //sgroot->createFromXMLmemory(manager, "xml_file/Venus.xml"); - // 未実装 + sgroot->createFromXMLfile(manager, "xml_file/Venus.xml"); char *data = {"1"}; int len = 0; - sgroot->createFromXMLmemory(manager, data, len); // SGList.h にある SceneGraph ID から SceneGraph を生成する /*
--- a/TaskManager/Test/test_render/Application/vacuum.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/vacuum.cc Thu Oct 22 21:26:19 2009 +0900 @@ -30,15 +30,14 @@ vacuum_coll(SceneGraphPtr node, int screen_w, int screen_h, SceneGraphPtr tree) { -#if 0 Pad *pad = sgroot->getController(); if(node->frame%ENCOUNT == ENCOUNT-1) { if(random()%2) { - add_cubecollision_object(REDCUBE,node,screen_w,screen_h); + add_cubecollision_object("REDCUBE",node,screen_w,screen_h); } else { - add_cubecollision_object(ENEMY,node,screen_w,screen_h); + add_cubecollision_object("ENEMY",node,screen_w,screen_h); } } @@ -53,21 +52,19 @@ SceneGraphIteratorPtr it = sgroot->getIterator(tree); lock_attack(node,it); } -#endif } void lock_attack(SceneGraphPtr node,SceneGraphIteratorPtr it) { -#if 0 SceneGraphPtr enemy; SceneGraphPtr near_enemy = NULL; float dx,dy,r,range = 100; // Pad *pad = sgroot->getController(); - for(;it->hasNext(ENEMY);) { + for(;it->hasNext(sgroot->sglist->get("ENEMY")->id);) { - it->next(ENEMY); + it->next(sgroot->sglist->get("ENEMY")->id); enemy = it->get(); dx = enemy->xyz[0] - node->xyz[0]; dy = enemy->xyz[1] - node->xyz[1]; @@ -90,7 +87,6 @@ //near_enemy_common_move->addChild(lockon); near_enemy->addChild(lockon); } -#endif } void @@ -141,7 +137,7 @@ /*cubeをランダムな場所に生成*/ void -add_cubecollision_object(int id,SceneGraphPtr root,int w,int h) +add_cubecollision_object(const char *id,SceneGraphPtr root,int w,int h) { SceneGraphPtr object; SceneGraphPtr common_move; @@ -160,15 +156,13 @@ vacuum_init2(TaskManager *manager, int w, int h) { SceneGraphPtr title; - /* - sgroot->createFromXMLmemory(manager, "xml_file/gamecube.xml"); - sgroot->createFromXMLmemory(manager, "xml_file/title.xml"); - sgroot->createFromXMLmemory(manager, "xml_file/gameover.xml"); - */ + sgroot->createFromXMLfile(manager, "xml_file/gamecube.xml"); + sgroot->createFromXMLfile(manager, "xml_file/title.xml"); + sgroot->createFromXMLfile(manager, "xml_file/gameover.xml"); + // 未実装 char *data = {"1"}; int len = 0; - sgroot->createFromXMLmemory(manager, data, len); title = sgroot->createSceneGraph("TITLE"); title->xyz[0] = w/2;
--- a/TaskManager/Test/test_render/Application/vacuum.h Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/Application/vacuum.h Thu Oct 22 21:26:19 2009 +0900 @@ -19,7 +19,7 @@ void collision_red(SceneGraphIteratorPtr it,SceneGraphPtr node); void collision_purple(SceneGraphIteratorPtr it,SceneGraphPtr node,int w,int h); void gameover_scene(int w,int h, SceneGraphPtr node); -void add_cubecollision_object(int id,SceneGraphPtr root,int w,int h); +void add_cubecollision_object(const char *id,SceneGraphPtr root,int w,int h); void lock_attack(SceneGraphPtr node,SceneGraphIteratorPtr it); void lockon_collision(SceneGraphPtr node,int w,int h,SceneGraphPtr tree); void cube_rotate(SceneGraphPtr node,int w,int h);
--- a/TaskManager/Test/test_render/SceneGraphRoot.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/SceneGraphRoot.cc Thu Oct 22 21:26:19 2009 +0900 @@ -106,7 +106,7 @@ xmlDocPtr doc; xmlNodePtr cur; SceneGraphPtr tmp; - + /* パース DOM生成 */ doc = xmlParseFile(xmlfile); cur = xmlDocGetRootElement(doc); @@ -116,11 +116,10 @@ /* XMLのノードを一つずつ解析 */ for (cur=cur->children; cur; cur=cur->next) { - /* 扱うのはsurfaceオンリー */ + /* 扱うのはsurfaceオンリー */ if (xmlStrcmp(cur->name,(xmlChar*)"surface") != 0) { continue; } - /* ポリゴン(SceneGraph)生成 */ tmp = new SceneGraph(manager, cur); @@ -130,6 +129,7 @@ } xmlFreeDoc(doc); + } SceneGraphPtr
--- a/TaskManager/Test/test_render/viewer.cc Thu Oct 22 19:34:38 2009 +0900 +++ b/TaskManager/Test/test_render/viewer.cc Thu Oct 22 21:26:19 2009 +0900 @@ -167,15 +167,16 @@ vacuum_init2(manager, this->width, this->height); break; case 16: - app = new Chain(); + app = new Chain(); app->init(manager, this->width, this->height); - speLoop(); + speLoop(); return; break; case 17: chain_old_init(manager, this->width, this->height); break; case 18: + dynamic_init(manager); break; case 19: