ここのシューティングゲーム館の講座を見ながら
シューティングゲームを作っていたのですが、
40ものエラーと2つの警告がでて困っています。
投稿時にエラーが出てしまいますので、ソースとエラーを分けて投稿します。
ソースは以下の通りです。
#include "DxLib.h" int counter=0; int color_white; char Key[256]; //画像ファイルハンドル int img_background; int img_player; //構造体 typedef struct{ double x,y; int status,counter; int shot [11][15]; } BODY_player_t; BODY_player_t Player; void img_sound_load(){ img_background = LoadGraph("試作地面.bmp"); img_player = LoadGraph("kame_usiro.bmp"); } void initialization(){ Player.x=200.0; Player.y=400.0; Player.counter=0; Player.status=0; } //構造体の初期化 void SetColor(){ color_white = GetColor(255,255,255); //白色ハンドルを取得 } void Background(){ DrawGraph(0,0,img_background,FALSE); //背景を描画 } void PlayerControl(){ DrawGraph((int)Player.x,(int)Player.y,img_player,TRUE);//プレイヤーを描画 } void FpsTimeFanction(){ static int FpsTime[2]={0,},FpsTime_i=0; static double Fps=0.0; if(FpsTime_i== 0) FpsTime[0]=GetNowCount(); //1周目の時間取得 if(FpsTime_i==49){ FpsTime[1]=GetNowCount(); //50周目の時間取得 Fps = 1000.0f / ((FpsTime[1] - FpsTime[0]) / 50.0f);//測定した値からfpsを計算 FpsTime_i=0; } else FpsTime_i++; //現在何周目かカウント if(Fps != 0) DrawFormatString(565,460,color_white,"FPS %.1f",Fps); //fpsを表示 return; } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){ int RefreshTime=0; ChangeWindowMode( TRUE ) ; if( DxLib_Init() == -1 ) return -1; SetDrawScreen( DX_SCREEN_BACK ) ; //裏画面を使用する。 img_sound_load(); //画像ファイルをロード initialization(); //初期化 SetColor(); //色を取得 while(ProcessMessage() == 0 && GetHitKeyStateAll(Key) == 0){ RefreshTime = GetNowCount(); //今の時間を取得 ClearDrawScreen(); //裏画面のデータを全て削除 Background(); //背景描画 PlayerControl(); //プレイヤー描画 FpsTimeFanction(); //FPS計算 ScreenFlip() ; //裏画面データを表画面へ反映 counter++; if(Key[KEY_INPUT_ESCAPE]==1) break; //Escapeが押されたら終了 while(GetNowCount() - RefreshTime < 17); //1周の処理が17ミリ秒になるまで待つ } DxLib_End() ; return 0 ; }