equal
deleted
inserted
replaced
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 *) |
17 *) |
18 |
18 |
19 unit uStore; |
19 unit uStore; |
20 interface |
20 interface |
21 uses uConsts, uTeams, SDLh, |
21 uses uConsts, uTeams, SDLh, |
22 {$IFDEF IPHONE} |
22 {$IFDEF IPHONE} |
23 gles11, |
23 gles11, |
24 {$ELSE} |
24 {$ELSE} |
25 GL, |
25 GL, |
26 {$ENDIF} |
26 {$ENDIF} |
653 |
653 |
654 function RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture; |
654 function RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture; |
655 var w, h: LongInt; |
655 var w, h: LongInt; |
656 Result: PSDL_Surface; |
656 Result: PSDL_Surface; |
657 begin |
657 begin |
|
658 if length(s) = 0 then s:= ' '; |
658 TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), w, h); |
659 TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), w, h); |
659 |
660 |
660 Result:= SDL_CreateRGBSurface(SDL_SWSURFACE, w + FontBorder * 2 + 4, h + FontBorder * 2, |
661 Result:= SDL_CreateRGBSurface(SDL_SWSURFACE, w + FontBorder * 2 + 4, h + FontBorder * 2, |
661 32, RMask, GMask, BMask, AMask); |
662 32, RMask, GMask, BMask, AMask); |
662 |
663 |