当たり判定の処理を int isMapPlayerhit 関数に書いているのですが、以下のようなエラーが出てしまいます。。。
原因がわからないので、教えていただいてもよろしいでしょうか?
1>c:\users\test\downloads\passer\gameprog\maphitcollision.h(6): error C2143: 構文エラー : ';' が '<クラスヘッド>' の前にありません。
1>c:\users\test\downloads\passer\gameprog\maphitcollision.cpp(11): error C2143: 構文エラー : ',' が '==' の前にありません
-MaphitCollision.h-
#pragma once
#include "Mapdata.h"
class MaphitCollision
{
public:
// MaphitCollision();
int isMapPlayerHit();
};
#include "MaphitCollision.h"
#include "DxLib.h"
/*
MaphitCollision::MaphitCollision()
{
}*/
int MaphitCollision::isMapPlayerHit()
{
if(Mapdata hantei1[120][120] == 1){
printfDx("fdsf");
}
}
-Mapdata.h-
#pragma once
#include "Globals.h"
struct Mapdata
{
int width;
int height;
int MapChip_Size;
};
Mapdata hantei1[120][120] =
{
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1 },
{ 0,1,1,1,1,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