Commit Graph

41 Commits

Author SHA1 Message Date
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
Nathan Adams ae064b62be chore: Change to no_drop from empty_drop for new gc-arena 2019-11-22 17:53:05 +00:00
Mike Welsh 01f47d675c core: Move UpdateContext into context submodule 2019-10-27 13:49:47 -07:00
Mike Welsh c4c895c6c9 core: Move display objects to display_object module 2019-10-26 15:04:52 -07:00
Mike Welsh a4bed6c643 core: Improve execution order of AS 2019-10-26 01:52:42 -07:00
David Wendt 911de06584 Only version MovieClips. Unversioned display objects recursively read their parents' versions, or the default version otherwise. 2019-10-13 17:27:04 -04:00
David Wendt feaa3dd203 Add a version parameter to every DisplayObject impl 2019-10-12 10:39:52 -04:00
Mike Welsh f0e345bea8 core: Improve handing of gotos (fix #33)
Display objects will now properly persist during gotos instead
of erroneously being recreated.
2019-09-16 22:03:34 -05:00
Mike Welsh 94afcfb2e1 core: Add DisplayObject::id 2019-09-15 11:35:04 -07:00
Mike Welsh 28f0ce3c83 Mask work 2019-09-09 20:42:08 -05:00
Mike Welsh 0849826c48 core: Add static data for morph shape and text 2019-09-06 15:15:34 -07:00
Nathan Adams 002272d7b5 Functions return `[type Function]` when converted to strings 2019-08-31 18:28:28 +02:00
Nathan Adams 7a18ece455 `DisplayObject`s all have a AVM1 `Value`. Added `toString()` default method for Objects (but not functions) 2019-08-31 17:54:15 +02: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 0143d9716e core: Button work 2019-08-19 22:27:38 -07:00
Mike Welsh d8ddf78bdc avm1: Implement _rotation and improve SetProperty
Implement _rotation and add SetProperty/GetProperty for these
values.
2019-08-19 22:27:38 -07:00
Mike Welsh 6c923930e6 avm1: Stub out ActionSetProperty
Rough impl of ActionSetProperty action. Not all properties
implemented. Add DisplayObject::matrix_mut.
2019-08-19 22:27:38 -07:00
Mike Welsh 0ab20e01c1 Add dyn 2019-08-19 22:27:38 -07:00
Mike Welsh ce606cece8 core: Re-enable AVM1 2019-08-19 22:27:37 -07:00
Mike Welsh 5bba546a53 core: Add BoundingBox calculations
TODO: Add dirty flag and cache matrices.
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 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 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 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 efe3270ce0 web: Decode streams completely on preload (for now) 2019-05-09 12:43:26 -07:00
Mike Welsh 12d6d3342b core: Switch to rust-gc 2019-05-08 18:10:43 -07:00
Mike Welsh e6e8536672 Clean up DisplayObject traits 2019-05-07 03:34:17 -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 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 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 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 ed3797f28c work 2019-04-28 22:55:44 -07:00
Mike Welsh ee64cc77bc Reforactor 2019-04-27 23:08:59 -07:00