Mercurial > hg > Members > koba > t_dandy
view spe/chara_state411.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_state411.h" #include "tobject.h" SchedDefineTask(STATE411); static int run(SchedTask *smanager, void *rbuf, void *wbuf) { CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); if (p->dt2 > 356) { p->vx = -1; } if (p->dt2 < -398) { p->vx = 1; } if ((p->dt1) % 62 == 0) Putenemy(41, p->x, p->y, (int) -Mycos(p->dt1 / 16) * 4 / SANKAKU, (int) -Mysin(p->dt1 / 16) * 4 / SANKAKU, chara_state7); if ((p->dt1) % 13 == 0) Puttama(11, p->x + 32, p->y + 32); p->dt2 += p->vx; p->dt1 += p->dt2 / 4; p->x = jiki.x - 16 + Mycos(p->dt1 / 16) * 128 / SANKAKU; p->y = jiki.y - 16 + Mysin(p->dt1 / 16) * 128 / SANKAKU; 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; }