Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,077 changes: 423 additions & 654 deletions js/libs/pixi-picture.js

Large diffs are not rendered by default.

1,761 changes: 876 additions & 885 deletions js/libs/pixi-tilemap.js

Large diffs are not rendered by default.

19,145 changes: 12,073 additions & 7,072 deletions js/libs/pixi.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/rpg_core/Graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ Graphics._updateRealScale = function() {
if (this._stretchEnabled) {
var h = window.innerWidth / this._width;
var v = window.innerHeight / this._height;
if (h >= 1 && h - 0.01 <= 1) h = 1;
if (v >= 1 && v - 0.01 <= 1) v = 1;
this._realScale = Math.min(h, v);
} else {
this._realScale = this._scale;
Expand Down
28 changes: 0 additions & 28 deletions js/rpg_core/Patch.js

This file was deleted.

9 changes: 5 additions & 4 deletions js/rpg_core/ShaderTilemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
function ShaderTilemap() {
Tilemap.apply(this, arguments);
this.roundPixels = true;
};
}

ShaderTilemap.prototype = Object.create(Tilemap.prototype);
ShaderTilemap.prototype.constructor = ShaderTilemap;

// we need this constant for some platforms (Samsung S4, S5, Tab4, HTC One H8)
PIXI.glCore.VertexArrayObject.FORCE_NATIVE = true;
PIXI.GC_MODES.DEFAULT = PIXI.GC_MODES.AUTO;
PIXI.settings.GC_MODE = PIXI.GC_MODES.AUTO;
PIXI.tilemap.TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
PIXI.tilemap.TileRenderer.DO_CLEAR = true;

/**
* Uploads animation state in renderer
Expand All @@ -27,8 +28,8 @@ PIXI.tilemap.TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
ShaderTilemap.prototype._hackRenderer = function(renderer) {
var af = this.animationFrame % 4;
if (af==3) af = 1;
renderer.plugins.tile.tileAnim[0] = af * this._tileWidth;
renderer.plugins.tile.tileAnim[1] = (this.animationFrame % 3) * this._tileHeight;
renderer.plugins.tilemap.tileAnim[0] = af * this._tileWidth;
renderer.plugins.tilemap.tileAnim[1] = (this.animationFrame % 3) * this._tileHeight;
return renderer;
};

Expand Down
6 changes: 3 additions & 3 deletions js/rpg_core/Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,16 +459,16 @@ Sprite.prototype._renderWebGL = function(renderer) {
//copy of pixi-v4 internal code
this.calculateVertices();

if (this._isPicture) {
if (this.pluginName === 'sprite' && this._isPicture) {
// use heavy renderer, which reduces artifacts and applies corrent blendMode,
// but does not use multitexture optimization
this._speedUpCustomBlendModes(renderer);
renderer.setObjectRenderer(renderer.plugins.picture);
renderer.plugins.picture.render(this);
} else {
// use pixi super-speed renderer
renderer.setObjectRenderer(renderer.plugins.sprite);
renderer.plugins.sprite.render(this);
renderer.setObjectRenderer(renderer.plugins[this.pluginName]);
renderer.plugins[this.pluginName].render(this);
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions js/rpg_core/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Utils.RPGMAKER_NAME = 'MV';
* @type String
* @final
*/
Utils.RPGMAKER_VERSION = "1.4.1";
Utils.RPGMAKER_VERSION = "1.6.1";

Utils.RPGMAKER_ENGINE = "community-1.2c";
Utils.RPGMAKER_ENGINE = "community-1.3";

/**
* Checks whether the option is in the query string.
Expand Down
5 changes: 5 additions & 0 deletions js/rpg_core/WebAudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,11 @@ WebAudio.prototype._onDecode = function(buffer) {
* @private
*/
WebAudio.prototype._startPlaying = function(loop, offset) {
if (this._loopLength > 0) {
while (offset >= this._loopStart + this._loopLength) {
offset -= this._loopLength;
}
}
this._removeEndTimer();
this._removeNodes();
this._createNodes();
Expand Down
2 changes: 1 addition & 1 deletion js/rpg_core/_header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//=============================================================================
// rpg_core.js v1.4.1 (community-1.2c)
// rpg_core.js v1.6.1 (community-1.3)
//=============================================================================
19 changes: 10 additions & 9 deletions js/rpg_managers/BattleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ BattleManager.initMembers = function() {
this._escapeRatio = 0;
this._escaped = false;
this._rewards = {};
this._turnForced = false;
};

BattleManager.isBattleTest = function() {
Expand Down Expand Up @@ -144,7 +145,7 @@ BattleManager.updateEvent = function() {
return this.updateEventMain();
}
}
return this.checkAbort2();
return this.checkAbort();
};

BattleManager.updateEventMain = function() {
Expand Down Expand Up @@ -330,6 +331,13 @@ BattleManager.endTurn = function() {
this._logWindow.displayAutoAffectedStatus(battler);
this._logWindow.displayRegeneration(battler);
}, this);
if (this.isForcedTurn()) {
this._turnForced = false;
}
};

