hedgewars/uRender.pas
changeset 7069 bcf9d8e64e92
parent 7028 0f60591f3a16
child 7080 dbf43c07a507
child 8026 4a4f21070479
child 8145 6408c0ba4ba1
equal deleted inserted replaced
7068:b1b7eb9c8cc9 7069:bcf9d8e64e92
   406 end;
   406 end;
   407 
   407 
   408 
   408 
   409 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
   409 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
   410 const VertexBuffer: array [0..3] of TVertex2f = (
   410 const VertexBuffer: array [0..3] of TVertex2f = (
   411         (x: -16; y: -16),
   411         (X: -16; Y: -16),
   412         (x:  16; y: -16),
   412         (X:  16; Y: -16),
   413         (x:  16; y:  16),
   413         (X:  16; Y:  16),
   414         (x: -16; y:  16));
   414         (X: -16; Y:  16));
   415 var l, r, t, b: real;
   415 var l, r, t, b: real;
   416     TextureBuffer: array [0..3] of TVertex2f;
   416     TextureBuffer: array [0..3] of TVertex2f;
   417 begin
   417 begin
   418     // do not draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
   418     // do not draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
   419     if (abs(X) > 32) and ((abs(X) - 16) * cScaleFactor > cScreenWidth) then
   419     if (abs(X) > 32) and ((abs(X) - 16) * cScaleFactor > cScreenWidth) then