Skip to content

Commit

Permalink
1.0.1 マスクをかけたピクチャIDに対してピクチャの表示を行うとマスクが解除される不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
elleonard committed Apr 6, 2024
1 parent 1f5c6f3 commit 386e88d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/codes/MaskPicture/DarkPlasma_MaskPicture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ function Game_Interpreter_MaskPictureMixIn(gameInterpreter: Game_Interpreter) {

Game_Interpreter_MaskPictureMixIn(Game_Interpreter.prototype);

function Game_Screen_MaskPictureMixIn(gameScreen: Game_Screen) {
const _showPicture = gameScreen.showPicture;
gameScreen.showPicture = function (pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode) {
const maskPictureId = this.picture(pictureId)?.maskPictureId();
_showPicture.call(this, pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode);
if (maskPictureId) {
this.picture(pictureId)?.mask(maskPictureId);
}
};
}

Game_Screen_MaskPictureMixIn(Game_Screen.prototype);

function Game_Picture_MaskPictureMixIn(gamePicture: Game_Picture) {
gamePicture.mask = function (maskPictureId) {
this._maskPictureId = maskPictureId;
Expand Down
3 changes: 3 additions & 0 deletions src/codes/MaskPicture/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ DarkPlasma_MaskPicture:
license: MIT
excludeLicenseManager: false
histories:
- date: 2024/04/06
version: 1.0.1
description: 'マスクをかけたピクチャIDに対してピクチャの表示を行うとマスクが解除される不具合を修正'
- date: 2024/04/04
version: 1.0.0
description: '公開'
Expand Down

0 comments on commit 386e88d

Please sign in to comment.