hedgewars/uStore.pas
changeset 6072 e3dc802965d6
parent 6021 652a199d4f38
child 6089 adc69bbb24e5
equal deleted inserted replaced
6071:212e5a5eadeb 6072:e3dc802965d6
   397     CountTexz[i]:= Surface2Tex(tmpsurf, false);
   397     CountTexz[i]:= Surface2Tex(tmpsurf, false);
   398     SDL_FreeSurface(tmpsurf)
   398     SDL_FreeSurface(tmpsurf)
   399 end;
   399 end;
   400 
   400 
   401 AddProgress;
   401 AddProgress;
   402 
       
   403 {$IFDEF SDL_IMAGE_NEWER}
       
   404 IMG_Quit();
   402 IMG_Quit();
   405 {$ENDIF}
       
   406 end;
   403 end;
   407 
   404 
   408 procedure StoreRelease(reload: boolean);
   405 procedure StoreRelease(reload: boolean);
   409 var ii: TSprite;
   406 var ii: TSprite;
   410     ai: TAmmoType;
   407     ai: TAmmoType;
   947 WeaponTooltipTex:= nil
   944 WeaponTooltipTex:= nil
   948 end;
   945 end;
   949 
   946 
   950 procedure chFullScr(var s: shortstring);
   947 procedure chFullScr(var s: shortstring);
   951 var flags: Longword = 0;
   948 var flags: Longword = 0;
   952     {$IFNDEF IPHONEOS}ico: PSDL_Surface;{$ENDIF}
   949     reinit: boolean = false;
   953     reinit: boolean;
   950     {$IFNDEF DARWIN}ico: PSDL_Surface;{$ENDIF}
   954     {$IFDEF SDL13}x, y: LongInt;{$ENDIF}
   951     {$IFDEF SDL13}x, y: LongInt;{$ENDIF}
   955 begin
   952 begin
   956     if Length(s) = 0 then cFullScreen:= not cFullScreen
   953     if Length(s) = 0 then cFullScreen:= not cFullScreen
   957     else cFullScreen:= s = '1';
   954     else cFullScreen:= s = '1';
   958 
   955 
   959     AddFileLog('Preparing to change video parameters...');
   956     AddFileLog('Preparing to change video parameters...');
   960     reinit:= false;
       
   961 {$IFNDEF IPHONEOS}
   957 {$IFNDEF IPHONEOS}
   962     if SDLPrimSurface = nil then
   958     if SDLPrimSurface = nil then
   963         begin
   959         begin
   964         // set window title
   960         // set window title
   965         SDL_WM_SetCaption('Hedgewars', nil);
   961         SDL_WM_SetCaption('Hedgewars', nil);
   966 {$IFDEF SDL_IMAGE_NEWER}
       
   967         WriteToConsole('Init SDL_image... ');
   962         WriteToConsole('Init SDL_image... ');
   968         SDLTry(IMG_Init(IMG_INIT_PNG) <> 0, true);
   963         SDLTry(IMG_Init(IMG_INIT_PNG) <> 0, true);
   969         WriteLnToConsole(msgOK);
   964         WriteLnToConsole(msgOK);
   970 {$ENDIF}
       
   971         // load engine icon
   965         // load engine icon
   972 {$IFDEF DARWIN}
   966 {$IFNDEF DARWIN}
   973         ico:= LoadImage(UserPathz[ptGraphics] + '/hwengine_mac', ifIgnoreCaps);
       
   974         if ico = nil then ico:= LoadImage(Pathz[ptGraphics] + '/hwengine_mac', ifIgnoreCaps);
       
   975 {$ELSE}
       
   976         ico:= LoadImage(UserPathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
   967         ico:= LoadImage(UserPathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
   977         if ico = nil then ico:= LoadImage(Pathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
   968         if ico = nil then ico:= LoadImage(Pathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
   978 {$ENDIF}
   969 {$ENDIF}
   979         if ico <> nil then
   970         if ico <> nil then
   980             begin
   971             begin