2014 ソフトウェア設計及び演習用の班Wiki
gr12::自機・敵機
Player.h
#define PLAYER_WIDTH 70 #define PLAYER_HEIGHT 100 #define PLAYER_NEUTRAL 0 #define PLAYER_RIGHT 1 #define PLAYER_LEFT 2 struct player_data { double x; double y; int used; int explosion; int damage; int hp; int blast_count; }; void DrawPlayer(cairo_t *cr); struct player_data *ReturnPlayerData(void); void PlayerKeyOperate();
Enemy.h
#define ENEMY_1_WIDTH 50 #define ENEMY_1_HEIGHT 100 #define ENEMY_MAX 25 struct enemy_data { int move_pattern; /* 移動パターン */ int picture_number; /* 画像番号 */ double x; /* 現在のx座標 */ double y; /* 現在のy座標 */ double x_speed; double y_speed; int pattern_counter; int time_watch; int bullet_pattern; int fire_counter; int used; /* この要素の使用有無 */ int explosion; /* 撃墜フラグ */ int blast_count; }; extern int enemy_2_flag; void OperateEnemy_3(cairo_t *cr); struct enemy_data *ReturnEnemyData(int data_number); void OperateEnemy_2(cairo_t *cr, GdkPixbuf *picture); void ResetEnemyData();
最終更新日:2015/02/18 13:02:21