hedgewars/uLand.pas
changeset 955 474afaab0365
parent 883 07a568ba44e0
child 1066 1f1b3686a2b0
equal deleted inserted replaced
954:0cc31e998f4e 955:474afaab0365
   540 
   540 
   541 procedure MakeFortsMap;
   541 procedure MakeFortsMap;
   542 var tmpsurf: PSDL_Surface;
   542 var tmpsurf: PSDL_Surface;
   543 begin
   543 begin
   544 WriteLnToConsole('Generating forts land...');
   544 WriteLnToConsole('Generating forts land...');
   545 TryDo(TeamsCount = 2, 'More or less than 2 teams on map in forts mode!', true);
   545 TryDo(ClansCount = 2, 'More or less than 2 clans on map in forts mode!', true);
   546 
   546 
   547 LandSurface:= SDL_CreateRGBSurface(SDL_HWSURFACE, 2048, 1024, 32, RMask, GMask, BMask, AMask);
   547 LandSurface:= SDL_CreateRGBSurface(SDL_HWSURFACE, 2048, 1024, 32, RMask, GMask, BMask, AMask);
   548 
   548 
   549 SDL_FillRect(LandSurface, nil, 0);
   549 SDL_FillRect(LandSurface, nil, 0);
   550 
   550 
   551 tmpsurf:= LoadImage(Pathz[ptForts] + '/' + TeamsArray[0]^.FortName + 'L', false, true, true);
   551 tmpsurf:= LoadImage(Pathz[ptForts] + '/' + ClansArray[0]^.Teams[0]^.FortName + 'L', false, true, true);
   552 BlitImageAndGenerateCollisionInfo(0, 0, tmpsurf, LandSurface);
   552 BlitImageAndGenerateCollisionInfo(0, 0, tmpsurf, LandSurface);
   553 SDL_FreeSurface(tmpsurf);
   553 SDL_FreeSurface(tmpsurf);
   554 
   554 
   555 tmpsurf:= LoadImage(Pathz[ptForts] + '/' + TeamsArray[1]^.FortName + 'R', false, true, true);
   555 tmpsurf:= LoadImage(Pathz[ptForts] + '/' + ClansArray[0]^.Teams[0]^.FortName + 'R', false, true, true);
   556 BlitImageAndGenerateCollisionInfo(1024, 0, tmpsurf, LandSurface);
   556 BlitImageAndGenerateCollisionInfo(1024, 0, tmpsurf, LandSurface);
   557 SDL_FreeSurface(tmpsurf);
   557 SDL_FreeSurface(tmpsurf);
   558 
   558 
   559 UpdateLandTexture(0, 1024)
   559 UpdateLandTexture(0, 1024)
   560 end;
   560 end;