Mercurial > hg > Members > koba > t_dandy
annotate 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 |
rev | line source |
---|---|
49 | 1 #include "task_base.h" |
2 #include "task_object.h" | |
18 | 3 |
49 | 4 SchedDefineTask1(State27, state27); |
18 | 5 |
6 static int | |
49 | 7 state27(SchedTask *smanager, void *rbuf, void *wbuf) |
18 | 8 { |
49 | 9 int length = 1; |
18 | 10 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); |
49 | 11 int count = *(int*)smanager->get_input(rbuf, 1); |
12 int rinkx = *(int*)smanager->get_input(rbuf, 2); | |
13 int rinkf1 = *(int*)smanager->get_input(rbuf, 3); | |
14 | |
15 smanager->set_outputSize(4, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); | |
16 smanager->setup_outputData(); | |
17 | |
18 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); | |
19 int *w_count = (int*)smanager->get_output(wbuf, 1); | |
20 int *w_rinkx = (int*)smanager->get_output(wbuf, 2); | |
21 int *w_rinkf1 = (int*)smanager->get_output(wbuf, 3); | |
22 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 4); | |
23 sprite->flag = true; | |
24 sprite->length = length; | |
18 | 25 |
26 if((p->dt2 > 50) && (p->dt2 < 60) && (p->x > -24) && (p->y > -24)) | |
27 { | |
28 rinkf1 = 6; | |
29 rinkx -= 4; | |
30 p->x -= 4; | |
31 p->y -= 4; | |
32 } | |
33 if(p->dt2 == 80) | |
34 { | |
35 rinkf1 = 7; | |
36 } | |
37 if(p->dt2 == 81) | |
38 { | |
39 rinkf1 = 8; | |
40 } | |
41 if(p->dt2 == 124) | |
42 { | |
43 rinkf1 = 9; | |
44 } | |
45 if(p->dt2 == 400) | |
46 { | |
47 rinkf1 = 10; | |
48 } | |
49 if(p->dt2 == 444) | |
50 { | |
51 rinkf1 = 11; | |
52 } | |
53 if(p->dt2 == 500) | |
54 { | |
55 rinkf1 = 12; | |
56 } | |
57 if((p->dt2 > 80) && (p->dt2 < 200)) | |
58 { | |
59 if((rinkx != 0) && (p->dt2 % 2 == 1)) | |
60 { | |
61 rinkx++; | |
62 p->x++; | |
63 p->y++; | |
64 } | |
65 } | |
66 count++; | |
49 | 67 PutSprite(count, p->x - 32, p->y, 6, &sprite->data[0]); |
18 | 68 if(rinkf1 == 12) |
69 { | |
70 p->dt2 = 0; | |
71 rinkf1 = 0; | |
72 rinkx = 0; | |
49 | 73 |
60
cfd42ee2ad28
change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents:
49
diff
changeset
|
74 p->state_task = STATE25; |
49 | 75 *q = *p; |
76 *w_count = count; | |
77 *w_rinkx = rinkx; | |
78 *w_rinkf1 = rinkf1; | |
18 | 79 return 0; |
80 } | |
81 p->dt2++; | |
49 | 82 |
83 *q = *p; | |
84 *w_count = count; | |
85 *w_rinkx = rinkx; | |
86 *w_rinkf1 = rinkf1; | |
18 | 87 return 0; |
88 } |