hedgewars/uStore.pas
changeset 2612 60c7691c348f
parent 2610 8c00c1ee6cac
child 2615 b86abe068708
equal deleted inserted replaced
2611:07b0cc91256c 2612:60c7691c348f
   261 var ii: TSprite;
   261 var ii: TSprite;
   262     fi: THWFont;
   262     fi: THWFont;
   263     ai: TAmmoType;
   263     ai: TAmmoType;
   264     tmpsurf: PSDL_Surface;
   264     tmpsurf: PSDL_Surface;
   265     i: LongInt;
   265     i: LongInt;
       
   266 (* this is a workaround for http://bugzilla.libsdl.org/show_bug.cgi?id=868 remove this when it's fixed in upstream *)
   266 {$IFDEF DARWIN}
   267 {$IFDEF DARWIN}
   267 tmpP: PLongWordArray;
   268 tmpP: PLongWordArray;
   268 tmpA, tmpR, tmpG, tmpB: LongWord;
   269 tmpA, tmpR, tmpG, tmpB: LongWord;
   269 {$ENDIF}
   270 {$ENDIF}
   270 begin
   271 begin
   348 				else
   349 				else
   349 					begin
   350 					begin
   350 					Texture:= Surface2Tex(tmpsurf, false);
   351 					Texture:= Surface2Tex(tmpsurf, false);
   351 					if (ii = sprWater) and not cReducedQuality then // HACK: We should include some sprite attribute to define the texture wrap directions
   352 					if (ii = sprWater) and not cReducedQuality then // HACK: We should include some sprite attribute to define the texture wrap directions
   352 						begin
   353 						begin
       
   354 					(*	REMOVE ME WHEN BUG ABOVE IS FIXED
   353 						tmpP := tmpsurf^.pixels; 
   355 						tmpP := tmpsurf^.pixels; 
   354 					(*	REMOVE ME WHEN BUG ABOVE IS FIXED
       
   355 						for i:= 0 to (tmpsurf^.pitch shr 2) * tmpsurf^.h - 1 do
   356 						for i:= 0 to (tmpsurf^.pitch shr 2) * tmpsurf^.h - 1 do
   356 						begin
   357 						begin
   357 							tmpA:= tmpP^[i] shr 24 and $FF;
   358 							tmpA:= tmpP^[i] shr 24 and $FF;
   358 							tmpR:= tmpP^[i] shr 16 and $FF;
   359 							tmpR:= tmpP^[i] shr 16 and $FF;
   359 							tmpG:= tmpP^[i] shr 8 and $FF;
   360 							tmpG:= tmpP^[i] shr 8 and $FF;