Mercurial > hg > Members > koba > t_dandy
diff spe/chara_state27.cc @ 18:c330ded6d728
add task file.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Dec 2010 22:18:11 +0900 |
parents | |
children | f4140672ef9f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spe/chara_state27.cc Fri Dec 17 22:18:11 2010 +0900 @@ -0,0 +1,63 @@ +#include "chara_state27.h" +#include "tobject.h" + +SchedDefineTask(STATE27); + +static int +run(SchedTask *smanager, void *rbuf, void *wbuf) +{ + CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); + + if((p->dt2 > 50) && (p->dt2 < 60) && (p->x > -24) && (p->y > -24)) + { + rinkf1 = 6; + rinkx -= 4; + p->x -= 4; + p->y -= 4; + } + if(p->dt2 == 80) + { + rinkf1 = 7; + } + if(p->dt2 == 81) + { + rinkf1 = 8; + } + if(p->dt2 == 124) + { + rinkf1 = 9; + } + if(p->dt2 == 400) + { + rinkf1 = 10; + } + if(p->dt2 == 444) + { + rinkf1 = 11; + } + if(p->dt2 == 500) + { + rinkf1 = 12; + } + if((p->dt2 > 80) && (p->dt2 < 200)) + { + if((rinkx != 0) && (p->dt2 % 2 == 1)) + { + rinkx++; + p->x++; + p->y++; + } + } + count++; + PutSprite(count, p->x - 32, p->y, 6); + if(rinkf1 == 12) + { + p->dt2 = 0; + rinkf1 = 0; + rinkx = 0; + p->task = STATE25; + return 0; + } + p->dt2++; + return 0; +}