hedgewars/uLand.pas
changeset 11006 cb06b7985261
parent 10717 0810826cdf80
child 11019 67ef02300508
equal deleted inserted replaced
11005:71927bdb776a 11006:cb06b7985261
   370 
   370 
   371 tmpsurf:= LoadDataImage(ptForts, ClansArray[0]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
   371 tmpsurf:= LoadDataImage(ptForts, ClansArray[0]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
   372 BlitImageAndGenerateCollisionInfo(leftX+150, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf);
   372 BlitImageAndGenerateCollisionInfo(leftX+150, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf);
   373 SDL_FreeSurface(tmpsurf);
   373 SDL_FreeSurface(tmpsurf);
   374 
   374 
   375 tmpsurf:= LoadDataImage(ptForts, ClansArray[1]^.Teams[0]^.FortName + 'R', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
   375 // not critical because if no R we can fallback to mirrored L
   376 BlitImageAndGenerateCollisionInfo(rightX - 150 - tmpsurf^.w, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf);
   376 tmpsurf:= LoadDataImage(ptForts, ClansArray[1]^.Teams[0]^.FortName + 'R', ifAlpha or ifTransparent or ifIgnoreCaps);
       
   377 // fallback
       
   378 if tmpsurf = nil then
       
   379     begin
       
   380     tmpsurf:= LoadDataImage(ptForts, ClansArray[1]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
       
   381     BlitImageAndGenerateCollisionInfo(rightX - 150 - tmpsurf^.w, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf, 0, true);
       
   382     end
       
   383 else
       
   384     BlitImageAndGenerateCollisionInfo(rightX - 150 - tmpsurf^.w, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf);
   377 SDL_FreeSurface(tmpsurf);
   385 SDL_FreeSurface(tmpsurf);
   378 end;
   386 end;
   379 
   387 
   380 procedure LoadMapConfig;
   388 procedure LoadMapConfig;
   381 var f: PFSFile;
   389 var f: PFSFile;