Small cleanup.
This commit is contained in:
parent
857c57b8ae
commit
c70d3266fc
1 changed files with 2 additions and 12 deletions
|
|
@ -39,14 +39,12 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
|
||||||
var tileSize = 128;
|
var tileSize = 128;
|
||||||
var tileName;
|
var tileName;
|
||||||
var imgSize;
|
var imgSize;
|
||||||
var offset = {x: 0, y: 0};
|
|
||||||
|
|
||||||
var debugred;
|
var debugred;
|
||||||
var debugblue;
|
var debugblue;
|
||||||
|
|
||||||
if (zoom == 0) {
|
if (zoom == 0) {
|
||||||
// Most zoomed out tiles.
|
// Most zoomed out tiles.
|
||||||
|
|
||||||
tileSize = 128;
|
tileSize = 128;
|
||||||
imgSize = tileSize;
|
imgSize = tileSize;
|
||||||
tileName = 'z' + this.prefix + '_' + (-coord.x * tileSize*2) + '_' + (coord.y * tileSize*2) + '.png';
|
tileName = 'z' + this.prefix + '_' + (-coord.x * tileSize*2) + '_' + (coord.y * tileSize*2) + '.png';
|
||||||
|
|
@ -54,14 +52,8 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
|
||||||
// Other zoom levels.
|
// Other zoom levels.
|
||||||
tileSize = 128;
|
tileSize = 128;
|
||||||
|
|
||||||
// Helper functions.
|
|
||||||
/*var floor = Math.floor;
|
|
||||||
var div = function(x,y){return floor(x/y);}
|
|
||||||
var mod = function(x,y){return ((x%y)+y)%y;};*/
|
|
||||||
|
|
||||||
imgSize = Math.pow(2, 6+zoom);
|
imgSize = Math.pow(2, 6+zoom);
|
||||||
var mapcoord = {x: coord.x*tileSize, y: coord.y*tileSize};
|
tileName = this.prefix + '_' + (-coord.x*tileSize) + '_' + (coord.y*tileSize) + '.png';
|
||||||
tileName = this.prefix + '_' + (-mapcoord.x) + '_' + mapcoord.y + '.png';
|
|
||||||
}
|
}
|
||||||
var img;
|
var img;
|
||||||
var tile = $('<div/>')
|
var tile = $('<div/>')
|
||||||
|
|
@ -87,9 +79,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
|
||||||
.css({
|
.css({
|
||||||
width: imgSize + 'px',
|
width: imgSize + 'px',
|
||||||
height: imgSize + 'px',
|
height: imgSize + 'px',
|
||||||
borderStyle: 'none',
|
borderStyle: 'none'
|
||||||
/*marginLeft: offset.x + 'px',
|
|
||||||
marginTop: offset.y + 'px'*/
|
|
||||||
})
|
})
|
||||||
.hide()
|
.hide()
|
||||||
.appendTo(tile);
|
.appendTo(tile);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue