hedgewars/uStore.pas
changeset 1251 1f545d9a10ca
parent 1242 4aca5f7b2504
child 1294 50198e5c7f02
equal deleted inserted replaced
1250:180b044f09b7 1251:1f545d9a10ca
    28 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
    28 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
    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 DrawTextureF(Texture: PTexture; X, Y, Frame, Dir, Frames: LongInt);
    33 procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, Frames: LongInt);
    34 procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
    34 procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
    35 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
    35 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
    36 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
    36 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
    37 procedure DrawCentered(X, Top: LongInt; Source: PTexture);
    37 procedure DrawCentered(X, Top: LongInt; Source: PTexture);
    38 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
    38 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
   355 glVertex2i(X, Texture^.h + Y);
   355 glVertex2i(X, Texture^.h + Y);
   356 
   356 
   357 glEnd()
   357 glEnd()
   358 end;
   358 end;
   359 
   359 
   360 procedure DrawTextureF(Texture: PTexture; X, Y, Frame, Dir, Frames: LongInt);
   360 procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, Frames: LongInt);
   361 var ft, fb: GLfloat;
   361 var ft, fb: GLfloat;
   362 	hw: LongInt;
   362 	hw: LongInt;
   363 begin
   363 begin
   364 glPushMatrix;
   364 glPushMatrix;
   365 glTranslatef(X, Y, 0);
   365 glTranslatef(X, Y, 0);
       
   366 glScalef(Scale, Scale, 1.0);
   366 
   367 
   367 if Dir < 0 then
   368 if Dir < 0 then
   368 	hw:= - 16
   369 	hw:= - 16
   369 else
   370 else
   370 	hw:= 16;
   371 	hw:= 16;