プレイヤー消滅エフェクト

フォーラム(掲示板)ルール
フォーラム(掲示板)ルールはこちら  ※コードを貼り付ける場合は [code][/code] で囲って下さい。詳しくはこちら
yotumoto

プレイヤー消滅エフェクト

#1

投稿記事 by yotumoto » 7年前

プレイヤーの消滅エフェクトを作成しているのですが
消滅エフェクトのフラグを立てる所でエラーが出てしまいます
分かる方いましたら
教えていただきたいです。

このサイトを参考にして制作しています
http://bituse.info/game/shot/18

コード:

[playereffect.h]
#pragma once

struct PEFFECT_EXPAND
{
	double x, y;
	double rad;
	int speed;
};

class EFFECT_PDEAD {
private:
	//座標
	double x, y;

	//画像のサイズ
	int width[3];
	int height[3];

	//グラフィックハンドル
	int gh[3];

	//拡大率
	double rate;

	//透明度
	int alpha;

	//パーティクルエフェクト構造体
	PEFFECT_EXPAND expand[EFFECT_PDEADNUM];

	//回転させる画像用の角度
	double rota;

	//カウント
	int count;

	//実行中かどうかのフラグ
	bool flag;



private:
	void Move();
	void Draw();

public:
	EFFECT_PDEAD();
	void SetFlag(double x, double y);
	bool GetFlag();
	void All();

};

コード:

[playereffect.cpp]
#include"pch.h"
#include"control.h"
#include<ctime>
#include<cstdlib>
#include<math.h>

EFFECT_PDEAD::EFFECT_PDEAD()
{
	gh[0] = LoadGraph("DATA/BG/playereffect1.png");
	gh[1] = LoadGraph("DATA/BG/playereffect2.png");
	gh[2] = LoadGraph("DATA/BG/playereffect3.png");

	for (int i = 0; i < 3; i++)
	{
		GetGraphSize(gh[i], &width[i], &height[i]);
	}

	rate = 1;
	alpha = 255;
	count = 0;
	flag = false;

	srand((unsigned int)time(NULL));
}


void EFFECT_PDEAD::Move()
{
	//初回だけ角度を保存
	if (count == 0)
	{
		for (int i = 0; i < EFFECT_PDEADNUM; i++)
		{
			expand[i].rad = rand() % 628 / 100;
			expand[i].speed = rand() % 10;
			expand[i].x = x;
			expand[i].y = y;
		}
	}

	rate = 0.5 + (count*0.05);

	alpha = 255 - (255 / 40)*count;

	rota = 0.05*count;

	//座標の移動
	for (int i = 0; i < EFFECT_PDEADNUM; i++)
	{
		expand[i].x += cos(expand[i].rad)*expand[i].speed;
		expand[i].y += sin(expand[i].rad)*expand[i].speed;
	}

	++count;

	if (count == 40)
	{
		flag = false;
		count = 0;
	}

}

void EFFECT_PDEAD::Draw()
{
	SetDrawBlendMode(DX_BLENDMODE_ALPHA, alpha);

	//円形のエフェクト描画
	DrawRotaGraph(x, y, rate, 0, gh[0], TRUE);

	//円盤のエフェクト描画(2つ)
	DrawRotaGraph(x, y, 1.0, rota, gh[1], TRUE);
	DrawRotaGraph(x, y, 1.0, 6.26 - rota, gh[1], TRUE);

	//パーティクルエフェクト描画
	for (int i = 0; i < EFFECT_PDEADNUM; i++)
	{
		DrawGraph(expand[i].x - width[2] / 2, expand[i].y - height[2] / 2, gh[2], TRUE);
	}
	SetDrawBlendMode(DX_BLENDMODE_NOBLEND,0);
}

void EFFECT_PDEAD::All()
{
	//フラグが立っているときだけ実行
	if (flag)
	{
		Move();
		Draw();
	}
}

void EFFECT_PDEAD::SetFlag(double x, double y)
{
	count = 0;
	flag = true;
	this->x = x;
	this->y = y;
}

bool EFFECT_PDEAD::GetFlag()
{
	return flag;
}

コード:

[player.h]
class PLAYER{
private:
	//x座標,y座標
	double x,y;

	//画像幅
	int width,height;

	//グラフィックハンドル格納用配列
	int gh[12];

	//移動係数
	float move;

	//横方向と縦方向のカウント数。
	int xcount,ycount;
	//添字用変数
	int ix,iy,result;

	//プレイヤーのライフ
	int life;
	bool damageflag;
	bool endflag;
	//ダメージ中のカウント
	int dcount;

	//弾
	SHOT shot[PSHOT_NUM];

	//カウント
	int count;

	bool s_shot;
	bool s_dead;

	int effect_pdead;


private:
	void Move();
	void Draw();
	void Shot();

public:
	bool All();
	PLAYER();
	bool GetShotSound();
	bool GetDeadSound();
	bool GetShotPosition(int index, double *x, double *y);
	void SetShotFlag(int index, bool flag);
	void GetPosition(double *x, double *y);
	void SetDamageFlag();
	bool GetDamageFlag();

};

コード:

[player.cpp]
#include "pch.h"
#include"control.h"



//***********************************************************************************************
//
//		コンストラクタ(初期設定)
//
//***********************************************************************************************

PLAYER::PLAYER()
{
	//画像読み込み
	
	if(-1==LoadDivGraph("DATA/CHR/char_org.png",12,3,4,29,40,gh))
	{
		MSG("エラー発生");
	}

	width=29;
	height=40;


	//移動係数
	move=1.0f;

	//横方向と縦方向のカウント数。
	xcount=0,ycount=0;
	//添字用変数
	ix=0,iy=0,result=0;

	//初期位置
	x=180;
	y=400;

	
	//生死確認
	life = 1;

	//弾初期化
	memset(shot, 0, sizeof(shot));

	//弾画像読み込み
	int temp = LoadGraph("DATA/BG/shot_org.png");
	int w, h;
	GetGraphSize(temp, &w, &h);

	//フラグ全部falseにしとく
	//グラッフィックハンドルと画像のサイズを代入しとく
	for (int i = 0; i < PSHOT_NUM; ++i)
	{
		shot[i].flag = false;
		shot[i].gh = temp;
		shot[i].width = w;
		shot[i].height = h;
	}

	count = 0;
	dcount = 0;
	damageflag = false;
	s_dead = false;

}


//***********************************************************************************************
//
//		動作
//
//***********************************************************************************************

void PLAYER::Move()
{
	
		if(key[KEY_INPUT_LEFT]==1 || key[KEY_INPUT_RIGHT]==1)
		{

			if(key[KEY_INPUT_UP]==1 || key[KEY_INPUT_DOWN]==1)
			{
				//移動係数を0.71に設定
				move=0.71f;
			}
			else
			{
				//斜めじゃなければ1.0に設定
				move=1.0f;
			}
		}

		else if(key[KEY_INPUT_UP]==1 || key[KEY_INPUT_DOWN]==1)
		{
			move=1.0f;
		}
		
		
		if(key[KEY_INPUT_LEFT]==1)
		{
			x-=(int)PLAYER_SPEED*move;
		}
		if(key[KEY_INPUT_RIGHT]==1)
		{
			x+=(int)PLAYER_SPEED*move;

		}
		if(key[KEY_INPUT_UP]==1)
		{
			y-=(int)PLAYER_SPEED*move;

		}
		if(key[KEY_INPUT_DOWN]==1)
		{
			y+=(int)PLAYER_SPEED*move;

		}

		//左キーが押されてて、かつxcountが0以上なら0にしてから1引く。
		//それ以外は1引く
		if(key[KEY_INPUT_LEFT]==1)
		{
			if(xcount>0)
				xcount=0;
			--xcount;
				
		}
		//右キーが押されてて、かつxcountが0以下なら0にしてから1足す。
		//それ以外は1引く
		if(key[KEY_INPUT_RIGHT]==1)
		{
			if(xcount<0)
				xcount=0;
			++xcount;
		}
		//上キーが押されてて、かつycountが0以上なら0にしてから1引く。
		//それ以外は1引く
		if(key[KEY_INPUT_UP]==1)
		{
			if(ycount>0)
				ycount=0;
			--ycount;
		}
		//下キーが押されてて、かつycountが0以下なら0にしてから1足す。
		//それ以外は1足す
		if(key[KEY_INPUT_DOWN]==1)
		{
			if(ycount<0)
				ycount=0;
			++ycount;
		}


		//カウント数から添字を求める。
		ix=abs(xcount)%30/10;
		iy=abs(ycount)%30/10;

		//xカウントがプラスなら右向きなので2行目の先頭添字番号を足す。
		if(xcount>0)
		{
			ix+=3;
			result=ix;
		}
		
		else if(xcount<0)
		{
			//マイナスなら左向きなので、4行目の先頭添字番号を足す。
			ix+=9;
			result=ix;
		}

		//yカウントがプラスなら下向きなので、3行目の先頭添字番号を足す。
		if(ycount>0)
		{
			iy+=6;
			result=iy;
		}
		else if(ycount<0)
		{
			//1行目の先頭添字番号は0なので何もする必要なし。(分かりやすくするために書いときました)
			iy+=0;
			result=iy;
		}

		//斜め移動の場合は横顔を優先
		if(move==0.71f)
			result=ix;


		//押されてなければカウントをゼロにする。
		if(key[KEY_INPUT_LEFT]!=1 && key[KEY_INPUT_RIGHT]!=1)
		{
			xcount=0;
		}
		if(key[KEY_INPUT_UP]!=1 && key[KEY_INPUT_DOWN]!=1)
		{
			ycount=0;
		}


//< span class="strees">
		//キャラの移動制御
	if (x > 400 - MARGIN)
	{
		x = 400 - MARGIN;
	}
	else if (x < MARGIN)
	{
		x = MARGIN;
	}
	if (y > 480 - height / 2 - MARGIN)
	{
		y = 480 - height / 2 - MARGIN;
	}
	else if (y < height / 2 + MARGIN)
	{
		y = height / 2 + MARGIN;
	}

	//←キーが押されてて、かつxcountが0以上なら0にしてから1引く
	//それ以外は1引く
	if (key[KEY_INPUT_LEFT] == 1)
	{
		if (xcount > 0)
			xcount = 0;
		--xcount;

	}
	//→キーが押されてて、かつxcountが0以下なら0にしてから1足す
	//それ以外は1引く
	if (key[KEY_INPUT_RIGHT] == 1)
	{
		if (xcount < 0)
			xcount = 0;
		++xcount;
	}
	//↑キーが押されてて、かつycountが0以下なら0にしてから1足す
	//それいがいは1引く
	if (key[KEY_INPUT_UP] == 1)
	{
		if (ycount > 0)
			ycount = 0;
		--ycount;
	}
	//↓キーが押されてて、かつycountが0以下なら0にしてから1足す
	//それいがいは1足す
	if (key[KEY_INPUT_DOWN] == 1)
	{
		if (ycount < 0)
			ycount = 0;
		++ycount;
	}

	//カウント数から添字を求める
	ix = abs(xcount) % 30 / 10;
	iy = abs(ycount) % 30 / 10;

	//xカウントがプラスなら右向きなので2行目の先頭添字番号を足す
	if (xcount > 0)
	{
		ix += 3;
		result = ix;
	}
	else if (xcount < 0)
	{	
		//マイナスなら左向きなので4行目の先頭添字を足す
		ix += 9;
		result = ix;
	}

	//yカウントがプラスなら下向きなので,3行目の先頭添字を足す
	if (ycount > 0)
	{
		iy += 6;
		result = iy;
	}
	else if (ycount < 0)
	{
		//1行目の先頭添字番号は0なので何も刷る必要なし
		iy += 0;
		result = iy;
	}

	//斜めの移動の場合は横顔を優先
	if (move == 0.71f)
		result = ix;

	//描画
	DrawGraph(x - width / 2, y - height / 2, gh[result], TRUE);

	//押されていなければカウントをゼロにする
	if (key[KEY_INPUT_LEFT] != 1 && key[KEY_INPUT_RIGHT != 1])
	{
		xcount = 0;
	}
	if (key[KEY_INPUT_UP] != 1 && key[KEY_INPUT_DOWN] != 1)
	{
		ycount = 0;
	}

}


