Commit Graph

1528 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
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
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
Mike Welsh 07122dc931 avm1: Implement Key listeners 2020-07-24 14:32:41 -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
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
Mike Welsh 74cb8609c1 avm1: Support loading into _level in GetURL2
Calling loadMovieNum with a variable parameter compiles into a
GetURL2 call with a `_level` window target parameter. Previously
this triggered Ruffle to try to navigate to the SWF. Now it
properly loads the SWF inside the current movie.
2020-07-23 02:08:48 -07:00
Nathan Adams f0980301da avm1: Implement arguments.callee 2020-07-22 15:57:45 -07:00
Nathan Adams 4a56cb1062 avm1: Make virtual properties store Object instead of Executable, so we can refer to the callee 2020-07-22 15:57:45 -07:00
Nathan Adams f4ab57d6e0 avm1: Make property watchers take Object, not Executable, so we can track the callee 2020-07-22 15:57:45 -07:00
Nathan Adams 9ae10b6387 avm1: Made AvmString debug actually show contents of the string 2020-07-22 13:23:57 -07:00
Nathan Adams 3b2b7c226c avm1: Fix gc unsoundness with missing collects in SystemPrototypes 2020-07-21 09:43:07 -07:00
Nathan Adams 0e0be34e17 avm1: Fix compile error when using avm_debug flag 2020-07-21 09:42:41 -07:00
Nathan Adams d5deeee1b7 avm1: Properly implement the arguments object, it's an array 2020-07-21 07:49:00 -07:00
dependabot-preview[bot] aa966fbfb6 build(deps): bump syn from 1.0.34 to 1.0.35
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.34 to 1.0.35.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.34...1.0.35)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-20 14:24:56 -07:00