Mercurial > hg > Members > koba > t_dandy
annotate spe/chara_state8.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 |
rev | line source |
---|---|
33 | 1 #include "task_base.h" |
2 #include "task_object.h" | |
18 | 3 |
49 | 4 SchedDefineTask1(State8, state8); |
18 | 5 |
6 static int | |
33 | 7 state8(SchedTask *smanager, void *rbuf, void *wbuf) |
18 | 8 { |
9 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); | |
49 | 10 int count = *(int*)smanager->get_input(rbuf, 1); |
11 int length; | |
33 | 12 |
18 | 13 if(p->y < 520) |
14 { | |
49 | 15 length = 2; |
16 smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); | |
17 smanager->setup_outputData(); | |
18 | |
19 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); | |
20 int *w_count = (int*)smanager->get_output(wbuf, 1); | |
21 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2); | |
22 sprite->flag = true; | |
23 sprite->length = length; | |
24 | |
18 | 25 p->y += p->vy; |
26 count++; | |
49 | 27 |
28 DefSpriteEx(p->charano, 16*4, 32*4, &sprite->data[0]); | |
29 PutSpriteEx(p->charano, (p->x * 4), (p->y * 4), 0.2, 0.2, 1, &sprite->data[1]); | |
30 | |
18 | 31 p->dt1 = 512; |
32 p->s = 0.125; | |
60
cfd42ee2ad28
change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents:
49
diff
changeset
|
33 p->state_task = STATE8; |
49 | 34 |
35 *w_count = count; | |
36 *q = *p; | |
18 | 37 return 0; |
38 } | |
33 | 39 |
49 | 40 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); |
60
cfd42ee2ad28
change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents:
49
diff
changeset
|
41 p->state_task = STATE9; |
49 | 42 |
43 *q = *p; | |
18 | 44 return 0; |
45 } |