hedgewars/uStore.pas
changeset 1431 21ca09524f9c
parent 1294 50198e5c7f02
child 1525 311d0ab35d98
equal deleted inserted replaced
1430:8b192c18a584 1431:21ca09524f9c
    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);
    39 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
    39 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
       
    40 procedure DrawFillRect(r: TSDL_Rect);
    40 function  RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture;
    41 function  RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture;
    41 procedure RenderHealth(var Hedgehog: THedgehog);
    42 procedure RenderHealth(var Hedgehog: THedgehog);
    42 procedure AddProgress;
    43 procedure AddProgress;
    43 procedure FinishProgress;
    44 procedure FinishProgress;
    44 function  LoadImage(const filename: string; hasAlpha, critical, setTransparent: boolean): PSDL_Surface;
    45 function  LoadImage(const filename: string; hasAlpha, critical, setTransparent: boolean): PSDL_Surface;
   540 glEnd();
   541 glEnd();
   541 
   542 
   542 glPopMatrix
   543 glPopMatrix
   543 end;
   544 end;
   544 
   545 
       
   546 procedure DrawFillRect(r: TSDL_Rect);
       
   547 begin
       
   548 glDisable(GL_TEXTURE_2D);
       
   549 
       
   550 glColor4ub(0, 0, 0, 127);
       
   551 
       
   552 glBegin(GL_QUADS);
       
   553 
       
   554 glVertex2i(r.x       , r.y      );
       
   555 glVertex2i(r.x + r.w , r.y      );
       
   556 glVertex2i(r.x + r.w , r.y + r.h);
       
   557 glVertex2i(r.x       , r.y + r.h);
       
   558 
       
   559 glEnd();
       
   560 
       
   561 glColor4f(1, 1, 1, 1);
       
   562 glEnable(GL_TEXTURE_2D)
       
   563 end;
       
   564 
   545 procedure StoreRelease;
   565 procedure StoreRelease;
   546 var ii: TSprite;
   566 var ii: TSprite;
   547 begin
   567 begin
   548 for ii:= Low(TSprite) to High(TSprite) do
   568 for ii:= Low(TSprite) to High(TSprite) do
   549     begin
   569     begin