corrade-http-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 2  →  ?path2? @ 12
/renderAvatarsMap/generateTerrainHeightMap.php
@@ -13,49 +13,14 @@
## CONFIGURATION ##
###########################################################################
 
// The configuration file for this script containing the settings.
include_once("config.php");
# The configuration file for this script containing the settings.
require_once("config.php");
require_once('functions.php');
 
###########################################################################
## INTERNALS ##
###########################################################################
 
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function wasKeyValueGet($key, $data) {
return array_reduce(
explode(
"&",
$data
),
function($o, $p) {
$x = explode("=", $p);
return array_shift($x) != $o ? $o : array_shift($x);
},
$key
);
}
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function mapValueToRange($value, $xMin, $xMax, $yMin, $yMax) {
return $yMin + (
(
$yMax - $yMin
)
*
(
$value - $xMin
)
/
(
$xMax - $xMin
)
);
}
 
####
# I. Get the terrain height.
$params = array(