forked from mirrors/0ad
Delete InitMap and ExportMap proxies and let the random map define the RandomMap object, refs #4804.
Eventually there should be no direct reference to g_Map in the library, refs #4964. This was SVN commit r20995.
This commit is contained in:
@@ -52,7 +52,7 @@ const heightShore = 1;
|
||||
const heightLand = 2;
|
||||
const heightIsland = 6;
|
||||
|
||||
InitMap(heightShore, tHill);
|
||||
var g_Map = new RandomMap(heightShore, tHill);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -306,4 +306,4 @@ setPPContrast(0.62);
|
||||
setPPSaturation(0.51);
|
||||
setPPBloom(0.12);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -41,7 +41,7 @@ var heightSeaGround = -5;
|
||||
var heightLand = 2;
|
||||
var heightCliff = 3;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -283,4 +283,4 @@ setWaterMurkiness(5.92);
|
||||
setWaterWaviness(0);
|
||||
setWaterType("clap");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -83,7 +83,7 @@ const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
var heightSeaGround = -5;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -266,4 +266,4 @@ setWaterMurkiness(0.82);
|
||||
setWaterWaviness(3.0);
|
||||
setWaterType("clap");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -283,7 +283,7 @@ var heightMountain = 30;
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -539,4 +539,4 @@ setWaterMurkiness(0.72);
|
||||
setWaterWaviness(2.0);
|
||||
setWaterType("lake");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -6,7 +6,7 @@ setSelectedBiome();
|
||||
|
||||
var heightLand = 2;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -207,4 +207,4 @@ placePlayersNomad(
|
||||
g_TileClasses.mountain, 4,
|
||||
g_TileClasses.animals, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -32,7 +32,7 @@ const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPoplar, tForestFloor];
|
||||
var heightLand = 1;
|
||||
var heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
|
||||
@@ -245,4 +245,4 @@ setPPSaturation(0.45);
|
||||
setPPContrast(0.62);
|
||||
setPPBloom(0.2);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -47,7 +47,7 @@ var heightSeaGround = -5;
|
||||
var heightLand = 3;
|
||||
var heightShore = 1;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -264,4 +264,4 @@ placePlayersNomad(
|
||||
setWaterWaviness(4.0);
|
||||
setWaterType("ocean");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -42,7 +42,7 @@ const pForest = [tForestFloor + TERRAIN_SEPARATOR + oBush, tForestFloor + TERRAI
|
||||
var heightSeaGround = -5;
|
||||
var heightLand = 2;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -322,4 +322,4 @@ setWaterMurkiness(0.92);
|
||||
setWaterWaviness(1);
|
||||
setWaterType("clap");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -53,7 +53,7 @@ const heightRavineHill = 40;
|
||||
const heightHill = 50;
|
||||
const heightOffsetRavine = 10;
|
||||
|
||||
InitMap(heightHill, tPrimary);
|
||||
var g_Map = new RandomMap(heightHill, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -459,4 +459,4 @@ placePlayersNomad(clPlayer, avoidClasses(clForest, 1, clMetal, 4, clRock, 4, clH
|
||||
setTerrainAmbientColor(0.44,0.51,0.56);
|
||||
setUnitsAmbientColor(0.44,0.51,0.56);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -37,7 +37,7 @@ const pForest2 = [tForestFloor + TERRAIN_SEPARATOR + oAleppoPine, tForestFloor];
|
||||
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -220,4 +220,4 @@ setPPContrast(0.45);
|
||||
setPPSaturation(0.56);
|
||||
setPPBloom(0.1);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -6,7 +6,7 @@ const tPrimary = ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_d",
|
||||
|
||||
const heightLand = 0;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -410,4 +410,4 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -49,7 +49,7 @@ const heightHill = 15;
|
||||
const heightOffsetBump1 = 2;
|
||||
const heightOffsetBump2 = 1;
|
||||
|
||||
InitMap(heightLand, tShoreBlend);
|
||||
var g_Map = new RandomMap(heightLand, tShoreBlend);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -394,4 +394,4 @@ setPPEffect("hdr");
|
||||
setPPSaturation(0.44);
|
||||
setPPBloom(0.3);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -2,7 +2,7 @@ Engine.LoadLibrary("rmgen");
|
||||
Engine.LoadLibrary("rmbiome");
|
||||
Engine.LoadLibrary("heightmap");
|
||||
|
||||
InitMap(0, "whiteness");
|
||||
var g_Map = new RandomMap(0, "whiteness");
|
||||
|
||||
/**
|
||||
* Drags a path to a target height smoothing it at the edges and return some points along the path.
|
||||
@@ -444,4 +444,4 @@ for (let i = 0; i < resourceSpots.length; ++i)
|
||||
placeCamp(resourceSpots[i]);
|
||||
}
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -46,7 +46,7 @@ const heightSeaGround = -7;
|
||||
const heightLand = 3;
|
||||
const heightHill = 20;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -279,4 +279,4 @@ setPPSaturation(0.62);
|
||||
setPPContrast(0.62);
|
||||
setPPBloom(0.3);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -43,7 +43,7 @@ const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TE
|
||||
const heightLand = 3;
|
||||
const heightHill = 30;
|
||||
|
||||
InitMap(heightHill, tMainTerrain);
|
||||
var g_Map = new RandomMap(heightHill, tMainTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -344,4 +344,4 @@ placePlayersNomad(
|
||||
clPlayer,
|
||||
[stayClasses(clLand, 4), avoidClasses(clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clHill2, 4, clFood, 2)]);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -43,7 +43,7 @@ const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TE
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -253,4 +253,4 @@ placePlayersNomad(
|
||||
setWaterWaviness(1.0);
|
||||
setWaterType("ocean");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -44,7 +44,7 @@ const pForest = [tForestFloor, tForestFloor + TERRAIN_SEPARATOR + oCarob, tFores
|
||||
var heightSeaGround = -4;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tHill);
|
||||
var g_Map = new RandomMap(heightLand, tHill);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -265,4 +265,4 @@ setPPContrast(0.62);
|
||||
setPPSaturation(0.51);
|
||||
setPPBloom(0.12);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -49,7 +49,7 @@ var heightOffsetLevel2 = 8;
|
||||
var heightOffsetBumps = 2;
|
||||
var heightOffsetAntiBumps = -5;
|
||||
|
||||
InitMap(heightSeaGround, tVeryDeepWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tVeryDeepWater);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -516,4 +516,4 @@ setWaterMurkiness(0.72);
|
||||
setWaterWaviness(2.0);
|
||||
setWaterType("ocean");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -47,7 +47,7 @@ const heightLand = 3;
|
||||
const heightHill = 12;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -359,4 +359,4 @@ setWaterMurkiness(0.72);
|
||||
setWaterWaviness(3.0);
|
||||
setWaterType("ocean");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -125,7 +125,7 @@ const heightLand = 3;
|
||||
const heightPath = 5;
|
||||
const heightIsland = 6;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -811,4 +811,4 @@ setWaterType("lake");
|
||||
setWaterMurkiness(0.97);
|
||||
setWaterHeight(21);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -27,7 +27,7 @@ var heightPath = -2;
|
||||
var heightLand = 0;
|
||||
var heightOffsetRandomPath = 1;
|
||||
|
||||
InitMap(heightLand, terrainPrimary);
|
||||
var g_Map = new RandomMap(heightLand, terrainPrimary);
|
||||
|
||||
var mapSize = getMapSize();
|
||||
var mapRadius = mapSize/2;
|
||||
@@ -199,4 +199,4 @@ Engine.SetProgress(95);
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clForest, 1, clBaseResource, 4));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -4,7 +4,7 @@ Engine.LoadLibrary("rmbiome");
|
||||
|
||||
setSelectedBiome();
|
||||
|
||||
InitMap(2, g_Terrains.mainTerrain);
|
||||
var g_Map = new RandomMap(2, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -230,4 +230,4 @@ placePlayersNomad(
|
||||
g_TileClasses.mountain, 4,
|
||||
g_TileClasses.animals, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -43,7 +43,7 @@ var heightSeaGround = -4;
|
||||
var heightShore = 1;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightShore, tPrimary);
|
||||
var g_Map = new RandomMap(heightShore, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -263,4 +263,4 @@ setPPBloom(0.37);
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clWater, 4, clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -55,7 +55,7 @@ var heightLand = 1;
|
||||
var heightHill = 18;
|
||||
var heightPlayerHill = 25;
|
||||
|
||||
InitMap(heightLand, tHillMedium1);
|
||||
var g_Map = new RandomMap(heightLand, tHillMedium1);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapCenter = getMapCenter();
|
||||
@@ -462,4 +462,4 @@ setWaterMurkiness(0.9);
|
||||
|
||||
setPPEffect("hdr");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -50,7 +50,7 @@ const heightSeaGround = -2;
|
||||
const heightLand = 2;
|
||||
const shoreRadius = 6;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const clPlayer = createTileClass();
|
||||
const clHill = createTileClass();
|
||||
@@ -300,4 +300,4 @@ placePlayersNomad(
|
||||
setSkySet(pickRandom(["cloudless", "cumulus", "overcast"]));
|
||||
setWaterMurkiness(0.4);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -43,7 +43,7 @@ const pForestP = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
var heightSeaGround = -4;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tGrass);
|
||||
var g_Map = new RandomMap(heightLand, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -305,4 +305,4 @@ setPPContrast(0.56);
|
||||
setPPBloom(0.38);
|
||||
setPPEffect("hdr");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -9,7 +9,7 @@ var randElevation = randIntInclusive(0, 29);
|
||||
if (randElevation < 25)
|
||||
randElevation = randIntInclusive(1, 4);
|
||||
|
||||
InitMap(randElevation, g_Terrains.mainTerrain);
|
||||
var g_Map = new RandomMap(randElevation, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
createArea(
|
||||
@@ -278,4 +278,4 @@ placePlayersNomad(
|
||||
g_TileClasses.plateau, 4,
|
||||
g_TileClasses.animals, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -48,7 +48,7 @@ var heightLand = 3;
|
||||
var heightRing = 4;
|
||||
var heightHill = 20;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -309,4 +309,4 @@ createStragglerTrees(
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clWater, 4, clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -40,7 +40,7 @@ var heightShallow = -1.5;
|
||||
var heightShore = 2;
|
||||
var heightLand = 3;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -282,4 +282,4 @@ setPPContrast(0.62);
|
||||
setPPSaturation(0.51);
|
||||
setPPBloom(0.12);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -136,7 +136,7 @@ else if (biome == "frozen_lake")
|
||||
|
||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor];
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -333,4 +333,4 @@ setWaterWaviness(5.0);
|
||||
setWaterType("lake");
|
||||
setWaterMurkiness(0.88);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -8,7 +8,7 @@ var heightSeaGround = -18;
|
||||
var heightLand = 2;
|
||||
var heightOffsetHarbor = -11;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -289,7 +289,7 @@ placePlayersNomad(
|
||||
g_TileClasses.mountain, 4,
|
||||
g_TileClasses.animals, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
function addCenterLake()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ setSelectedBiome();
|
||||
const heightLand = 1;
|
||||
const heightBarrier = 30;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -244,7 +244,7 @@ placePlayersNomad(
|
||||
g_TileClasses.mountain, 4,
|
||||
g_TileClasses.animals, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
function placeBarriers()
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ const heightLand = 1;
|
||||
const heightOffsetBump = 4;
|
||||
const heightHill = 15;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const mapCenter = getMapCenter();
|
||||
const mapBounds = getMapBounds();
|
||||
@@ -340,4 +340,4 @@ setWaterWaviness(2.0);
|
||||
setWaterType("ocean");
|
||||
setWaterMurkiness(0.83);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -27,7 +27,7 @@ const heightLand = 1;
|
||||
const heightShore = 3;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tGrass1);
|
||||
var g_Map = new RandomMap(heightLand, tGrass1);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -268,4 +268,4 @@ setPPEffect("hdr");
|
||||
setPPContrast(0.57031);
|
||||
setPPBloom(0.34);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -49,7 +49,7 @@ const heightSeaGround = -10;
|
||||
const heightLand = 3;
|
||||
const heightHill = 18;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -406,4 +406,4 @@ setWaterWaviness(2);
|
||||
|
||||
Engine.SetProgress(100);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -49,7 +49,7 @@ const heightLand = 3;
|
||||
const heightOffsetBump = 2;
|
||||
const heightHill = 18;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -361,4 +361,4 @@ setSunRotation(randomAngle());
|
||||
setSunElevation(randFloat(1/5, 1/3) * Math.PI);
|
||||
setWaterWaviness(2);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -36,7 +36,7 @@ const heightSeaGround = -5;
|
||||
const heightLand = 3;
|
||||
const heightHill = 25;
|
||||
|
||||
InitMap(heightLand, tGrass);
|
||||
var g_Map = new RandomMap(heightLand, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -333,4 +333,4 @@ setPPSaturation(0.65);
|
||||
setPPBloom(0.6);
|
||||
|
||||
setSkySet("cirrus");
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -43,7 +43,7 @@ const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TE
|
||||
const heightSeaGround = -3;
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -249,4 +249,4 @@ placePlayersNomad(clPlayer, avoidClasses(clWater, 4, clHill, 2, clForest, 1, clM
|
||||
setWaterWaviness(4.0);
|
||||
setWaterType("lake");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -54,7 +54,7 @@ const heightLand = 0;
|
||||
const heightPlayer = 5;
|
||||
const heightHill = 12;
|
||||
|
||||
InitMap(heightLand, tGrass);
|
||||
var g_Map = new RandomMap(heightLand, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -477,4 +477,4 @@ setWaterWaviness(2.5);
|
||||
setWaterType("ocean");
|
||||
setWaterMurkiness(0.8);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -11,7 +11,7 @@ const heightPath = 10;
|
||||
const heightDen = 15;
|
||||
const heightHill = 50;
|
||||
|
||||
InitMap(heightHill, topTerrain);
|
||||
var g_Map = new RandomMap(heightHill, topTerrain);
|
||||
|
||||
const mapCenter = getMapCenter();
|
||||
const numPlayers = getNumPlayers();
|
||||
@@ -422,7 +422,7 @@ placePlayersNomad(
|
||||
g_TileClasses.animals, 2)
|
||||
]);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
function createSunkenTerrain()
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ const heightShallows = -2;
|
||||
const heightLand = 3;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -318,4 +318,4 @@ setWaterWaviness(3.0);
|
||||
setWaterType("lake");
|
||||
setWaterMurkiness(0.80);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -39,7 +39,7 @@ const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TE
|
||||
|
||||
const heightLand = 3;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -193,4 +193,4 @@ createStragglerTrees(
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -47,7 +47,7 @@ const heightLand = 3;
|
||||
const heightHill = 18;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -369,4 +369,4 @@ setWaterWaviness(2);
|
||||
|
||||
placePlayersNomad(clPlayer, [stayClasses(clIsland, 4), avoidClasses(clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2)]);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -45,7 +45,7 @@ const heightOffsetHill2 = 16;
|
||||
const heightOffsetHill3 = 16;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -355,4 +355,4 @@ setWaterType("clap");
|
||||
setWaterMurkiness(0.75);
|
||||
setWaterHeight(20);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
InitMap(0, "grass1_spring");
|
||||
var g_Map = new RandomMap(0, "grass1_spring");
|
||||
|
||||
placePlayerBases({
|
||||
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.39))
|
||||
@@ -8,4 +8,4 @@ placePlayerBases({
|
||||
|
||||
placePlayersNomad(createTileClass());
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -31,7 +31,7 @@ const heightLake = -4;
|
||||
const heightLand = 3;
|
||||
const heightHill = 25;
|
||||
|
||||
InitMap(heightLand, tSnowA);
|
||||
var g_Map = new RandomMap(heightLand, tSnowA);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -285,4 +285,4 @@ setPPSaturation(0.28);
|
||||
setPPEffect("hdr");
|
||||
|
||||
setSkySet("fog");
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -42,7 +42,7 @@ const heightOasisPath = 4;
|
||||
const heightOffsetBump = 4;
|
||||
const heightOffsetDune = 18;
|
||||
|
||||
InitMap(heightLand, tSand);
|
||||
var g_Map = new RandomMap(heightLand, tSand);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -338,4 +338,4 @@ setWaterMurkiness(0.5);
|
||||
setTerrainAmbientColor(0.45, 0.5, 0.6);
|
||||
setUnitsAmbientColor(0.501961, 0.501961, 0.501961);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -50,7 +50,7 @@ const pForestO = [tForestFloor + TERRAIN_SEPARATOR + oOak, tForestFloor + TERRAI
|
||||
const heightLand = 10;
|
||||
const heightOffsetValley = -10;
|
||||
|
||||
InitMap(heightLand, tDirtMain);
|
||||
var g_Map = new RandomMap(heightLand, tDirtMain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -326,4 +326,4 @@ setPPBloom(0.3);
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -46,7 +46,7 @@ const heightIsland = 6;
|
||||
const heightHill = 15;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tHill);
|
||||
var g_Map = new RandomMap(heightLand, tHill);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -329,4 +329,4 @@ setPPBloom(0.52);
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clWater, 4, clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -31,7 +31,7 @@ var heightSeaGround = -4;
|
||||
var heightLand = 2;
|
||||
var heightCliff = 3;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -286,4 +286,4 @@ setPPContrast(0.6);
|
||||
setPPSaturation(0.45);
|
||||
setPPBloom(0.4);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -68,7 +68,7 @@ const heightMountain = heightHighRocks + 20;
|
||||
const heightOffsetHill = 7;
|
||||
const heightOffsetHillRandom = 2;
|
||||
|
||||
InitMap(heightInit, tGrass);
|
||||
var g_Map = new RandomMap(heightInit, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -480,4 +480,4 @@ setWaterType("ocean");
|
||||
setWaterMurkiness(0.83);
|
||||
setWaterHeight(heightWaterLevel);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -39,7 +39,7 @@ const heightLand = 1;
|
||||
const heightOffsetBumpWater = 1;
|
||||
const heightOffsetBumpLand = 2;
|
||||
|
||||
InitMap(heightLand, tGrass);
|
||||
var g_Map = new RandomMap(heightLand, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
|
||||
@@ -305,4 +305,4 @@ setPPEffect("hdr");
|
||||
setPPSaturation(0.44);
|
||||
setPPBloom(0.3);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -43,7 +43,7 @@ const heightSeaGround = -8;
|
||||
const heightLand = 3;
|
||||
const heightHill = 25;
|
||||
|
||||
InitMap(heightSeaGround, tGrass);
|
||||
var g_Map = new RandomMap(heightSeaGround, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -497,4 +497,4 @@ setPPSaturation(0.65);
|
||||
setPPBloom(0.6);
|
||||
|
||||
setSkySet("stratus");
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -50,7 +50,7 @@ const heightSeaGround = -3;
|
||||
const heightShallows = -1;
|
||||
const heightLand = 1;
|
||||
|
||||
InitMap(heightLand, tMainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, tMainTerrain);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -286,4 +286,4 @@ placePlayersNomad(clPlayer, avoidClasses(clWater, 4, clForest, 1, clMetal, 4, cl
|
||||
setWaterWaviness(3.0);
|
||||
setWaterType("lake");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -31,21 +31,6 @@ const g_CivData = deepfreeze(loadCivFiles(false));
|
||||
*/
|
||||
var TILE_CENTERED_HEIGHT_MAP = false;
|
||||
|
||||
/**
|
||||
* Main RandomMap object.
|
||||
*/
|
||||
var g_Map;
|
||||
|
||||
function InitMap(baseHeight, baseTerrain)
|
||||
{
|
||||
g_Map = new RandomMap(baseHeight, baseTerrain);
|
||||
}
|
||||
|
||||
function ExportMap()
|
||||
{
|
||||
g_Map.ExportMap();
|
||||
}
|
||||
|
||||
function fractionToTiles(f)
|
||||
{
|
||||
return g_MapSettings.Size * f;
|
||||
|
||||
@@ -36,7 +36,7 @@ const pForest = [tLush + TERRAIN_SEPARATOR + oDatePalm, tLush + TERRAIN_SEPARATO
|
||||
const heightLand = 1;
|
||||
const heightOffsetOasis = -3;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -237,4 +237,4 @@ setWaterWaviness(1.0);
|
||||
setWaterType("clap");
|
||||
setWaterMurkiness(0.5);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -30,7 +30,7 @@ const aRock = "actor|geology/stone_savanna_med.xml";
|
||||
const heightSeaGround = -5;
|
||||
const heightLand = 1;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -238,4 +238,4 @@ setPPEffect("hdr");
|
||||
setPPContrast(0.57031);
|
||||
setPPBloom(0.34);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -41,7 +41,7 @@ const heightLand = 3;
|
||||
const heightHill = 35;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tGrass);
|
||||
var g_Map = new RandomMap(heightLand, tGrass);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -388,4 +388,4 @@ setWaterMurkiness(0.87);
|
||||
setWaterWaviness(0.5);
|
||||
setWaterType("clap");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -66,7 +66,7 @@ var tWaterBorder = ['dirt_brown_d'];
|
||||
const heightLand = 1;
|
||||
const heightOffsetPath = -0.1;
|
||||
|
||||
InitMap(heightLand, terrainPrimary);
|
||||
var g_Map = new RandomMap(heightLand, terrainPrimary);
|
||||
|
||||
var clPlayer = createTileClass();
|
||||
var clPath = createTileClass();
|
||||
@@ -317,4 +317,4 @@ placePlayersNomad(clPlayer, avoidClasses(clWater, 4, clForest, 1, clFood, 2, clM
|
||||
|
||||
Engine.SetProgress(100);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -41,7 +41,7 @@ const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TE
|
||||
const heightIsland = 20;
|
||||
const heightSeaGround = -5;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
@@ -437,4 +437,4 @@ setSkySet(pickRandom(["cirrus", "cumulus", "sunny"]));
|
||||
setSunRotation(randomAngle());
|
||||
setSunElevation(Math.PI * randFloat(1/5, 1/3));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -6,7 +6,7 @@ setSelectedBiome();
|
||||
|
||||
const heightLand = 30;
|
||||
|
||||
InitMap(heightLand, g_Terrains.mainTerrain);
|
||||
var g_Map = new RandomMap(heightLand, g_Terrains.mainTerrain);
|
||||
|
||||
initTileClasses();
|
||||
|
||||
@@ -256,4 +256,4 @@ placePlayersNomad(
|
||||
g_TileClasses.mountain, 4,
|
||||
g_TileClasses.animals, 2));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -42,7 +42,7 @@ const triggerPointTreasures = [
|
||||
const heightLand = 3;
|
||||
const heightHill = 30;
|
||||
|
||||
InitMap(heightHill, tMainTerrain);
|
||||
var g_Map = new RandomMap(heightHill, tMainTerrain);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapSize = getMapSize();
|
||||
@@ -200,4 +200,4 @@ createStragglerTrees(
|
||||
clForest,
|
||||
stragglerTrees);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -35,7 +35,7 @@ const heightLand = 1;
|
||||
const heightHill = 22;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tMainDirt);
|
||||
var g_Map = new RandomMap(heightLand, tMainDirt);
|
||||
|
||||
const mapCenter = getMapCenter();
|
||||
const numPlayers = getNumPlayers();
|
||||
@@ -274,4 +274,4 @@ setPPContrast(0.65);
|
||||
setPPSaturation(0.42);
|
||||
setPPBloom(0.6);
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -45,7 +45,7 @@ const heightPonds = -7;
|
||||
const heightSeaGround = -3;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightLand, tPrimary);
|
||||
var g_Map = new RandomMap(heightLand, tPrimary);
|
||||
|
||||
const mapSize = getMapSize();
|
||||
const mapCenter = getMapCenter();
|
||||
@@ -408,4 +408,4 @@ setWaterMurkiness(1);
|
||||
setWaterWaviness(3.0);
|
||||
setWaterType("lake");
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -56,7 +56,7 @@ const heightCliff = 3.12;
|
||||
const heightHill = 18;
|
||||
const heightOffsetBump = 2;
|
||||
|
||||
InitMap(heightSeaGround, tWater);
|
||||
var g_Map = new RandomMap(heightSeaGround, tWater);
|
||||
|
||||
const numPlayers = getNumPlayers();
|
||||
const mapSize = getMapSize();
|
||||
|
||||
@@ -6,4 +6,4 @@ g_AllowNaval = true;
|
||||
|
||||
createUnknownMap();
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -6,4 +6,4 @@ g_AllowNaval = false;
|
||||
|
||||
createUnknownMap();
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -25,7 +25,7 @@ var pForestP = [tGrassB + TERRAIN_SEPARATOR + oTree, tGrassB];
|
||||
const heightLand = 1;
|
||||
const heightHill = 18;
|
||||
|
||||
InitMap(heightLand, tGrassB);
|
||||
var g_Map = new RandomMap(heightLand, tGrassB);
|
||||
|
||||
var numPlayers = getNumPlayers();
|
||||
var mapCenter = getMapCenter();
|
||||
@@ -182,4 +182,4 @@ createStragglerTrees(
|
||||
|
||||
placePlayersNomad(clPlayer, avoidClasses(clForest, 1, clMetal, 4, clRock, 4, clHill, 4));
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Engine.LoadLibrary("rmgen");
|
||||
|
||||
InitMap(0, "grass1");
|
||||
var g_Map = new RandomMap(0, "grass1");
|
||||
|
||||
/**
|
||||
* Demonstration code for wall placement.
|
||||
@@ -327,4 +327,4 @@ for (let styleIndex in wallStyleList)
|
||||
placeLinearWall(startX, startY, endX, endY, wallPart, style, playerID);
|
||||
}
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
@@ -2,7 +2,7 @@ Engine.LoadLibrary("rmgen");
|
||||
Engine.LoadLibrary("rmbiome");
|
||||
Engine.LoadLibrary("heightmap");
|
||||
|
||||
InitMap(0, "whiteness");
|
||||
var g_Map = new RandomMap(0, "whiteness");
|
||||
|
||||
/**
|
||||
* getArray - To ensure a terrain texture is contained within an array
|
||||
@@ -634,4 +634,4 @@ for (let i = 0; i < resourceSpots.length; ++i)
|
||||
}
|
||||
}
|
||||
|
||||
ExportMap();
|
||||
g_Map.ExportMap();
|
||||
|
||||
Reference in New Issue
Block a user