Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state11.cc @ 64:07bc996c8e49
fix t_dandy on ps3.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 Feb 2011 18:20:30 +0900 (2011-02-11) |
parents | 3c2fc35a6b55 |
children | b97628fca317 |
line wrap: on
line source
#include "task_base.h" #include "task_object.h" SchedDefineTask1(State11, state11); static int state11(SchedTask *smanager, void *rbuf, void *wbuf) { int rinkf1 = (int)smanager->get_param(0); int count = (int)smanager->get_param(1); int length; CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); if(rinkf1 == 0) { length = 2; smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); smanager->setup_outputData(); CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); int *w_count = (int*)smanager->get_output(wbuf, 1); ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2); sprite->flag = true; sprite->length = length; count++; DefSpriteEx(54, 16, 32, &sprite->data[0]); PutSpriteEx(54, p->x, p->y, p->s, p->s, 1, &sprite->data[1]); p->state_task = STATE11; *w_count = count; *q = *p; return 0; } CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); p->dt1 = 0; p->dt2 = 0; p->state_task = STATE11; *q = *p; return 0; }