hedgewars/uStore.pas
changeset 3445 1ce844170014
parent 3407 dcc129c4352e
child 3463 23c50be687a9
equal deleted inserted replaced
3444:9d501dc22f71 3445:1ce844170014
    79 function  RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture;
    79 function  RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture;
    80 procedure RenderWeaponTooltip(atype: TAmmoType);
    80 procedure RenderWeaponTooltip(atype: TAmmoType);
    81 procedure ShowWeaponTooltip(x, y: LongInt);
    81 procedure ShowWeaponTooltip(x, y: LongInt);
    82 procedure FreeWeaponTooltip;
    82 procedure FreeWeaponTooltip;
    83 procedure Tint(r, g, b, a: Byte); inline;
    83 procedure Tint(r, g, b, a: Byte); inline;
       
    84 procedure Tint(c: Longword); inline;
    84 
    85 
    85 implementation
    86 implementation
    86 uses uMisc, uConsole, uLocale{$IFDEF IPHONEOS}, PascalExports{$ENDIF};
    87 uses uMisc, uConsole, uLocale{$IFDEF IPHONEOS}, PascalExports{$ENDIF};
    87 
    88 
    88 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
    89 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
    98 nc:= (a shl 24) or (b shl 16) or (g shl 8) or r;
    99 nc:= (a shl 24) or (b shl 16) or (g shl 8) or r;
    99 if nc = lastTint then
   100 if nc = lastTint then
   100     exit;
   101     exit;
   101 glColor4ub(r, g, b, a);
   102 glColor4ub(r, g, b, a);
   102 lastTint:= nc;
   103 lastTint:= nc;
       
   104 end;
       
   105 
       
   106 procedure Tint(c: Longword); inline;
       
   107 begin
       
   108 Tint(((c shr 16) and $FF), ((c shr 8) and $FF), (c and $FF), $FF);
   103 end;
   109 end;
   104 
   110 
   105 procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
   111 procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
   106 var r: TSDL_Rect;
   112 var r: TSDL_Rect;
   107 begin
   113 begin