//=============================================================================
// ParallaxesNonBlur.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.1.0 2016/05/14 Fixed an error when running on a version of 1.2.0
// 1.0.0 2015/12/05 First release
// ----------------------------------------------------------------------------
// [Blog] : http://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc Remove blur of zero parallax for distant view
* @author triacontane
*
* @help Removes the blurring process if the distant view is zero parallax ("!" for battle of filename).
* Instead, the distant view does not loop and scroll.
*
* There's no plugin command.
*
* Terms of Service:
* It's possible to modify and redistribute without permission from the author.
* And this plugin licensed under MIT License.
*/
(function () {
var _SpriteSet_Map_createParallax = Spriteset_Map.prototype.createParallax;
Spriteset_Map.prototype.createParallax = function() {
_SpriteSet_Map_createParallax.apply(this, arguments);
this._parallaxNonBlur = new Sprite();
this._baseSprite.addChild(this._parallaxNonBlur);
};
var _SpriteSet_Map_updateParallax = Spriteset_Map.prototype.updateParallax;
Spriteset_Map.prototype.updateParallax = function() {
this._parallax.visible = !$gameMap._parallaxZero;
this._parallaxNonBlur.visible = $gameMap._parallaxZero;
if ($gameMap._parallaxZero) {
if (this._parallaxName !== $gameMap.parallaxName()) {
this._parallaxName = $gameMap.parallaxName();
this._parallaxNonBlur.bitmap = ImageManager.loadParallax(this._parallaxName);
this._parallax.bitmap = ImageManager.loadEmptyBitmap();
}
if (this._parallaxNonBlur.bitmap) {
this._parallaxNonBlur.x = 0;
this._parallaxNonBlur.y = 0;
this._parallaxNonBlur.setFrame($gameMap.parallaxOx(), $gameMap.parallaxOy(),
Graphics.width, Graphics.height);
}
} else {
this._parallaxNonBlur.bitmap = null;
_SpriteSet_Map_updateParallax.apply(this, arguments);
}
};
})();