hedgewars/uStore.pas
branchhedgeroid
changeset 6224 42b256eca362
parent 6025 cac1d5601d7c
parent 6089 adc69bbb24e5
child 6328 d14adf1c7721
equal deleted inserted replaced
6055:88cfcd9161d3 6224:42b256eca362
   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}
       
   979         if ico <> nil then
   969         if ico <> nil then
   980             begin
   970             begin
   981             SDL_WM_SetIcon(ico, 0);
   971             SDL_WM_SetIcon(ico, 0);
   982             SDL_FreeSurface(ico)
   972             SDL_FreeSurface(ico)
   983             end;
   973             end;
       
   974 {$ENDIF}
   984         end
   975         end
   985     else
   976     else
   986         begin
   977         begin
   987         SetScale(cDefaultZoomLevel);
   978         SetScale(cDefaultZoomLevel);
   988 {$IF DEFINED(DARWIN) OR DEFINED(WIN32)}
   979 {$IF DEFINED(DARWIN) OR DEFINED(WIN32)}