Commit Graph

29 Commits

Author SHA1 Message Date
Nathan Adams f6f358b4de avm1: Expose TextFields and allow setting their .text 2019-12-19 10:19:43 -08:00
Mike Welsh dae3e27fb3 avm1: Rename Library::instantiate_by_id 2019-12-17 03:27:05 -08:00
Mike Welsh 009da39f12 avm1: Implement MovieClip.attachMovie 2019-12-17 03:00:56 -08:00
Mike Welsh 0f3bad8f1b core: Wrap Font in a Gc 2019-12-17 02:48:55 -08:00
Mike Welsh 289e0b8aff core: Handle ExportAssets SWF tag 2019-12-16 19:32:34 -08:00
Mike Welsh 30ecbd0ecc core: Use enum_trait_object for DisplayObject 2019-12-10 01:36:01 -08:00
Mike Welsh 23ca66a7e3 avm1: Use enum_trait_object for avm1::Object 2019-12-10 01:36:01 -08:00
David Wendt d25bdbacf8 Separate `Object` into an interface trait and a standard implementation. Host object implementations may bypass `ScriptObject` and directly interface with the AVM using this trait.
Note that host objects that do so will *not* have access to their standard representation from within member functions - you will need to extend the interface to accomodate for them. This is due to long-standing limitations with type IDs and downcasting with types that bear lifetimes - it's entirely an unsafe operation and exposing such a facility to safe Rust is unsound. However, this will at least let us separate out several things from ScriptObject that don't need to be there for the time being.
2019-11-26 14:51:05 -05:00
David Wendt 2f965d1c64 First stab at moving system builtins to explicit prototypes 2019-11-26 14:51:03 -05:00
Mike Welsh e3d0d9031d core: Handle empty JPEGTables tags (fix #116) 2019-11-11 17:08:08 -05:00
Mike Welsh 09fa755405 core: Make Library::device_font optional 2019-10-26 02:20:42 -07:00
Mike Welsh 4aec120ffb core: Add Bitmap display object
Converts the Bitmap character to a proper display object. This can
be instantiated directly in a PlaceObject tag in SWFv9 movies,
compared to the previous versions which indirectly references
bitmaps from Shape tags.
2019-10-11 16:33:58 -07:00
Mike Welsh eded29ce6d text: Add dummy implementation of device text
Embed an SWF version of Noto Sans (core/assets/*) into the player.
The player will load this font and use it to render device text.

This is a quicky implementation to get dynamic device text
rendering.
2019-10-07 23:23:45 -07:00
Mike Welsh de1cedb653 core: Initial EditText implementation 2019-10-07 23:23:45 -07:00
Nathan Adams 2eca394a58 Implemented `typeof` for movieclips and functions 2019-08-31 14:09:37 +02:00
Nathan Adams 2fd7d456a4 Movie clip access from AS. Functions are now callable objects, and receive `this`. 2019-08-30 20:37:48 +02:00
Mike Welsh 5998876271 core: Don't panic on missing characters in button 2019-08-22 21:54:00 -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 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 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 79b3a7007d core: Initial morph shape implementation 2019-05-12 12:55:48 -04:00
Mike Welsh 7983d9eb96 Clean up DisplayObject instantiation 2019-05-07 03:22:58 -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 1dfedae485 Add some button functionality 2019-05-03 11:44:12 -07:00
Mike Welsh ae8df0486b Use a handle for the JS<->Rust Player object 2019-05-02 17:17:02 -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