Mercurial > hg > Members > koba > t_dandy
view spe/chara_state500.cc @ 24:86c6b3bdc763
fix.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 26 Dec 2010 23:42:10 +0900 |
parents | c330ded6d728 |
children | f4140672ef9f |
line wrap: on
line source
#include "chara_state500.h" #include "tobject.h" SchedDefineTask(STATE500); static int run(SchedTask *smanager, void *rbuf, void *wbuf) { CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); p->s = 0; kyeenemyno = p; p->dt2++; p->dt2 %= 512; p->dt1++; count++; DefSpriteEx(100, 16, 16); // PutSprite(count, enemy[tekino].x + 16, // enemy[tekino].y + 16, 100); PutSpriteEx(100, p->x + 16, p->y + 16, 2, 2, p->dt1); if (p->dt1 % (5 + p->dt2 / 8) == 1) { if (rand() % 2 == 1) Putenemy(24, p->x, p->y, (rand() % 5 + 0.5) * (rand() % 2 == 1 ? -1 : 1), (rand() % 5 + 0.5) * (rand() % 2 == 1 ? -1 : 1), chara_state501); else Putenemy(rand() % 2 + 1, p->x, p->y, (int) Mycos(p->dt1 / 4) * 4 / SANKAKU, (int) -Mysin(p->dt1 / 4) * 4 / SANKAKU, chara_state501); } if (p->dt1 == 50) { /*Putenemy(44,0,0,1,1,411); */ } return 0; }