下記は新しく書いたプログラムの一部なのですが、フレームがX座標32の状態で右キーを押すとX座標672に行ってしまいます。
何故なのか、御指摘して頂けないでしょうか?
while(!ProcessMessage()&&!ClearDrawScreen()&&!CheckHitKey(KEY_INPUT_ESCAPE))
{
DrawGraph(0,0,menu.back,FALSE);
DrawGraph(menu.frame_1_x,menu.frame_1_y,menu.frame_1_graph,TRUE);
if(menu.keyflag==0)
{
if(menu.frame_1_x==32&&CheckHitKey(KEY_INPUT_RIGHT)) menu.frame_1_x=352;
if(menu.frame_1_x==352&&CheckHitKey(KEY_INPUT_RIGHT)) menu.frame_1_x=672;
if(menu.frame_1_x==352&&CheckHitKey(KEY_INPUT_LEFT)) menu.frame_1_x=32;
if(menu.frame_1_x==672&&CheckHitKey(KEY_INPUT_LEFT)) menu.frame_1_x=352;
}
if(CheckHitKeyAll()) menu.keyflag=1;
if(!CheckHitKeyAll()) menu.keyflag=0;
ScreenFlip();
}