Commit Graph

9507 Commits

Author SHA1 Message Date
Toad06 8ce8b775a7 avm1: Fix coercion order in SWFv4 actions 2023-06-08 01:33:08 +02:00
Moulins 3f1bcecfbb avm1: Add version gate for `{MovieClip, Button}.blendMode`
Theses properties are only available on SWF >= 8
2023-06-08 01:18:06 +02:00
Moulins b71b8f9de5 avm1: fix coercions for the `blendMode` property of display objects
`mc.blendMode = 3` is a valid way of modifying the blend mode of a DO;
on the other hand, booleans and objects *shouldn't* be coerced.
2023-06-08 01:18:06 +02:00
Crowdin Bot 93f5869005 chore: Update translations from Crowdin 2023-06-08 00:57:49 +02:00
Aaron Hill 0e0399963e avm2: Throw exception when ExternalInterface is not available 2023-06-07 17:24:25 -05:00
Aaron Hill b240f05390 avm2: Stub Graphics.beginShaderFill 2023-06-07 17:06:33 -05:00
Daniel Jacobs 55efb80dd6 web: Don't try to use Ruffle on browsers with Flash support 2023-06-07 23:48:39 +02:00
Aaron Hill 1efcd584c2 avm2: Wrap orphan list in an `Rc` for correct iteration behavior
When we iterate over the orphan list to run frame lifecyle methods,
the orphan list may be modified (e.g. an event listener creates a new
orphan object). To ensure that we iterate over all of the orphans
originally present, this commit wraps the orphan list in an `Rc`
(just like we do for the render list). Modifications to the list use
`Rc::make_mut`, and iteration operates on a clone of the `Rc`.
2023-06-07 16:23:06 -05:00
Aaron Hill d2999a2572 core: Fix parsing of PixelBender sampleNearest and sampleLinear
This fixes a panic on startup for Sniper Team
2023-06-07 15:59:31 -05:00
Aaron Hill ccb5027de0 avm2: Preserve MultinameFlags::ATTRIBUTE when filling a lazy Multiname 2023-06-07 14:08:10 -05:00
Aaron Hill 638471fc2d avm2: Stub flash.printing.PrintJob 2023-06-07 03:47:29 -05:00
Aaron Hill 5fd7dc2c9b core: Correctly handle '.' and '<' in obfuscated QNames
QName can contain characters like '.' and '<' as part of the
package or class name (though this requires editing the SWF
or using a nonstandard compiler). This broke our attempt to parse
generic type paramters by looking for '.<'

Instead, our 'Vector' special casing now operates on the unparsed
'AVMString' name, instead of attempting to construct a 'QName'.
This means that we don't need to handle generic paramters at
all for obfuscated names (which will never start with '__AS3__'
or 'Vector.<')

This fixes a bug in Red Ball 4v3, which has an obfuscated class
'!D.<H'
2023-06-06 18:12:58 -05:00
Aaron Hill 0d5ead4c02 core: Ignore newer PlaceObject tag in same frame with duplicate depth
If we have two PlaceObject tags in the same frame with the same depth,
only the first one actually places an object. The second one is ignored
(Flash Player logs a warning).
2023-06-06 14:50:07 -05:00
Aaron Hill d037038170 avm2: Make `caller_domain` an `Option`, and call `expect` when actually needed
There are only a few places where we actually need to use the
`caller_domain`, so we don't actually need it available for most native
method calls. This means that `Activation::from_nothing` can be used
in the vast majority of cases without causing a panic later on.
2023-06-06 21:05:19 +02:00
Nathan Adams 10134467c9 avm2: Don't error on removeChildren() for empty containers - fixes #11382 2023-06-05 18:30:08 -05:00
Crowdin Bot 808deaa378 chore: Update translations from Crowdin 2023-06-05 09:00:51 +02:00
renovate[bot] f1fe998869 chore(deps): lock file maintenance rust dependencies 2023-06-04 22:53:18 -05:00
relrelb f62d80dd93 ci: Fix artifact download for AUR package
`actions/download-artifact` cannot be used because only macOS artifacts are uploaded using `actions/upload-artifact`.