//***********************************************************************************************
//
//		描画処理
//
//***********************************************************************************************

void PLAYER::Draw()
{

	//弾描画
	for (int i = 0; i<PSHOT_NUM; ++i) 
	{
		if (shot[i].flag) {
			DrawGraph(shot[i].x - shot[i].width / 2, shot[i].y - shot[i].height / 2, shot[i].gh, TRUE);
		}
	}

	//生きてれば描画
	if (damageflag) 
	{
		if (dcount>20) 
		{
			if (dcount % 2 == 0) 
			{
				SetDrawBlendMode(DX_BLENDMODE_ALPHA, 140);
				DrawGraph(PLAYER_INITX - width / 2, PLAYER_INITY - height / 2 + 60 - (dcount - 20), gh[1], TRUE);
				SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
			}
			else 
			{
				DrawGraph(PLAYER_INITX - width / 2, PLAYER_INITY - height / 2 + 60 - (dcount - 20), gh[1], TRUE);
			}
		}
		++dcount;

		if (dcount == 80) 
		{
			damageflag = false;
			dcount = 0;
			//座標を初期値に戻す
			x = PLAYER_INITX;
			y = PLAYER_INITY;
			//上向きの画像にする
			result = 1;
		}
	}
	else 
	{
		//通常描画
		DrawGraph(x - width / 2, y - height / 2, gh[result], TRUE);
	}
}


//***********************************************************************************************
//
//		弾処理
//
//***********************************************************************************************

void PLAYER::Shot()
{
	s_shot = false;

	if (!damageflag)
	{

		//キーが押されててかつ、6ループに一回発射
		if (key[KEY_INPUT_Z] == 1 && count % 6 == 0) 
		{
			for (int i = 0; i < PSHOT_NUM; ++i) 
			{
				if (shot[i].flag == false)
				{
					shot[i].flag = true;
					shot[i].x = x;
					shot[i].y = y;
					break;
				}
			}
			//ショットサウンドフラグを立てる
			s_shot = true;
		}

		//弾を移動させる処理
		for (int i = 0; i < PSHOT_NUM; ++i) 
		{
			//発射してる弾だけ
			if (shot[i].flag) 
			{
				shot[i].y -= PSHOT_SPEED;

				//画面の外にはみ出したらフラグを戻す
				if (shot[i].y < -10)
				{
					shot[i].flag = false;
				}
			}
		}
	}
}


//***********************************************************************************************
//
//		位置処理(プレイヤー、弾)
//
//***********************************************************************************************

void PLAYER::GetPosition(double *x, double *y)
{
	*x = this->x;
	*y = this->y;
}

bool PLAYER::GetShotPosition(int index, double *x, double *y)
{
	if (shot[index].flag) 
	{
		*x = shot[index].x;
		*y = shot[index].y;
		return true;
	}
	else 
	{
		return false;
	}

}


void PLAYER::SetDamageFlag()
{
	damageflag = true;
	//消滅エフェクトのフラグを立てる
    //ここでエラーが出ます。
	effect_pdead.SetFlag(x, y);
}

bool PLAYER::GetDamageFlag()
{
	return damageflag;
}


void PLAYER::SetShotFlag(int index, bool flag)
{
	shot[index].flag = flag;
}

bool PLAYER::GetShotSound()
{
	return s_shot;
}

bool PLAYER::GetDeadSound()
{
	return s_dead;
}



//***********************************************************************************************
//
//		All関数
//
//***********************************************************************************************

bool PLAYER::All()
{
	//消滅していないときだけ実行
	if (!damageflag) 
	{
		Move();
	}
	Shot();
	Draw();
	count++;

	return endflag;
}

[code]
[pch.h]
//警告を消すための記述
#pragma warning(disable:4244)
#define _CRT_SECURE_NO_WARNINGS

//DXライブラリとdefine.hの取り込み
#include "DxLib.h"
#include "define.h"

コード:

[define.h]
//プレイヤー消滅エフェクト
#define EFFECT_PDEADNUM 20

コード:

[control.h]
#include"playereffect.h"

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#2

投稿記事 by みけCAT » 7年前

yotumoto さんが書きました:プレイヤーの消滅エフェクトを作成しているのですが
消滅エフェクトのフラグを立てる所でエラーが出てしまいます
誠に身勝手ではありますが、大量のコードをコピペしてコンパイルするのは面倒くさいのでどのようなエラーか(エラーメッセージ)を書いていただけるとありがたいです。

[player.cpp]と書かれているブロックの291行目
yotumoto さんが書きました:

コード:

key[KEY_INPUT_RIGHT != 1]
これは「KEY_INPUT_RIGHTが1ならkey[0]、そうでなければkey[1]」すなわちDXライブラリならkey[1]という意味ですが、
これは意図した仕様ですか?
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#3

投稿記事 by みけCAT » 7年前

[player.cpp]と書かれたブロックの438行目
yotumoto さんが書きました:

コード:

    //ここでエラーが出ます。
という行に全角スペースが含まれていたのでコメントアウトしてコンパイルしたところ、
型PLAYERが定義されていないというエラーが出ました。
これはplayer.cppおよびそこからincludeされているファイルでPLAYERが定義されていないためです。
player.cppの3行目に

コード:

#include "player.h"
を入れると、今度は以下のエラーが出ました。
► スポイラーを表示
以下の識別子が定義されていないのに使用されているようです。
  • SHOT
  • MSG
  • key
  • PSHOT_NUM
  • PLAYER_SPEED
  • MARGIN
  • PLAYER_INITX
  • PLAYER_INITY
  • PSHOT_SPEED
そこで、player.cppの冒頭、追加した#include "player.h"の前に以下の記述を追加しました。

コード:

struct SHOT {
	int flag, gh, width, height, x, y;
};
#define MSG(a)
int key[1000000];
const int PSHOT_NUM = 0;
const int PLAYER_SPEED = 0;
const int MARGIN = 0;
const int PLAYER_INITX = 0;
const int PLAYER_INITY = 0;
const int PSHOT_SPEED = 0;
すると、

コード:

In file included from player.cpp:1:0:
pch.h:2:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(disable:4244)
 ^

player.cpp: In member function 'void PLAYER::SetDamageFlag()':
player.cpp:448:15: error: request for member 'SetFlag' in '((PLAYER*)this)->PLAYER::effect_pdead', which is of non-class type 'int'
  effect_pdead.SetFlag(x, y);
               ^
というエラーが出ました。
これは、書いてある通りメンバを持たないint型のeffect_pdeadに対しメンバアクセス演算子の.を利用したのが良くないです。
適切なタイミングでこの変数の初期化をしないといけないでしょうが、とりあえずplayer.hの

コード:

	int effect_pdead;

コード:

	EFFECT_PDEAD effect_pdead
とすると、コンパイルは通り、WinMainがないことによるリンクエラーが発生しました。
使用したのはGCC 4.8.1です。
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

yotumoto

Re: プレイヤー消滅エフェクト

#4

投稿記事 by yotumoto » 7年前

何度もすいません

player.hの

コード:

int effect_pdead

コード:

EFFECT_PDEAD effect_pdead;
に書き直してビルドを通すと

SetFlagの左側はクラス、構造体、共用体でなければなりません
effect_pdead:不明なオーバーライド指定子です
effect_pdead:定義されていない識別子です
型指定子がありません - int と仮定しました。メモ: C++ は int を既定値としてサポートしていません

と、エラーが出てしまいました。

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#5

投稿記事 by みけCAT » 7年前

エラーはそれだけですか?

コード:

EFFECT_PDEAD effect_pdead;
を含むPLAYERの定義を(player.hで)する時に、コンパイラが既に(playereffect.h内の)EFFECT_PDEADの定義を読んでいなければいけません。
この時、異なる翻訳単位(≒.cppファイルおよびそこからインクルードされるファイル(間接的なものを含む))で読んでいても意味ありません。

yotumotoさんが提示したコードは、質問していると思われるint型の変数に対しメンバアクセスが行われている問題の他に大量のエラーを含んでいました。
そのため、提示されたコードと実際にコンパイルしているコードが違うと推測されます。
したがって、具体的にどう修正すればいいかはわかりません。
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

yotumoto

Re: プレイヤー消滅エフェクト

#6

投稿記事 by yotumoto » 7年前

コードを端折ってすいません

コード:

[main.cpp]
#include "pch.h"
#include "control.h"

//キー取得用配列
char key[256];

int g_count;

int state = 0;

// プログラムは WinMain から始まります
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow )
{
	ChangeWindowMode(TRUE);

	if( DxLib_Init() == -1 )		// DXライブラリ初期化処理
	{
		return -1 ;			// エラーが起きたら直ちに終了
	}


	while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0 && GetHitKeyStateAll(key) == 0) {


		CONTROL::GetInstance().All();

	}


	DxLib_End() ;				// DXライブラリ使用の終了処理

	return 0 ;				// ソフトの終了 
}

コード:

[back.cpp]
#include "back.h"
#include "pch.h"

//***********************************************************************************************
//
//		コンストラクタ(初期設定)
//
//***********************************************************************************************

BACK::BACK()
{
	gh = LoadGraph("DATA/BG/back_org.png");
	x = y = MARGIN;
}


//***********************************************************************************************
//
//		描画処理
//
//***********************************************************************************************

void BACK::Draw()
{
	//1枚目描画
	DrawGraph(x, y, gh, FALSE);

	//2枚目描画
	DrawGraph(x, y - 460, gh, FALSE);

	//一番下までスクロールしたら初期値に戻す
	if (y == 460 + MARGIN)
		y = 10;
}

//***********************************************************************************************
//
//		更新処理
//
//***********************************************************************************************

void BACK::Move()
{
	y += SCROLL_SPEED;
}



//***********************************************************************************************
//
//		All関数
//
//***********************************************************************************************

void BACK::All()
{
	Draw();
	Move();
}

コード:

[back.h]
class BACK {
private:
	//座標
	double x, y;

	//グラフィックハンドル
	int gh;

private:
	void Draw();
public:
	void Move();
	void All();
	BACK();
};

コード:

[player.cpp]
#include "pch.h"
#include"control.h"



//***********************************************************************************************
//
//		コンストラクタ(初期設定)
//
//***********************************************************************************************

