#include "DxLib.h"
#define WAIT_TIME 1
#define FIVE_BLOCK 180
#define FOUR_BLOCK 160
#define THREE_BLOCK 140
#define TWO_BLOCK 120
#define ONE_BLOCK 100
#define ALL_BLOCK_Y 95
#define KASANARI 25
#define AIDA 220
#define AAIDA 420
struct position
{
int x;
int y;
};
struct position one;
struct position two;
struct position three;
struct position four;
struct position five;
void Draw()
{
static int near_Backhandle = LoadGraph("画像/背景.png");
static int one_block = LoadGraph("画像/1.png");
static int two_block = LoadGraph("画像/2.png");
static int three_block = LoadGraph("画像/3.png");
static int four_block = LoadGraph("画像/4.png");
static int five_block = LoadGraph("画像/5.png");
one.x = 40;
two.x = 40;
three.x = 40;
four.x = 40;
five.x = 40;
one.y = 150;
two.y = 200;
three.y = 250;
four.y = 300;
five.y = 350;
DrawExtendGraph( five.x ,five.y, five.x+THREE_BLOCK, five.y+ALL_BLOCK_Y, five_block, TRUE);
DrawExtendGraph( four.x , four.y,four.x+THREE_BLOCK, four.y+ALL_BLOCK_Y, four_block, TRUE);
DrawExtendGraph( three.x , three.y, three.x+THREE_BLOCK,three.y+ALL_BLOCK_Y, three_block, TRUE);
DrawExtendGraph( two.x , two.y, two.x+THREE_BLOCK,two.y+ALL_BLOCK_Y, two_block, TRUE);
DrawExtendGraph( one.x , one.y, one.x+THREE_BLOCK,one.y+ALL_BLOCK_Y, one_block, TRUE);
ScreenFlip();
}
void move(){
int Mouse;
int Mouse_x,Mouse_y;
one.x = 40;
two.x = 40;
three.x = 40;
four.x = 40;
five.x = 40;
one.y = 150;
two.y = 200;
three.y = 250;
four.y = 300;
five.y = 350;
Mouse = GetMouseInput();
SetMouseDispFlag(TRUE);
GetMousePoint(&Mouse_x,&Mouse_y);
if ( Mouse&MOUSE_INPUT_LEFT ){
if(one.x + THREE_BLOCK > Mouse_x >one.x && one.y +50 > Mouse_y > one.y ){
one.x = Mouse_x;
one.y = Mouse_y;
}
if(two.x + THREE_BLOCK > Mouse_x >two.x && two.y+50 > Mouse_y > two.y ){
two.x = Mouse_x;
two.y = Mouse_y;
}
if(three.x + THREE_BLOCK > Mouse_x >three.x && three.y +50> Mouse_y > three.y ){
three.x = Mouse_x;
three.y = Mouse_y;
}
if(four.x + THREE_BLOCK > Mouse_x >four.x && four.y +50 > Mouse_y > four.y ){
four.x = Mouse_x;
four.y = Mouse_y;
}
if(five.x + THREE_BLOCK > Mouse_x >five.x && five.y +50 > Mouse_y > five.y ){
five.x = Mouse_x;
five.y = Mouse_y;
}
}
}
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int){
ChangeWindowMode(TRUE);
SetBackgroundColor(255,255,255);
DxLib_Init();
SetDrawScreen( DX_SCREEN_BACK ); //ウィンドウモード変更と初期化と裏画面設定
Draw();
while( 1 ){
move();
ClearDrawScreen();
ProcessMessage();
if( CheckHitKey(KEY_INPUT_ESCAPE) == 1 ){
break;
}
ClearDrawScreen();
}
DxLib_End(); // DXライブラリ終了処理
return 0;
}
というプログラムを実行したら
1>------ ビルド開始: プロジェクト: GameProg, 構成: Debug Win32 ------
1>2013/09/29 2:29:32 にビルドを開始しました。
1>InitializeBuildStatus:
1> "Debug\GameProg.unsuccessfulbuild" のタッチ タスクを実行しています。
1>ClCompile:
1> test.cpp
1>c:\users\稜太郎\desktop\gameprog\test.cpp(107): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(107): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(112): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(112): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(116): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(116): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(121): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(121): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(126): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>c:\users\稜太郎\desktop\gameprog\test.cpp(126): warning C4804: '>' : 演算中の 'bool' 型の使用方法が安全ではありません
1>ManifestResourceCompile:
1> すべての出力が最新のものです。
1>LINK : fatal error LNK1168: ファイル C:\Users\稜太郎\Desktop\GameProg\Debug\GameProg.exe を開いて書き込むことができません。
1>
1>ビルドに失敗しました。
1>
1>経過時間 00:00:01.42
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========
このような結果が返ってきました
解決する方法を教えてください