Commit Graph

55 Commits

Author SHA1 Message Date
dependabot-preview[bot] da3398c832 build(deps): bump bitstream-io from 0.8.4 to 0.8.5
Bumps [bitstream-io](https://github.com/tuffy/bitstream-io) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/tuffy/bitstream-io/releases)
- [Commits](https://github.com/tuffy/bitstream-io/commits/v0.8.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-17 17:08:59 +00:00
dependabot-preview[bot] 2bfa2502a9 build(deps): bump num_enum from 0.4.2 to 0.4.3
Bumps [num_enum](https://github.com/illicitonion/num_enum) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/illicitonion/num_enum/releases)
- [Commits](https://github.com/illicitonion/num_enum/compare/0.4.2...0.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-17 17:07:35 +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
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
David Wendt 5ce499d11e Add separate libraries for each loaded movie. 2020-02-21 23:57:56 -05:00
David Wendt 250ec13c12 Implement LoadVariablesFlag.
This has some subtle problems: we cannot hold references to garbage-collected data in Futures, so we have to arrange for the AVM itself to forcibly root them for us. Then we get them back when our async code is ready to do something to the AVM.
2020-02-21 23:44:06 -05:00
David Wendt 55149b7b7e Reference count the Player and provide a weak reference in UpdateContext.
This allows the formation of `'static` futures that can still interact with a player. Async code will need to upgrade the weak reference in order to be able to interact with the player.
2020-02-21 23:44:06 -05:00
dependabot-preview[bot] dc8858505d build(deps): bump smallvec from 1.1.0 to 1.2.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.1.0...v1.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 18:42:28 +00:00
Mike Welsh 8cb4278903 tests: Use pretty_assertions for nice output on test fail 2020-01-17 13:54:39 -08:00
dependabot-preview[bot] 6c2f5143b3 build(deps): bump rand from 0.7.2 to 0.7.3
Bumps [rand](https://github.com/rust-random/rand) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 18:38:15 +00:00
David Wendt 89c9753520 Add rudimentary custom DOM impl on top of `quick_xml`.
`quick_xml` was chosen due to it's high performance and support for zero-copy use cases. However, we are not using `minidom`, which is the already-extant DOM impl that uses `quick_xml` as it's parsing provider. This is because `minidom` nodes are not amenable to garbage collection.

Specifically: we want to be able to construct a new `Object` variant that holds part of an XML node. However, `minidom::Element` directly owns it's children, meaning that we can't hold references to it from within `Object` while also keeping those objects to the `'gc` lifetime. Hence, we provide a GC-exclusive DOM implementation.

I ruled out solutions such as holding an entire XML tree in an `Rc` and having AVM objects that shadow them. This works for `SwfSlice` because indexing an array is cheap; but traversing a tree can get very expensive. XML is used in many places in Flash Player, so it's important that we treat it like a first-class citizen.
2020-01-04 18:48:17 -05:00
dependabot-preview[bot] b4a47e17da build(deps): bump generational-arena from 0.2.6 to 0.2.7
Bumps [generational-arena](https://github.com/fitzgen/generational-arena) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/fitzgen/generational-arena/releases)
- [Changelog](https://github.com/fitzgen/generational-arena/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/generational-arena/compare/0.2.6...0.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-03 19:14:43 +00:00
Nathan Adams 6c484fe29d core: Changed KeyCode into an enum that maps out every Flash key code 2019-12-21 19:08:06 -08:00
dependabot-preview[bot] e8e0b83d23 build(deps): bump smallvec from 1.0.0 to 1.1.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.0.0...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-20 22:36:07 +00:00
dependabot-preview[bot] 251fb01572 build(deps): bump jpeg-decoder from 0.1.17 to 0.1.18
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 18:21:42 +00:00
Mike Welsh 23ca66a7e3 avm1: Use enum_trait_object for avm1::Object 2019-12-10 01:36:01 -08:00
dependabot-preview[bot] 86c0fa327b build(deps): bump jpeg-decoder from 0.1.16 to 0.1.17
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.16 to 0.1.17.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 17:39:42 +00:00
Nathan Adams d1b73582ce core: Add feature `avm_debug` that toggles tracing avm actions and stack history 2019-11-29 12:59:45 -08:00
dependabot-preview[bot] 2e75f06ee5 build(deps): bump gc-arena-derive from 0.1.1 to 0.2.0
Bumps [gc-arena-derive](https://github.com/kyren/gc-arena) from 0.1.1 to 0.2.0.
- [Release notes](https://github.com/kyren/gc-arena/releases)
- [Changelog](https://github.com/kyren/gc-arena/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kyren/gc-arena/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 18:07:50 +00:00
dependabot-preview[bot] 238c575f16 build(deps): bump gc-arena from 0.1.1 to 0.2.0
Bumps [gc-arena](https://github.com/kyren/gc-arena) from 0.1.1 to 0.2.0.
- [Release notes](https://github.com/kyren/gc-arena/releases)
- [Changelog](https://github.com/kyren/gc-arena/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kyren/gc-arena/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 17:53:05 +00:00
dependabot-preview[bot] 387feaf76c
build(deps): bump rand from 0.6.5 to 0.7.2 (#124) 2019-11-20 18:30:54 +00:00
dependabot-preview[bot] 6d124a6ac2 build(deps): bump smallvec from 0.6.13 to 1.0.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 0.6.13 to 1.0.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v0.6.13...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-19 18:51:19 +00:00
David Wendt d543e67528 Inline the first 8 registers with a `SmallVec`. 2019-10-12 10:39:54 -04:00
Mike Welsh 3b42c70e48 core: Disable LZMA support by default 2019-10-12 00:09:10 -07:00
Mike Welsh 1ab5211bfe swf: Fix compiling with lzma feature 2019-10-11 23:18:57 -07:00
Nathan Adams f2a4000ee2 Added object property attributes (initially just DontDelete) 2019-10-08 14:30:36 +02:00
Will Brindle 06b0d42c8b core: Add matrix tests (#72)
* Add matrix tests. Requires the approx crate
2019-10-03 02:44:26 -07:00
Mike Welsh 52b6832db2 chore: Move swf-rs to ruffle workspace
Move the swf-rs crate into the Ruffle workspace proper instead of
having a separate repo. This makes it easier to make changes to
the SWF parsing code during development. swf-rs can still be
published as its own crate from the subfolder.
2019-10-02 18:58:58 -07:00
Mike Welsh 3c38405a71 avm1: Update swf-rs and use byte slices for functions 2019-09-09 13:57:29 -07:00
Mike Welsh 1ff86012ae chore: Fix jpeg-decoder warnings in Cargo.toml 2019-09-04 15:56:10 -07:00
Mike Welsh 35652ae87e chore: Update dependencies
Run cargo update. Remove git dependency on jpeg-decoder (the latest
version was published to crates.io). Update swf-rs to latest to
disable smoothing in SWFv7 and lower (addresses #28).
2019-08-29 14:57:12 -07:00
Nathan Adams a74d1734af Initial work on avm1 method calling, local and global variables.
This contains just enough AS1 support for early trivial loading screens to not crash (ie badgers badgers badgers)
2019-08-28 21:43:20 -05:00
Mike Welsh 39f1853440 core: Bump swf-rs revision to support ProductInfo
swf-rs now reads ProductInfo and DebugId SWF tags. These are not
documented by SWF19.

See: http://wahlers.com.br/claus/blog/undocumented-swf-tags-written-by-mxmlc/

Fixes #20.
2019-08-16 10:03:16 -07:00
Mike Welsh 4c6395bd83 core: Use latest git branch for jpeg-decoder
The current version of jpeg-decoder on crates.io (0.1.15) panics
when encountering a valid JPEG marker of length 2. Some SWF files
contained JPEGs with a COM segment of length 2. This is fixed
on the master branch of jpeg-decoder.
2019-08-14 23:19:10 -07:00
Mike Welsh 746b9d8518 core: Support for DefineBitsJPEG3/4
TODO: Pull out all JPEG decoding into core, remove jpeg-decoder
dependency from backend crates.
2019-08-12 16:44:49 -07:00
Mike Welsh 23db688e6f core: Add DefineBitsLossless decoding function
Pulled out the code for decoding DefinieBitsLossless tags into
backend::render::define_bits_lossless_to_rgba. Switch to libflate
for zlib decoding.
2019-08-12 15:45:40 -07:00
Mike Welsh e64e306137 Rework audio to allow for streaming decoding 2019-08-08 15:59:32 -07:00
Mike Welsh 725cdae6c5 Begin AVM1 cleanup 2019-08-08 15:58:45 -07:00
Mike Welsh ce5faefe1f Work 2019-08-08 15:57:10 -07:00
Mike Welsh fd8f58c6c2 Work 2019-07-10 21:04:59 -07:00
Mike Welsh 1460ece3dc Use commit id for swf-rs cargo dependency 2019-06-25 16:48:16 -07:00
Mike Welsh 2a365288e8 Update to latest swf-rs 2019-06-17 02:59:32 -07:00
Mike Welsh af33b8538e desktop: Better event sounds 2019-05-09 17:43:53 -07:00
Mike Welsh 12d6d3342b core: Switch to rust-gc 2019-05-08 18:10:43 -07:00
Mike Welsh 07c6addb8b core: Remove patch from Cargo.toml 2019-05-08 11:59:46 -07:00
Mike Welsh 62ae3b0c46 Rename project 2019-05-08 09:46:19 -07:00
Mike Welsh cf2091477d Support uncompressed event sounds 2019-05-05 22:04:35 -07:00
Mike Welsh 6e8082f01b Reorganized backend structure 2019-05-02 19:56:17 -07:00
Mike Welsh ae8df0486b Use a handle for the JS<->Rust Player object 2019-05-02 17:17:02 -07:00