Mercurial > hg > Members > koba > t_dandy
annotate spe/chara_state9.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 |
---|---|
49 | 1 #include "task_base.h" |
2 #include "task_object.h" | |
18 | 3 |
49 | 4 SchedDefineTask1(State9, state9); |
18 | 5 |
6 static int | |
49 | 7 state9(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; | |
18 | 12 |
13 if(p->s <= 2) | |
14 { | |
49 | 15 length = 2; |
16 smanager->set_outputSize(4, 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, 4); | |
22 sprite->flag = true; | |
23 sprite->length = length; | |
24 | |
18 | 25 p->s += 0.05; |
26 p->y -= 12; | |
49 | 27 |
18 | 28 count++; |
49 | 29 *w_count = count; |
30 | |
31 DefSpriteEx(54, 16*4, 32*4, &sprite->data[0]); | |
32 PutSpriteEx(54, (p->x * 4), (p->y * 4), p->s, p->s, 1, &sprite->data[1]); | |
33 | |
60
cfd42ee2ad28
change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents:
49
diff
changeset
|
34 p->state_task = STATE9; |
49 | 35 *q = *p; |
18 | 36 return 0; |
37 } | |
49 | 38 length = 4; |
39 smanager->set_outputSize(4, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); | |
40 smanager->setup_outputData(); | |
41 | |
42 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); | |
43 int *w_rinkx = (int*)smanager->get_output(wbuf, 2); | |
44 int *w_rinky = (int*)smanager->get_output(wbuf, 3); | |
45 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 4); | |
46 sprite->flag = true; | |
47 sprite->length = length; | |
48 | |
18 | 49 count++; |
49 | 50 |
51 | |
52 DefSpriteEx(54, 16, 32, &sprite->data[0]); | |
53 PutSpriteEx(54, p->x, p->y, p->s, p->s, 1, &sprite->data[1]); | |
54 *w_rinkx = p->x; | |
55 *w_rinky = p->y; | |
56 Putenemy(5, *w_rinkx - 16, *w_rinky - 16, 1, 0, STATE10, &sprite->data[2]); | |
57 Putenemy(5, *w_rinkx - 16, *w_rinky - 16, -1, 0, STATE10, &sprite->data[3]); | |
58 p->dt1 = 8192; | |
59 | |
60
cfd42ee2ad28
change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents:
49
diff
changeset
|
60 p->state_task = STATE11; |
49 | 61 |
62 *q = *p; | |
18 | 63 return 0; |
64 } |