editor: ban 48*32 blocks in fgmap/bgmap

This commit is contained in:
YouWei Zhao 2018-09-16 00:08:29 +08:00
parent f0d5c04db5
commit d1fdc2825d
2 changed files with 18 additions and 9 deletions

View File

@ -178,13 +178,15 @@ editor.prototype.mapInit = function () {
editor.currentFloorData.cannotMove = {};
}
editor.prototype.drawMapBg = function (img) {
return
var bgc = bg.getContext('2d');
return;
//legacy
if (!core.isset(editor.bgY) || editor.bgY == 0) {
editor.main.editor.drawMapBg();
return;
}
var bgc = bg.getContext('2d');
for (var ii = 0; ii < 13; ii++)
for (var jj = 0; jj < 13; jj++) {
bgc.clearRect(ii * 32, jj * 32, 32, 32);
@ -529,8 +531,12 @@ editor.prototype.listen = function () {
currDrawData.info = JSON.parse(JSON.stringify(editor.info));
reDo = null;
// console.log(stepPostfix);
for (var ii = 0; ii < stepPostfix.length; ii++)
editor[editor.layerMod][stepPostfix[ii].y][stepPostfix[ii].x] = editor.info;
if (editor.layerMod!='map' && editor.info.images && editor.info.images.indexOf('48')!==-1){
printe('前景/背景不支持48的图块');
} else {
for (var ii = 0; ii < stepPostfix.length; ii++)
editor[editor.layerMod][stepPostfix[ii].y][stepPostfix[ii].x] = editor.info;
}
// console.log(editor.map);
editor.updateMap();
holdingPath = 0;

View File

@ -433,11 +433,14 @@ maps.prototype.drawMap = function (mapName, callback) {
}
if (main.mode=='editor'){
main.editor.drawMapBg = function(){
core.clearMap('bg');
core.clearMap('fg');
drawBg();
}
// just do not run drawBg
// //---move to main.editor.updateMap
// main.editor.drawMapBg = function(){
// core.clearMap('bg');
// core.clearMap('fg');
// drawBg();
// }
} else {
drawBg();
}