Commit Graph

14 Commits

Author SHA1 Message Date
Mike Welsh 5ea06b0ce6 swf: Use Option for more PlaceObject parameters
There is a difference between empty/default (change value to default)
and none (don't modify), so make this explicit for some PlaceObject
parameters where it wasn't.

Fixes #1104.
2020-09-03 19:09:48 -07:00
Mike Welsh d7a186b2cd avm1: Implement shape hit testing 2020-09-02 17:51:55 -07:00
Nathan Adams 1f8abc92fd core: Keep track of cursor position in drawings 2020-05-21 18:38:10 +02:00
Nathan Adams eda862c719 swf: Merged core::Matrix into swf::Matrix 2020-05-20 14:54:41 +02:00
Nathan Adams 5767fb1772 swf: Added utility method for `Color::from_rgb(rgb, alpha)` 2020-05-10 22:03:56 -07:00
David Wendt 5ed5876e9a Merge SWF data and version into a single structure. Refactor everything that interacts with it to use `SwfSlice`s. 2020-02-21 23:57:53 -05:00
David Wendt 63b7d172f4 `TextRecord.height` is also in `Twips`.
Notably, the `Text` rendering code does not appear to actually work in pixel scale.
2020-02-03 14:46:34 -05:00
David Wendt fde7715fb8 `EditText.height` is in `Twips` 2020-02-03 14:46:33 -05:00
Mike Welsh bc872cbf9c swf: Clean up DefineButtonCxform tag 2019-12-20 19:20:25 -08:00
Mike Welsh 4cb2cefc5b swf: Switch depth to u16 2019-12-17 02:48:55 -08:00
Mike Welsh 24d8fa6298 swf: Add public method for read_export_assets 2019-12-16 19:32:34 -08:00
Mike Welsh da13b36e47 swf: Use EnumSet for ClipEventFlag 2019-12-15 19:00:16 -08:00
Mike Welsh 800147043a swf: Try to recover from incorrect zlib streams
Some SWFs are compressed incorrectly, often with incorrect
compressed/uncompressed lengths, causing the zlib decoders
to vomit if you try to decompress them fully. However, often times
the data still decompresses all the way to the End tag, and we
still want to try to play it even if it's corrupt.
Now these errors only omit a warning, and we'll continue to run
the SWF.

Addresses #86.
2019-10-10 13:41:43 -07:00
Mike Welsh 0de44d61b3 Merge swf-rs into ruffle repo
git-subtree-dir: swf
git-subtree-mainline: 2740f3ccc1
git-subtree-split: 1b04015326
2019-10-02 17:25:30 -07:00