Instead use `gh release download`, which mirrors `gh release upload`.
2023-06-03 23:56:06 +03:00
relrelb 9c8e212641 avm1: Migrate `GradientBevelFilter` to `NativeObject` 2023-06-03 21:33:12 +03:00
Crowdin Bot 9767ffca96 chore: Update translations from Crowdin 2023-06-03 15:58:24 +02:00
Nathan Adams 136417c58c core: Make debug windows scrollable 2023-06-03 09:11:06 +02:00
Nathan Adams 85f6fd3889 core: Add movie clip info to debug menu 2023-06-03 09:11:06 +02:00
Nathan Adams a26a64d88f core: Format Rectangle to 2 decimal places 2023-06-03 09:11:06 +02:00
Nathan Adams c9d0a08863 core: Move debug children list's button into header 2023-06-03 09:11:06 +02:00
Nathan Adams 9f384df27b core: Don't have dynamic_root in UpdateContext unless egui feature is enabled 2023-06-03 09:11:06 +02:00
Nathan Adams a641c564de core: Show debug rect on hovering stuff 2023-06-03 09:11:06 +02:00
Nathan Adams 16ce9aa437 core: Add debug rects to debugger 2023-06-03 09:11:06 +02:00
Nathan Adams a6b8883acd core: Add mask/masker/clip info to debug UI 2023-06-03 09:11:06 +02:00
Nathan Adams 59eceb8b7a core: Add AVM1 path to debug UI 2023-06-03 09:11:06 +02:00
Nathan Adams 77bd1cd1c8 core: Add depth and color transform to debug ui 2023-06-03 09:11:06 +02:00
Nathan Adams e12e2a2e54 core: Initial Debug UI 2023-06-03 09:11:06 +02:00
Nathan Adams eb70a4f361 core: Update gc_arena to 63dab12871321e0e5ada10ff1f1de8f4cf1764f9 2023-06-03 09:11:06 +02:00
Aaron Hill 2cd518013c
wgpu: Don't skip alpha/erase blend modes for BitmapData.draw (#11323)
We can skip these when we're drawing to a fresh buffer, but not when we're blending over an existing BitmapData texture.
2023-06-02 21:16:05 +00:00
relrelb e5da68c1df avm1: Migrate `ConvolutionFilter` to `NativeObject` 2023-06-02 23:39:02 +03:00
Aaron Hill 21429cc205 avm2: Add PixelBender bytecode parsing to ShaderData
We now parse PixelBender bytecode, and populate the parameters
from the bytecode on `ShaderData`. This is enough to progress
Steamlands, which needs to access dynamically set properties
on `ShaderData`

Bytecode execution is not implemented yet.
2023-06-02 15:23:32 -05:00
Aaron Hill 999e2f5b71 wgpu: Implement Context3D.setScissorRectangle 2023-06-02 14:56:14 -05:00
relrelb abb0e33431 chore: Use Rust's `OnceCell`/`OnceLock`
They were stabilized in Rust 1.70.0, which was released yesterday.
This removes the `once_cell` dependency.
2023-06-02 22:21:38 +03:00
relrelb 652a52e91b ci: Provide `sha512sums` in AUR package
Previously it was skipped, which isn't a good practice.
2023-06-02 21:52:57 +03:00
renovate[bot] 6bc5d72995 chore(deps): lock file maintenance node.js dependencies 2023-06-01 08:59:52 +03:00
renovate[bot] 8bf44926af chore(deps): update node.js dependencies 2023-06-01 08:45:23 +03:00
Lord-McSweeney 5fdbfe2fd4 avm2: Partial implementation of Loader.unload 2023-05-31 21:03:18 -05:00
Aaron Hill 8b257ef6da avm2: Always run `construct_frame` in `initialize_for_allocator`
When we create a DisplayObject from ActionScript, we should always
run `construct_frame` on it, regardless of what frame phase we
are currently in.

This fixes a regression in Fancy Pants World 4 Part 1, where entering
the first door produced an error.
2023-05-31 17:33:25 -05:00
Adrian Wielgosik c8fc810fa6 desktop: rewrite AS3 warning popup in egui 2023-05-31 23:21:30 +02:00
nosamu 2ec2966f51 docs: Add detailed instructions for running tests 2023-05-31 21:32:51 +02:00
Daniel Jacobs a2fa855156 web: Update youtube check to be more accurate using regex 2023-05-31 21:06:25 +03:00
relrelb 17e0eb112b web: Enforce ESLint's `camelcase` rule 2023-05-31 08:22:15 +03:00
Adrian Wielgosik 5d3544ddc7 desktop: Simple hack to stop ignoring egui redraws 2023-05-30 23:55:31 +02:00
Crowdin Bot 6dc3743f4b chore: Update translations from Crowdin 2023-05-30 23:21:28 +02:00
tinaun ff518b9deb use light menus on light theme & detect changes 2023-05-30 23:07:09 +02:00
relrelb df1cd29a12 tests: Expand `duplicate_movie_clip` 2023-05-30 23:10:36 +03:00