BattleManager.isForcedTurn = function () {
return this._turnForced;
};

BattleManager.updateTurnEnd = function() {
Expand Down Expand Up @@ -460,6 +468,7 @@ BattleManager.forceAction = function(battler) {

BattleManager.processForcedAction = function() {
if (this._actionForcedBattler) {
this._turnForced = true;
this._subject = this._actionForcedBattler;
this._actionForcedBattler = null;
this.startAction();
Expand Down Expand Up @@ -487,14 +496,6 @@ BattleManager.checkBattleEnd = function() {
};

BattleManager.checkAbort = function() {
if ($gameParty.isEmpty() || this.isAborting()) {
this.processAbort();
return true;
}
return false;
};

BattleManager.checkAbort2 = function() {
if ($gameParty.isEmpty() || this.isAborting()) {
SoundManager.playEscape();
this._escaped = true;
Expand Down
2 changes: 1 addition & 1 deletion js/rpg_managers/_header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//=============================================================================
// rpg_managers.js v1.4.1 (community-1.2c)
// rpg_managers.js v1.6.1 (community-1.3)
//=============================================================================
6 changes: 4 additions & 2 deletions js/rpg_objects/Game_Battler.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,10 @@ Game_Battler.prototype.onAllActionsEnd = function() {
Game_Battler.prototype.onTurnEnd = function() {
this.clearResult();
this.regenerateAll();
this.updateStateTurns();
this.updateBuffTurns();
if (!BattleManager.isForcedTurn()) {
this.updateStateTurns();
this.updateBuffTurns();
}
this.removeStatesAuto(2);
};

Expand Down
48 changes: 30 additions & 18 deletions js/rpg_objects/Game_Interpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,19 @@ Game_Interpreter.prototype.command413 = function() {

// Break Loop
Game_Interpreter.prototype.command113 = function() {
var depth = 0;
while (this._index < this._list.length - 1) {
this._index++;
var command = this.currentCommand();
if (command.code === 413 && command.indent < this._indent) {
break;

if (command.code === 112)
depth++;

if (command.code === 413) {
if (depth > 0)
depth--;
else
break;
}
}
return true;
Expand Down Expand Up @@ -654,22 +662,26 @@ Game_Interpreter.prototype.command121 = function() {
// Control Variables
Game_Interpreter.prototype.command122 = function() {
var value = 0;
switch (this._params[3]) { // Operand
case 0: // Constant
value = this._params[4];
break;
case 1: // Variable
value = $gameVariables.value(this._params[4]);
break;
case 2: // Random
value = this._params[4] + Math.randomInt(this._params[5] - this._params[4] + 1);
break;
case 3: // Game Data
value = this.gameDataOperand(this._params[4], this._params[5], this._params[6]);
break;
case 4: // Script
value = eval(this._params[4]);
break;
switch (this._params[3]) { // Operand
case 0: // Constant
value = this._params[4];
break;
case 1: // Variable
value = $gameVariables.value(this._params[4]);
break;
case 2: // Random
value = this._params[5] - this._params[4] + 1;
for (var i = this._params[0]; i <= this._params[1]; i++) {
this.operateVariable(i, this._params[2], this._params[4] + Math.randomInt(value));
}
return true;
break;
case 3: // Game Data
value = this.gameDataOperand(this._params[4], this._params[5], this._params[6]);
break;
case 4: // Script
value = eval(this._params[4]);
break;
}
for (var i = this._params[0]; i <= this._params[1]; i++) {
this.operateVariable(i, this._params[2], value);
Expand Down
2 changes: 1 addition & 1 deletion js/rpg_objects/_header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//=============================================================================
// rpg_objects.js v1.4.1 (community-1.2c)
// rpg_objects.js v1.6.1 (community-1.3)
//=============================================================================
2 changes: 1 addition & 1 deletion js/rpg_scenes/_header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//=============================================================================
// rpg_scenes.js v1.4.1 (community-1.2c)
// rpg_scenes.js v1.6.1 (community-1.3)
//=============================================================================
2 changes: 2 additions & 0 deletions js/rpg_sprites/Spriteset_Battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Spriteset_Battle.prototype.battleback2Name = function() {
};

Spriteset_Battle.prototype.overworldBattleback1Name = function() {
if ($gameMap.battleback1Name() === '') return '';
if ($gamePlayer.isInVehicle()) {
return this.shipBattleback1Name();
} else {
Expand All @@ -125,6 +126,7 @@ Spriteset_Battle.prototype.overworldBattleback1Name = function() {
};

Spriteset_Battle.prototype.overworldBattleback2Name = function() {
if ($gameMap.battleback2Name() === '') return '';
if ($gamePlayer.isInVehicle()) {
return this.shipBattleback2Name();
} else {
Expand Down
2 changes: 1 addition & 1 deletion js/rpg_sprites/_header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//=============================================================================
// rpg_sprites.js v1.4.1 (community-1.2c)
// rpg_sprites.js v1.6.1 (community-1.3)
//=============================================================================
1 change: 0 additions & 1 deletion js/rpg_windows/Window_DebugRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,4 @@ Window_DebugRange.prototype.processCancel = function() {

Window_DebugRange.prototype.setEditWindow = function(editWindow) {
this._editWindow = editWindow;
this.update();
};
1 change: 0 additions & 1 deletion js/rpg_windows/Window_EquipSlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ Window_EquipSlot.prototype.setStatusWindow = function(statusWindow) {

Window_EquipSlot.prototype.setItemWindow = function(itemWindow) {
this._itemWindow = itemWindow;
this.update();
};

Window_EquipSlot.prototype.updateHelp = function() {
Expand Down
1 change: 0 additions & 1 deletion js/rpg_windows/Window_ItemCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ Window_ItemCategory.prototype.makeCommandList = function() {

Window_ItemCategory.prototype.setItemWindow = function(itemWindow) {
this._itemWindow = itemWindow;
this.update();
};
1 change: 0 additions & 1 deletion js/rpg_windows/Window_SkillType.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Window_SkillType.prototype.update = function() {

Window_SkillType.prototype.setSkillWindow = function(skillWindow) {
this._skillWindow = skillWindow;
this.update();
};

Window_SkillType.prototype.selectLast = function() {
Expand Down
2 changes: 1 addition & 1 deletion js/rpg_windows/_header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//=============================================================================
// rpg_windows.js v1.4.1 (community-1.2c)
// rpg_windows.js v1.6.1 (community-1.3)
//=============================================================================
1 change: 0 additions & 1 deletion rpg_core.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[
"js/rpg_core/_header.js",
"js/rpg_core/Patch.js",
"js/rpg_core/ProgressWatcher.js",
"js/rpg_core/JsExtensions.js",
"js/rpg_core/Utils.js",
Expand Down