Mercurial > hg > Members > koba > t_dandy
changeset 27:871f7d9a2f35
running.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 27 Dec 2010 17:21:24 +0900 |
parents | c4210c1053e8 |
children | 813f5461daab |
files | TaskDandy.cc ppe/chara_state22.cc ppe/chara_state4.cc ppe/task_init.cc state_task.cc |
diffstat | 5 files changed, 61 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskDandy.cc Mon Dec 27 02:58:02 2010 +0900 +++ b/TaskDandy.cc Mon Dec 27 17:21:24 2010 +0900 @@ -272,6 +272,12 @@ schedule(); enemyfaste = count; + + if (jiki.bf == TRUE) { + Player(0); + count++; + PutSprite(count, jiki.x, jiki.y, jiki.ch); + } // timeprof_begin(timeprof_move); //Move(); //enemy move @@ -284,12 +290,6 @@ //charpatern(); //bosguage(); - if (jiki.bf == TRUE) { - Player(0); - count++; - PutSprite(count, jiki.x, jiki.y, jiki.ch); - } - Putbom(); tokuten();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/chara_state22.cc Mon Dec 27 17:21:24 2010 +0900 @@ -0,0 +1,41 @@ +#include "task_base.h" +#include "task_object.h" + +SchedDefineTask(State22); + +static int +run(SchedTask *smanager, void *rbuf, void *wbuf) +{ + CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); + + int sf; + + sf = rand() % 4; + if((sf == 0) || (sf == 1)) + { + p->x = -35; + p->y = rand() % (120 - 35); + p->vx = (rand() % 4 + 1); + p->vy = rand() % 3 + 1; + p->task = STATE23; + } + if((sf == 2)) + { + p->x = rand() % 290; + p->y = -30; + p->vx = rand() % 3 - 1; + p->vy = (rand() % 4 + 1); + p->task = STATE23; + } + if(sf == 3) + { + p->x = 320; + p->y = rand() % (120 - 35); + p->vx = (rand() % 4 + 1) * -1; + p->vy = rand() % 3 -1; + p->task = STATE23; + } + + smanager->swap(); + return 0; +}
--- a/ppe/chara_state4.cc Mon Dec 27 02:58:02 2010 +0900 +++ b/ppe/chara_state4.cc Mon Dec 27 17:21:24 2010 +0900 @@ -16,7 +16,7 @@ { p->vy = -2; p->vx = ((jiki->x > p->x) ? 4 : -4); -// p->task = STATE7; + p->task = STATE7; } else p->task = STATE4;
--- a/ppe/task_init.cc Mon Dec 27 02:58:02 2010 +0900 +++ b/ppe/task_init.cc Mon Dec 27 17:21:24 2010 +0900 @@ -15,6 +15,7 @@ SchedExternTask(State20); SchedExternTask(State21); +SchedExternTask(State22); SchedExternTask(State30); /** @@ -38,6 +39,7 @@ SchedRegisterTask(STATE20, State20); SchedRegisterTask(STATE21, State21); + SchedRegisterTask(STATE22, State22); SchedRegisterTask(STATE30, State30); }
--- a/state_task.cc Mon Dec 27 02:58:02 2010 +0900 +++ b/state_task.cc Mon Dec 27 17:21:24 2010 +0900 @@ -66,25 +66,29 @@ SetTaskState(STATE4, chara_state4); SetTaskState(STATE5, chara_state5); SetTaskState(STATE6, chara_state6); + SetTaskState(STATE7, chara_state7); #if 0 - SetTaskState(STATE7, chara_state7); SetTaskState(STATE8, chara_state8); SetTaskState(STATE9, chara_state9); SetTaskState(STATE10, chara_state10); SetTaskState(STATE11, chara_state11); SetTaskState(STATE12, chara_state12); SetTaskState(STATE13, chara_state13); +#endif SetTaskState(STATE20, chara_state20); SetTaskState(STATE21, chara_state21); SetTaskState(STATE22, chara_state22); SetTaskState(STATE23, chara_state23); +#if 0 SetTaskState(STATE24, chara_state24); SetTaskState(STATE25, chara_state25); SetTaskState(STATE26, chara_state26); SetTaskState(STATE27, chara_state27); SetTaskState(STATE28, chara_state28); SetTaskState(STATE29, chara_state29); +#endif SetTaskState(STATE30, chara_state30); +#if 0 SetTaskState(STATE31, chara_state31); SetTaskState(STATE32, chara_state32); SetTaskState(STATE33, chara_state33); @@ -111,7 +115,7 @@ CHARACTER *p = (CHARACTER*)chara; int num = GetStateNum(p->task); - p=state_list[num](p); + p->state = state_list[num]; } void @@ -226,7 +230,6 @@ return SimpleStateTask(p); } - CHARACTER* chara_state3(CHARACTER *p) { @@ -525,7 +528,7 @@ return SimpleStateTask(p); } -#if 0 + //ここまでgetate boss @@ -533,13 +536,15 @@ { return SimpleStateTask(p); } - + + CHARACTER * chara_state23(CHARACTER *p) { - p=asteroid(p); +// p=asteroid(p); return p; } +#if 0 CHARACTER * chara_state24(CHARACTER *p) { kyeenemyno = p;