Commit Graph

8258 Commits

Author SHA1 Message Date
Nathan Adams d6abf24a81 chore: Update docs andf actions to wasm-bindgen-cli 0.2.84 2023-02-13 02:57:52 +01:00
renovate[bot] fed24aa243 fix(deps): update rust dependencies - wasm-bindgen related 2023-02-13 02:57:52 +01:00
Nathan Adams 4cb22d6d9d chore: Bundle wasm-bindgen and wasm-bindgen-futures updates together in renovate PRs 2023-02-13 01:07:55 +01:00
Lord-McSweeney b848ab6860 Fix stub in DisplayObjectContainer
In mouse_children
2023-02-13 00:42:28 +01:00
Lord-McSweeney eb7a96f55b Fix stub types in security.rs
Change from avm2_stub_getter to avm2_stub_method
2023-02-13 00:42:28 +01:00
Adrian Wielgosik 561e118ffe avm2: Export private traits normally, remove private_trait_scripts hack 2023-02-12 17:49:14 +01:00
Adrian Wielgosik f717b99599 avm2: Compare private namespaces by pointer. Refactor rust-avm field sharing. 2023-02-12 17:49:14 +01:00
Adrian Wielgosik e0e653e463 avm2: make Namespace a GC type 2023-02-12 17:49:14 +01:00
Aaron Hill 4e0dce2efa core: Make SandboxType configurable, and set to 'remote' on web
The Newgrounds API checks `Security.sandboxType` to see if it should
run in debug mode or not (which determines whether or not medals
can actually be unlocked).

