少なくとも、1/60秒以上遅れて移動してると思うのですが、どうしたらいいでしょうか?
CDeviceInputクラス
int CDeviceInput::GetMouseX(){
int x,y;
GetMousePoint(&x,&y);
return x;
}
int CDeviceInput::GetMouseY(){
int x,y;
GetMousePoint(&x,&y);
return y;
}
main.cpp
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int){
ChangeWindowMode(TRUE),SetGraphMode(X_WINDOW,Y_WINDOW,16),DxLib_Init(), SetDrawScreen( DX_SCREEN_BACK ); //ウィンドウモード変更と初期化と裏画面設定
enum{
GAMESTART,
MAINGAME,
GAMEEND=99
}GAME_STATUS;
CDeviceInput DeviceInput;
GAME_STATUS=GAMESTART;//ゲーム内メインステータス
while(ProcessLoop(GAME_STATUS)==0){
switch(GAME_STATUS){
case GAMESTART:
DrawFormatString(DeviceInput.GetMouseX(),0,60000,"X->%d",DeviceInput.GetMouseX());
DrawFormatString(0,DeviceInput.GetMouseY(),60000,"Y->%d",DeviceInput.GetMouseY());
DrawLine(DeviceInput.GetMouseX(),0,DeviceInput.GetMouseX(),DeviceInput.GetMouseY()+30,60000,0);
DrawLine(0,DeviceInput.GetMouseY(),DeviceInput.GetMouseX()+30,DeviceInput.GetMouseY(),60000,0);
DrawCircle(DeviceInput.GetMouseX(),DeviceInput.GetMouseY(),10,60000,1);
break;
}
}
DxLib_End(); // DXライブラリ終了処理
return 0;
}