hedgewars/uStore.pas
changeset 5215 d4c529624460
parent 5187 b01ab1ef01fb
child 5238 46ddaf14509d
equal deleted inserted replaced
5214:d2ad737891b0 5215:d4c529624460
   271 LoadGraves;
   271 LoadGraves;
   272 
   272 
   273 AddProgress;
   273 AddProgress;
   274 for ii:= Low(TSprite) to High(TSprite) do
   274 for ii:= Low(TSprite) to High(TSprite) do
   275     with SpritesData[ii] do
   275     with SpritesData[ii] do
   276         // FIXME - add a sprite attribute
   276         // FIXME - add a sprite attribute to match on rq flags?
   277         if ((cReducedQuality and rqNoBackground) = 0) or // FIXME: should check for both rqNoBackground and rqKillFlakes
   277         if (((cReducedQuality and (rqNoBackground or rqLowRes)) = 0) or   // why rqLowRes?
   278             (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR, sprFlake, sprSplash, sprDroplet, sprSDSplash, sprSDDroplet]) or
   278                 (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]))) and
   279             (((Theme = 'Snow') or (Theme = 'Christmas')) and ((ii = sprFlake) or (ii = sprSDFlake)))) then // FIXME: hack; also should checked against rqLowRes
   279            (((cReducedQuality and rqPlainSplash) = 0) or ((not (ii in [sprSplash, sprDroplet, sprSDSplash, sprSDDroplet])))) and
       
   280            (((cReducedQuality and rqKillFlakes) = 0) or (Theme = 'Snow') or (Theme = 'Christmas') or ((not (ii in [sprFlake, sprSDFlake])))) then
   280         begin
   281         begin
   281             if AltPath = ptNone then
   282             if AltPath = ptNone then
   282                 if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack
   283                 if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack
   283                     tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent)
   284                     tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent)
   284                 else
   285                 else
   545     AddFileLog('  |----- Vendor: ' + shortstring(pchar(glGetString(GL_VENDOR))));
   546     AddFileLog('  |----- Vendor: ' + shortstring(pchar(glGetString(GL_VENDOR))));
   546     AddFileLog('  |----- Version: ' + shortstring(pchar(glGetString(GL_VERSION))));
   547     AddFileLog('  |----- Version: ' + shortstring(pchar(glGetString(GL_VERSION))));
   547     AddFileLog('  \----- GL_MAX_TEXTURE_SIZE: ' + inttostr(MaxTextureSize));
   548     AddFileLog('  \----- GL_MAX_TEXTURE_SIZE: ' + inttostr(MaxTextureSize));
   548 
   549 
   549     if MaxTextureSize <= 0 then
   550     if MaxTextureSize <= 0 then
   550     begin
   551         begin
   551         MaxTextureSize:= 1024;
   552         MaxTextureSize:= 1024;
   552         AddFileLog('OpenGL Warning - driver didn''t provide any valid max texture size; assuming 1024');
   553         AddFileLog('OpenGL Warning - driver didn''t provide any valid max texture size; assuming 1024');
   553     end;
   554         end
       
   555     else if (MaxTextureSize < 1024) and (MaxTextureSize >= 512) then
       
   556         begin
       
   557         cReducedQuality := cReducedQuality or rqNoBackground;  
       
   558         AddFileLog('Texture size too small for backgrounds, disabling.');
       
   559         end;
   554 
   560 
   555 {$IFDEF IPHONEOS}
   561 {$IFDEF IPHONEOS}
   556     cGPUVendor:= gvApple;
   562     cGPUVendor:= gvApple;
   557 {$ELSE}
   563 {$ELSE}
   558     if StrPos(Str2PChar(vendor), Str2PChar('nvidia')) <> nil then
   564     if StrPos(Str2PChar(vendor), Str2PChar('nvidia')) <> nil then