For now, desktop continues to use `localTrusted` as the default,
while web now uses `remote`. We might want to make this configurable
at some point, but this should be good enough for now (and better
match Flash's behavior).
2023-02-11 14:44:11 -06:00
Aaron Hill 9bce6b78d5 core: Queue up Sound and SoundChannel methods during loading
Flash supports calling `Sound.play`, `SoundChannel.stop`, and
`SoundChannel.soundTransform` while a sound load is in progress
(e.g. immediately after calling `Sound.load`).

To support this, we queue up information inside `SoundObject`
and `SoundChannelObject` when a load is in progress. When a load
completes, we trigger any queued `Sound.play` and `SoundChannel.stop`
calls, and apply the most recent `SoundChannel.soundTransform`
2023-02-11 11:53:56 -06:00
Aaron Hill 51fe1e9754 core: Handle `DirtyState::CpuModified` in `overwrite_cpu_pixels`
If we're going to overwrite the CPU pixels with the result of a
GPU operation, make sure the GPU texture is up to date with the
latest CPU pixels. I've also renamed the method to
`overwrite_cpu_pixels_from_gpu` to better reflect how it should
be used.
2023-02-11 11:37:00 -06:00
Bale 73e9fd55fb
avm2: Make sure scripts get initialized after all scripts have been loaded when lazy init is disabled (#9478)
* avm2: Initialize scripts **after** all scripts have been loaded

* tests: Add test for eager initialization
2023-02-11 00:38:38 +00:00
Aaron Hill 4b76d1b32a
core: Support using URLVariables as a POST request body (#9489)
This is needed by the Newgrounds API. We don't have the ability
to make fake requests to HTTP urls in our test frameworks,
so I haven't added any tests for this. However, I tested locally
that this allows the Newgrounds API to work (and got a medal
in Cloud Wars).
2023-02-11 00:18:10 +00:00
nosamu a2cd3ee06e tests: Update fills_and_lines expected image 2023-02-10 23:43:01 +01:00
nosamu 0b6e413b5b chore: Run `cargo update` 2023-02-10 23:43:01 +01:00
nosamu 669bd83387 exporter: Only use png feature of image crate 2023-02-10 23:43:01 +01:00
nosamu c1fe3ded25 chore: remove unnecessary FromStr impl for LoadBehavior 2023-02-10 00:56:17 -08:00
nosamu 1a65a0942c desktop: Add --letterbox option 2023-02-09 23:43:25 -08:00
EmperorBale e7612f571d avm2: Implement ScopeChain caching 2023-02-09 10:51:12 -08:00
golfinq 37ec94f95b Avm2: Implement Stage.invalidate 2023-02-08 17:47:21 -07:00
Aaron Hill a818dd0918 core: Use colorTransform in DisplayObject.setTransform 2023-02-08 20:56:46 +01:00
Adrian Wielgosik 61a5161a20 avm2: Convert most errors in get/set/initproperty to AVM errors 2023-02-07 18:50:15 -06:00
Adrian Wielgosik c844d2ab6f avm2: Only store actually-passed arguments to 'arguments' 2023-02-07 18:35:30 -06:00
Nathan Adams 83f88a6f3e chore: Update renovate to only group rust patch dependencies, leave minor/major dependency updates (and any wasm-bindgen) to their own PR 2023-02-07 14:11:11 -06:00
Nathan Adams ac9b6e3ecb avm2: Mark Dictionary(true) and TimerEvent.updateAfterEvent() as stubs 2023-02-07 20:34:59 +01:00
Nathan Adams e5f44b0f05 avm2: Replaced stubs in actionscript with new stub system 2023-02-07 20:34:59 +01:00
Nathan Adams bdbf54ecd4 core: Added ability to mark stubs inside actionscript 2023-02-07 20:34:59 +01:00
Nathan Adams dff558170e avm2: Implement BitmapData.getPixels() 2023-02-07 19:10:25 +01:00
Nathan Adams 25cc6f3243 avm2: Change MovieClip::frame_scripts to Vec<Option<Avm2Object>>, where index is frame num 2023-02-07 18:26:27 +01:00
Nathan Adams 43d9c3deed avm2: Make sure SoundChannel.soundTransform always returns a value 2023-02-07 18:26:27 +01:00
Nathan Adams bc7773596b avm2: addFrameScript allows null to unset the script, and only allows one script per frame 2023-02-07 18:26:27 +01:00
CUB3D 48f4df51a5 avm1: Correct depth calculation for AVM1 clips pending removal and add tests 2023-02-06 10:53:45 -07:00
CUB3D 6b6e07c7cb test: Update unload fla 2023-02-06 10:53:45 -07:00
CUB3D 2d11a250da avm1: Retrieving the child of a container should prioritise lowest depth 2023-02-06 10:53:45 -07:00
CUB3D a356be15fe avm1: Only delay removals on AVM1, check for dynamic unload handlers 2023-02-06 10:53:45 -07:00
CUB3D 755425ebfa avm1: Delay clip removals when a child has an unload listener
When removing a clip, first check if it has an unload event listener somewhere
it's hierarchy.
If it does, enqueue the removal to happen on the next frame, by moving it to a negative depth.
2023-02-06 10:53:45 -07:00
David Wendt acd0d4ab29 sponsors: Add Bubble Shooter as diamond sponsor 2023-02-06 09:07:38 -07:00
Nathan Adams 0e9b1e4a77 wgpu: Better support for 2x and 8x msaa 2023-02-06 16:08:04 +01:00
Nathan Adams 50fd7aeff5 core: Add quality options to the context menu 2023-02-06 16:08:04 +01:00
Nathan Adams 6fbdbd8c72 web: Removed old sample_count default 2023-02-06 16:08:04 +01:00
Nathan Adams 68761608fc desktop: Add --quality option 2023-02-06 16:08:04 +01:00
Nathan Adams a220703618 core: Made PlayerBuilder take quality instead of setting it after the Player was made 2023-02-06 16:08:04 +01:00
Nathan Adams 1cb3ea7bf9 wgpu: Store quality, not sample_count, and calculate the correct sample count per format 2023-02-06 16:08:04 +01:00
Nathan Adams b95983b492 wgpu: Hook up set_quality 2023-02-06 16:08:04 +01:00
Nathan Adams d8e924affc render: Add RenderBackend::set_quality method, and call it from core 2023-02-06 16:08:04 +01:00
Nathan Adams 12bd38b338 core: Changed Player::set_quality to take in a StageQuality directly 2023-02-06 16:08:04 +01:00
Nathan Adams b270d1bbd7 render: Move StageQuality from core to render 2023-02-06 16:08:04 +01:00
Nathan Adams 00c7e8f634 avm2: Fixed bytearray compress/decompress methods setting position of resulting bytearray 2023-02-05 19:22:01 +01:00
Nathan Adams e798d69299 avm2: Convert ByteArray EOF to avm error 2023-02-05 19:22:01 +01:00
Nathan Adams c14f022837 core: Use overwrite_cpu_pixels in apply_filter 2023-02-05 18:41:43 +01:00