PLAYER::PLAYER()
{
	//画像読み込み
	
	if(-1==LoadDivGraph("DATA/CHR/char_org.png",12,3,4,29,40,gh))
	{
		MSG("エラー発生");
	}

	width=29;
	height=40;


	//移動係数
	move=1.0f;

	//横方向と縦方向のカウント数。
	xcount=0,ycount=0;
	//添字用変数
	ix=0,iy=0,result=0;

	//初期位置
	x=180;
	y=400;

	
	//生死確認
	life = 1;

	//弾初期化
	memset(shot, 0, sizeof(shot));

	//弾画像読み込み
	int temp = LoadGraph("DATA/BG/shot_org.png");
	int w, h;
	GetGraphSize(temp, &w, &h);

	//フラグ全部falseにしとく
	//グラッフィックハンドルと画像のサイズを代入しとく
	for (int i = 0; i < PSHOT_NUM; ++i)
	{
		shot[i].flag = false;
		shot[i].gh = temp;
		shot[i].width = w;
		shot[i].height = h;
	}

	count = 0;
	dcount = 0;
	damageflag = false;
	s_dead = false;

}


//***********************************************************************************************
//
//		動作(更新処理)
//
//***********************************************************************************************

void PLAYER::Move()
{
	
		if(key[KEY_INPUT_LEFT]==1 || key[KEY_INPUT_RIGHT]==1)
		{

			if(key[KEY_INPUT_UP]==1 || key[KEY_INPUT_DOWN]==1)
			{
				//移動係数を0.71に設定
				move=0.71f;
			}
			else
			{
				//斜めじゃなければ1.0に設定
				move=1.0f;
			}
		}

		else if(key[KEY_INPUT_UP]==1 || key[KEY_INPUT_DOWN]==1)
		{
			move=1.0f;
		}
		
		
		if(key[KEY_INPUT_LEFT]==1)
		{
			x-=(int)PLAYER_SPEED*move;
		}
		if(key[KEY_INPUT_RIGHT]==1)
		{
			x+=(int)PLAYER_SPEED*move;

		}
		if(key[KEY_INPUT_UP]==1)
		{
			y-=(int)PLAYER_SPEED*move;

		}
		if(key[KEY_INPUT_DOWN]==1)
		{
			y+=(int)PLAYER_SPEED*move;

		}

		//左キーが押されてて、かつxcountが0以上なら0にしてから1引く。
		//それ以外は1引く
		if(key[KEY_INPUT_LEFT]==1)
		{
			if(xcount>0)
				xcount=0;
			--xcount;
				
		}
		//右キーが押されてて、かつxcountが0以下なら0にしてから1足す。
		//それ以外は1引く
		if(key[KEY_INPUT_RIGHT]==1)
		{
			if(xcount<0)
				xcount=0;
			++xcount;
		}
		//上キーが押されてて、かつycountが0以上なら0にしてから1引く。
		//それ以外は1引く
		if(key[KEY_INPUT_UP]==1)
		{
			if(ycount>0)
				ycount=0;
			--ycount;
		}
		//下キーが押されてて、かつycountが0以下なら0にしてから1足す。
		//それ以外は1足す
		if(key[KEY_INPUT_DOWN]==1)
		{
			if(ycount<0)
				ycount=0;
			++ycount;
		}


		//カウント数から添字を求める。
		ix=abs(xcount)%30/10;
		iy=abs(ycount)%30/10;

		//xカウントがプラスなら右向きなので2行目の先頭添字番号を足す。
		if(xcount>0)
		{
			ix+=3;
			result=ix;
		}
		
		else if(xcount<0)
		{
			//マイナスなら左向きなので、4行目の先頭添字番号を足す。
			ix+=9;
			result=ix;
		}

		//yカウントがプラスなら下向きなので、3行目の先頭添字番号を足す。
		if(ycount>0)
		{
			iy+=6;
			result=iy;
		}
		else if(ycount<0)
		{
			//1行目の先頭添字番号は0なので何もする必要なし。(分かりやすくするために書いときました)
			iy+=0;
			result=iy;
		}

		//斜め移動の場合は横顔を優先
		if(move==0.71f)
			result=ix;


		//押されてなければカウントをゼロにする。
		if(key[KEY_INPUT_LEFT]!=1 && key[KEY_INPUT_RIGHT]!=1)
		{
			xcount=0;
		}
		if(key[KEY_INPUT_UP]!=1 && key[KEY_INPUT_DOWN]!=1)
		{
			ycount=0;
		}


//< span class="strees">
		//キャラの移動制御
	if (x > 400 - MARGIN)
	{
		x = 400 - MARGIN;
	}
	else if (x < MARGIN)
	{
		x = MARGIN;
	}
	if (y > 480 - height / 2 - MARGIN)
	{
		y = 480 - height / 2 - MARGIN;
	}
	else if (y < height / 2 + MARGIN)
	{
		y = height / 2 + MARGIN;
	}

	//←キーが押されてて、かつxcountが0以上なら0にしてから1引く
	//それ以外は1引く
	if (key[KEY_INPUT_LEFT] == 1)
	{
		if (xcount > 0)
			xcount = 0;
		--xcount;

	}
	//→キーが押されてて、かつxcountが0以下なら0にしてから1足す
	//それ以外は1引く
	if (key[KEY_INPUT_RIGHT] == 1)
	{
		if (xcount < 0)
			xcount = 0;
		++xcount;
	}
	//↑キーが押されてて、かつycountが0以下なら0にしてから1足す
	//それいがいは1引く
	if (key[KEY_INPUT_UP] == 1)
	{
		if (ycount > 0)
			ycount = 0;
		--ycount;
	}
	//↓キーが押されてて、かつycountが0以下なら0にしてから1足す
	//それいがいは1足す
	if (key[KEY_INPUT_DOWN] == 1)
	{
		if (ycount < 0)
			ycount = 0;
		++ycount;
	}

	//カウント数から添字を求める
	ix = abs(xcount) % 30 / 10;
	iy = abs(ycount) % 30 / 10;

	//xカウントがプラスなら右向きなので2行目の先頭添字番号を足す
	if (xcount > 0)
	{
		ix += 3;
		result = ix;
	}
	else if (xcount < 0)
	{	
		//マイナスなら左向きなので4行目の先頭添字を足す
		ix += 9;
		result = ix;
	}

	//yカウントがプラスなら下向きなので,3行目の先頭添字を足す
	if (ycount > 0)
	{
		iy += 6;
		result = iy;
	}
	else if (ycount < 0)
	{
		//1行目の先頭添字番号は0なので何も刷る必要なし
		iy += 0;
		result = iy;
	}

	//斜めの移動の場合は横顔を優先
	if (move == 0.71f)
		result = ix;

	//描画
	DrawGraph(x - width / 2, y - height / 2, gh[result], TRUE);

	//押されていなければカウントをゼロにする
	if (key[KEY_INPUT_LEFT] != 1 && key[KEY_INPUT_RIGHT != 1])
	{
		xcount = 0;
	}
	if (key[KEY_INPUT_UP] != 1 && key[KEY_INPUT_DOWN] != 1)
	{
		ycount = 0;
	}

}


//***********************************************************************************************
//
//		描画処理
//
//***********************************************************************************************

void PLAYER::Draw()
{

	//弾描画
	for (int i = 0; i<PSHOT_NUM; ++i) 
	{
		if (shot[i].flag) {
			DrawGraph(shot[i].x - shot[i].width / 2, shot[i].y - shot[i].height / 2, shot[i].gh, TRUE);
		}
	}

	//生きてれば描画
	if (damageflag) 
	{
		if (dcount>20) 
		{
			if (dcount % 2 == 0) 
			{
				SetDrawBlendMode(DX_BLENDMODE_ALPHA, 140);
				DrawGraph(PLAYER_INITX - width / 2, PLAYER_INITY - height / 2 + 60 - (dcount - 20), gh[1], TRUE);
				SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
			}
			else 
			{
				DrawGraph(PLAYER_INITX - width / 2, PLAYER_INITY - height / 2 + 60 - (dcount - 20), gh[1], TRUE);
			}
		}
		++dcount;

		if (dcount == 80) 
		{
			damageflag = false;
			dcount = 0;
			//座標を初期値に戻す
			x = PLAYER_INITX;
			y = PLAYER_INITY;
			//上向きの画像にする
			result = 1;
		}
	}
	else 
	{
		//通常描画
		DrawGraph(x - width / 2, y - height / 2, gh[result], TRUE);
	}
}


//***********************************************************************************************
//
//		弾処理
//
//***********************************************************************************************

void PLAYER::Shot()
{
	s_shot = false;

	if (!damageflag)
	{

		//キーが押されててかつ、6ループに一回発射
		if (key[KEY_INPUT_Z] == 1 && count % 6 == 0) 
		{
			for (int i = 0; i < PSHOT_NUM; ++i) 
			{
				if (shot[i].flag == false)
				{
					shot[i].flag = true;
					shot[i].x = x;
					shot[i].y = y;
					break;
				}
			}
			//ショットサウンドフラグを立てる
			s_shot = true;
		}

		//弾を移動させる処理
		for (int i = 0; i < PSHOT_NUM; ++i) 
		{
			//発射してる弾だけ
			if (shot[i].flag) 
			{
				shot[i].y -= PSHOT_SPEED;

				//画面の外にはみ出したらフラグを戻す
				if (shot[i].y < -10)
				{
					shot[i].flag = false;
				}
			}
		}
	}
}


//***********************************************************************************************
//
//		位置処理(プレイヤー、弾)
//
//***********************************************************************************************

void PLAYER::GetPosition(double *x, double *y)
{
	*x = this->x;
	*y = this->y;
}

bool PLAYER::GetShotPosition(int index, double *x, double *y)
{
	if (shot[index].flag) 
	{
		*x = shot[index].x;
		*y = shot[index].y;
		return true;
	}
	else 
	{
		return false;
	}

}


//***********************************************************************************************
//
//		SE処理
//
//***********************************************************************************************

void PLAYER::SetDamageFlag()
{
	damageflag = true;
	//消滅エフェクトのフラグを立てる
	effect_pdead.SetFlag(x, y);
}

bool PLAYER::GetDamageFlag()
{
	return damageflag;
}


void PLAYER::SetShotFlag(int index, bool flag)
{
	shot[index].flag = flag;
}

bool PLAYER::GetShotSound()
{
	return s_shot;
}

bool PLAYER::GetDeadSound()
{
	return s_dead;
}



//***********************************************************************************************
//
//		All関数
//
//***********************************************************************************************

bool PLAYER::All()
{
	//消滅していないときだけ実行
	if (!damageflag) 
	{
		Move();
	}
	Shot();
	Draw();
	SetDamageFlag();
	count++;

	return endflag;
}

コード:

[player.h]
class PLAYER{
private:
	//x座標,y座標
	double x,y;

	//画像幅
	int width,height;

	//グラフィックハンドル格納用配列
	int gh[12];

	//移動係数
	float move;

	//横方向と縦方向のカウント数。
	int xcount,ycount;
	//添字用変数
	int ix,iy,result;

	//プレイヤーのライフ
	int life;
	bool damageflag;
	bool endflag;
	//ダメージ中のカウント
	int dcount;

	//弾
	SHOT shot[PSHOT_NUM];

	//カウント
	int count;

	bool s_shot;
	bool s_dead;

