hedgewars/uStore.pas
changeset 3628 2b4d878ba565
parent 3626 19f78afa0188
child 3629 86212d2b116a
equal deleted inserted replaced
3627:f1da1d8fb56c 3628:2b4d878ba565
  1500 RenderHelpWindow:=  Surface2Tex(tmpsurf, true);
  1500 RenderHelpWindow:=  Surface2Tex(tmpsurf, true);
  1501 SDL_FreeSurface(tmpsurf)
  1501 SDL_FreeSurface(tmpsurf)
  1502 end;
  1502 end;
  1503 
  1503 
  1504 procedure RenderWeaponTooltip(atype: TAmmoType);
  1504 procedure RenderWeaponTooltip(atype: TAmmoType);
  1505 {$IFNDEF IPHONEOS}
       
  1506 var r: TSDL_Rect;
  1505 var r: TSDL_Rect;
  1507     i: LongInt;
  1506     i: LongInt;
  1508     extra: ansistring;
  1507     extra: ansistring;
  1509     extracolor: LongInt;
  1508     extracolor: LongInt;
  1510 begin
  1509 begin
  1546     end;
  1545     end;
  1547 
  1546 
  1548 // render window and return the texture
  1547 // render window and return the texture
  1549 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r)
  1548 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r)
  1550 end;
  1549 end;
  1551 {$ELSE}
       
  1552 begin end;
       
  1553 {$ENDIF}
       
  1554 
  1550 
  1555 procedure ShowWeaponTooltip(x, y: LongInt);
  1551 procedure ShowWeaponTooltip(x, y: LongInt);
  1556 begin
  1552 begin
  1557 {$IFNDEF IPHONEOS}
       
  1558 // draw the texture if it exists
  1553 // draw the texture if it exists
  1559 if WeaponTooltipTex <> nil then
  1554 if WeaponTooltipTex <> nil then
  1560     DrawTexture(x, y, WeaponTooltipTex)
  1555     DrawTexture(x, y, WeaponTooltipTex)
  1561 {$ENDIF}
       
  1562 end;
  1556 end;
  1563 
  1557 
  1564 procedure FreeWeaponTooltip;
  1558 procedure FreeWeaponTooltip;
  1565 begin
  1559 begin
  1566 {$IFNDEF IPHONEOS}
       
  1567 // free the existing texture (if there's any)
  1560 // free the existing texture (if there's any)
  1568 if WeaponTooltipTex = nil then
  1561 if WeaponTooltipTex = nil then
  1569     exit;
  1562     exit;
  1570 FreeTexture(WeaponTooltipTex);
  1563 FreeTexture(WeaponTooltipTex);
  1571 WeaponTooltipTex:= nil
  1564 WeaponTooltipTex:= nil
  1572 {$ENDIF}
       
  1573 end;
  1565 end;
  1574 
  1566 
  1575 procedure initModule;
  1567 procedure initModule;
  1576 begin
  1568 begin
  1577     PixelFormat:= nil;
  1569     PixelFormat:= nil;