Commit Graph

1332 Commits

Author SHA1 Message Date
Mike Welsh 17a7b02f14 chore: Bump npm packages 2020-03-16 02:15:55 -07:00
Mike Welsh a0bc9d3ec9 chore: Set to abort on panic
This shaves ~20% size off the desktop build.
2020-03-16 01:16:15 -07:00
dependabot[bot] 893f0fe9e2
Merge pull request #446 from ruffle-rs/dependabot/npm_and_yarn/web/demo/acorn-6.4.1 2020-03-16 07:14:02 +00:00
Mike Welsh ca72070506 chore: Bump ci to 1.42 2020-03-15 23:50:10 -07:00
dependabot[bot] 623849483c
build(deps): bump acorn from 6.4.0 to 6.4.1 in /web/demo
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-16 06:09:43 +00:00
dependabot-preview[bot] 2c1495eebd build(deps): [security] bump acorn in /web/selfhosted
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-16 06:09:05 +00:00
dependabot-preview[bot] 0f7f36681d build(deps): bump quick-xml from 0.17.2 to 0.18.1
Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.17.2 to 0.18.1.
- [Release notes](https://github.com/tafia/quick-xml/releases)
- [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md)
- [Commits](https://github.com/tafia/quick-xml/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-16 05:34:45 +00:00
Mike Welsh 24a557807d chore: Fix more clippy lints 2020-03-12 21:40:48 -07:00
Mike Welsh 13b039fa34 chore: Fix clippy iter-nth-zero warnings
New lint added in latest clippy versions.
2020-03-12 21:16:30 -07:00
Mike Welsh 038e8966da
web: Merge #435, spruce up demo page
Spruced up Web Demo page
2020-03-12 16:20:38 -07:00
Sean-Thomas 609b6671b3 Spruced up Web Demo Page
Edited styling for web demo page to look more like the https://ruffle.rs homepage.
2020-03-09 19:33:03 -04:00
dependabot-preview[bot] b85c4e2ed8 build(deps): bump image from 0.23.0 to 0.23.1
Bumps [image](https://github.com/image-rs/image) from 0.23.0 to 0.23.1.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.0...v0.23.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 18:56:56 +00:00
Mike Welsh 098bf33068 chore: Bump quote to 1.0.3 2020-03-08 18:58:39 -07:00
dependabot-preview[bot] 05d74f4870 build(deps): bump base64 from 0.11.0 to 0.12.0
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.11.0...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 01:07:16 +00:00
dependabot-preview[bot] fb02a8b57f build(deps): bump png from 0.16.0 to 0.16.1
Bumps [png](https://github.com/image-rs/image-png) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.0...v0.16.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 23:13:22 +00:00
dependabot-preview[bot] 924fb05981 build(deps): bump svg from 0.7.0 to 0.7.1
Bumps [svg](https://github.com/bodoni/svg) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/bodoni/svg/releases)
- [Commits](https://github.com/bodoni/svg/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 22:30:38 +00:00
Mike Welsh cd334bcd3f web: Fix bitmap fills not using twips 2020-03-02 18:31:49 -08:00
dependabot-preview[bot] f215458501 build(deps): bump structopt from 0.3.9 to 0.3.11
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.9 to 0.3.11.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 00:01:14 +00:00
dependabot-preview[bot] 23b0478796 build(deps): bump png from 0.15.3 to 0.16.0
Bumps [png](https://github.com/image-rs/image-png) from 0.15.3 to 0.16.0.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.15.3...v0.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 23:32:44 +00:00
dependabot-preview[bot] 55a568a42b build(deps): bump svg from 0.6.0 to 0.7.0
Bumps [svg](https://github.com/bodoni/svg) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/bodoni/svg/releases)
- [Commits](https://github.com/bodoni/svg/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 21:49:30 +00:00
dependabot-preview[bot] a0ee19fd37 build(deps): bump syn from 1.0.14 to 1.0.16
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.14 to 1.0.16.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.14...1.0.16)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 20:26:50 +00:00
dependabot-preview[bot] 4266cd54d5 build(deps): bump lyon from 0.15.5 to 0.15.6
Bumps [lyon](https://github.com/nical/lyon) from 0.15.5 to 0.15.6.
- [Release notes](https://github.com/nical/lyon/releases)
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nical/lyon/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 19:51:44 +00:00
dependabot-preview[bot] ba185d3d43 build(deps): bump minimp3 from 0.3.3 to 0.3.5
Bumps [minimp3](https://github.com/germangb/minimp3-rs) from 0.3.3 to 0.3.5.
- [Release notes](https://github.com/germangb/minimp3-rs/releases)
- [Commits](https://github.com/germangb/minimp3-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 19:07:25 +00:00
dependabot-preview[bot] 3f28554285 build(deps): bump enumset from 0.4.4 to 0.4.5
Bumps [enumset](https://github.com/Lymia/enumset) from 0.4.4 to 0.4.5.
- [Release notes](https://github.com/Lymia/enumset/releases)
- [Changelog](https://github.com/Lymia/enumset/blob/master/RELEASES.md)
- [Commits](https://github.com/Lymia/enumset/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 18:14:25 +00:00
dependabot-preview[bot] d30928e634 build(deps-dev): bump webpack from 4.41.6 to 4.42.0 in /web/selfhosted
Bumps [webpack](https://github.com/webpack/webpack) from 4.41.6 to 4.42.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.41.6...v4.42.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 18:06:33 +00:00
Mike Welsh 8f54980df3
avm1: Merge #413, load manager resiliency
Fixes #410 and #411.
2020-03-02 10:06:09 -08:00
David Wendt fdce33ff5e Return an `Err` when decompression fails, rather than just logging it and returning an empty vec. 2020-02-26 18:18:24 -05:00
David Wendt ded7737ac0 `SwfMovie::from_data` is falliable and we should not hide those errors behind panics. 2020-02-26 18:15:01 -05:00
David Wendt 0313225164 Don't allow movie loads to be removed from the load manager unless they have completed or errored. 2020-02-26 18:03:45 -05:00
David Wendt a023e161fc Don't panic if our target handle was removed from the load manager. Instead, return an `Err` so that it can be properly reported on the console without killing the player. 2020-02-26 17:38:31 -05:00
Mike Welsh 223edb9bc1 core: Matrix translation is in twips 2020-02-26 12:47:47 -08:00
Mike Welsh c4c02260fb core: Implement keyUp event 2020-02-26 03:48:07 -08:00
Mike Welsh db9bd1616e chore: Remove unused deref impl from AudioBackend 2020-02-26 02:00:28 -08:00
Mike Welsh acd5f2c74f web: Fix invisible cursor 2020-02-26 01:47:08 -08:00
Mike Welsh c620f95c4f chore: Expose lzma feature on targets 2020-02-26 00:47:15 -08:00
Mike Welsh 86ec2c6cb8 input: Add InputBackend::set_mouse_cursor. Change cursor on buttons
It doesn't feel like Flash without having the hand cursor display
when hovering over buttons. First pass at implementing this;
core communicates which mouse cursor to use via
`InputBackend::set_mouse_cursor`.

TODO: Hand cursor only displayed for Button display objects
currently. Movie clips should also display this when they are in
"button mode" (when a button mouse event is set on them in AVM1,
or `buttonMode` property in AVM2).
2020-02-25 02:50:26 -08:00
Mike Welsh a917fa4028 tests: Add temporary test for MovieClip.getRect
This is just testing that it exists and returns the same values as
getBounds for shapes without strokes.

TODO: When it is properly implemented for strokes, add stroked
shapes to testing.
2020-02-24 14:12:48 -08:00
Mike Welsh d8079ac04a core: Stub out MovieClip.getRect
Just defer to getBounds for now. TODO: getRect should return bounds
ignoring strokes, so in reality it is <= getBounds.
2020-02-24 14:12:48 -08:00
Mike Welsh 993c05cf19 core: Calculate bounds for each morphshape frame 2020-02-24 14:12:48 -08:00
Mike Welsh a5c08f2e59 avm1: Implement MovieClip.getBounds and clean up bounding box methods
Implements MovieClip.getBounds, and also reorganized the
DisplayObject AABB methods:

 * `self_bounds` calculates the inherent untransfomed bounds of
 the object without children. All `DisplayObject`s must implement
 this method. For example, `Bitmap` returns the size of bitmap.
 Composite objects like `MovieClip` return a null AABB because they
 are made up of only children.
 * `bounds` calculates the untransformed bounds including children.
 * `local_bounds` calculates the bounds relative to the object's
 parent.
 * `world_bounds` calculates the bounds in global stage space.
 * `bounds_with_transform` calculates a tight AABB for the object
 with a given transform, and is used to implement the above.
2020-02-24 14:12:48 -08:00
Mike Welsh 73a9a0e771 tests: Add test for MovieClip.getBounds 2020-02-24 14:12:48 -08:00
Mike Welsh 8018c88870
core: Merge #120, initial multiple movie support
Initial support for loading multiple movies:
 * `loadMovie`/`loadMovieNum`
 * `loadVariables`/`loadVariablesNum`
 * XML loading
Desktop currently only loads from the local file system.
2020-02-24 12:47:18 -08:00
Mike Welsh 8c486b7544 chore: Use free functions for movie_clip methods
Try to keep style more consistent by using functions for all MC
methods. Previous was a mix of closures and functions (we're still
a little bad with this elsewhere)
2020-02-24 11:17:40 -08:00
Mike Welsh f163afc5b4 core: Use collect to copy level pointers 2020-02-24 02:28:27 -08:00
Mike Welsh 5315d059b9 desktop: Fetch from local filesystem for now 2020-02-24 01:49:28 -08:00
Mike Welsh 1b08fb538d chore: Rename layer -> level
Unify mix of 'layer' and 'level' in the code, and it's probably
better to stick with Flash nomenclature.
2020-02-23 23:41:55 -08:00
David Wendt 05e5fbb69c For some reason, this color transform code broke on the moviefetch branch 2020-02-22 00:02:52 -05:00
David Wendt abc1d00276 Fix incorrect preload of `_root` in `DefineFunction2` function calls.
This is caused by the fact that `avm.root_object` references the *current* stack frame, not the one we are about to introduce. Ergo, we need to pull the base clip of the *new* stack frame and find it's root.

This particular behavior only crops up in situations where there can be multiple root objects, at least until we implement `_lockroot`.
2020-02-22 00:02:51 -05:00
David Wendt 766ded6dfd When replacing a movie clip with another movie, don't wipe out the entire display object base as that disassociates us from our parent, siblings, and most importantly, *layer depth*. 2020-02-22 00:02:51 -05:00
David Wendt e0b4a0f193 Top-level layers are referenced via their path (`_leveln`) rather than name - in fact, their name is always the empty string. 2020-02-22 00:02:51 -05:00