Mercurial > hg > Members > kono > tree_dandy2
view Enemy.c @ 0:01387a2e419e
initial version
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Dec 2010 15:39:45 +0900 |
parents | |
children |
line wrap: on
line source
#include "Enemy.h" #include"syokika.h" int filpcount = 0; int stage = 0; teki enemy[300]; teki *e; BOOL tf = FALSE; #define ENEMY_STATUS(id,charno,score,hardness) {charno,score,hardness} const state enemystate[] = ENEMY_STATUS_TABLE; void TFon() { tf = TRUE; } void TFoff() { tf = FALSE; } void Putenemy(int charno, float x, float y, float sx, float sy, int move) { int ii = 0; e = &enemy[0]; while ((e->f) == TRUE) { ii++; if (ii == 100) return; e++; } e->x = x; e->y = y; e->sx = sx; e->sy = sy; e->charno = enemystate[charno].charno; e->f = TRUE; e->p = enemystate[charno].p; e->move = move; e->sc = enemystate[charno].sc; e->dt1 = e->dt2 = 0; e->tama = tf; } void Putenemyb(int b, int charno, float x, float y, float sx, float sy, int move) { //int ii=0; e = &enemy[b]; e->x = x; e->y = y; e->sx = sx; e->sy = sy; e->charno = enemystate[charno].charno; e->f = TRUE; e->p = enemystate[charno].p; e->move = move; e->sc = enemystate[charno].sc; e->dt1 = e->dt2 = 0; e->tama = tf; }