Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/rmgen/library.js
Show All 15 Lines | |||||
* Useful to transform footprint sizes of templates to the coordinate system used by getMapSize. | * Useful to transform footprint sizes of templates to the coordinate system used by getMapSize. | ||||
*/ | */ | ||||
const TERRAIN_TILE_SIZE = RMS.GetTerrainTileSize(); | const TERRAIN_TILE_SIZE = RMS.GetTerrainTileSize(); | ||||
const MAX_HEIGHT = MAX_HEIGHT_RANGE - SEA_LEVEL; | const MAX_HEIGHT = MAX_HEIGHT_RANGE - SEA_LEVEL; | ||||
// Default angle for buildings | // Default angle for buildings | ||||
const BUILDING_ORIENTATION = - PI / 4; | const BUILDING_ORIENTATION = - PI / 4; | ||||
const g_CivData = deepfreeze(loadCivFiles(RMS, false)); | |||||
function fractionToTiles(f) | function fractionToTiles(f) | ||||
{ | { | ||||
return g_Map.size * f; | return g_Map.size * f; | ||||
} | } | ||||
function tilesToFraction(t) | function tilesToFraction(t) | ||||
{ | { | ||||
return t / g_Map.size; | return t / g_Map.size; | ||||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator