This union hasn't been needed for 5 years, and makes using other headers harder.
authornemo
Fri, 17 Aug 2012 07:49:54 -0400
changeset 7546 b50556f2a0e8
parent 7545 063601290761
child 7547 6e9c5feb88eb
This union hasn't been needed for 5 years, and makes using other headers harder.
hedgewars/SDLh.pas
hedgewars/uLandObjects.pas
hedgewars/uRenderUtils.pas
hedgewars/uScript.pas
hedgewars/uStore.pas
--- a/hedgewars/SDLh.pas	Thu Aug 16 21:58:57 2012 +0400
+++ b/hedgewars/SDLh.pas	Fri Aug 17 07:49:54 2012 -0400
@@ -410,12 +410,10 @@
 
     PSDL_Color = ^TSDL_Color;
     TSDL_Color = record
-        case Byte of
-            0: ( r: Byte;
-                 g: Byte;
-                 b: Byte;
-                 unused: Byte; );
-            1: ( value: LongWord; );
+            r: Byte;
+            g: Byte;
+            b: Byte;
+            unused: Byte;
         end;
 
 
--- a/hedgewars/uLandObjects.pas	Thu Aug 16 21:58:57 2012 +0400
+++ b/hedgewars/uLandObjects.pas	Fri Aug 17 07:49:54 2012 -0400
@@ -501,7 +501,7 @@
             c2.g:= t;
             c2.b:= t
             end;
-        ExplosionBorderColor:= c2.value or AMask;
+        ExplosionBorderColor:= c2.r shl 24 or c2.g shl 16 or c2.b shl 8 or $FF; 
         end
     else if key = 'water-top' then
         begin
--- a/hedgewars/uRenderUtils.pas	Thu Aug 16 21:58:57 2012 +0400
+++ b/hedgewars/uRenderUtils.pas	Fri Aug 17 07:49:54 2012 -0400
@@ -92,7 +92,7 @@
     textRect.y:= Y;
     textRect.w:= w;
     textRect.h:= h;
-    DrawRoundRect(@finalRect, cWhiteColor, endian(cNearBlackColorChannels.value), Surface, true);
+    DrawRoundRect(@finalRect, cWhiteColor, cNearBlackColor, Surface, true);
     clr.r:= (Color shr 16) and $FF;
     clr.g:= (Color shr 8) and $FF;
     clr.b:= Color and $FF;
--- a/hedgewars/uScript.pas	Thu Aug 16 21:58:57 2012 +0400
+++ b/hedgewars/uScript.pas	Fri Aug 17 07:49:54 2012 -0400
@@ -744,7 +744,7 @@
             TryDo(texsurf <> nil, errmsgCreateSurface, true);
             TryDo(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
 
-            DrawRoundRect(@r, cWhiteColor, cNearBlackColorChannels.value, texsurf, true);
+            DrawRoundRect(@r, cWhiteColor, cNearBlackColor, texsurf, true);
             rr:= r;
             inc(rr.x, 2); dec(rr.w, 4); inc(rr.y, 2); dec(rr.h, 4);
             DrawRoundRect(@rr, clan^.Color, clan^.Color, texsurf, false);
--- a/hedgewars/uStore.pas	Thu Aug 16 21:58:57 2012 +0400
+++ b/hedgewars/uStore.pas	Fri Aug 17 07:49:54 2012 -0400
@@ -152,7 +152,7 @@
         TryDo(texsurf <> nil, errmsgCreateSurface, true);
         TryDo(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
 
-        DrawRoundRect(@r, cWhiteColor, cNearBlackColorChannels.value, texsurf, true);
+        DrawRoundRect(@r, cWhiteColor, cNearBlackColor, texsurf, true);
         rr:= r;
         inc(rr.x, 2); dec(rr.w, 4); inc(rr.y, 2); dec(rr.h, 4);
         DrawRoundRect(@rr, Clan^.Color, Clan^.Color, texsurf, false);