Mike Welsh
2c4639eb6c
core: Add BoundingBox and static data to Graphic
...
Add BoundingBox, which will store the AABB of dispaly objects.
Added static_data to Graphic, which is a reference to constant data
shared between each instance of a specific graphic. Currently
holds the render handle, bounding box, and character ID.
2019-08-19 17:29:55 -07:00
Mike Welsh
2c7e3c835f
core: Add parent to DisplayObjectBase
2019-08-19 17:29:55 -07: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
4666d211a7
core: Add dyn to fix Rust 1.37 warnings
...
Omitting dyn on trait objects now emits a warning, so add missing
dyn where necessary.
2019-08-15 13:54:20 -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
a3998b657b
core: Remove invalid JPEG data from DefineBitsJPEG
...
DefineBitsJPEG tags can have some extraneous bytes inside the
stream. Splice these out when decoding the JPEG.
TODO: Docs say this should only happen for SWF versions before 8?
2019-08-12 15:45:40 -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
f3a746de21
core: Improve morph shape
...
Morph shapes where move_to was not in a matching pair would crash.
Now the previous pen position is used to generate the matching
move_to.
The ratio was backwards, causing the shape tween to run in
reverse. Morph shapes should now animate in the proper direction.
2019-08-11 23:58:06 -07:00
Mike Welsh
af2287a658
desktop: Add letterbox to viewport
...
Add getters to Player to allow access to the type Renderer.
Letter/pillarboxes added as window resized.
2019-08-10 10:18:32 -07:00
Mike Welsh
24fc403e06
core: Make player generic over backend
2019-08-09 22:34:15 -07:00
Mike Welsh
2accd5bdd4
core: Remove audio struct
2019-08-09 16:03:13 -07:00
Mike Welsh
3edc3c3d3e
web: Disable auto-play, add click-to-play
2019-08-09 14:50:20 -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
2a365288e8
Update to latest swf-rs
2019-06-17 02:59:32 -07:00
Mike Welsh
3cefeeba6a
Use twips for internal calculations
...
Switch from pixels to twips for internal calculations. swf crate
was updated to add a Twips wrapper-type. Ruffle will use this type
internally for transforms and shapes. This fixes some precision
errors in rendering (see heroes_of_cybertron.swf) and will match
what the Flash Player does internally more closely. (e.g.
DisplayObject x and y will be quantized to 1/20 pixel units). It
is up to the renderer to convert units from twip space to pixels
when rendering.
2019-05-17 13:40:56 -07:00
Mike Welsh
6673527b0a
core: Add clip depth to DisplayObject
2019-05-12 13:48:00 -04:00
Mike Welsh
79b3a7007d
core: Initial morph shape implementation
2019-05-12 12:55:48 -04:00
Mike Welsh
af33b8538e
desktop: Better event sounds
2019-05-09 17:43:53 -07:00
Mike Welsh
61189cfb84
core: Fix text transforms
2019-05-09 14:14:21 -07:00
Mike Welsh
efe3270ce0
web: Decode streams completely on preload (for now)
2019-05-09 12:43:26 -07:00
Mike Welsh
74743f327c
core: Remove unused file
2019-05-09 12:43:03 -07:00
Mike Welsh
12d6d3342b
core: Switch to rust-gc
2019-05-08 18:10:43 -07:00
Mike Welsh
20844185d7
core: Set preload flag
2019-05-07 12:11:32 -07:00
Mike Welsh
cb6d96955d
Remove debug spew
2019-05-07 09:52:22 -07:00
Mike Welsh
e6e8536672
Clean up DisplayObject traits
2019-05-07 03:34:17 -07:00
Mike Welsh
7983d9eb96
Clean up DisplayObject instantiation
2019-05-07 03:22:58 -07:00
Mike Welsh
60b673986b
Work
2019-05-06 23:31:34 -07:00
Mike Welsh
598b342106
core: Add name property to DisplayObject
2019-05-06 11:15:52 -07:00
Mike Welsh
8262db3991
ADPCM decoder
2019-05-06 02:34:45 -07:00
Mike Welsh
cf2091477d
Support uncompressed event sounds
2019-05-05 22:04:35 -07:00
Mike Welsh
a0c478379d
Preload assets for web
...
Run through all definition tags to preload assets on web.
TODO: Keep track of which assets are done loading.
2019-05-05 17:35:00 -07:00
Mike Welsh
1a4734896d
Event sounds and text on web
2019-05-05 15:55:27 -07:00
Mike Welsh
2480469c2c
First pass of static text
2019-05-04 11:45:11 -07:00
Mike Welsh
1f6aa4e4e1
Add MorphShape stub
2019-05-03 14:25:54 -07:00
Mike Welsh
34f31a37f0
Use BTreeMap for display list
2019-05-03 14:25:01 -07:00
Mike Welsh
1dfedae485
Add some button functionality
2019-05-03 11:44:12 -07:00
Mike Welsh
884b7c915a
Gradients on desktop
2019-05-02 22:09:25 -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
Mike Welsh
747aeba2ed
First pass of Button
2019-05-01 22:34:02 -07:00
Mike Welsh
708175419a
Add AVM1 opcodes
2019-05-01 22:00:40 -07:00
Mike Welsh
d6e68dd43e
Add initial AVM1 implementation
2019-05-01 17:46:49 -07:00
Mike Welsh
5e88f43280
Color transforms
2019-05-01 09:55:54 -07:00
Mike Welsh
ded41dffb0
work
2019-04-30 17:46:32 -07:00
Mike Welsh
eb6c23d967
Work
2019-04-30 01:53:21 -07:00
Mike Welsh
663ad9f663
Work
2019-04-29 13:24:29 -07:00
Mike Welsh
ed3797f28c
work
2019-04-28 22:55:44 -07:00
Mike Welsh
ee64cc77bc
Reforactor
2019-04-27 23:08:59 -07:00