Mercurial > hg > Members > koba > t_dandy
view spe/chara_state27.cc @ 60:cfd42ee2ad28
change makefile, spe/task. adjust scale api. worked on ps3-ppe.
author | yutaka@localhost.localdomain |
---|---|
date | Sun, 06 Feb 2011 17:16:43 +0900 |
parents | f4140672ef9f |
children |
line wrap: on
line source
#include "task_base.h" #include "task_object.h" SchedDefineTask1(State27, state27); static int state27(SchedTask *smanager, void *rbuf, void *wbuf) { int length = 1; CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); int count = *(int*)smanager->get_input(rbuf, 1); int rinkx = *(int*)smanager->get_input(rbuf, 2); int rinkf1 = *(int*)smanager->get_input(rbuf, 3); smanager->set_outputSize(4, 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); int *w_rinkx = (int*)smanager->get_output(wbuf, 2); int *w_rinkf1 = (int*)smanager->get_output(wbuf, 3); ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 4); sprite->flag = true; sprite->length = length; 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, &sprite->data[0]); if(rinkf1 == 12) { p->dt2 = 0; rinkf1 = 0; rinkx = 0; p->state_task = STATE25; *q = *p; *w_count = count; *w_rinkx = rinkx; *w_rinkf1 = rinkf1; return 0; } p->dt2++; *q = *p; *w_count = count; *w_rinkx = rinkx; *w_rinkf1 = rinkf1; return 0; }