インベーダーモドキ(globalのソースとヘッダー)
/*************************************************
*global.h
**************************************************/
//インクルードガード。
#ifndef GLOBAL_H
//インクルード。
#include <stdlib.h>
#include "Console_game_lib.h"
//インクルードガード用定数。
#define GLOBAL_H
//キャラクターを出せる最大数。これだけあれば大丈夫だろぅ的な奴。
#define CHARACTER_MAX 2048
//描画可能領域。
#define WINDOW_W (CONSOLE_W - 1)
#define WINDOW_H (CONSOLE_H - 1)
//ゲームウィンドウ。
#define GAME_WINDOW_W (CONSOLE_W - 20)
#define GAME_WINDOW_H (CONSOLE_H - 1)
//ゲームステート用定数。
enum GAME_STATE{
GAME_STATE_EXIT,
GAME_STATE_MAINMENU,
GAME_STATE_INGAME,
GAME_STATE_RESULT,
GAME_STATE_GAMEOVER,
};
//ゲームハンドル。
struct GAME_HANDLE
{
GAME_STATE game_state; //ゲームステート
int game_frame; //ゲーム全体での経過時間。
int mainmenu_flame; //メインメニューでの経過時間。
int ingame_flame; //インゲームでの経過時間。
int result_flame; //リザルトでの経過時間。
int ending_flame; //エンディングでの経過時間。
};
//マップデータ。
enum MAPDATA
{
MAPDATA_0,
MAPDATA_1,
MAPDATA_MAX,
};
//キャラクターID。
enum CHARACTER_ID {
CHARACTER_ID_NONE,
CHARACTER_ID_PLAYER,
CHARACTER_ID_ENEMY,
CHARACTER_ID_BULLET,
CHARACTER_ID_UFO,
CHARACTER_ID_BORDER,
CHARACTER_ID_ENEMY_KILLCOUNT,
CHARACTER_ID_UFO_KILLCOUNT,
CHARACTER_ID_SCORE,
CHARACTER_ID_BULLET_KILLCOUNT,
CHARACTER_ID_IKEMEN01,
CHARACTER_ID_IKEMEN02,
CHARACTER_ID_IKEMEN03,
CHARACTER_ID_IKEMEN04,
CHARACTER_ID_IKEMEN05,
CHARACTER_ID_IKEMEN06,
CHARACTER_ID_IKEMEN07,
CHARACTER_ID_IKEMEN08,
CHARACTER_ID_IKEMEN09,
CHARACTER_ID_IKEMEN10,
CHARACTER_ID_IKEMEN11,
CHARACTER_ID_IKEMEN12,
CHARACTER_ID_IKEMEN13,
CHARACTER_ID_IKEMEN14,
CHARACTER_ID_IKEMEN15,
CHARACTER_ID_IKEMEN16,
CHARACTER_ID_IKEMEN17,
CHARACTER_ID_IKEMEN18,
CHARACTER_ID_IKEMEN19,
CHARACTER_ID_IKEMEN20,
CHARACTER_ID_IKEMEN21,
CHARACTER_ID_IKEMEN22,
CHARACTER_ID_IKEMEN23,
CHARACTER_ID_IKEMEN24,
CHARACTER_ID_IKEMEN25,
CHARACTER_ID_IKEMEN26,
CHARACTER_ID_IKEMEN27,
CHARACTER_ID_IKEMEN28,
CHARACTER_ID_IKEMEN29,
CHARACTER_ID_IKEMEN30,
CHARACTER_ID_IKEMEN31,
CHARACTER_ID_IKEMEN32,
CHARACTER_ID_IKEMEN33,
CHARACTER_ID_IKEMEN34,
CHARACTER_ID_IKEMEN35,
CHARACTER_ID_IKEMEN36,
CHARACTER_ID_IKEMEN37,
CHARACTER_ID_IKEMEN38,
CHARACTER_ID_IKEMEN39,
CHARACTER_ID_IKEMEN40,
CHARACTER_ID_IKEMEN41,
CHARACTER_ID_IKEMEN42,
CHARACTER_ID_IKEMEN43,
CHARACTER_ID_IKEMEN44,
CHARACTER_ID_IKEMEN45,
CHARACTER_ID_IKEMEN46,
CHARACTER_ID_IKEMEN47,
CHARACTER_ID_IKEMEN48,
CHARACTER_ID_IKEMEN49,
CHARACTER_ID_IKEMEN50,
CHARACTER_ID_IKEMEN51,
CHARACTER_ID_IKEMEN52,
CHARACTER_ID_IKEMEN53,
CHARACTER_ID_IKEMEN54,
CHARACTER_ID_IKEMEN55,
CHARACTER_ID_IKEMEN56,
CHARACTER_ID_IKEMEN57,
CHARACTER_ID_IKEMEN58,
CHARACTER_ID_IKEMEN59,
CHARACTER_ID_IKEMEN60,
CHARACTER_ID_IKEMEN61,
CHARACTER_ID_IKEMEN62,
CHARACTER_ID_IKEMEN63,
CHARACTER_ID_IKEMEN64,
CHARACTER_ID_MAX,
};
//敵味方の識別用。
enum TEAM_ID {
TEAM_ID_NONE,
TEAM_ID_FRIEND,
TEAM_ID_ENEMY,
};
//スコア関係。
struct SCORE {
int killboard[CHARACTER_ID_MAX];
int enemy_killcount_num; //エネミーキルカウント表示用キャラの番号を格納するための奴。
int ufo_killcount_num; //ユーフォーキルカウント表示用キャラの番号を格納するための奴。
int score_num; //スコア表示用キャラの番号を格納するための奴。
int bullet_killcount_num; //弾表示用キャラの番号を格納するための奴。
};
//構造体定義。
struct CHARACTER {
int x,y,vx,vy;
int width, height;
CHARACTER_ID character_id;
TEAM_ID team_id;
const char image;
SCORE score;
};
//グローバル変数のエクスタン宣言。
extern GAME_HANDLE game_handle;
//キャラクター管理用配列のエクスタン宣言。
extern CHARACTER characters[CHARACTER_MAX];
// 使用状態ではない配列番号を拾ってくる関数。
int FindVacantNumber();
//キャラを全て未使用状態にする関数。
void ClearCharacterBuffer();
//キャラクターの初期化処理を行う関数。
int InitCharacter(CHARACTER_ID character_id);
//マップデータを元に全てのキャラクターを初期化する。
void InitAllCharacter(MAPDATA mapdata_num);
//ヒットチェック。
bool CheckHit(CHARACTER character01, CHARACTER character02);
#endif // GLOBAL_Hインクルードガードの効力はここまで。
/*************************************************
*global.cpp
**************************************************/
//インクルード。
#include "global.h"
#include "enemy.h"
#include "bullet.h"
#include "player.h"
//各キャラクターのデフォルトパラメータ。
CHARACTER character_data_table[CHARACTER_ID_MAX] = {
//NONE。ダミーッス。
{0,0,0,0,
0,0,
CHARACTER_ID_NONE,TEAM_ID_NONE," ",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//PLAYER
{0,0,0,0,
PLAYER_WIDTH,PLAYER_HEIGHT,
CHARACTER_ID_PLAYER,TEAM_ID_FRIEND,"M",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//ENEMY
{0,0,ENEMY_X_SPEED,ENEMY_Y_SPEED,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"(≧Д≦)",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//BULLET
{0,0,0,0,
BULLET_WIDTH,BULLET_HEIGHT,
CHARACTER_ID_BULLET,TEAM_ID_NONE,"|",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//UFO
{0,0,UFO_X_SPEED,0,
UFO_WIDTH,UFO_HEIGHT,
CHARACTER_ID_UFO,TEAM_ID_ENEMY,"( ……… )",
{{0,0,0,0,0,0,0,0,UFO_POINT,0,0},0,0,0,0},
},
//BORDER
{0,0,0,0,
BULLET_WIDTH,BULLET_HEIGHT,
CHARACTER_ID_BORDER,TEAM_ID_NONE,"l",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//KILLCOUNT_ENEMY
{0,0,0,0,
BULLET_WIDTH,BULLET_HEIGHT,
CHARACTER_ID_ENEMY_KILLCOUNT,TEAM_ID_NONE,"(≧Д≦) * %d",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//KILLCOUNT_UFO
{0,0,0,0,
BULLET_WIDTH,BULLET_HEIGHT,
CHARACTER_ID_UFO_KILLCOUNT,TEAM_ID_NONE,"(………) * %d",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
// SCORE
{0,0,0,0,
0,0,
CHARACTER_ID_SCORE,TEAM_ID_NONE,"SCORE : %d",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//BULLET_KILLCOUNT
{0,0,0,0,
0,0,
CHARACTER_ID_BULLET_KILLCOUNT,TEAM_ID_NONE," | * %d",
{{0,0,0,0,0,0,0,0,0,0,0},0,0,0,0},
},
//IKEMEN01
{0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"/",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//IKEMEN02
{0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARAC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_ID_ENEMY,"ノ",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN11,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"W",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN12,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"ヾ",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN13,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"ミ",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN14,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"{",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN15,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"メ",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN16,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"ー",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN17,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"゙",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_I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",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN26,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"ー",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN27,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"=",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN28,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"'",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN29,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"、",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN30,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"}",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN31,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"‐",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN32,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,",",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN33,
{ 0,0,0,0,
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T,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN56,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"ー",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN57,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"八",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN58,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY," ̄",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN59,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"x",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN60,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"`",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN61,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"、",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN62,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CHARACTER_ID_ENEMY,TEAM_ID_ENEMY,"_",
{{0,0,0,0,0,0,0,0,ENEMY_POINT,0,0},0,0,0,0},
},
//CHARACTER_ID_IKEMEN63,
{ 0,0,0,0,
ENEMY_WIDTH,ENEMY_HEIGHT,
CH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,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
},
{
5,0,0,0,0,0,0,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,0,0,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,0,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,17,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,18,11,11,11,11,11,11,19,19,0,12,11,11,11,11,22,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,0,23,11,24,25,26,0,0,0,0,0,0,27,26,0,0,0,0,28,11,11,11,11,11,11,11,11,11,11,11,11,11,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,0,17,11,29,29,0,0,0,0,0,0,0,0,0,0,0,30,31,38,0,0,0,12,11,11,11,11,11,11,11,11,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,0,34,35,68,70,0,12,0,30,0,72,0,67,48,0,0,0,0,17,11,11,11,11,11,11,30,36,37,38,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}
};
// 使用状態ではない配列番号を拾ってくる関数。
int FindVacantNumber() {
for (int i = 0; i < CHARACTER_MAX; i++) {
if (characters[i].character_id == CHARACTER_ID_NONE) {
return i;
}
}
return CHARACTER_MAX - 1;
}
//キャラを全て未使用状態にする関数。
void ClearCharacterBuffer() {
for (int i = 0; i < CHARACTER_MAX; i++) {
if (characters[i].character_id != CHARACTER_ID_NONE) {
characters[i].character_id = CHARACTER_ID_NONE;
}
}
}
//キャラクターの初期化処理を行う関数。
int InitCharacter(CHARACTER_ID character_id) {
//想定外の数値が入ってきて居ないかチェック。(なんかキャスト使うと通っちゃうっぽいので)
if (CHARACTER_ID_MAX <= character_id) { character_id = CHARACTER_ID_NONE; }
//空き番号の取得。
int vacant_num = FindVacantNumber();
//初期化するキャラクターのデフォルトデータをロードする。
characters[vacant_num] = character_data_table[character_id];
return vacant_num;
}
//マップデータを元に全てのキャラクターを初期化する。
void InitAllCharacter(MAPDATA mapdata_num) {
//空き番号用。
int character_num = 0;
//スコアキャラの番号を保持するための変数。
SCORE score_character_num_list = { 0 };
for (int y = 0; y < WINDOW_H; y++) {
for (int x = 0; x < WINDOW_W; x++) {
character_num = InitCharacter((CHARACTER_ID)map_data[mapdata_num][y][x]);
characters[character_num].x = x;
characters[character_num].y = y;
//自分でも心底糞みたいなプログラムだと思う。ゆるして。
switch (characters[character_num].character_id)
{
case CHARACTER_ID_ENEMY:
AddEnemyCounter();
break;
case CHARACTER_ID_ENEMY_KILLCOUNT:
score_character_num_list.enemy_killcount_num = character_num;
break;
case CHARACTER_ID_UFO_KILLCOUNT:
score_character_num_list.ufo_killcount_num = character_num;
break;
case CHARACTER_ID_SCORE:
score_character_num_list.score_num = character_num;
break;
case CHARACTER_ID_BULLET_KILLCOUNT:
score_character_num_list.bullet_killcount_num = character_num;
break;
}
}
}
//キャラの初期化が終わったので、プレイヤーにスコア表示に必要なキャラクターの番号を入れていく。
characters[FindPlayerNumber()].score = score_character_num_list;
}
//ヒットチェック。
bool CheckHit(CHARACTER character01, CHARACTER character02) {
//矩形でヒット判定を行う。
if ((character01.x < character02.x + character02.width && character02.x < character01.x + character01.width)
&& (character01.y < character02.y + character02.height && character02.y < character01.y + character01.height)) {
return true;
}
return false;
}
この記事が気に入ったらサポートをしてみませんか?