	EFFECT_PDEAD effect_pdead;


private:
	void Move();
	void Draw();
	void Shot();

public:
	bool All();
	PLAYER();
	bool GetShotSound();
	bool GetDeadSound();
	bool GetShotPosition(int index, double *x, double *y);
	void SetShotFlag(int index, bool flag);
	void GetPosition(double *x, double *y);
	void SetDamageFlag();
	bool GetDamageFlag();

};

コード:

[playereffect.cpp]
#include"pch.h"
#include"control.h"
#include<ctime>
#include<cstdlib>
#include<math.h>

EFFECT_PDEAD::EFFECT_PDEAD()
{
	gh[0] = LoadGraph("DATA/BG/playereffect1.png");
	gh[1] = LoadGraph("DATA/BG/playereffect2.png");
	gh[2] = LoadGraph("DATA/BG/playereffect3.png");

	for (int i = 0; i < 3; i++)
	{
		GetGraphSize(gh[i], &width[i], &height[i]);
	}

	rate = 1;
	alpha = 255;
	count = 0;
	flag = false;

	srand((unsigned int)time(NULL));
}


void EFFECT_PDEAD::Move()
{
	//初回だけ角度を保存
	if (count == 0)
	{
		for (int i = 0; i < EFFECT_PDEADNUM; i++)
		{
			expand[i].rad = rand() % 628 / 100;
			expand[i].speed = rand() % 10;
			expand[i].x = x;
			expand[i].y = y;
		}
	}

	rate = 0.5 + (count*0.05);

	alpha = 255 - (255 / 40)*count;

	rota = 0.05*count;

	//座標の移動
	for (int i = 0; i < EFFECT_PDEADNUM; i++)
	{
		expand[i].x += cos(expand[i].rad)*expand[i].speed;
		expand[i].y += sin(expand[i].rad)*expand[i].speed;
	}

	++count;

	if (count == 40)
	{
		flag = false;
		count = 0;
	}

}

void EFFECT_PDEAD::Draw()
{
	SetDrawBlendMode(DX_BLENDMODE_ALPHA, alpha);

	//円形のエフェクト描画
	DrawRotaGraph(x, y, rate, 0, gh[0], TRUE);

	//円盤のエフェクト描画(2つ)
	DrawRotaGraph(x, y, 1.0, rota, gh[1], TRUE);
	DrawRotaGraph(x, y, 1.0, 6.26 - rota, gh[1], TRUE);

	//パーティクルエフェクト描画
	for (int i = 0; i < EFFECT_PDEADNUM; i++)
	{
		DrawGraph(expand[i].x - width[2] / 2, expand[i].y - height[2] / 2, gh[2], TRUE);
	}
	SetDrawBlendMode(DX_BLENDMODE_NOBLEND,0);
}

void EFFECT_PDEAD::All()
{
	//フラグが立っているときだけ実行
	if (flag)
	{
		Move();
		Draw();
	}
}

void EFFECT_PDEAD::SetFlag(double x, double y)
{
	count = 0;
	flag = true;
	this->x = x;
	this->y = y;
}

bool EFFECT_PDEAD::GetFlag()
{
	return flag;
}

コード:

[playereffect.h]
#pragma once

struct PEFFECT_EXPAND
{
	double x, y;
	double rad;
	int speed;
};

class EFFECT_PDEAD {
private:
	//座標
	double x, y;

	//画像のサイズ
	int width[3];
	int height[3];

	//グラフィックハンドル
	int gh[3];

	//拡大率
	double rate;

	//透明度
	int alpha;

	//パーティクルエフェクト構造体
	PEFFECT_EXPAND expand[EFFECT_PDEADNUM];

	//回転させる画像用の角度
	double rota;

	//カウント
	int count;

	//実行中かどうかのフラグ
	bool flag;



private:
	void Move();
	void Draw();

public:
	EFFECT_PDEAD();
	void SetFlag(double x, double y);
	bool GetFlag();
	void All();

};

コード:

[enemy.cpp]
#define _USE_MATH_DEFINES
#include"pch.h"
#include"control.h"

#include"math.h"
#include<ctime>
#include<cstdlib>

//***********************************************************************************************
//
//		コンストラクタ(初期設定)
//
//***********************************************************************************************

ENEMY::ENEMY(int type, int stype,int m_pattern,int s_pattern,int in_time,int stop_time, int shot_time, int out_time,
	int x, int y, int speed, int hp, int item)
{
	//サイズ 
	width = 27;
	height = 25;

	//敵の種類 
	this->type = type;
	this->stype = stype;

	//移動パターンとショットパターン 
	this->m_pattern = m_pattern;
	this->s_pattern = s_pattern;

	//座標セット 
	this->x = x;
	this->y = y;

	//出現、停止、発射、帰還時間セット 
	this->in_time = in_time;
	this->stop_time = stop_time;
	this->shot_time = shot_time;
	this->out_time = out_time;

	//HPとアイテム代入
	this->hp = hp;
	this->item = item;

	//敵画像読み込み
	if (type == 0)
	{
		LoadDivGraph("DATA/ENEMY/enemy_org.png", 3, 1, 3, 27, 25, gh);
	}

	if (type == 1)
	{
		LoadDivGraph("DATA/ENEMY/enemy_org_2.png", 3, 1, 3, 27, 25, gh);
	}

	if (type == 2)
	{
		LoadDivGraph("DATA/ENEMY/enemy_org_3.png", 3, 1, 3, 27, 25, gh);
	}

	int temp = 0;
	//弾画像読み込み
	switch (stype)
	{
	case 0:
		temp = LoadGraph("DATA/ENEMY/enemyshot_org1.png");
		break;
	case 1:
		temp = LoadGraph("DATA/ENEMY/enemyshot_org1.png");
		break;
	case 2:
		temp = LoadGraph("DATA/ENEMY/enemyshot_org2.png");
		break;
	}


	int w, h;
	GetGraphSize(temp, &w, &h);

	//弾の初期化 
	for (int i = 0; i < ENEMY_SNUM; ++i)
	{
		shot[i].flag = false;
		shot[i].gh = temp;
		shot[i].width = w;
		shot[i].height = h;
		shot[i].pattern = s_pattern;
		shot[i].speed = speed;
		shot[i].x = x;
		shot[i].y = y;
	}


	count = 0;
	scount = 0;
	num = 0;
	rad = 0;

	deadflag = false;
	endflag = false;
	sflag = false;
	s_shot = false;
	s_dead = false;
	
}

//***********************************************************************************************
//
//		動作(更新処理)
//
//***********************************************************************************************

void ENEMY::Move()
{
	//まだ生きてるか画面内に居るときだけ処理
	if (!deadflag)
	{
		switch (m_pattern) 
		{
			//途中で止まって、そのまま後ろに帰るパターン
		case 0:
			if (in_time<g_count && g_count<stop_time)
			{
				y += 2;
				//帰還時間を過ぎたら戻る。
			}
			else if (g_count>out_time)
			{
				y -= 2;
			}
			break;

		case 1:

			if (in_time <= g_count) 
			{
				y += 2;
			}

			break;

		case 2:
			if (in_time <= g_count) 
			{
				y += 1;
				if (count % 10 == 0) 
				{
					x -= 2;
				}
			}
			break;


		case 3:
			if (in_time <= g_count) 
			{
				y += 1;
				if (count % 10 == 0) 
				{
					x += 3;
				}
			}
			break;

		}
		//画面からはみ出したら、deadflag(はみ出すか死ぬかのフラグ)をtrueにする。
		if (g_count >= stop_time) 
		{
			if (OutCheck()) 
			{
				deadflag = true;
			}
		}
		++count;
	}
}



//***********************************************************************************************
//
//		弾処理
//
//***********************************************************************************************

void ENEMY::Shot()
{

	//CONTROLクラスの参照
	CONTROL &control = CONTROL::GetInstance();
	double px, py;

	//発射タイミングになったら、フラグを立てる
	if (shot_time == g_count) 
	{
		sflag = true;
	}

	//フラグ立ってるときだけ
	if (sflag) 
	{
		//ショット音フラグを戻す
		s_shot = false;

		//プレイヤーの位置取得
		control.GetPlayerPosition(&px, &py);

		//敵とプレイヤーとの座標の差から逆正接を求める。
		//初回だけ実行
		if (scount == 0)
			rad = atan2(py - y, px - x);

		switch (s_pattern)
		{
			//前方にショット
		case 0:
			//5ループに一回発射。20までなので5発発射。
			if (scount % 5 == 0 && scount <= 20)
			{
				for (int i = 0; i<ENEMY_SNUM; ++i) {
					//フラグが立ってない弾を探して、座標等をセット
					if (shot[i].flag == false) 
					{
						shot[i].flag = true;
						shot[i].x = x;
						shot[i].y = y;
						shot[i].rad = rad;
						break;
					}
				}
				//ショットサウンドフラグを立てる
				s_shot = true;

			}
			break;

			//プレイヤーに向かって直線ショット
		case 1:
			//6ループに一回発射。54までなので10発発射。
			if (scount % 6 == 0 && scount <= 54)
			{
				for (int i = 0; i<ENEMY_SNUM; ++i) 
				{
					//フラグが立ってない弾を探して、座標等をセット
					if (shot[i].flag == false)
					{
						shot[i].flag = true;
						shot[i].x = x;
						shot[i].y = y;
						shot[i].rad = rad;
						break;
					}
				}
				//ショットサウンドフラグを立てる
				s_shot = true;

			}
			break;

			//3直線ショット
		case 2:
			//10ループに一回発射。1ループに3発なので5ループさせると15発発射
			if (scount % 10 == 0 && scount <= 40) 
			{
				for (int i = 0; i<ENEMY_SNUM; ++i) 
				{
					//フラグが立ってない弾を探して、座標等をセット
					if (shot[i].flag == false) 
					{
						shot[i].flag = true;
						shot[i].x = x;
						shot[i].y = y;

						//0はキャラクターに向かって発射
						if (num == 0)
						{

							//敵とプレイヤーとの逆正接から30度引いたラジアンを代入
							shot[i].rad = rad - (10 * 3.14 / 180);

						}
						else if (num == 1) 
						{
							//敵とプレイヤーとの逆正接を代入
							shot[i].rad = rad;

						}
						else if (num == 2) 
						{
							//敵とプレイヤーとの逆正接から30度足したラジアンを代入
							shot[i].rad = rad + (10 * M_PI / 180);

						}
						++num;

						//3発発射したら,numを0にしてループを抜ける。
						if (num == 3) 
						{
							num = 0;
							break;
						}
					}
				}
				//ショットサウンドフラグを立てる
				s_shot = true;

			}
			break;

			//乱射ショット
		case 3:
			//10ループに一回発射。42までなので15発発射。
			if (scount % 1 == 0 && scount <= 42) 
			{
				for (int i = 0; i<ENEMY_SNUM; ++i) 
				{
					//フラグが立ってない弾を探して、座標等をセット
					if (shot[i].flag == false) 
					{
						shot[i].flag = true;
						shot[i].x = x;
						shot[i].y = y;
						//初回だけ乱数初期化
						if (num == 0)
							srand((unsigned int)time(NULL));

						shot[i].rad = atan2(py - y, px - x) - (60 * M_PI / 180) + ((rand() % 120)*M_PI / 180);
						++num;
						break;
					}
				}
				//ショットサウンドフラグを立てる
				s_shot = true;

			}
			break;
		}

		//フラグが立ってる弾の数
		int s = 0;

		//フラグ立ってる弾だけ、弾の移動を行う
		for (int i = 0; i<ENEMY_SNUM; ++i) 
		{
			if (shot[i].flag)
			{
				switch (shot[i].pattern) 
				{
					//単純に下に発射
				case 0:
					shot[i].y += shot[i].speed;
					break;

				case 1:
					shot[i].x += shot[i].speed*cos(shot[i].rad);
					shot[i].y += shot[i].speed*sin(shot[i].rad);
					break;
				case 2:
					shot[i].x += shot[i].speed*cos(shot[i].rad);
					shot[i].y += shot[i].speed*sin(shot[i].rad);
					break;
				case 3:
					shot[i].x += shot[i].speed*cos(shot[i].rad);
					shot[i].y += shot[i].speed*sin(shot[i].rad);
					break;

				}

				//弾が画面をはみ出たらフラグを戻す。
				if (ShotOutCheck(i)) 
				{
					shot[i].flag = false;
					continue;
				}
				++s;
			}
		}
		//sがゼロということは発射中の弾がない。
		//かつdeadflagがTRUEということはこの敵のクラスは消滅させてもよい
		if (s == 0 && deadflag)
		{
			//敵クラス消滅フラグをTRUEにする
			endflag = true;
			s_dead = true;
		}

		++scount;

	}

}

