editor: ban 48*32 blocks in fgmap/bgmap
This commit is contained in:
parent
f0d5c04db5
commit
d1fdc2825d
@ -178,13 +178,15 @@ editor.prototype.mapInit = function () {
|
|||||||
editor.currentFloorData.cannotMove = {};
|
editor.currentFloorData.cannotMove = {};
|
||||||
}
|
}
|
||||||
editor.prototype.drawMapBg = function (img) {
|
editor.prototype.drawMapBg = function (img) {
|
||||||
return
|
return;
|
||||||
var bgc = bg.getContext('2d');
|
|
||||||
|
//legacy
|
||||||
if (!core.isset(editor.bgY) || editor.bgY == 0) {
|
if (!core.isset(editor.bgY) || editor.bgY == 0) {
|
||||||
editor.main.editor.drawMapBg();
|
editor.main.editor.drawMapBg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var bgc = bg.getContext('2d');
|
||||||
for (var ii = 0; ii < 13; ii++)
|
for (var ii = 0; ii < 13; ii++)
|
||||||
for (var jj = 0; jj < 13; jj++) {
|
for (var jj = 0; jj < 13; jj++) {
|
||||||
bgc.clearRect(ii * 32, jj * 32, 32, 32);
|
bgc.clearRect(ii * 32, jj * 32, 32, 32);
|
||||||
@ -529,8 +531,12 @@ editor.prototype.listen = function () {
|
|||||||
currDrawData.info = JSON.parse(JSON.stringify(editor.info));
|
currDrawData.info = JSON.parse(JSON.stringify(editor.info));
|
||||||
reDo = null;
|
reDo = null;
|
||||||
// console.log(stepPostfix);
|
// console.log(stepPostfix);
|
||||||
for (var ii = 0; ii < stepPostfix.length; ii++)
|
if (editor.layerMod!='map' && editor.info.images && editor.info.images.indexOf('48')!==-1){
|
||||||
editor[editor.layerMod][stepPostfix[ii].y][stepPostfix[ii].x] = editor.info;
|
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);
|
// console.log(editor.map);
|
||||||
editor.updateMap();
|
editor.updateMap();
|
||||||
holdingPath = 0;
|
holdingPath = 0;
|
||||||
|
|||||||
13
libs/maps.js
13
libs/maps.js
@ -433,11 +433,14 @@ maps.prototype.drawMap = function (mapName, callback) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (main.mode=='editor'){
|
if (main.mode=='editor'){
|
||||||
main.editor.drawMapBg = function(){
|
// just do not run drawBg
|
||||||
core.clearMap('bg');
|
|
||||||
core.clearMap('fg');
|
// //---move to main.editor.updateMap
|
||||||
drawBg();
|
// main.editor.drawMapBg = function(){
|
||||||
}
|
// core.clearMap('bg');
|
||||||
|
// core.clearMap('fg');
|
||||||
|
// drawBg();
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
drawBg();
|
drawBg();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user