hedgewars/uStore.pas
changeset 161 d8870bbf960e
parent 108 08f1fe6f21f8
child 183 57c2ef19f719
equal deleted inserted replaced
160:207f520b9e83 161:d8870bbf960e
    39 procedure StoreInit;
    39 procedure StoreInit;
    40 procedure StoreLoad;
    40 procedure StoreLoad;
    41 procedure StoreRelease;
    41 procedure StoreRelease;
    42 procedure DrawGear(Stuff : TStuff; X, Y: integer; Surface: PSDL_Surface);
    42 procedure DrawGear(Stuff : TStuff; X, Y: integer; Surface: PSDL_Surface);
    43 procedure DrawSpriteFromRect(r: TSDL_Rect; X, Y, Height, Position: integer; Surface: PSDL_Surface);
    43 procedure DrawSpriteFromRect(r: TSDL_Rect; X, Y, Height, Position: integer; Surface: PSDL_Surface);
    44 procedure DrawSprite (Sprite: TSprite; X, Y, Position: integer; Surface: PSDL_Surface);
    44 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: integer; Surface: PSDL_Surface);
    45 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: integer; Surface: PSDL_Surface);
    45 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: integer; Surface: PSDL_Surface);
    46 procedure DrawLand (X, Y: integer; Surface: PSDL_Surface);
    46 procedure DrawLand (X, Y: integer; Surface: PSDL_Surface);
    47 procedure DXOutText(X, Y: Integer; Font: THWFont; s: string; Surface: PSDL_Surface);
    47 procedure DXOutText(X, Y: Integer; Font: THWFont; s: string; Surface: PSDL_Surface);
    48 procedure DrawCaption(X, Y: integer; Rect: TSDL_Rect; Surface: PSDL_Surface);
    48 procedure DrawCaption(X, Y: integer; Rect: TSDL_Rect; Surface: PSDL_Surface);
    49 procedure DrawCentered(X, Top: integer; Source, Surface: PSDL_Surface);
    49 procedure DrawCentered(X, Top: integer; Source, Surface: PSDL_Surface);
   362 r.y:= r.y + Height * Position;
   362 r.y:= r.y + Height * Position;
   363 r.h:= Height;
   363 r.h:= Height;
   364 DrawFromRect(X, Y, @r, StoreSurface, Surface)
   364 DrawFromRect(X, Y, @r, StoreSurface, Surface)
   365 end;
   365 end;
   366 
   366 
   367 procedure DrawSprite(Sprite: TSprite; X, Y, Position: integer; Surface: PSDL_Surface);
   367 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: integer; Surface: PSDL_Surface);
   368 var r: TSDL_Rect;
   368 var r: TSDL_Rect;
   369 begin
   369 begin
   370 r.x:= 0;
   370 r.x:= 0;
   371 r.w:= SpritesData[Sprite].Width;
   371 r.w:= SpritesData[Sprite].Width;
   372 r.y:= Position * SpritesData[Sprite].Height;
   372 r.y:= Frame * SpritesData[Sprite].Height;
   373 r.h:= SpritesData[Sprite].Height;
   373 r.h:= SpritesData[Sprite].Height;
   374 DrawFromRect(X, Y, @r, SpritesData[Sprite].Surface, Surface)
   374 DrawFromRect(X, Y, @r, SpritesData[Sprite].Surface, Surface)
   375 end;
   375 end;
   376 
   376 
   377 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: integer; Surface: PSDL_Surface);
   377 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: integer; Surface: PSDL_Surface);