Make use of "unused" struct member (based on sdl_ttf example)
authorunc0rr
Mon, 16 Oct 2006 21:06:32 +0000
changeset 201 c9610ad20fef
parent 200 a36102728776
child 202 8603c0420461
Make use of "unused" struct member (based on sdl_ttf example)
hedgewars/SDLh.pas
hedgewars/uStore.pas
--- a/hedgewars/SDLh.pas	Mon Oct 16 19:20:13 2006 +0000
+++ b/hedgewars/SDLh.pas	Mon Oct 16 21:06:32 2006 +0000
@@ -110,7 +110,7 @@
                   r: Byte;
                   g: Byte;
                   b: Byte;
-                  unused: Byte;
+                  a: Byte;
                   end;
 
      PSDL_RWops = ^TSDL_RWops;
--- a/hedgewars/uStore.pas	Mon Oct 16 19:20:13 2006 +0000
+++ b/hedgewars/uStore.pas	Mon Oct 16 21:06:32 2006 +0000
@@ -108,6 +108,7 @@
 clr.r:= Color shr 16;
 clr.g:= (Color shr 8) and $FF;
 clr.b:= Color and $FF;
+clr.a:= $FF;
 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr);
 Result.x:= X + 3;
 Result.y:= Y + 1;
@@ -374,6 +375,7 @@
 clr.r:= $FF;
 clr.g:= $FF;
 clr.b:= $FF;
+clr.a:= $FF;
 tmpsurf:= TTF_RenderUTF8_Solid(Fontz[Font].Handle, PChar(s), clr);
 SDLTry(tmpsurf <> nil, true);
 SDL_UpperBlit(tmpsurf, nil, Surface, @r);