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
Nathan Adams
751b15beec
chore: Raise errors during Object.registerClass
2020-02-29 23:13:02 +01:00
Nathan Adams
7bed4d4940
chore: Document each trace in attach_movie avm1 tests
2020-02-29 23:05:17 +01:00
Nathan Adams
041bb6b44c
avm1: Implement `Object.registerClass`
2020-02-29 23:05:17 +01:00
Nathan Adams
d850443c84
avm1: Refactor to expose `avm, context` in `post_instantiate`
2020-02-29 23:05:15 +01: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
David Wendt
00f88f9e87
Use the depth to indicate which layer a particular root clip is, and then use that to calculate it's `_leveln` path.
2020-02-22 00:02:50 -05:00
David Wendt
8ef759d377
Top-level layers do not get an instance name of `_leveln`.
2020-02-22 00:02:50 -05:00
David Wendt
9adf0f43d7
Allow levels to be read as scope variables, and add a test for this.
2020-02-22 00:02:50 -05:00
David Wendt
5a7e530c91
Add a test for cross-movie `_root`.
...
This test does not pass yet. Other layers need to resolve as target paths in order for this to happen.
2020-02-22 00:02:48 -05:00
David Wendt
aa6aba13dd
Abolish `context.root` completely.
...
`_root` is calculated dynamically based on the clip the currently executing function was called in.
Other things that used `context.root` have been changed to either update all layers or just update layer 0, which is the former `context.root`.
2020-02-22 00:02:46 -05:00
David Wendt
88b10f21c4
Implement an async executor for desktop so that these methods don't immediately panic.
2020-02-22 00:02:46 -05:00
David Wendt
33d26b9149
Shorten `Pin<Box<dyn Future<Output=Result<T,E>> + 'static>>` into `OwnedFuture<T,E>`.
...
This is technically stricter on `fetch` impls, but right now we can't support non-`'static` futures at all.
2020-02-22 00:02:45 -05:00
David Wendt
aab339880d
Implement `XML.load()`, with tests.
...
Interestingly enough, very little actually has to be done inside the async process for XML. The async process basically just fetches data and fires an event handler when it's done. Everything else is handled via a system builtin, `XML.onData`.
2020-02-22 00:02:45 -05:00
David Wendt
538a5f05e5
Add tests for various forms of `loadVariables`.
...
Surprisingly enough these tests passed without any changes, somehow.
2020-02-22 00:02:43 -05:00