//***********************************************************************************************
//
//		弾範囲処理
//
//***********************************************************************************************

bool ENEMY::ShotOutCheck(int i)
{
	//弾が画面をはみ出たらフラグを戻す。
	if (shot[i].x < -20 || shot[i].x>420 || shot[i].y < -20 || shot[i].y>500)
	{
		return true;
	}
	else
	{
		return false;
	}
}

bool ENEMY::OutCheck()
{
	if (x<-50 || x>520 || y<-50 || y>530) {
		return true;
	}
	else {
		return false;
	}
}


//***********************************************************************************************
//
//		描画処理
//
//***********************************************************************************************

void ENEMY::Draw()
{
	int temp;

	//弾から最初に描画
	for (int i = 0; i<ENEMY_SNUM; ++i) 
	{
		if (shot[i].flag) 
		{
			if (stype == 0 || stype == 2) 
			{
				DrawGraph(shot[i].x - shot[i].width / 2, shot[i].y - shot[i].height / 2, shot[i].gh, true);
			}
			else 
			{
				DrawRotaGraph(shot[i].x, shot[i].y, 1.0, shot[i].rad - (90 * M_PI / 180), shot[i].gh, true);
			}
		}
	}
	if (!deadflag) 
	{

		temp = count % 40 / 10;
		if (temp == 3)
			temp = 1;

		DrawGraph(x - width / 2, y - height / 2, gh[temp], TRUE);
	}
}


//***********************************************************************************************
//
//		位置処理(敵、弾)
//
//***********************************************************************************************

void ENEMY::GetPosition(double *x, double *y)
{
	*x = this->x;
	*y = this->y;
}

bool ENEMY::GetShotPosition(int index, double *x, double *y)
{
	if (shot[index].flag)
	{
		*x = shot[index].x;
		*y = shot[index].y;
		return true;
	}
	else
	{
		return false;
	}
}


//***********************************************************************************************
//
//		SE処理
//
//***********************************************************************************************

//弾の種類
int ENEMY::GetShotType()
{
	return stype;
}

//弾
void ENEMY::SetShotFlag(int index, bool flag)
{
	shot[index].flag = flag;
}

bool ENEMY::GetShotSound()
{
	return s_shot;
}


//死
void ENEMY::SetDeadFlag()
{
	deadflag = true;
}

bool ENEMY::GetDeadFlag()
{
	return deadflag;
}

bool ENEMY::GetDeadSound()
{
	return s_dead;
}


//***********************************************************************************************
//
//		All関数
//
//***********************************************************************************************

bool ENEMY::All()
{
	Move();
	Shot();
	OutCheck();
	Draw();
	GetShotSound();

	++count;

	return endflag;
}

コード:

[enemy.h]
class ENEMY {
private:
	//座標とグラフィックハンドル 
	double x, y;
	int gh[3];

	//画像サイズ 
	int width, height;

	//出現、停止、帰還、発射タイミング 
	int in_time, stop_time, out_time, shot_time;

	//敵の種類 
	int type;

	//弾の種類 
	int stype;

	//移動パターン 
	int m_pattern;

	//ショットパターン 
	int s_pattern;

	//HP
	int hp;

	//アイテム
	int item;

	//敵が出現してからのカウント 
	int count;

	//発射した段数
	int num;
	
	//発射直後のラジアン
	double rad;

	//敵消滅フラグ 
	bool deadflag;

	//敵クラス消滅フラグ 
	bool endflag;

	//弾構造体 
	E_SHOT shot[ENEMY_SNUM];

	//ショットが撃てるようになったかのフラグ 
	bool sflag;

	//ショットが打てるようになってからのカウント 
	int scount;

	bool s_shot;
	bool s_dead;

private:
	void Move();
	void Shot();
	void Draw();
	bool OutCheck();
	bool ShotOutCheck(int i);

public:
	bool All();
	void GetPosition(double *x, double *y);
	bool GetShotPosition(int index, double *x, double *y);
	void SetShotFlag(int index, bool flag);
	int GetShotType();
	ENEMY(int type, int stype, int m_pattern, int s_pattern, int in_time, int stop_time, int shot_time, int out_time,
		int x, int y, int speed, int hp, int item);
	bool GetShotSound();
	void SetDeadFlag();
	bool GetDeadFlag();
	bool GetDeadSound();
};

コード:

[enemyeffect.cpp]
#include"pch.h"
#include"control.h"
#include<ctime>
#include<cstdlib>

int EFFECT_EDEAD::gh[3];

EFFECT_EDEAD::EFFECT_EDEAD()
{
	x = y = 0;
	 

	//画像読み込み
	if (gh[0] == 0)
	{
		gh[0] = LoadGraph("DATA/ENEMY/effect1.png");
		gh[1] = LoadGraph("DATA/ENEMY/effect2.png");
		gh[2] = LoadGraph("DATA/ENEMY/effect3.png");
	}

	srand((unsigned int)time(NULL));

	rad = 0;

	rate = 1;

	alpha = 255;

	count = 0;

	flag = false;

	index = 0;
}

void EFFECT_EDEAD::Move()
{
	if (flag)
	{
		//角度と添字セット
		if (count == 0)
		{
			rad = rand() % 624 / 100;
			index = rand() % 3;
		}

		rate = 0.5 + count*0.05;
		alpha = 255 - 255 / 30 * count;

		++count;

		if (count == 30)
		{
			count = 0;
			flag = false;
		}


	}
}

void EFFECT_EDEAD::Draw()
{
	SetDrawBlendMode(DX_BLENDMODE_ALPHA, alpha);
	DrawRotaGraph(x, y, rate, rad, gh[index], TRUE);
	SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
}

void EFFECT_EDEAD::All()
{
	Move();
	Draw();
}

void EFFECT_EDEAD::SetFlag(double x, double y)
{
	this->x = x;
	this->y = y;

	flag = true;
}

bool EFFECT_EDEAD::GetFlag()
{
	return flag;
}

コード:

[enemyeffect.h]
#pragma once

class EFFECT_EDEAD {
private:
	//座標
	double x, y;

	//グラフィックハンドル
	static int gh[3];

	//エフェクト画像の角度
	double rad;

	//拡大率
	double rate;

	//透明度
	int alpha;

	//どの画像を使うかの添字
	int index;

	//カウント
	int count;

	//実行中かどうかのフラグ
	bool flag;

private:
	void Move();
	void Draw();

public:
	EFFECT_EDEAD();
	bool GetFlag();
	void SetFlag(double x, double y);
	void All();
};

コード:

[control.cpp]
#pragma once

class EFFECT_EDEAD {
private:
	//座標
	double x, y;

	//グラフィックハンドル
	static int gh[3];

	//エフェクト画像の角度
	double rad;

	//拡大率
	double rate;

	//透明度
	int alpha;

	//どの画像を使うかの添字
	int index;

	//カウント
	int count;

	//実行中かどうかのフラグ
	bool flag;

private:
	void Move();
	void Draw();

public:
	EFFECT_EDEAD();
	bool GetFlag();
	void SetFlag(double x, double y);
	void All();
};

コード:

[control.h]
#include "player.h"	
#include"back.h"
#include"enemy.h"
#include"title.h"
#include"enemyefect.h"
#include"playereffect.h"

class CONTROL{
private:
	//プレイヤークラス
	PLAYER *player;
	
	//背景クラス
	BACK *back;

	//エネミークラス
	ENEMY *enemy[ENEMY_NUM];

	TITLE *title;

	//敵消滅エフェクトクラス
	EFFECT_EDEAD *effect_edead[EFFECT_EDEADNUM];

	//サウンドハンドル
	int s_eshot;
	int s_pshot;
	int s_edead;
	int s_pdead;

	//サウンドを鳴らすかどうかのフラグ
	bool eshot_flag;
	bool pshot_flag;


	//敵死亡
	bool edead_flag;

	//プレイヤー死亡
	bool pdead_flag;

private:
	CONTROL();
	~CONTROL();
	void SoundAll();
	void CollisionAll();
	bool CircleCollision(double c1, double c2, double cx1, double cx2, double cy1, double cy2);
	void EnemyDeadEffect(double x, double y);

public:
	void All();
	void GetPlayerPosition(double *x, double *y);
	void GetEnemyPosition(int index, double *x, double *y);
	static CONTROL& GetInstance() {
		static CONTROL control;
		return control;
	}


};

コード:

[pch.h]
//警告を消すための記述
#pragma warning(disable:4244)
#define _CRT_SECURE_NO_WARNINGS

//DXライブラリとdefine.hの取り込み
#include "DxLib.h"
#include "define.h"

コード:

[define.h]
#include <windows.h>

//プレイヤーの歩くスピード
#define PLAYER_SPEED 4

//プレイヤー初期位置
#define PLAYER_INITX 180
#define PLAYER_INITY 400
//x = 180;
//y = 400;

//座標取得
#define MARGIN 10

//背景スクロールスピード
#define SCROLL_SPEED 2

//弾処理
#define PSHOT_NUM 20
#define PSHOT_SPEED 14

//当たり判定用半径定義
#define PLAYER_COLLISION 4
#define ENEMY1_COLLISION 14

#define PSHOT_COLLISION 3
#define ESHOT0_COLLISION 10
#define ESHOT1_COLLISION 3
#define ESHOT2_COLLISION 2

//敵消滅エフェクト
#define EFFECT_EDEADNUM 20

//プレイヤー消滅エフェクト
#define EFFECT_PDEADNUM 20

//メッセージボックス
#define MSG(m) {\
	MessageBox(NULL,m,"メッセージ",MB_OK);}

//extern宣言してkey配列にどこからでもアクセスできるようにする
extern char key[256];

extern int g_count;

