hedgewars/uStore.pas
changeset 30 794e98e11b66
parent 4 bcbd7adb4e4b
child 35 9367f246fb5f
--- a/hedgewars/uStore.pas	Fri Dec 23 23:14:31 2005 +0000
+++ b/hedgewars/uStore.pas	Tue Dec 27 10:19:21 2005 +0000
@@ -539,7 +539,7 @@
 end;
 
 procedure RenderHealth(var Hedgehog: THedgehog);
-var s: string;
+var s: string[15];
 begin
 str(Hedgehog.Gear.Health, s);
 Hedgehog.HealthRect:= WriteInRoundRect(TempSurface, Hedgehog.HealthRect.x, Hedgehog.HealthRect.y, Hedgehog.Team.Color, fnt16, s);
@@ -584,10 +584,16 @@
 end;
 
 function  LoadImage(filename: string): PSDL_Surface;
+var tmpsurf: PSDL_Surface;
 begin
 WriteToConsole(msgLoading + filename + '... ');
-Result:= IMG_Load(PChar(filename));
-TryDo(Result <> nil, msgFailed, true);
+tmpsurf:= IMG_Load(PChar(filename));
+TryDo(tmpsurf <> nil, msgFailed, true);
+if cFullScreen then
+   begin
+   Result:= SDL_DisplayFormat(tmpsurf);
+   SDL_FreeSurface(tmpsurf);
+   end else Result:= tmpsurf;
 WriteLnToConsole(msgOK)
 end;