Mercurial > hg > Members > koba > t_dandy
diff Enemy.h @ 0:435ac1cdb64e
create task dandy directry.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 11 Dec 2010 21:25:28 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Enemy.h Sat Dec 11 21:25:28 2010 +0900 @@ -0,0 +1,106 @@ +#include "bool.h" + +#ifndef _ENEMY_H_ +#define _ENEMY_H_ + +typedef struct enemy_status { + int charno; // sprite image number + int sc; // score + int p; // hardness +} state; + +typedef struct teki { + float x; + float y; + float sx; + float sy; + int charno; + BOOL tama; /*たま */ + BOOL f; /*表示フラグ */ + int p; /*かたさです */ + int move; + int sc; /*スコア */ + int dt1; + int dt2; + float s; +} teki; + + +// prote type +extern void Puttama(int type, float x, float y); +extern void Defenemy(int no, int charno, int sc, int p); +extern void TFon(); +extern void TFoff(); +extern void Putenemy(int charno, float x, float y, float sx, float sy, + int move); +extern void Putenemyb(int b, int charno, float x, float y, float sx, + float sy, int move); +extern void En0(); + + +extern int filpcount; +extern int stage; +extern teki enemy[300]; +extern const state enemystate[50]; + +/** + * enemyの種類一覧 + */ +#define ENEMY_STATUS_TABLE {\ + ENEMY_STATUS(UNUSED0, 0, 0, 0),\ + ENEMY_STATUS(ID_GREENCRAB, ENEMY_GREENCRAB, 330, 98),\ + ENEMY_STATUS(ID_PLANE, ENEMY_PLANE, 470, 37),\ + ENEMY_STATUS(ID_REDBULLET, ENEMY_REDBULLET, 30, 16),\ + ENEMY_STATUS(ID_BOSS1ORGAN, BOSS1_ORGAN, 25000, 10000),\ + ENEMY_STATUS(ID_BOSS1SIDEPARTS, BOSS1_ORGAN, 10000, 10000),\ + ENEMY_STATUS(ID_BLUEBULLET, ENEMY_BLUEBULLET, 40, 39),\ + ENEMY_STATUS(ID_LASER, ENEMY_LASER, 100, 100000),\ + ENEMY_STATUS(ID_LIGHTNING, ENEMY_LIGHTNING, 100, 100000),\ + ENEMY_STATUS(ID_ASTEROID, ASTEROID, 170, 500),\ + ENEMY_STATUS(ID_ASTEROIDID_BOSS2BODY, BOSS2_BODY, 100, 500),\ + ENEMY_STATUS(ID_BOSS2LEFTSHOULDER, BOSS2_LEFTSHOULDER, 10000, 12000),\ + ENEMY_STATUS(ID_BOSS2RIGHTSHOULDER, BOSS2_RIGHTSHOULDER, 10000, 12000),\ + ENEMY_STATUS(ID_BOSS2RIGHTARM, BOSS2_RIGHTARM, 5000, 15000),\ + ENEMY_STATUS(ID_BOSS2LEFTARM, BOSS2_LEFTARM, 5000, 15000),\ + ENEMY_STATUS(ID_BOSS2BATTERY, BOSS2_BATTERY, 10000, 5000),\ + ENEMY_STATUS(ID_BOSS2OPENBATTERY, BOSS2_OPENBATTERY, 10000, 5000),\ + ENEMY_STATUS(ID_BOSS2BROKENHATCH, BOSS2_BROKENHATCH, 100, 500),\ + ENEMY_STATUS(ID_BOSS2DUMMY, BOSS2_DUMMY, 50000, 15000),\ + ENEMY_STATUS(ID_BOSS2RIGHTSHOULDERUP, BOSS2_RIGHTSHOULDERUP, 10000, 20000),\ + ENEMY_STATUS(ID_BOSS2LEFTSHOULDERUP, BOSS2_LEFTSHOULDERUP, 10000, 15000),\ + ENEMY_STATUS(ID_BOSS2LEFTSHOULDERGIRD, BOSS2_LEFTSHOULDERGIRD, 100, 20000),\ + ENEMY_STATUS(ID_BOSS2RIGHTARMBATTERY, BOSS2_RIGHTARMBATTERY, 100, 500),\ + ENEMY_STATUS(ID_BOSS2LEFTARMBATTERY, BOSS2_LEFTARMBATTERY, 100, 500),\ + ENEMY_STATUS(ID_ORBIT, ORBITMACHINE, 20, 1000000),\ + ENEMY_STATUS(UNUSED1, 0, 0, 0),\ + ENEMY_STATUS(UNUSED2, 0, 0, 0),\ + ENEMY_STATUS(UNUSED3, 0, 0, 0),\ + ENEMY_STATUS(UNUSED4, 0, 0, 0),\ + ENEMY_STATUS(UNUSED5, 0, 0, 0),\ + ENEMY_STATUS(ID_BLACK_HOLE, BLACKHOLE, 200000, 30000),\ + ENEMY_STATUS(UNUSED6, 0, 0, 0),\ + ENEMY_STATUS(UNUSED7, 0, 0, 0),\ + ENEMY_STATUS(UNUSED8, 0, 0, 0),\ + ENEMY_STATUS(UNUSED9, 0, 0, 0),\ + ENEMY_STATUS(UNUSED10, 0, 0, 0),\ + ENEMY_STATUS(UNUSED11, 0, 0, 0),\ + ENEMY_STATUS(UNUSED12, 0, 0, 0),\ + ENEMY_STATUS(UNUSED13, 0, 0, 0),\ + ENEMY_STATUS(UNUSED14, 0, 0, 0),\ + ENEMY_STATUS(ID_GUN_BATTERY, GUNBATTERY, 540, 137),\ + ENEMY_STATUS(ID_PURPLE_CORE, PURPLECORE, 840, 287),\ + ENEMY_STATUS(ID_SPACE_FISH, SPACEFISH, 370, 137),\ + ENEMY_STATUS(ID_AUTOMISSILE, MISSILE, 210, 24),\ + ENEMY_STATUS(ID_BOSS3, BOSS3_BODY, 100000, 9600),\ + ENEMY_STATUS(UNUSED15, 0, 0, 0),\ + ENEMY_STATUS(UNUSED16, 0, 0, 0),\ + ENEMY_STATUS(UNUSED17, 0, 0, 0),\ + ENEMY_STATUS(UNUSED18, 0, 0, 0),\ + ENEMY_STATUS(ID_BOSS4, BODD4_BODY, 300000, 20400)\ +} + +#define ENEMY_STATUS(id,charno,score,hardness) id +typedef enum ENEMY_STATUS EnemyId; +#undef ENEMY_STATUS + +#endif // _ENEMY_H_