CameraTools.addBorder

This commit is contained in:
2022-06-21 23:32:57 +00:00
parent bc550ec67e
commit cee2e30230
6 changed files with 70 additions and 4 deletions

View File

@@ -21,4 +21,12 @@
(spriteSheet.replaceColor FlxColor.WHITE FlxColor.TRANSPARENT)
spriteSheet))
// Grab a whole BMP and add transparency
(function :FlxSprite fromWholeBmp [file]
(let [oBmp (Bmp.loadBitmapData file)
sprite (new FlxSprite)]
(sprite.loadGraphic (FlxGraphic.fromBitmapData oBmp))
(sprite.replaceColor FlxColor.WHITE FlxColor.TRANSPARENT)
sprite))
// TODO some of the sprite sheets mix multiple frame sizes (i.e. character sheets)