diff --git a/assets b/assets index 7bdcc73ff..09eb769fe 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 7bdcc73ff85338c788ff961d7566489dde8c7a7b +Subproject commit 09eb769fe3181a95d964eeb2ed02b358c164c609 diff --git a/source/funkin/graphics/shaders/DropShadowShader.hx b/source/funkin/graphics/shaders/DropShadowShader.hx index f6a21e757..63eebf583 100644 --- a/source/funkin/graphics/shaders/DropShadowShader.hx +++ b/source/funkin/graphics/shaders/DropShadowShader.hx @@ -167,6 +167,17 @@ class DropShadowShader extends FlxShader return spr; } + public function loadAltMask(path:String) + { + #if html5 + BitmapData.loadFromFile(path).onComplete(function(bmp:BitmapData) { + altMaskImage = bmp; + }); + #else + altMaskImage = BitmapData.fromFile(path); + #end + } + public function onAttachedFrame(name, frameNum, frameIndex) { if (attachedSprite != null) updateFrameInfo(attachedSprite.frame); diff --git a/source/funkin/graphics/shaders/TextureSwap.hx b/source/funkin/graphics/shaders/TextureSwap.hx index 65de87ea3..ee2ca05d5 100644 --- a/source/funkin/graphics/shaders/TextureSwap.hx +++ b/source/funkin/graphics/shaders/TextureSwap.hx @@ -9,6 +9,17 @@ class TextureSwap extends FlxShader public var swappedImage(default, set):BitmapData; public var amount(default, set):Float; + public function loadSwapImage(path:String) + { + #if html5 + BitmapData.loadFromFile(path).onComplete(function(bmp:BitmapData) { + swappedImage = bmp; + }); + #else + swappedImage = BitmapData.fromFile(path); + #end + } + function set_swappedImage(_bitmapData:BitmapData):BitmapData { image.input = _bitmapData;