//プレイヤー弾
struct SHOT
{
	bool		flag;			//弾が発射中かどうか
	double		x;				//x座標
	double		y;				//y座標
	int			gh;				//グラフィックハンドル
	int			width, height;	//画像の幅と高さ

};

//エネミー弾
struct E_SHOT
{
	bool	flag;			//弾が発射中かどうか 
	double	x;				//x座標 
	double	y;				//y座標 
	double	rad;			//角度(ラジアン)
	int		gh;				//グラフィックハンドル 
	int		width, height;	//画像の幅と高さ 
	int		pattern;		//ショットパターン 
	int		speed;			//弾スピード 
};
#define ENEMY_SNUM 50 

//エネミーデータ
struct ENEMY_DATA 
{
	int		type;			//敵種類
	int		stype;			//弾種類
	int		m_pattern;		//移動パターン
	int		s_pattern;		//発射パターン
	int		in_time;		//出現時間
	int		stop_time;		//停止時間
	int		shot_time;		//弾発射時間
	int		out_time;		//帰還時間
	int		x;				//x座標
	int		y;				//y座標
	int		speed;			//弾スピード
	int		hp;				//HP
	int		item;			//アイテム
};
#define ENEMY_NUM 20
エラーは先ほど記述したものだけでした。

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#7

投稿記事 by みけCAT » 7年前

とりあえず、control.hにおいて

コード:

#include"enemyefect.h"

コード:

#include "player.h"
の前に移動すると改善しそうです。

このようにほかのファイルからインクルードする順番に依存するのではなく、
各ヘッダにインクルードガードを追加し、
定義などに必要なヘッダはヘッダ内で自分でインクルードするようにした方がいいと思います。
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

yotumoto

Re: プレイヤー消滅エフェクト

#8

投稿記事 by yotumoto » 7年前

control.hの

コード:

#include"enemyefect.h"

コード:

#include "player.h"
の前に書くと同じエラーが出たので

コード:

#include"playereffect.h"

コード:

#include "player.h"
の前に書いてビルドを通すとエラーが出なくなったのですが
起動すると、プレイヤーが一生死んだままになってしまいました(・・;)

ポニョ

Re: プレイヤー消滅エフェクト

#9

投稿記事 by ポニョ » 7年前

プロジェクト・ファイルを見せて頂くと有り難いです。.vcxprojという拡張子のファイルですよ。

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#10

投稿記事 by みけCAT » 7年前

yotumoto さんが書きました:起動すると、プレイヤーが一生死んだままになってしまいました(・・;)
それで、どうしたいのですか?
何か質問はありますか?
報告するだけでなく、少しは自分でデバッグしていますか?
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

yotumoto

Re: プレイヤー消滅エフェクト

#11

投稿記事 by yotumoto » 7年前

コード:

<?xml version="1.0" encoding="UTF-8"?>

-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0" DefaultTargets="Build">


-<ItemGroup Label="ProjectConfigurations">


-<ProjectConfiguration Include="Debug|Win32">

<Configuration>Debug</Configuration>

<Platform>Win32</Platform>

</ProjectConfiguration>


-<ProjectConfiguration Include="Release|Win32">

<Configuration>Release</Configuration>

<Platform>Win32</Platform>

</ProjectConfiguration>


-<ProjectConfiguration Include="Debug|x64">

<Configuration>Debug</Configuration>

<Platform>x64</Platform>

</ProjectConfiguration>


-<ProjectConfiguration Include="Release|x64">

<Configuration>Release</Configuration>

<Platform>x64</Platform>

</ProjectConfiguration>

</ItemGroup>


-<ItemGroup>

<ClCompile Include="back.cpp"/>

<ClCompile Include="control.cpp"/>

<ClCompile Include="enemy.cpp"/>

<ClCompile Include="enemyefect.cpp"/>

<ClCompile Include="main.cpp"/>

<ClCompile Include="player.cpp"/>

<ClCompile Include="playereffect.cpp"/>

<ClCompile Include="title.cpp"/>

</ItemGroup>


-<ItemGroup>

<ClInclude Include="back.h"/>

<ClInclude Include="control.h"/>

<ClInclude Include="define.h"/>

<ClInclude Include="enemy.h"/>

<ClInclude Include="enemyefect.h"/>

<ClInclude Include="pch.h"/>

<ClInclude Include="player.h"/>

<ClInclude Include="playereffect.h"/>

<ClInclude Include="title.h"/>

</ItemGroup>


-<PropertyGroup Label="Globals">

<ProjectGuid>{A795A660-E7D1-4673-8EFF-7C8054F7E567}</ProjectGuid>

<Keyword>Win32Proj</Keyword>

<RootNamespace>GameProg</RootNamespace>

<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>

</PropertyGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>


-<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

<ConfigurationType>Application</ConfigurationType>

<UseDebugLibraries>true</UseDebugLibraries>

<PlatformToolset>v140</PlatformToolset>

<CharacterSet>MultiByte</CharacterSet>

</PropertyGroup>


-<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

<ConfigurationType>Application</ConfigurationType>

<UseDebugLibraries>false</UseDebugLibraries>

<PlatformToolset>v140</PlatformToolset>

<WholeProgramOptimization>true</WholeProgramOptimization>

<CharacterSet>MultiByte</CharacterSet>

</PropertyGroup>


-<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

<ConfigurationType>Application</ConfigurationType>

<UseDebugLibraries>true</UseDebugLibraries>

<PlatformToolset>v140</PlatformToolset>

<CharacterSet>Unicode</CharacterSet>

</PropertyGroup>


-<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

<ConfigurationType>Application</ConfigurationType>

<UseDebugLibraries>false</UseDebugLibraries>

<PlatformToolset>v140</PlatformToolset>

<WholeProgramOptimization>true</WholeProgramOptimization>

<CharacterSet>Unicode</CharacterSet>

</PropertyGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>

<ImportGroup Label="ExtensionSettings"> </ImportGroup>

<ImportGroup Label="Shared"> </ImportGroup>


-<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

<Import Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"/>

</ImportGroup>


-<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

<Import Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"/>

</ImportGroup>


-<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

<Import Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"/>

</ImportGroup>


-<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

<Import Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"/>

</ImportGroup>

<PropertyGroup Label="UserMacros"/>


-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

<LinkIncremental>true</LinkIncremental>

</PropertyGroup>


-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

<LinkIncremental>true</LinkIncremental>

</PropertyGroup>


-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

<LinkIncremental>false</LinkIncremental>

</PropertyGroup>


-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

<LinkIncremental>false</LinkIncremental>

</PropertyGroup>


-<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">


-<ClCompile>

<PrecompiledHeader> </PrecompiledHeader>

<WarningLevel>Level3</WarningLevel>

<Optimization>Disabled</Optimization>

<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

<AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

<SDLCheck>false</SDLCheck>

</ClCompile>


-<Link>

<SubSystem>Windows</SubSystem>

<GenerateDebugInformation>true</GenerateDebugInformation>

<AdditionalLibraryDirectories>C:\DxLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

</Link>

</ItemDefinitionGroup>


-<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">


-<ClCompile>

<PrecompiledHeader> </PrecompiledHeader>

<WarningLevel>Level3</WarningLevel>

<Optimization>Disabled</Optimization>

<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

</ClCompile>


-<Link>

<SubSystem>Windows</SubSystem>

<GenerateDebugInformation>true</GenerateDebugInformation>

</Link>

</ItemDefinitionGroup>


-<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">


-<ClCompile>

<WarningLevel>Level3</WarningLevel>

<PrecompiledHeader> </PrecompiledHeader>

<Optimization>MaxSpeed</Optimization>

<FunctionLevelLinking>true</FunctionLevelLinking>

<IntrinsicFunctions>true</IntrinsicFunctions>

<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

<RuntimeLibrary>MultiThreaded</RuntimeLibrary>

<AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

<SDLCheck>false</SDLCheck>

</ClCompile>


-<Link>

<SubSystem>Windows</SubSystem>

<EnableCOMDATFolding>true</EnableCOMDATFolding>

<OptimizeReferences>true</OptimizeReferences>

<GenerateDebugInformation>true</GenerateDebugInformation>

<AdditionalLibraryDirectories>C:\DxLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

</Link>

</ItemDefinitionGroup>


-<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">


-<ClCompile>

<WarningLevel>Level3</WarningLevel>

<PrecompiledHeader> </PrecompiledHeader>

<Optimization>MaxSpeed</Optimization>

<FunctionLevelLinking>true</FunctionLevelLinking>

<IntrinsicFunctions>true</IntrinsicFunctions>

<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

</ClCompile>


-<Link>

<SubSystem>Windows</SubSystem>

<EnableCOMDATFolding>true</EnableCOMDATFolding>

<OptimizeReferences>true</OptimizeReferences>

<GenerateDebugInformation>true</GenerateDebugInformation>

</Link>

</ItemDefinitionGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>

<ImportGroup Label="ExtensionTargets"> </ImportGroup>

</Project>
プロジェクトファイルはこの様になっています。

プレイヤーが敵の弾に当たっていないのに
ずっと死んだままになってしまうので
プレイヤーが敵の弾に当たった時に死んで
その時に消滅エフェクトを描画するようにしたいです。

ポニョ

Re: プレイヤー消滅エフェクト

#12

投稿記事 by ポニョ » 7年前

プロジェクトファイルは改行はないはず。プロジェクトファイルは厳密にxmlの規則で書かれているので手をいれてはいけません。コマンドライン・コンパイルがエラーになります。必ず変更のない元のままをもう一度確認して送ってください。

yotumoto

Re: プレイヤー消滅エフェクト

#13

投稿記事 by yotumoto » 7年前

コード:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="back.cpp" />
    <ClCompile Include="control.cpp" />
    <ClCompile Include="enemy.cpp" />
    <ClCompile Include="enemyefect.cpp" />
    <ClCompile Include="main.cpp" />
    <ClCompile Include="player.cpp" />
    <ClCompile Include="playereffect.cpp" />
    <ClCompile Include="title.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="back.h" />
    <ClInclude Include="control.h" />
    <ClInclude Include="define.h" />
    <ClInclude Include="enemy.h" />
    <ClInclude Include="enemyefect.h" />
    <ClInclude Include="pch.h" />
    <ClInclude Include="player.h" />
    <ClInclude Include="playereffect.h" />
    <ClInclude Include="title.h" />
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{A795A660-E7D1-4673-8EFF-7C8054F7E567}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>GameProg</RootNamespace>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <SDLCheck>false</SDLCheck>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalLibraryDirectories>C:\DxLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <SDLCheck>false</SDLCheck>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalLibraryDirectories>C:\DxLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>
これで合っているでしょうか?

Math

Re: プレイヤー消滅エフェクト

#14

投稿記事 by Math » 7年前

このFileは全部揃っているでしょうかご確認ください。ほかに画像・音とかのファイルもいいですか?

コード:

 <ItemGroup>
    <ClCompile Include="back.cpp" />
    <ClCompile Include="control.cpp" />
    <ClCompile Include="enemy.cpp" />
    <ClCompile Include="enemyefect.cpp" />
    <ClCompile Include="main.cpp" />
    <ClCompile Include="player.cpp" />
    <ClCompile Include="playereffect.cpp" />
    <ClCompile Include="title.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="back.h" />
    <ClInclude Include="control.h" />
    <ClInclude Include="define.h" />
    <ClInclude Include="enemy.h" />
    <ClInclude Include="enemyefect.h" />
    <ClInclude Include="pch.h" />
    <ClInclude Include="player.h" />
    <ClInclude Include="playereffect.h" />
    <ClInclude Include="title.h" />

