Fix Bigmap bug

This commit is contained in:
oc 2018-09-01 00:09:23 +08:00
parent f262834c27
commit 6d92301de5
2 changed files with 6 additions and 6 deletions

View File

@ -164,9 +164,9 @@ maps.prototype.save = function(maps, floorId) {
var mh = core.floors[floorId].height || 13;
var blocks = [];
for (var x=0;x<mw;x++) {
for (var x=0;x<mh;x++) {
blocks[x]=[];
for (var y=0;y<mh;y++) {
for (var y=0;y<mw;y++) {
blocks[x].push(0);
}
}
@ -215,9 +215,9 @@ maps.prototype.load = function (data, floorId) {
maps.prototype.getMapArray = function (blockArray,width,height){
var blocks = [];
for (var x=0;x<width;x++) {
for (var x=0;x<height;x++) {
blocks[x]=[];
for (var y=0;y<height;y++) {
for (var y=0;y<width;y++) {
blocks[x].push(0);
}
}

View File

@ -1827,8 +1827,8 @@ ui.prototype.drawThumbnail = function(floorId, canvas, blocks, x, y, size, cente
var blockIcon = core.material.icons.terrains[groundId];
var blockImage = core.material.images.terrains;
// background
for (var i=0;i<mw;i++) {
for (var j=0;j<mh;j++) {
for (var j=0;j<mh;j++) {
for (var i=0;i<mw;i++) {
tempCanvas.drawImage(blockImage, 0, blockIcon * 32, 32, 32, i * 32, j * 32, 32, 32);
}
}