hedgewars/uStore.pas
changeset 853 0b4a23795530
parent 844 9a82149409f3
child 883 07a568ba44e0
equal deleted inserted replaced
852:f756a1d3324c 853:0b4a23795530
    29 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
    29 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
    30 procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture);
    30 procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture);
    31 procedure DrawLand (X, Y: LongInt);
    31 procedure DrawLand (X, Y: LongInt);
    32 procedure DrawTexture(X, Y: LongInt; Texture: PTexture);
    32 procedure DrawTexture(X, Y: LongInt; Texture: PTexture);
    33 procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
    33 procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
    34 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame: LongInt; Angle: real);
    34 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
    35 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
    35 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
    36 procedure DrawCentered(X, Top: LongInt; Source: PTexture);
    36 procedure DrawCentered(X, Top: LongInt; Source: PTexture);
    37 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
    37 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
    38 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
    38 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
    39 function  RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture;
    39 function  RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture;
   378 		SpritesData[Sprite].Width,
   378 		SpritesData[Sprite].Width,
   379 		SpritesData[Sprite].Height,
   379 		SpritesData[Sprite].Height,
   380 		X, Y, Dir, Angle)
   380 		X, Y, Dir, Angle)
   381 end;
   381 end;
   382 
   382 
   383 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame: LongInt; Angle: real);
   383 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
   384 begin
   384 begin
   385 glPushMatrix;
   385 glPushMatrix;
   386 glTranslatef(X, Y, 0);
   386 glTranslatef(X, Y, 0);
   387 glRotatef(Angle, 0, 0, 1);
   387 glRotatef(Angle, 0, 0, 1);
   388 
   388 
   389 DrawSprite(Sprite, -SpritesData[Sprite].Width div 2, -SpritesData[Sprite].Width div 2, Frame);
   389 if Dir < 0 then glScalef(-1.0, 1.0, 1.0);
       
   390 
       
   391 DrawSprite(Sprite, -SpritesData[Sprite].Width div 2, -SpritesData[Sprite].Height div 2, Frame);
   390 
   392 
   391 glPopMatrix
   393 glPopMatrix
   392 end;
   394 end;
   393 
   395 
   394 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
   396 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);