Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state11.cc @ 67:21ac9f57a6d4
Mac OS X 64bit
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 May 2011 16:27:41 +0900 |
parents | 39e643fc4f90 |
children |
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) { long rinkf1 = (long)smanager->get_param(0); long count = (long)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->task = STATE11; *w_count = count; *q = *p; return 0; } CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); p->dt1 = 0; p->dt2 = 0; p->task = STATE12; *q = *p; return 0; }