メニュー処理を無くしてスコア表示だけの場合は正常に表示されます。
どうすればメニュー処理を行いつつスコアを正常に表示出来るでしょうか?
以下プログラム
void result(){
int i,p;
int score=ch.score;
int hiscore=ch.hiscore;
int point=ch.point;
int total_score=score+point;
int x;
int y;
int SelectNum = 0;
while( ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0 && gpUpdateKey()==0 ){
if( Key[ KEY_INPUT_DOWN ] == 1 ){
SelectNum = ( SelectNum + 1 ) % 3;
}
if( Key[ KEY_INPUT_UP ] == 1 ){
SelectNum = ( SelectNum + 2 ) % 3;
}
switch ( SelectNum ){
case 0:
x=480;
y=440;
break;
case 1:
x=480;
y=480;
break;
case 2:
x=480;
y=520;
break;
}
if( Key[ KEY_INPUT_Z ] ==1 ){
break;
}
DrawGraph( 0, 0, img_result[1], TRUE );
DrawGraph( x, y, img_menu[2], TRUE );
DrawGraph( 30, 50, img_result[2], TRUE );
for(i=0;i<6;i++){//スコア表示
DrawRotaGraph(500-30*i,180,1.0f,0.0f,img_num[1][hiscore%10],TRUE);
DrawRotaGraph(500-30*i,255,1.0f,0.0f,img_num[1][score%10],TRUE);
DrawRotaGraph(500-30*i,390,1.0f,0.0f,img_num[1][total_score%10],TRUE);
score/=10;
hiscore/=10;
total_score/=10;
}
for(p=0;p<4;p++){//ポイント表示
DrawRotaGraph(500-30*p,315,1.0f,0.0f,img_num[1][point%10],TRUE);
point/=10;
}
}
}