while(ProcessMessage()!=-1){
ClearDrawScreen();

if(count<20) 右足が前に出てるキャラ表示
if(count>=20&&count<40)左足が前に出てるキャラ表示
ScreenFlip();
WaitTimer(10);
count++;
if(count==40)count=0;

}

うーんよくわからん