hedgewars/uWorld.pas
changeset 3113 2829ea0dd47c
parent 3110 c8d7c852e26a
child 3123 b0a02930a1dc
equal deleted inserted replaced
3112:f1bbe35ddb83 3113:2829ea0dd47c
   437     grp: TCapGroup;
   437     grp: TCapGroup;
   438     s: string[15];
   438     s: string[15];
   439     highlight: Boolean;
   439     highlight: Boolean;
   440     offset, offsetX, offsetY, screenBottom: LongInt;
   440     offset, offsetX, offsetY, screenBottom: LongInt;
   441     scale: GLfloat;
   441     scale: GLfloat;
       
   442     VertexBuffer: array [0..3] of TVertex2f;
   442 begin
   443 begin
   443 if ZoomValue < zoom then
   444 if ZoomValue < zoom then
   444     begin
   445     begin
   445     zoom:= zoom - 0.002 * Lag;
   446     zoom:= zoom - 0.002 * Lag;
   446     if ZoomValue > zoom then zoom:= ZoomValue
   447     if ZoomValue > zoom then zoom:= ZoomValue
   839         begin
   840         begin
   840         case ScreenFade of
   841         case ScreenFade of
   841             sfToBlack, sfFromBlack: glColor4f(0, 0, 0, ScreenFadeValue / 1000);
   842             sfToBlack, sfFromBlack: glColor4f(0, 0, 0, ScreenFadeValue / 1000);
   842             sfToWhite, sfFromWhite: glColor4f(1, 1, 1, ScreenFadeValue / 1000);
   843             sfToWhite, sfFromWhite: glColor4f(1, 1, 1, ScreenFadeValue / 1000);
   843             end;
   844             end;
   844         glBegin(GL_TRIANGLE_FAN);
   845         
   845         glVertex3f(-cScreenWidth, cScreenHeight, 0);
   846         glDisable(GL_TEXTURE_2D);
   846         glVertex3f(-cScreenWidth, 0, 0);
   847         VertexBuffer[0].X:= -cScreenWidth;
   847         glVertex3f(cScreenWidth, 0, 0);
   848         VertexBuffer[0].Y:= cScreenHeight;
   848         glVertex3f(cScreenWidth, cScreenHeight, 0);
   849         VertexBuffer[1].X:= -cScreenWidth;
   849         glEnd;
   850         VertexBuffer[1].Y:= 0;
       
   851         VertexBuffer[2].X:= cScreenWidth;
       
   852         VertexBuffer[2].Y:= 0;
       
   853         VertexBuffer[3].X:= cScreenWidth;
       
   854         VertexBuffer[3].Y:= cScreenHeight;
       
   855          
       
   856         glEnableClientState(GL_VERTEX_ARRAY);
       
   857         glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
       
   858         glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
       
   859         glDisableClientState(GL_VERTEX_ARRAY);
       
   860          
   850         glColor4f(1, 1, 1, 1)
   861         glColor4f(1, 1, 1, 1)
   851         end
   862         end
   852     end;
   863     end;
   853 
   864 
   854 glDisable(GL_BLEND);
   865 glDisable(GL_BLEND);