Game_Map.prototype.setDisplayPos = function(x, y) {
if (this.isLoopHorizontal()) {
this._displayX = x.mod(this.width());
this._parallaxX = x;
} else {
var endX = this.width() - this.screenTileX();
this._displayX = endX < 0 ? endX / 2 : x.clamp(0, endX);
this._parallaxX = this._displayX;
}
if (this.isLoopVertical()) {
this._displayY = y.mod(this.height());
this._parallaxY = y;
} else {
var endY = this.height() - this.screenTileY();
this._displayY = endY < 0 ? endY / 2 : y.clamp(0, endY);
this._parallaxY = this._displayY;
}
};
Game_Map.prototype.setDisplayPos = function(x, y) {
if (this.isLoopHorizontal()) {
this._displayX = x.mod(this.width());
this._parallaxX = x;
} else {
var endX = this.width() - this.screenTileX();
this._displayX = endX < 0 ? endX / 2 : x.clamp(0, endX);
this._parallaxX = this._displayX;
}
if (this.isLoopVertical()) {
this._displayY = y.mod(this.height());
this._parallaxY = y;
} else {
var endY = this.height() - this.screenTileY();
this._displayY = endY < 0 ? endY / 2 : y.clamp(0, endY);
this._parallaxY = this._displayY;
}
};
Spriteset_Map.prototype.updateTilemap = function() {
//图块地图 原点 x = 游戏地图 显示x() * 游戏地图 图块宽()
this._tilemap.origin.x = $gameMap.displayX() * $gameMap.tileWidth();
//图块地图 原点 y = 游戏地图 显示y() * 游戏地图 图块高()
this._tilemap.origin.y = $gameMap.displayY() * $gameMap.tileHeight();
this._tilemap.origin.x = Math.round(this._tilemap.origin.x)
this._tilemap.origin.y = Math.round(this._tilemap.origin.y)
};
Spriteset_Map.prototype.updateTilemap = function() {
//图块地图 原点 x = 游戏地图 显示x() * 游戏地图 图块宽()
this._tilemap.origin.x = $gameMap.displayX() * $gameMap.tileWidth();
//图块地图 原点 y = 游戏地图 显示y() * 游戏地图 图块高()
this._tilemap.origin.y = $gameMap.displayY() * $gameMap.tileHeight();
this._tilemap.origin.x = Math.round(this._tilemap.origin.x)
this._tilemap.origin.y = Math.round(this._tilemap.origin.y)
};