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; |