Mercurial > hg > Members > tkaito > t_dandy_old
comparison spe/chara_state602.cc @ 0:4be1ca60a49b default tip
first commit.
author | tkaito |
---|---|
date | Sat, 05 Feb 2011 02:13:58 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4be1ca60a49b |
---|---|
1 #include "chara_state602.h" | |
2 #include "tobject.h" | |
3 | |
4 SchedDefineTask(STATE602); | |
5 | |
6 static int | |
7 run(SchedTask *smanager, void *rbuf, void *wbuf) | |
8 { | |
9 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); | |
10 | |
11 p->dt2++; | |
12 Putenemy(24, p->x + 14, p->y + 14, | |
13 (rand() % 5 + 0.5) * (rand() % 2 == 1 ? -1 : 1), | |
14 (rand() % 5 + 0.5) * (rand() % 2 == 1 ? -1 : 1), | |
15 chara_state29); | |
16 if (p->dt2 > 1024) { | |
17 p->task = STATE600; | |
18 p->dt2 = 0; | |
19 } | |
20 return 0; | |
21 } |