- procedure TForm1.IdleHandler(Sender: TObject; var Done: Boolean);
- var i:integer;
- begin
- QueryPerformanceCounter(Start);
- if GetAsyncKeyState(vk_right) <> 0 then playerx:=playerx+1*speedfactor;
- if GetAsyncKeyState(vk_left) <> 0 then playerx:=playerx-1*speedfactor;
- Render;
- QueryPerformanceCounter(Ende);
- speedfactor:=(ende-start) / frequenz;
- Done:= false;
- end;