Mike Welsh
f2d31b222b
core: Implement DefineButtonCxform SWF tag
...
(Although nothing uses this... it was only used in SWF version 2
and below!)
2019-12-20 19:20:25 -08:00
Mike Welsh
bc872cbf9c
swf: Clean up DefineButtonCxform tag
2019-12-20 19:20:25 -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]
4aebeab577
build(deps): bump web-sys from 0.3.32 to 0.3.33
...
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen ) from 0.3.32 to 0.3.33.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases )
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-20 18:36:15 +00:00
Mike Welsh
4821966898
ci: Bump to Rust 1.40
2019-12-20 01:09:23 -08:00
Mike Welsh
4026e22bbf
core: Handle DefineButtonSound SWF tag
...
This plays sounds whenever a button is hovered/clicked. Fixes
gun sounds in Pico's School.
2019-12-20 01:08:28 -08:00
Mike Welsh
cadf14f077
chore: Add .swd files to .gitignore (SWF debug symbols)
2019-12-19 17:33:27 -08:00
Mike Welsh
d459bbe010
avm1: Functions store their base clip
...
Functions now store their base clip (the code that contains the
executing bytecode). This is because `GotoFrame` and other actions
will execute on the clip the bytecode exists on, not on `this`.
(Note that `this.gotoAndStop` uses `GetMember` actions, which
worked correctly).
`Activation` now stores `target_clip`, and `Avm1::target_clip` and
`target_clip_or_root` grab this from the current stack frame.
Renamed `start_clip` to `base_clip` to match Flash conventions.
Removed `active_clip` as this was superfluous. Now you can use
`Avm1::target_clip_or_root`.
`UpdateContext` no longer contains `target_clip` etc.
2019-12-19 17:30:50 -08:00
Mike Welsh
c4b446ff78
tests: Add test for functions closing over base clip
2019-12-19 17:30:50 -08:00
Mike Welsh
13c43ed171
tests: Update movieclip_hittest to verify points are in root coordinates
2019-12-19 12:35:56 -08:00
Mike Welsh
540b03090a
avm1: hitTest point is actually in root coordinates ( fix #185 )
2019-12-19 12:35:56 -08:00
Nathan Adams
f6f358b4de
avm1: Expose TextFields and allow setting their .text
2019-12-19 10:19:43 -08:00
dependabot-preview[bot]
f84bfae010
build(deps-dev): bump webpack-dev-server in /web/selfhosted
...
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server ) from 3.9.0 to 3.10.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases )
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/v3.10.1/CHANGELOG.md )
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.9.0...v3.10.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-19 09:29:07 -08:00
Mike Welsh
c9a5d2dbb3
chore: Fix clippy lints in 1.40
2019-12-19 09:10:41 -08:00
dependabot-preview[bot]
d1f258e71e
build(deps-dev): bump webpack from 4.41.3 to 4.41.4 in /web/selfhosted
...
Bumps [webpack](https://github.com/webpack/webpack ) from 4.41.3 to 4.41.4.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v4.41.3...v4.41.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-19 16:21:31 +00:00
Nathan Adams
d3848f97ea
avm1: Implemented MovieClip.hittest, without shape flag
2019-12-18 15:21:14 -08:00
Nathan Adams
5f6eea6f25
chore: Refactor system listeners into a reusable system
2019-12-18 15:15:56 -08:00
Mike Welsh
3a8256a993
avm1: Allow setting _name
2019-12-18 14:07:32 -08:00
Mike Welsh
9079b69991
avm1: Push Undefined when trying to construct invalid object
2019-12-18 13:47:01 -08:00
Mike Welsh
bb6a4c119c
avm1: Warn and clear operand stack if not empty after execution
...
Add a check and clear the stack if it isn't empty at the end of
`run_stack_till_empty`. This is probably a bug on our side
and we a good place for breakpoints.
2019-12-18 13:47:01 -08:00
Mike Welsh
8b9aedc4c8
avm1: Fix extra stack frame in event handlers
...
When running an clip event handler (e.g. onEnterFrame), a stack
frame is pushed to get the property value. However, this frame
was causing an extra Undefined to be pushed on the operand stack in
`Avm1::retire_stack_frame`, which would blow out the stack.
Now this stack frame is popped after the property is resolved and
before the function is executed. The function will push its own
stack frame when it executes.
2019-12-18 13:47:01 -08:00
Mike Welsh
3e003ed9dd
avm1: Add missing stage.rs
2019-12-17 22:36:53 -08:00
Mike Welsh
3ebc1ed928
avm1: Stub out Stage properties
...
This is a very rough stub out of Stage.width and height to get
basic V-cams to start functioning.
TODO: Implement the different stage scaling modes. We will probably
want to add a "Stage" display object to handle this.
2019-12-17 22:28:44 -08:00
Mike Welsh
2af76e10f8
core: Mark scale/rotation as dirty when matrix changes
2019-12-17 22:06:34 -08:00
Mike Welsh
74aa127b74
avm1: Fix double borrow in Executable::exec
2019-12-17 21:35:22 -08:00
Mike Welsh
32953d5c5c
avm1: Allow objects in ActionSetTarget2
...
Fixes 8-Bit Theater 3 soft locking on the first frame.
2019-12-17 18:32:25 -08:00
Mike Welsh
a9baf72c53
avm1: Handle trailing / in slash paths
2019-12-17 04:00:01 -08:00
Mike Welsh
28faf2030b
tests: Add failing case to slash_syntax test
2019-12-17 04:00:01 -08:00
Mike Welsh
4d287cab71
avm1: MovieClip creation methods (merge #176 )
...
avm1: MovieClip creation methods
2019-12-17 03:59:14 -08:00
Mike Welsh
dae3e27fb3
avm1: Rename Library::instantiate_by_id
2019-12-17 03:27:05 -08:00
Mike Welsh
fc3878d6d9
tests: Add tests for movie clip cloning/removing
2019-12-17 03:20:01 -08:00
Mike Welsh
1476930e0c
avm1: Implement MovieClip.removeMovieClip
2019-12-17 03:20:01 -08:00
Mike Welsh
1668e823e6
avm1: Implement MovieClip.createEmptyMovieClip
2019-12-17 03:02:07 -08:00
Mike Welsh
d33a8278d7
avm1: Implement MovieClip.duplicateMovieClip
2019-12-17 03:00:56 -08:00
Mike Welsh
009da39f12
avm1: Implement MovieClip.attachMovie
2019-12-17 03:00:56 -08:00
Mike Welsh
d0504104b7
core: Use i32 for display object depth
2019-12-17 02:48:55 -08:00
Mike Welsh
4cb2cefc5b
swf: Switch depth to u16
2019-12-17 02:48:55 -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
24d8fa6298
swf: Add public method for read_export_assets
2019-12-16 19:32:34 -08:00
Mike Welsh
b6df9fded0
core: Remove boxes from library items
2019-12-16 19:32:34 -08:00
Nathan Adams
45e497826b
avm1: Implement `Mouse` listeners & events (excluding scroll)
2019-12-16 19:22:10 -08:00
Mike Welsh
c2f4633cdb
avm1: Trace constant_pool in Collect for Activation
2019-12-16 16:14:49 -08:00
Mike Welsh
c61842a72a
tests: Add test for slash syntax
2019-12-16 15:33:57 -08:00
Mike Welsh
f270a278c0
avm1: Push Undefined on GetVariable with invalid slash path
2019-12-16 15:33:16 -08:00
Mike Welsh
8b85212513
avm1: Handle .. in slash syntax
2019-12-16 15:24:25 -08:00
Mike Welsh
f4f755e958
avm1: Remove warnings on _currentframe/_totalframe
2019-12-16 10:21:37 -08:00
Nathan Adams
84ff69854a
avm1: Pass mouse events down to movie clips
2019-12-16 10:11:23 -08:00
Nathan Adams
c8e42123cf
avm1: Implemented `_xmouse` and `_ymouse`
2019-12-16 10:11:23 -08:00
Nathan Adams
783037e8cc
chore: Removed array debug code that snuck in. Oops!
2019-12-16 09:56:46 -08:00