Commit Graph

2403 Commits

Author SHA1 Message Date
CUB3D fa8b2bca8b chore: Fix formatting 2020-07-27 12:50:31 -07:00
CUB3D c1771d7d4e core: Split function and constructor, tests, fix bug with constructor 2020-07-27 12:50:31 -07:00
CUB3D 4217138d1a chore: Update comment 2020-07-27 12:50:31 -07:00
CUB3D 7792487181 chore: Fix clippy lints 2020-07-27 12:50:31 -07:00
CUB3D afb1d6b42f core: Add global Array() function 2020-07-27 12:50:31 -07:00
CUB3D 22db5ab76a core: Populate function when creating a constructor 2020-07-27 10:38:50 -07:00
CUB3D 01b7e73459 core: Fix build 2020-07-27 10:38:50 -07:00
CUB3D adb9af5a62 core: Update arguments 2020-07-27 10:38:50 -07:00
CUB3D 7b66968ebb core: Cleanup 2020-07-27 10:38:50 -07:00
CUB3D 5f87b1361b core: Update NewMethod action and update globals to use constructor 2020-07-27 10:38:50 -07:00
CUB3D e83dbf7327 core: Split construct and call for function objects 2020-07-27 10:38:50 -07:00
Nathan Adams 337e3292dd avm1: Treat MovieClipLoader _listeners as an array, not an object 2020-07-27 05:36:28 -07:00
dependabot-preview[bot] ed07ea6db2 build(deps): bump syn from 1.0.35 to 1.0.36
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.35 to 1.0.36.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.35...1.0.36)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 05:17:11 -07:00
dependabot-preview[bot] e8214f2305 build(deps): bump image from 0.23.7 to 0.23.8
Bumps [image](https://github.com/image-rs/image) from 0.23.7 to 0.23.8.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.7...v0.23.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 05:01:54 -07:00
Nathan Adams 749d78e613 chore: Update debug guide in CONTRIBUTING.md 2020-07-27 04:13:31 -07:00
Nathan Adams 17344613e3 core: Lock variable dumping behind avm_debug 2020-07-27 04:13:31 -07:00
Nathan Adams e98b953088 avm1: Use avm_warn and avm_error in all of avm1 2020-07-27 04:13:31 -07:00
Nathan Adams 10a739f714 avm1: Always assign function names (where possible) when running in avm_debug, not just when spamming output 2020-07-27 04:13:31 -07:00
Nathan Adams 810e231b8b avm1: Add macros for more advanced log/error printing when avm_debug is on 2020-07-27 04:13:31 -07:00
Mike Welsh e5480ee9b2 chore: Use matches! to fix clippy lint 2020-07-27 04:13:11 -07:00
dependabot-preview[bot] 938a129a49 build(deps): bump bytemuck from 1.3.0 to 1.3.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/commits/v1.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 03:16:49 -07:00
Nathan Adams f1f04e0e7a avm1: Fixed a bunch of cases where we're using _level0 instead of current object (fixes #926) 2020-07-27 01:40:28 -07:00
Nathan Adams cf61f8a4d3 avm1: Add failing test for registerClass in a loaded movie 2020-07-27 01:40:28 -07:00
Mike Welsh 8ac2ad9b40
avm1: Store movie URL on load and implement _url (merge #912) 2020-07-27 01:38:28 -07:00
David Wendt acd7ceb706 Fix missing import on web. 2020-07-25 22:20:30 -04:00
David Wendt 153b7b78a5 Add a web version of `url_from_relative_path` that just yields an error.
This allows us to remove the conditionals on implementations of `from_path` that need to call this function, as the function is now always guaranteed to be there, even if it's just a no-op/`Err` generator.
2020-07-25 19:48:32 -04:00
dependabot-preview[bot] c3127c0506 build(deps): bump bytemuck from 1.2.0 to 1.3.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-24 20:10:56 -07:00
Mike Welsh 4680b01f03 swf: Allow StyleChangeRecord in DefineShape v1
The spec says that StyleChangeRecord is only supported in
DefineShape2+, but SWFs exist with StyleChangeRecord in
DefineShape1 tags, and these play correctly in the Flash Player.
(see #929 HAGIMURA_EXTREME.swf).
2020-07-24 18:46:18 -07:00
Mike Welsh 07122dc931 avm1: Implement Key listeners 2020-07-24 14:32:41 -07:00
dependabot-preview[bot] 40101ed4ec build(deps-dev): bump webpack from 4.43.0 to 4.44.0 in /web
Bumps [webpack](https://github.com/webpack/webpack) from 4.43.0 to 4.44.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.43.0...v4.44.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-24 11:45:38 -07:00
dependabot-preview[bot] 786ecd0c5d build(deps-dev): bump @wdio/local-runner from 6.3.4 to 6.3.5 in /web
Bumps [@wdio/local-runner](https://github.com/webdriverio/webdriverio) from 6.3.4 to 6.3.5.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.3.4...v6.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-24 11:42:50 -07:00
dependabot-preview[bot] 382745922d build(deps-dev): bump @wdio/cli from 6.3.4 to 6.3.5 in /web
Bumps [@wdio/cli](https://github.com/webdriverio/webdriverio) from 6.3.4 to 6.3.5.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.3.4...v6.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-24 11:42:38 -07:00
Mike Welsh 85d9caef56 avm1: All properties of _global are DontEnum 2020-07-23 22:58:58 -07:00
Mike Welsh 794dc69809 avm1: Implement isFinite 2020-07-23 22:58:58 -07:00
David Wendt aed47d458d Level loads in GetURL2 should also propagate origin information. 2020-07-23 23:09:08 -04:00
David Wendt a34e81a704 `_url` on desktop should always return a file URL for file-loaded movies. 2020-07-23 23:02:56 -04:00
David Wendt f0e2c77c1f URLs from paths is a desktop-only feature. 2020-07-23 23:02:55 -04:00
David Wendt 9b9d4076fe Expose movie URL to ActionScript. 2020-07-23 23:02:55 -04:00
David Wendt a8877ab63c Yield the correct error when the root movie load fails. 2020-07-23 23:02:55 -04:00
David Wendt d172441663 Also make absolute URLs for all movie loads passed through the load manager. 2020-07-23 23:02:54 -04:00
David Wendt 5d15f5bfe3 When loading a movie from the filesystem outside of the core, ensure that the URL is properly made absolute. 2020-07-23 23:02:54 -04:00
David Wendt c926da8888 Refactor URL relativization into two utility methods that backends can provide base URLs and paths to. 2020-07-23 23:02:54 -04:00
David Wendt 7433bfe28f Add a `NavigatorBackend` method to resolve relative URLs. 2020-07-23 23:02:53 -04:00
David Wendt 4813942fe7 The player should always change the audio backend's framerate itself. 2020-07-23 23:02:52 -04:00
David Wendt f56d16a68d Separate player creation from root movie setup, and allow users of Ruffle to load in movies synchronously or asynchronously.
During the small period of time when a player is created but has no root movie, a temporary empty movie is installed with an assumed stage size and framerate of 550x400@12fps. This is Flash default for new projects, so it seemed appropriate. User ActionScript cannot see these values, and I'm not even sure JavaScript can, either.
2020-07-23 23:02:51 -04:00
David Wendt 6998dafdb9 Store an origin URL on every movie that is loaded. 2020-07-23 23:02:50 -04:00
Nathan Adams 7f7281493f core: Allow toggling avm_debug output on and off with ctrl+alt+d, defaults to off 2020-07-23 19:14:32 -07:00
Nathan Adams 2df3b81f92 web: Allow avm_debug in web 2020-07-23 11:25:59 -07:00
Mike Welsh efa059ff8d tests: Add test for LoadVars 2020-07-23 03:00:19 -07:00
Mike Welsh 1709e76409 avm1: Implement LoadVars 2020-07-23 03:00:19 -07:00