hedgewars/uLand.pas
changeset 760 23aaafa40b4e
parent 758 bebfae2063b3
child 766 cdc8f75ab7bc
equal deleted inserted replaced
759:8da05b316d81 760:23aaafa40b4e
   311             end;
   311             end;
   312       inc(r.y, tmpsurf^.h)
   312       inc(r.y, tmpsurf^.h)
   313       end;
   313       end;
   314 SDL_FreeSurface(tmpsurf);
   314 SDL_FreeSurface(tmpsurf);
   315 
   315 
       
   316 
   316 tmpsurf:= SDL_CreateRGBSurfaceFrom(@Land, 2048, 1024, 32, 2048*4, RMask, GMask, BMask, 0);
   317 tmpsurf:= SDL_CreateRGBSurfaceFrom(@Land, 2048, 1024, 32, 2048*4, RMask, GMask, BMask, 0);
   317 SDLTry(tmpsurf <> nil, true);
   318 SDLTry(tmpsurf <> nil, true);
   318 //SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, SDL_MapRGB(tmpsurf^.format, $FF, $FF, $FF));
   319 SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, SDL_MapRGB(tmpsurf^.format, $FF, $FF, $FF));
   319 SDL_UpperBlit(tmpsurf, nil, Surface, nil);
   320 SDL_UpperBlit(tmpsurf, nil, Surface, nil);
   320 SDL_FreeSurface(tmpsurf)
   321 SDL_FreeSurface(tmpsurf)
   321 end;
   322 end;
   322 
   323 
   323 procedure AddBorder(Surface: PSDL_Surface);
   324 procedure AddBorder(Surface: PSDL_Surface);
   525 LandSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, 2048, 1024, 32, RMask, GMask, BMask, AMask);
   526 LandSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, 2048, 1024, 32, RMask, GMask, BMask, AMask);
   526 
   527 
   527 TryDo(LandSurface <> nil, 'Error creating land surface', true);
   528 TryDo(LandSurface <> nil, 'Error creating land surface', true);
   528 SDL_FillRect(LandSurface, nil, 0);
   529 SDL_FillRect(LandSurface, nil, 0);
   529 AddProgress;
   530 AddProgress;
   530 
       
   531 SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, 0);
   531 SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, 0);
   532 AddObjects(tmpsurf, LandSurface);
   532 AddObjects(tmpsurf, LandSurface);
   533 SDL_FreeSurface(tmpsurf);
   533 SDL_FreeSurface(tmpsurf);
   534 
   534 
   535 LandTexture:= Surface2Tex(LandSurface);
   535 LandTexture:= Surface2Tex(LandSurface);