Игровая программа
Курсовой проект - Компьютеры, программирование
Другие курсовые по предмету Компьютеры, программирование
loatToStrF(CountFuel,ffNumber,6,3)+л);
Canvas.TextOut(500,55,Нитро: +FloatToStrF(CountNitro,ffNumber,6,3)+кг/см);
Canvas.TextOut(500,70,К.метры: +FloatToStrF(CountKM,ffNumber,6,3)+км);
end;}
//
Caption:=StatisticCaption;
//Поддержка аппаратного ускорителя и версия OpenGL клавиша a
if PressedKey[65]=true then
Caption:=OpenGL: +
StrPas(glGetString(GL_VERSION))+
+
StrPas(glGetString(GL_VENDOR))+
+
StrPas(glGetString(GL_RENDERER));
if PressedKey[70]=true then //Показывать Fps -- клавиша f
begin
newCount:=GetTickCount;
Inc(frameCount);
If abs(newCount - lastCount) > 1000 then
begin
StatisticCaption:=FPS: +FloatToStr(frameCount);
lastCount := newCount;
frameCount := 0;
end;
end;
if PressedKey[75]=true then
StatisticCaption:=X=+FloatToStrF(xpos,ffNumber,4,3)+
+Y=+FloatToStrF(ypos,ffNumber,4,3);
if (PressedKey[70]=false)and
(PressedKey[75]=false)and
(PressedKey[65]=false)then StatisticCaption:=SpeedLine;
end;
procedure TSpeedGL.FormDestroy(Sender: TObject);
begin
//glDeleteLists(1,1);
timeKillEvent(uTimerID);
wglMakeCurrent (0, 0);
wglDeleteContext (hrc);
ReleaseDC (Handle, DC);
end;
procedure TSpeedGL.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
//////////////////////////////////////////////
xpos:=2*X/ClientWidth-1;
ypos:=2*(ClientHeight-Y)/ClientHeight-1;
//////////////////////////////////////////////
if Selected_Menu_item= then begin //Selected_Menu_item
if (xpos>-0.3)and(ypos>0.4)and
(xpos0.4)and
(xpos<0.3)and(ypos<0.6)and
(xpos>-0.3)and(ypos<0.6)then begin
if Menu_item<>1 then
PlaySound(Sound\Select_MainMenu.wav,0,SND_ASYNC);
Menu_item:=1;
end;
if (xpos>-0.3)and(ypos>0.15)and
(xpos0.15)and
(xpos<0.3)and(ypos<0.35)and
(xpos>-0.3)and(ypos<0.35)then begin
if Menu_item<>2 then
PlaySound(Sound\Select_MainMenu.wav,0,SND_ASYNC);
Menu_item:=2;
end;
if (xpos>-0.3)and(ypos>-0.1)and
(xpos-0.1)and
(xpos<0.3)and(ypos<0.1)and
(xpos>-0.3)and(ypos<0.1)then begin
if Menu_item<>3 then
PlaySound(Sound\Select_MainMenu.wav,0,SND_ASYNC);
Menu_item:=3;
end;
if (xpos>-0.3)and(ypos>-0.5)and
(xpos-0.5)and
(xpos<0.3)and(ypos<-0.3)and
(xpos>-0.3)and(ypos<-0.3)then begin
if Menu_item<>4 then
PlaySound(Sound\Select_MainMenu.wav,0,SND_ASYNC);
Menu_item:=4;
end;
{if Selected_Menu_item=Start then
begin
if
end;}
end; //Selected_Menu_item
end;