Revert to PIXI4
This commit is contained in:
parent
35dcbf3276
commit
a7d6c0355c
21 changed files with 44598 additions and 88738 deletions
|
@ -1,7 +1,6 @@
|
|||
//=============================================================================
|
||||
// rpg_sprites.js v1.6.2.2
|
||||
// rpg_sprites.js v1.6.1
|
||||
//=============================================================================
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Sprite_Base
|
||||
|
@ -252,9 +251,9 @@ Sprite_Character.prototype.updateBitmap = function () {
|
|||
|
||||
Sprite_Character.prototype.isImageChanged = function () {
|
||||
return (this._tilesetId !== $gameMap.tilesetId() ||
|
||||
this._tileId !== this._character.tileId() ||
|
||||
this._characterName !== this._character.characterName() ||
|
||||
this._characterIndex !== this._character.characterIndex());
|
||||
this._tileId !== this._character.tileId() ||
|
||||
this._characterName !== this._character.characterName() ||
|
||||
this._characterIndex !== this._character.characterIndex());
|
||||
};
|
||||
|
||||
Sprite_Character.prototype.setTileBitmap = function () {
|
||||
|
@ -648,24 +647,24 @@ Sprite_Actor.prototype = Object.create(Sprite_Battler.prototype);
|
|||
Sprite_Actor.prototype.constructor = Sprite_Actor;
|
||||
|
||||
Sprite_Actor.MOTIONS = {
|
||||
walk: { index: 0, loop: true },
|
||||
wait: { index: 1, loop: true },
|
||||
chant: { index: 2, loop: true },
|
||||
guard: { index: 3, loop: true },
|
||||
damage: { index: 4, loop: false },
|
||||
evade: { index: 5, loop: false },
|
||||
thrust: { index: 6, loop: false },
|
||||
swing: { index: 7, loop: false },
|
||||
missile: { index: 8, loop: false },
|
||||
skill: { index: 9, loop: false },
|
||||
spell: { index: 10, loop: false },
|
||||
item: { index: 11, loop: false },
|
||||
escape: { index: 12, loop: true },
|
||||
victory: { index: 13, loop: true },
|
||||
dying: { index: 14, loop: true },
|
||||
abnormal: { index: 15, loop: true },
|
||||
sleep: { index: 16, loop: true },
|
||||
dead: { index: 17, loop: true }
|
||||
walk: { index: 0, loop: true },
|
||||
wait: { index: 1, loop: true },
|
||||
chant: { index: 2, loop: true },
|
||||
guard: { index: 3, loop: true },
|
||||
damage: { index: 4, loop: false },
|
||||
evade: { index: 5, loop: false },
|
||||
thrust: { index: 6, loop: false },
|
||||
swing: { index: 7, loop: false },
|
||||
missile: { index: 8, loop: false },
|
||||
skill: { index: 9, loop: false },
|
||||
spell: { index: 10, loop: false },
|
||||
item: { index: 11, loop: false },
|
||||
escape: { index: 12, loop: true },
|
||||
victory: { index: 13, loop: true },
|
||||
dying: { index: 14, loop: true },
|
||||
abnormal: { index: 15, loop: true },
|
||||
sleep: { index: 16, loop: true },
|
||||
dead: { index: 17, loop: true }
|
||||
};
|
||||
|
||||
Sprite_Actor.prototype.initialize = function (battler) {
|
||||
|
@ -844,10 +843,10 @@ Sprite_Actor.prototype.motionSpeed = function () {
|
|||
|
||||
Sprite_Actor.prototype.refreshMotion = function () {
|
||||
var actor = this._actor;
|
||||
var motionGuard = Sprite_Actor.MOTIONS.guard;
|
||||
var motionGuard = Sprite_Actor.MOTIONS['guard'];
|
||||
if (actor) {
|
||||
if (this._motion === motionGuard && !BattleManager.isInputting()) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
var stateMotion = actor.stateMotionIndex();
|
||||
if (actor.isInputting() || actor.isActing()) {
|
||||
|
@ -1020,27 +1019,27 @@ Sprite_Enemy.prototype.setupEffect = function () {
|
|||
Sprite_Enemy.prototype.startEffect = function (effectType) {
|
||||
this._effectType = effectType;
|
||||
switch (this._effectType) {
|
||||
case 'appear':
|
||||
this.startAppear();
|
||||
break;
|
||||
case 'disappear':
|
||||
this.startDisappear();
|
||||
break;
|
||||
case 'whiten':
|
||||
this.startWhiten();
|
||||
break;
|
||||
case 'blink':
|
||||
this.startBlink();
|
||||
break;
|
||||
case 'collapse':
|
||||
this.startCollapse();
|
||||
break;
|
||||
case 'bossCollapse':
|
||||
this.startBossCollapse();
|
||||
break;
|
||||
case 'instantCollapse':
|
||||
this.startInstantCollapse();
|
||||
break;
|
||||
case 'appear':
|
||||
this.startAppear();
|
||||
break;
|
||||
case 'disappear':
|
||||
this.startDisappear();
|
||||
break;
|
||||
case 'whiten':
|
||||
this.startWhiten();
|
||||
break;
|
||||
case 'blink':
|
||||
this.startBlink();
|
||||
break;
|
||||
case 'collapse':
|
||||
this.startCollapse();
|
||||
break;
|
||||
case 'bossCollapse':
|
||||
this.startBossCollapse();
|
||||
break;
|
||||
case 'instantCollapse':
|
||||
this.startInstantCollapse();
|
||||
break;
|
||||
}
|
||||
this.revertToNormal();
|
||||
};
|
||||
|
@ -1083,27 +1082,27 @@ Sprite_Enemy.prototype.updateEffect = function () {
|
|||
if (this._effectDuration > 0) {
|
||||
this._effectDuration--;
|
||||
switch (this._effectType) {
|
||||
case 'whiten':
|
||||
this.updateWhiten();
|
||||
break;
|
||||
case 'blink':
|
||||
this.updateBlink();
|
||||
break;
|
||||
case 'appear':
|
||||
this.updateAppear();
|
||||
break;
|
||||
case 'disappear':
|
||||
this.updateDisappear();
|
||||
break;
|
||||
case 'collapse':
|
||||
this.updateCollapse();
|
||||
break;
|
||||
case 'bossCollapse':
|
||||
this.updateBossCollapse();
|
||||
break;
|
||||
case 'instantCollapse':
|
||||
this.updateInstantCollapse();
|
||||
break;
|
||||
case 'whiten':
|
||||
this.updateWhiten();
|
||||
break;
|
||||
case 'blink':
|
||||
this.updateBlink();
|
||||
break;
|
||||
case 'appear':
|
||||
this.updateAppear();
|
||||
break;
|
||||
case 'disappear':
|
||||
this.updateDisappear();
|
||||
break;
|
||||
case 'collapse':
|
||||
this.updateCollapse();
|
||||
break;
|
||||
case 'bossCollapse':
|
||||
this.updateBossCollapse();
|
||||
break;
|
||||
case 'instantCollapse':
|
||||
this.updateInstantCollapse();
|
||||
break;
|
||||
}
|
||||
if (this._effectDuration === 0) {
|
||||
this._effectType = null;
|
||||
|
@ -1395,7 +1394,7 @@ Sprite_Animation.prototype.updateFrame = function () {
|
|||
|
||||
Sprite_Animation.prototype.currentFrameIndex = function () {
|
||||
return (this._animation.frames.length -
|
||||
Math.floor((this._duration + this._rate - 1) / this._rate));
|
||||
Math.floor((this._duration + this._rate - 1) / this._rate));
|
||||
};
|
||||
|
||||
Sprite_Animation.prototype.updateAllCellSprites = function (frame) {
|
||||
|
@ -1422,10 +1421,10 @@ Sprite_Animation.prototype.updateCellSprite = function (sprite, cell) {
|
|||
sprite.rotation = cell[4] * Math.PI / 180;
|
||||
sprite.scale.x = cell[3] / 100;
|
||||
|
||||
if (cell[5]) {
|
||||
if(cell[5]){
|
||||
sprite.scale.x *= -1;
|
||||
}
|
||||
if (mirror) {
|
||||
if(mirror){
|
||||
sprite.x *= -1;
|
||||
sprite.rotation *= -1;
|
||||
sprite.scale.x *= -1;
|
||||
|
@ -1443,15 +1442,15 @@ Sprite_Animation.prototype.updateCellSprite = function (sprite, cell) {
|
|||
Sprite_Animation.prototype.processTimingData = function (timing) {
|
||||
var duration = timing.flashDuration * this._rate;
|
||||
switch (timing.flashScope) {
|
||||
case 1:
|
||||
this.startFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 2:
|
||||
this.startScreenFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 3:
|
||||
this.startHiding(duration);
|
||||
break;
|
||||
case 1:
|
||||
this.startFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 2:
|
||||
this.startScreenFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 3:
|
||||
this.startHiding(duration);
|
||||
break;
|
||||
}
|
||||
if (!this._duplicated && timing.se) {
|
||||
AudioManager.playSe(timing.se);
|
||||
|
@ -1614,7 +1613,7 @@ Sprite_StateIcon.prototype.initialize = function () {
|
|||
this.loadBitmap();
|
||||
};
|
||||
|
||||
Sprite_StateIcon._iconWidth = 32;
|
||||
Sprite_StateIcon._iconWidth = 32;
|
||||
Sprite_StateIcon._iconHeight = 32;
|
||||
|
||||
Sprite_StateIcon.prototype.initMembers = function () {
|
||||
|
@ -1908,9 +1907,6 @@ function Sprite_Picture() {
|
|||
Sprite_Picture.prototype = Object.create(Sprite.prototype);
|
||||
Sprite_Picture.prototype.constructor = Sprite_Picture;
|
||||
|
||||
Sprite_Picture.prototype._renderCanvas_PIXI = PIXI.picture.Sprite.prototype._renderCanvas;
|
||||
Sprite_Picture.prototype._render_PIXI = PIXI.picture.Sprite.prototype._render;
|
||||
|
||||
Sprite_Picture.prototype.initialize = function (pictureId) {
|
||||
Sprite.prototype.initialize.call(this);
|
||||
this._pictureId = pictureId;
|
||||
|
@ -2075,7 +2071,7 @@ Sprite_Destination.prototype.initialize = function () {
|
|||
|
||||
Sprite_Destination.prototype.update = function () {
|
||||
Sprite.prototype.update.call(this);
|
||||
if ($gameTemp.isDestinationValid()) {
|
||||
if ($gameTemp.isDestinationValid()){
|
||||
this.updatePosition();
|
||||
this.updateAnimation();
|
||||
this.visible = true;
|
||||
|
@ -2382,14 +2378,14 @@ Spriteset_Map.prototype._canvasReAddParallax = function () {
|
|||
this._parallax = new TilingSprite();
|
||||
this._parallax.move(0, 0, Graphics.width, Graphics.height);
|
||||
this._parallax.bitmap = ImageManager.loadParallax(this._parallaxName);
|
||||
this._baseSprite.addChildAt(this._parallax, index);
|
||||
this._baseSprite.addChildAt(this._parallax,index);
|
||||
};
|
||||
|
||||
Spriteset_Map.prototype.updateParallax = function () {
|
||||
if (this._parallaxName !== $gameMap.parallaxName()) {
|
||||
this._parallaxName = $gameMap.parallaxName();
|
||||
|
||||
if (this._parallax.bitmap && Graphics.isWebGL() !== true) {
|
||||
if (this._parallax.bitmap && Graphics.isWebGL() != true) {
|
||||
this._canvasReAddParallax();
|
||||
} else {
|
||||
this._parallax.bitmap = ImageManager.loadParallax(this._parallaxName);
|
||||
|
@ -2404,14 +2400,6 @@ Spriteset_Map.prototype.updateParallax = function () {
|
|||
Spriteset_Map.prototype.updateTilemap = function () {
|
||||
this._tilemap.origin.x = $gameMap.displayX() * $gameMap.tileWidth();
|
||||
this._tilemap.origin.y = $gameMap.displayY() * $gameMap.tileHeight();
|
||||
/* removed in 1.6.2 - But apparently is still needed for some games */
|
||||
if (this._tilemap.bitmaps) {
|
||||
if (!this.isTilesetReady && this._tilemap.bitmaps.every(bitmap => bitmap.isRequestReady())) {
|
||||
this._tilemap.refresh();
|
||||
this._tilemap.refreshTileset();
|
||||
this.isTilesetReady = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Spriteset_Map.prototype.updateShadow = function () {
|
||||
|
@ -2566,57 +2554,57 @@ Spriteset_Battle.prototype.overworldBattleback2Name = function () {
|
|||
|
||||
Spriteset_Battle.prototype.normalBattleback1Name = function () {
|
||||
return (this.terrainBattleback1Name(this.autotileType(1)) ||
|
||||
this.terrainBattleback1Name(this.autotileType(0)) ||
|
||||
this.defaultBattleback1Name());
|
||||
this.terrainBattleback1Name(this.autotileType(0)) ||
|
||||
this.defaultBattleback1Name());
|
||||
};
|
||||
|
||||
Spriteset_Battle.prototype.normalBattleback2Name = function () {
|
||||
return (this.terrainBattleback2Name(this.autotileType(1)) ||
|
||||
this.terrainBattleback2Name(this.autotileType(0)) ||
|
||||
this.defaultBattleback2Name());
|
||||
this.terrainBattleback2Name(this.autotileType(0)) ||
|
||||
this.defaultBattleback2Name());
|
||||
};
|
||||
|
||||
Spriteset_Battle.prototype.terrainBattleback1Name = function (type) {
|
||||
switch (type) {
|
||||
case 24: case 25:
|
||||
return 'Wasteland';
|
||||
case 26: case 27:
|
||||
return 'DirtField';
|
||||
case 32: case 33:
|
||||
return 'Desert';
|
||||
case 34:
|
||||
return 'Lava1';
|
||||
case 35:
|
||||
return 'Lava2';
|
||||
case 40: case 41:
|
||||
return 'Snowfield';
|
||||
case 42:
|
||||
return 'Clouds';
|
||||
case 4: case 5:
|
||||
return 'PoisonSwamp';
|
||||
default:
|
||||
return null;
|
||||
case 24: case 25:
|
||||
return 'Wasteland';
|
||||
case 26: case 27:
|
||||
return 'DirtField';
|
||||
case 32: case 33:
|
||||
return 'Desert';
|
||||
case 34:
|
||||
return 'Lava1';
|
||||
case 35:
|
||||
return 'Lava2';
|
||||
case 40: case 41:
|
||||
return 'Snowfield';
|
||||
case 42:
|
||||
return 'Clouds';
|
||||
case 4: case 5:
|
||||
return 'PoisonSwamp';
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
Spriteset_Battle.prototype.terrainBattleback2Name = function (type) {
|
||||
switch (type) {
|
||||
case 20: case 21:
|
||||
return 'Forest';
|
||||
case 22: case 30: case 38:
|
||||
return 'Cliff';
|
||||
case 24: case 25: case 26: case 27:
|
||||
return 'Wasteland';
|
||||
case 32: case 33:
|
||||
return 'Desert';
|
||||
case 34: case 35:
|
||||
return 'Lava';
|
||||
case 40: case 41:
|
||||
return 'Snowfield';
|
||||
case 42:
|
||||
return 'Clouds';
|
||||
case 4: case 5:
|
||||
return 'PoisonSwamp';
|
||||
case 20: case 21:
|
||||
return 'Forest';
|
||||
case 22: case 30: case 38:
|
||||
return 'Cliff';
|
||||
case 24: case 25: case 26: case 27:
|
||||
return 'Wasteland';
|
||||
case 32: case 33:
|
||||
return 'Desert';
|
||||
case 34: case 35:
|
||||
return 'Lava';
|
||||
case 40: case 41:
|
||||
return 'Snowfield';
|
||||
case 42:
|
||||
return 'Clouds';
|
||||
case 4: case 5:
|
||||
return 'PoisonSwamp';
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue