- //y-drehung
- if (keys[VK_RIGHT]) then y_rotate := y_rotate + 5;
- if (keys[VK_LEFT]) then y_rotate := y_rotate - 5;
- if not(keys[VK_RIGHT] and keys[VK_LEFT]) then
- begin
- sp := false;
- if y_rotate > 0 then y_rotate := y_rotate - 2;
- if y_rotate < 0 then y_rotate := y_rotate + 2;
- end;
- //x-drehung
- if (keys[VK_UP]) then x_rotate := x_rotate - 5;
- if (keys[VK_DOWN]) then x_rotate := x_rotate + 5;
- if not(keys[VK_UP] or keys[VK_DOWN]) then
- begin
- sp := false;
- if x_rotate > 0 then x_rotate := x_rotate - 2;
- if x_rotate < 0 then x_rotate := x_rotate + 2;
- end;
- //stoppen 'S'
- if (keys[ord('S')] and not(sp)) then
- begin
- y_rotate := 0;
- x_rotate := 0;
- sp := true;
- glLoadIdentity();
- glTranslatef(0,0,-10);
- end;