35
|
1 #include "task_base.h"
|
|
2 #include "task_object.h"
|
|
3
|
|
4 SchedDefineTask1(State33, state33);
|
|
5
|
|
6 static int
|
|
7 state33(SchedTask *smanager, void *rbuf, void *wbuf)
|
|
8 {
|
|
9 int enemystate_11 = (int)smanager->get_param(4);
|
|
10 int enemystate_19 = (int)smanager->get_param(5);
|
37
|
11
|
|
12 int length;
|
35
|
13 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
|
|
14 CHARACTER *kyeenemyno = (CHARACTER*)smanager->get_input(rbuf, 1);
|
|
15 int rinkf1 = *(int*)smanager->get_input(rbuf, 3);
|
|
16 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0);
|
|
17
|
|
18 if (kyeenemyno->f == FALSE)
|
|
19 {
|
37
|
20 length = 1;
|
|
21 smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1));
|
|
22 smanager->setup_outputData();
|
|
23 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0);
|
|
24 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2);
|
|
25 sprite->flag = true;
|
|
26 sprite->length = length;
|
|
27
|
|
28 Bom(p->x, p->y, &sprite->data[0]);
|
35
|
29 p->f = FALSE;
|
57
|
30 p->collision_task = true;
|
35
|
31
|
|
32 *q = *p;
|
|
33 return 0;
|
|
34 }
|
|
35 p->x = kyeenemyno->x + 32;
|
|
36 p->y = kyeenemyno->y;
|
|
37 if (rinkf1 == 5)
|
|
38 {
|
|
39 p->x = kyeenemyno->x + 32 - 4;
|
|
40 p->y = kyeenemyno->y;
|
|
41 p->charano = enemystate_19;
|
|
42 }
|
|
43 if (rinkf1 == 6)
|
|
44 {
|
|
45 p->charano = enemystate_11;
|
|
46 }
|
|
47 *q = *p;
|
|
48 return 0;
|
|
49 }
|