yotumoto

Re: プレイヤー消滅エフェクト

#15

投稿記事 by yotumoto » 7年前

ファイル全て揃っていました。
他のファイルとはこれでしょうか?

コード:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="ソース ファイル">
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    </Filter>
    <Filter Include="ヘッダー ファイル">
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
    </Filter>
    <Filter Include="リソース ファイル">
      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="main.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="player.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="control.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="back.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="enemy.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="title.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="enemyefect.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
    <ClCompile Include="playereffect.cpp">
      <Filter>ソース ファイル</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="control.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="define.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="pch.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="player.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="back.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="enemy.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="title.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="enemyefect.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
    <ClInclude Include="playereffect.h">
      <Filter>ヘッダー ファイル</Filter>
    </ClInclude>
  </ItemGroup>
</Project>

Math

Re: プレイヤー消滅エフェクト

#16

投稿記事 by Math » 7年前

あれ不思議なファイルですね。名前は”ユーザー名”.vcxprojですか?

Math

Re: プレイヤー消滅エフェクト

#17

投稿記事 by Math » 7年前

多分要らないと思います。

yotumoto

Re: プレイヤー消滅エフェクト

#18

投稿記事 by yotumoto » 7年前

”ユーザー名”.vcxproj
のファイルは先ほど記載したこちらになります。

コード:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="back.cpp" />
    <ClCompile Include="control.cpp" />
    <ClCompile Include="enemy.cpp" />
    <ClCompile Include="enemyefect.cpp" />
    <ClCompile Include="main.cpp" />
    <ClCompile Include="player.cpp" />
    <ClCompile Include="playereffect.cpp" />
    <ClCompile Include="title.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="back.h" />
    <ClInclude Include="control.h" />
    <ClInclude Include="define.h" />
    <ClInclude Include="enemy.h" />
    <ClInclude Include="enemyefect.h" />
    <ClInclude Include="pch.h" />
    <ClInclude Include="player.h" />
    <ClInclude Include="playereffect.h" />
    <ClInclude Include="title.h" />
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{A795A660-E7D1-4673-8EFF-7C8054F7E567}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>GameProg</RootNamespace>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <SDLCheck>false</SDLCheck>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalLibraryDirectories>C:\DxLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <SDLCheck>false</SDLCheck>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalLibraryDirectories>C:\DxLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

Math

Re: プレイヤー消滅エフェクト

#19

投稿記事 by Math » 7年前

title.cppとtitle.hを送ってみてください。ここがおかしくありませんか。

コード:

#include"enemyeffect.h" //"enemyefect.h" <<<--------

yotumoto

Re: プレイヤー消滅エフェクト

#20

投稿記事 by yotumoto » 7年前

コード:

[title.h]
#pragma once

class TITLE {
public:
	// 座標
	int x = 640;
	int y = 480;
	int gh;

private:
	void Draw();
public:
	void Update();
	void All();
	TITLE();
};

コード:

[title.cpp]
#include "title.h"
#include "pch.h"

TITLE::TITLE()
{
	gh = LoadGraph("DATA/BG/title.png");
}

void TITLE::Draw()
{
	DrawGraph(0, 0, gh, FALSE);
}

void TITLE::Update()
{
	
	while (1)
	{
		if (key[KEY_INPUT_RETURN])
		{
			break;
		}
	}
	

}



void TITLE::All()
{
	Update();
	Draw();
}

このようになっていますが
うまく表示されなかったので
後から作成しようと思い
実体を作っただけでそのままにしています。

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#21

投稿記事 by みけCAT » 7年前

yotumoto さんが書きました:

コード:

void TITLE::Update()
{
	
	while (1)
	{
		if (key[KEY_INPUT_RETURN])
		{
			break;
		}
	}
	

}
これはダメですね。
このループの中ではkeyが更新されないので、key[KEY_INPUT_RETURN]が0の状態でこのループに突入すると無限ループになり、
メッセージの処理が出来ないのでフリーズしてしまいます。

だからといって、このループの中にメッセージの処理を入れてはダメですよ。
このようなループはせず、key[KEY_INPUT_RETURN]の判定によって状態遷移をするのがいいでしょう。
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

Math

Re: プレイヤー消滅エフェクト

#22

投稿記事 by Math » 7年前

一応正常にコンパイルはできるようなりました。プロジェクトファイルのDxLibとのリンク部分と不要部分の削除をしてみます。(まあNMAKE方式ではできるのですがエラーがでる)
[Build方式]

コード:

 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /IC:\DxLib /ZI /nologo /W3 /
  WX- /sdl- /Od /Oy- /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /Gm /EHsc /RTC1 /MTd /GS /fp:precise /
  Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP /analyze- /errorRepo
  rt:queue enemyeffect.cpp
  enemyeffect.cpp
Link:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\h
  \z10\01\09\game\Debug\cppApp1.exe" /INCREMENTAL /NOLOGO /LIBPATH:C:\DxLib kernel32.lib user32.lib
   gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odb
  c32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed
  /DEBUG /PDB:"D:\h\z10\01\09\game\Debug\cppApp1.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXC
  OMPAT /IMPLIB:"D:\h\z10\01\09\game\Debug\cppApp1.lib" /MACHINE:X86 Debug\back.obj
  Debug\control.obj
  Debug\enemy.obj
  Debug\enemyeffect.obj
  Debug\main.obj
  Debug\player.obj
  Debug\playereffect.obj
  Debug\title.obj
LINK : fatal error LNK1104: ファイル 'DxDrawFunc_vs2015_x86_d.lib' を開くことができません。 [D:\h\z10\01\09\game\cp
pApp1.txt]
プロジェクト "D:\h\z10\01\09\game\cppApp1.txt" (既定のターゲット) のビルドが終了しました -- 失敗。
[NMAKE方式]

コード:

D:\h\z10\01\09\game>nmake -f g.mak

Microsoft(R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /c /TP /EHsc /D "_MBCS" /MT  /I"d:\DxLib_VC\プロジェクトに追加すべきファイル_VC用" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /W3 main.cpp back.cpp control.cpp enemy.cpp enemyeffect.cpp player.cpp playereffect.cpp title.cpp
Microsoft(R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

main.cpp
back.cpp
control.cpp
enemy.cpp
enemyeffect.cpp
player.cpp
playereffect.cpp
title.cpp
コードを生成中...
        link /out:main.exe /SUBSYSTEM:WINDOWS /LIBPATH:"d:\DxLib_VC\プロジェクトに追加すべきファイル_VC用" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" main.obj
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

main.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ) が関数 "public: static class CONTROL & __cdecl CONTROL::GetInstance(void)" (?GetInstance@CONTROL@@SAAAV1@XZ) で参照されました。
main.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ) が関数 "void __cdecl `public: static class GetInstance & __cdecl CONTROL::GetInstance(void)'::`2'::`dynamic atexit destructor for 'control''(void)" (??__Fcontrol@?1??GetInstance@CONTROL@@SAAAV1@XZ@YAXXZ) で参照されました。
main.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::All(void)" (?All@CONTROL@@QAEXXZ) が関数 _WinMain@16 で参照されました。
main.exe : fatal error LNK1120: 3 件の未解決の外部参照
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : リターン コード '0x460'
Stop.

D:\h\z10\01\09\game>

Math

Re: プレイヤー消滅エフェクト

#23

投稿記事 by Math » 7年前

Makefileのバグを直したらリンクエラーが増えてしまった。

コード:

D:\h\z10\01\09\game>type g.mak
TARGETNAME=main

C_FLAGS=/c /TP /EHsc /D "_MBCS" /MT  /I"d:\DxLib_VC\プロジェクトに追加すべきファイル_VC用" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /W3

LINK_FLAGS=/SUBSYSTEM:WINDOWS /LIBPATH:"d:\DxLib_VC\プロジェクトに追加すべきファイル_VC用" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"

ALL:
        cl $(C_FLAGS) $(TARGETNAME).cpp back.cpp control.cpp enemy.cpp enemyeffect.cpp player.cpp playereffect.cpp title.cpp
        link /out:$(TARGETNAME).exe $(LINK_FLAGS) $(TARGETNAME).obj back.obj control.obj enemy.obj enemyeffect.obj player.obj playereffect.obj title.obj
        $(TARGETNAME).exe
D:\h\z10\01\09\game>
実行結果

コード:

D:\h\z10\01\09\game>nmake -f g.mak

Microsoft(R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /c /TP /EHsc /D "_MBCS" /MT  /I"d:\DxLib_VC\プロジェクトに追加すべきファイル_VC用" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /W3 main.cpp back.cpp control.cpp enemy.cpp enemyeffect.cpp player.cpp playereffect.cpp title.cpp
Microsoft(R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

main.cpp
back.cpp
control.cpp
enemy.cpp
enemyeffect.cpp
player.cpp
playereffect.cpp
title.cpp
コードを生成中...
        link /out:main.exe /SUBSYSTEM:WINDOWS /LIBPATH:"d:\DxLib_VC\プロジェクトに追加すべきファイル_VC用" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" main.obj back.obj control.obj enemy.obj enemyeffect.obj player.obj playereffect.obj title.obj
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

main.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ) が関数 "public: static class CONTROL & __cdecl CONTROL::GetInstance(void)" (?GetInstance@CONTROL@@SAAAV1@XZ) で参照されました。
enemy.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ)" は未解決です。
main.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ) が関数 "void __cdecl `public: static class GetInstance & __cdecl CONTROL::GetInstance(void)'::`2'::`dynamic atexit destructor for 'control''(void)" (??__Fcontrol@?1??GetInstance@CONTROL@@SAAAV1@XZ@YAXXZ) で参照されました。
enemy.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ)" は未解決です。
main.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::All(void)" (?All@CONTROL@@QAEXXZ) が関数 _WinMain@16 で参照されました。
enemy.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::GetPlayerPosition(double *,double *)" (?GetPlayerPosition@CONTROL@@QAEXPAN0@Z) が関数 "private: void __thiscall ENEMY::Shot(void)" (?Shot@ENEMY@@AAEXXZ) で参照されました。
main.exe : fatal error LNK1120: 4 件の未解決の外部参照
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : リターン コード '0x460'
Stop.

D:\h\z10\01\09\game>

Math

Re: プレイヤー消滅エフェクト

#24

投稿記事 by Math » 7年前

http://dxlib.o.oo7.jp/dxdload.htmlDxlib3.17aにVersion UPし環境を[d:\dxlibに本体を収め]すっきりしたものに改変中。Build,Makefileも一新し分かりやすくする予定です。Vs2015,VS2008の設定もすっきりしたものに変更する予定です。

Math

Re: プレイヤー消滅エフェクト

#25

投稿記事 by Math » 7年前

xlib3.17aにVersion UPが完了しました。プロジェクトファイルの

コード:

<AdditionalIncludeDirectories>C:\DxLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
は私の環境依存になります。新Makefileはこのようになります。

コード:

TARGETNAME=main

C_FLAGS=/c /TP /EHsc /D "_MBCS" /MT  /I"d:\dxlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /W3 

