Mercurial > hg > Members > koba > t_dandy
view spe/chara_state600.cc @ 69:1c57e38fb9b5
fix xml files ( model /c_xyz )
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 22 May 2011 10:19:58 +0900 |
parents | c330ded6d728 |
children | f4140672ef9f |
line wrap: on
line source
#include "chara_state600.h" #include "tobject.h" SchedDefineTask(STATE600); static int run(SchedTask *smanager, void *rbuf, void *wbuf) { CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); kyeenemyno = p; p->dt1 += 30; p->dt2++; p->dt1 %= 360; p->x += Mycos(p->dt1) * 4 / SANKAKU; p->y += Mysin(p->dt1) * 4 / SANKAKU; Puttama(11, p->x + 16, p->y + 16); Puttama(11, p->x + 32, p->y + 48); Puttama(11, p->x + 48, p->y + 16); if (p->dt2 > 240) p->task = STATE601; if (p->x < 0) p->x = 0; if (p->x > 260) p->x = 260; if (p->y < 0) p->y = 0; if (p->y > 232) p->y = 232; return 0; }