LINK_FLAGS=/SUBSYSTEM:WINDOWS /LIBPATH:"d:\dxlib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" 

ALL:
	cl $(C_FLAGS) $(TARGETNAME).cpp back.cpp control.cpp enemy.cpp enemyeffect.cpp player.cpp playereffect.cpp title.cpp
	link /out:$(TARGETNAME).exe $(LINK_FLAGS) $(TARGETNAME).obj back.obj control.obj enemy.obj enemyeffect.obj player.obj playereffect.obj title.obj
	$(TARGETNAME).exe 
------------------------------------------------
「プロジェクトの誤り」がありそもそもVisualStudioのコンパイルさえ出来なかったはずです。

コード:

  <ItemGroup>
    <ClCompile Include="back.cpp" />
    <ClCompile Include="control.cpp" />
    <ClCompile Include="enemy.cpp" />
    <ClCompile Include="enemyefect.cpp" />//<<<-----enemyeffect.cppが正しい
    <ClCompile Include="main.cpp" />
    <ClCompile Include="player.cpp" />
    <ClCompile Include="playereffect.cpp" />
    <ClCompile Include="title.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="back.h" />
    <ClInclude Include="control.h" />
    <ClInclude Include="define.h" />
    <ClInclude Include="enemy.h" />
    <ClInclude Include="enemyefect.h" />//<<<-----enemyeffect.hが正しい
    <ClInclude Include="pch.h" />
    <ClInclude Include="player.h" />
    <ClInclude Include="playereffect.h" />
    <ClInclude Include="title.h" />
  </ItemGroup>

Math

Re: プレイヤー消滅エフェクト

#26

投稿記事 by Math » 7年前

私の新環境に合わせてかつプロジェクトファイルの修正を行った後の実行結果です。一応コンパイルは正常になりました。

コード:

<AdditionalIncludeDirectories>D:\dxlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
[control.h]の間違いも修正。

コード:

#include"enemyeffect.h" //"enemyefect.h" <<<--------
----------------------------------------------------------------------------------------------------------------------------------
新NMAKE方式の実行結果

コード:

D:\h\z10\01\10\game>nmake -f g.mak

Microsoft(R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /c /TP /EHsc /D "_MBCS" /MT  /I"d:\dxlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /W3 main.cpp back.cpp control.cpp enemy.cpp enemyeffect.cpp player.cpp playereffect.cpp title.cpp
Microsoft(R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

main.cpp
back.cpp
control.cpp
enemy.cpp
enemyeffect.cpp
player.cpp
playereffect.cpp
title.cpp
コードを生成中...
        link /out:main.exe /SUBSYSTEM:WINDOWS /LIBPATH:"d:\dxlib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" main.obj back.obj control.obj enemy.obj enemyeffect.obj player.obj playereffect.obj title.obj
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

main.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ) が関数 "public: static class CONTROL & __cdecl CONTROL::GetInstance(void)" (?GetInstance@CONTROL@@SAAAV1@XZ) で参照されました。
enemy.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ)" は未解決です。
main.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ) が関数 "void __cdecl `public: static class GetInstance & __cdecl CONTROL::GetInstance(void)'::`2'::`dynamic atexit destructor for 'control''(void)" (??__Fcontrol@?1??GetInstance@CONTROL@@SAAAV1@XZ@YAXXZ) で参照されました。
enemy.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ)" は未解決です。
main.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::All(void)" (?All@CONTROL@@QAEXXZ) が関数 _WinMain@16 で参照されました。
enemy.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::GetPlayerPosition(double *,double *)" (?GetPlayerPosition@CONTROL@@QAEXPAN0@Z) が関数 "private: void __thiscall ENEMY::Shot(void)" (?Shot@ENEMY@@AAEXXZ) で参照されました。
main.exe : fatal error LNK1120: 4 件の未解決の外部参照
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : リターン コード '0x460'
Stop.

D:\h\z10\01\10\game>
新Build方式の実行結果

コード:

D:\h\z10\01\10\game>MSBuild cppApp1.txt
Microsoft (R) Build Engine バージョン 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

2017/01/11 8:05:44 にビルドを開始しました。
"C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (34,37)" にある BeforeTargets 属性に一覧表示されているターゲット "_ConvertPdbFiles" はプロジェク
ト内に存在しないため、無視されます。
"C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (34,70)" にある AfterTargets 属性に一覧表示されているターゲット "_CollectPdbFiles" はプロジェクト
内に存在しないため、無視されます。
"C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (41,38)" にある BeforeTargets 属性に一覧表示されているターゲット "_CollectMdbFiles" はプロジェク
ト内に存在しないため、無視されます。
"C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (41,71)" にある AfterTargets 属性に一覧表示されているターゲット "_CopyMdbFiles" はプロジェクト内に存
在しないため、無視されます。
ノード 1 上のプロジェクト "D:\h\z10\01\10\game\cppApp1.txt" (既定のターゲット)。
InitializeBuildStatus:
  "Debug\cppApp1.tlog\unsuccessfulbuild" のタッチ タスクを実行しています。
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /ID:\dxlib /ZI /nologo /W3 /WX- /sdl- /Od /Oy- /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /Gm /EHsc
   /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP /analyze- /errorReport:queue back.cpp control.cpp enemy.cpp
   enemyeffect.cpp main.cpp player.cpp playereffect.cpp title.cpp
  title.cpp
  playereffect.cpp
  player.cpp
  main.cpp
  enemyeffect.cpp
  enemy.cpp
  control.cpp
  back.cpp
  コードを生成中...
Link:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\h\z10\01\10\game\Debug\cppApp1.exe" /INCREMENTAL /NOLOGO /LIBPATH:D:\
  dxlib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFES
  TUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:\h\z10\01\10\game\Debug\cppApp1.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMP
  LIB:"D:\h\z10\01\10\game\Debug\cppApp1.lib" /MACHINE:X86 Debug\back.obj
  Debug\control.obj
  Debug\enemy.obj
  Debug\enemyeffect.obj
  Debug\main.obj
  Debug\player.obj
  Debug\playereffect.obj
  Debug\title.obj
enemy.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ) が関数 "public: static class CONTROL & __cdecl CONTROL::GetInstanc
e(void)" (?GetInstance@CONTROL@@SAAAV1@XZ) で参照されました。 [D:\h\z10\01\10\game\cppApp1.txt]
main.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ)" は未解決です。 [D:\h\z10\01\10\game\cppApp1.txt]
enemy.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ) が関数 "void __cdecl `public: static class GetInstance & __cdecl
CONTROL::GetInstance(void)'::`2'::`dynamic atexit destructor for 'control''(void)" (??__Fcontrol@?1??GetInstance@CONTROL@@SAAAV1@XZ@YAXXZ) で参照されました。 [D:\h\z10\01\10\ga
me\cppApp1.txt]
main.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ)" は未解決です。 [D:\h\z10\01\10\game\cppApp1.txt]
enemy.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::GetPlayerPosition(double *,double *)" (?GetPlayerPosition@CONTROL@@QAEXPAN0@Z) が関数 "private: vo
id __thiscall ENEMY::Shot(void)" (?Shot@ENEMY@@AAEXXZ) で参照されました。 [D:\h\z10\01\10\game\cppApp1.txt]
main.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::All(void)" (?All@CONTROL@@QAEXXZ) が関数 _WinMain@16 で参照されました。 [D:\h\z10\01\10\game\cppApp1.txt]
D:\h\z10\01\10\game\Debug\cppApp1.exe : fatal error LNK1120: 4 件の未解決の外部参照 [D:\h\z10\01\10\game\cppApp1.txt]
プロジェクト "D:\h\z10\01\10\game\cppApp1.txt" (既定のターゲット) のビルドが終了しました -- 失敗。


ビルドに失敗しました。

"D:\h\z10\01\10\game\cppApp1.txt" (既定のターゲット) (1) ->
(Link ターゲット) ->
  enemy.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ) が関数 "public: static class CONTROL & __cdecl CONTROL::GetInsta
nce(void)" (?GetInstance@CONTROL@@SAAAV1@XZ) で参照されました。 [D:\h\z10\01\10\game\cppApp1.txt]
  main.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::CONTROL(void)" (??0CONTROL@@AAE@XZ)" は未解決です。 [D:\h\z10\01\10\game\cppApp1.txt]
  enemy.obj : error LNK2019: 未解決の外部シンボル "private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ) が関数 "void __cdecl `public: static class GetInstance & __cdec
l CONTROL::GetInstance(void)'::`2'::`dynamic atexit destructor for 'control''(void)" (??__Fcontrol@?1??GetInstance@CONTROL@@SAAAV1@XZ@YAXXZ) で参照されました。 [D:\h\z10\01\10\
game\cppApp1.txt]
  main.obj : error LNK2001: 外部シンボル ""private: __thiscall CONTROL::~CONTROL(void)" (??1CONTROL@@AAE@XZ)" は未解決です。 [D:\h\z10\01\10\game\cppApp1.txt]
  enemy.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::GetPlayerPosition(double *,double *)" (?GetPlayerPosition@CONTROL@@QAEXPAN0@Z) が関 数 "private:
void __thiscall ENEMY::Shot(void)" (?Shot@ENEMY@@AAEXXZ) で参照されました。 [D:\h\z10\01\10\game\cppApp1.txt]
  main.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall CONTROL::All(void)" (?All@CONTROL@@QAEXXZ) が関数 _WinMain@16 で参照されました。 [D:\h\z10\01\10\game\cppApp1.txt]
  D:\h\z10\01\10\game\Debug\cppApp1.exe : fatal error LNK1120: 4 件の未解決の外部参照 [D:\h\z10\01\10\game\cppApp1.txt]

    0 個の警告
    7 エラー

経過時間 00:00:14.55
D:\h\z10\01\10\game>

Math

Re: プレイヤー消滅エフェクト

#27

投稿記事 by Math » 7年前

[雑談]C++も遅ればせながらC#/VBのようなコマンドラインBuildが可能になりました。C#/VBはVisualStudioがなくてもWindowsの機能だけでVS2015相当のC#/VB/xamlのコンパイルが可能です。(VistaでもOK)しかもPowerShellではUnixのShell命令(salは特に有効)を駆使してBuidと実行の自動化ができます。PowerShellの入力自動補完もVisualStudioより使い易くUnixのShell命令と組合すと簡単に命令のエクセル風の一覧がつくれますよ。(まあ高度なプログラムにはVisualStudioのNuGetが有効だしパソコンの比率が下がってクロスプラットが増えてるのでMonaca(iOS/Android用)をいれました)[PowerShellを使うとその機能の便利さに驚きます。C#で作られてい万能ツールです。最新版はクラスも作れるようになった。]

アバター
みけCAT
記事: 6734
登録日時: 13年前
住所: 千葉県
連絡を取る:

Re: プレイヤー消滅エフェクト

#28

投稿記事 by みけCAT » 7年前

[control.cpp]とされるコードが[enemyeffect.h]と同じようなので、コピペミスがあったと考えられます。
複雑な問題?マシンの性能を上げてOpenMPで殴ればいい!(死亡フラグ)

Math

Re: プレイヤー消滅エフェクト

#29

投稿記事 by Math » 7年前

ロジック以前にケアレスミスが多いようなので”もう一度自分で”ご確認お願い致します。

閉鎖

“C言語何でも質問掲示板” へ戻る