Commit Graph

8630 Commits

Author SHA1 Message Date
Aaron Hill 203d4cd3aa avm2: Use Value::Undefined for out-of-range Vector enumerant index
This makes Vector consistenht with the other implementations
of `get_enumerant_name`. This also fixes a bug where AMF object
serialization would loop all te way to `u32::MAX` when serializing
a vector, because it would never see `Value::Undefined` and break.
2023-02-22 15:03:09 -06:00
Aaron Hill f1b0247de7 avm2: Remove install_trait_late 2023-02-22 14:41:01 -06:00
Aaron Hill c52f1082c4 avm2: Make `early_resolve_interface` take in a `domain` directly 2023-02-22 14:41:01 -06:00
Aaron Hill c258423dc3 avm2: Allow resolving interfaces before ClassObjects are available
The Adobe Animate compiler can emit a 'newclass' opcode for
a concrete class before the 'newclass' opcodes for the interfaces
it implements. As a result, we cannot rely on looking up an interface
`ClassObject` when resolving a class's interfaces.

We now store a map of exported classes in `Domain`, and use this
to lookup interfaces before their `ClassObject`s have been created.

Additionally, `link_interfaces` was failing to consider superinterfaces,
which meant that methods from superinterfaces were not being copied
into the vtable. I've fixed this along with the other changes.
2023-02-22 14:41:01 -06:00
relrelb 52e395ecca extension: Use `@tsconfig/strictest` 2023-02-22 21:39:12 +02:00
relrelb 140e1fcfee web: Use `@tsconfig/strictest` 2023-02-22 21:39:12 +02:00
Bale 2cfa97e84d
avm2: ByteArray.readUTF/readUTFBytes should cut off after null byte (#9673)
* avm2: Fix #9668

* tests: Extend ByteArray test
2023-02-22 18:47:59 +00:00
Marty_SVK fac7fc0666 Stub System.pauseForGCIfCollectionImminent
This progresses Papas Scooperia
2023-02-22 12:34:13 -06:00
Nathan Adams a550c877f6 tests: Update avm2/simplebutton_constr_params test to check the button on frame 2 2023-02-22 18:49:04 +01:00
Nathan Adams e8fcc8b194 avm2: Don't reset SimpleButtons that are created by scripts 2023-02-22 18:49:04 +01:00
Nathan Adams aef466f8f3 avm2: Implemented BitmapData.drawWithQuality 2023-02-22 17:36:55 +01:00
Nathan Adams 6539262db7 render: Add Quality option to RenderBackend::render_offscreen 2023-02-22 17:36:55 +01:00
nosamu 70bf0a816a core: Add options to set and force stage scale mode 2023-02-22 12:13:20 +02:00
Lord-McSweeney 74640ed44e
tests: Remove ^M characters from Dictionary tests (#9656)
* Remove ^M characters from Dictionary test

Using Github's automatic line ending conversion to CRLF.

* Remove ^M characters from dictionary_delete test

* Remove ^M characters from dictionary_in test
2023-02-22 09:57:50 +02:00
relrelb e98aa54599 swf: Introduce `ConvolutionFilterFlags` 2023-02-21 16:55:13 +02:00
relrelb 35ef402b95 swf: Introduce `GradientFilterFlags` 2023-02-21 16:55:13 +02:00
relrelb 1fbfd2cbbc swf: Introduce `BevelFilterFlags` 2023-02-21 16:55:13 +02:00
relrelb 1f9c940331 swf: Introduce `GlowFilterFlags` 2023-02-21 16:55:13 +02:00
relrelb 2aaf337b6a swf: Introduce `BlurFilterFlags` 2023-02-21 16:55:13 +02:00
relrelb c86cd4fa9d swf: Introduce `DropShadowFilterFlags` 2023-02-21 16:55:13 +02:00
nosamu 1e2ab9cd0e tests: Add new clipDepth test 2023-02-21 16:39:42 +02:00
nosamu a505d7a6d3 core: Fix off-by-one bug with clipDepth 2023-02-21 16:39:42 +02:00
Adrian Wielgosik f7a12698b9 core: Implement Color::to_premultiplied_alpha without floats 2023-02-19 22:25:34 +01:00
Adrian Wielgosik 92e52f2d0a avm2: Add missing imports 2023-02-19 19:06:54 +01:00
relrelb 94db943743 web: Enforce ESLint's `prefer-const` rule 2023-02-19 14:09:43 +02:00
David Wendt 81ef33f58e web: Use the CORRECT extension ID in the version seal 2023-02-18 18:44:33 -07:00
Lord-McSweeney 89792865d0
avm2: Stub Loader.close 2023-02-18 18:35:20 +00:00
relrelb 5a3bb33b78 swf: Cleanup `Twips2d`
* Rename it to `Point`.
* Remove unnecessary methods, such as `.get()`.
2023-02-18 17:51:02 +02:00
relrelb 1581123284 web: Miscellaneous tiny cleanups 2023-02-18 16:35:59 +02:00
relrelb a7f41f4df5 web: Add missing access modifiers 2023-02-18 16:35:59 +02:00
relrelb b36643f52d web: Cleanup some comments 2023-02-18 16:35:59 +02:00
relrelb 903f8bc33a web: Enforce ESLint's `no-constructor-return` rule 2023-02-18 16:35:59 +02:00
relrelb f68542991f web: Enforce ESLint's `curly` rule 2023-02-18 16:35:59 +02:00
relrelb 87ecbcc066 web: Remove `InternalContextMenuItem` type
Simply declare it inline.
2023-02-18 16:35:59 +02:00
Aaron Hill 3327a9a3fd core: Set clipDepth to 0 when swapDepths affects a clip
This makes "Garfield's Comic Creator" properly show
panels when you close the editor.
2023-02-17 23:11:57 -06:00
EmperorBale fa6d01c505 tests: Extend `movielcip.gotoAndPlay` test 2023-02-17 18:46:43 -08:00
EmperorBale 158de01c92 avm2: `goto_frame` should use the movieclips scene by default 2023-02-17 18:46:43 -08:00
Aaron Hill 071306f107 avm2: Also register EventDispatcher methods in ns "flash.events:IEventDispatcher"
This is needed by "Steambirds: Survival"
2023-02-17 20:32:27 -06:00
EmperorBale bc165a81ff chore: Add comment explaining why we skip the first scope 2023-02-18 01:37:12 +01:00
EmperorBale 46bd6bbee9 tests: Add test for scopechain resolution order 2023-02-18 01:37:12 +01:00
EmperorBale 7ef56c1d16 avm2: Search global scope after everything else 2023-02-18 01:37:12 +01:00
CUB3D f7b0c021a9 avm1: The this property should be mutable 2023-02-17 14:39:10 -06:00
Aaron Hill 4149913967
core: Introduce dedicated avm2 mouse picking logic (#9565)
The mouse picking behavior in AVM2 interacts in complicated
ways with `mouseEnabled` and `mouseChildren.` It's sufficiently
different from AVM1 that I decided to split the logic into separate
`mouse_pick_avm1` and `mouse_pick_avm2` methods.

The `mouseChildren` property is now fully implemented.
Additionally, the `click_block` tests now work correctly
under Ruffle.

Combined with the orphan-movie PR, this is enough to make
SteamBirds fully playable (though performance greatly degrades
over a course of a level).
2023-02-17 19:04:52 +00:00
relrelb 90082e4658 ci: Refactor activity check
Use a GitHub output parameter, rather than an environment variable,
as described in:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
2023-02-17 14:25:25 +02:00
Lord-McSweeney 559ec8356d
Port Video to Actionscript 2023-02-16 22:46:11 +02:00
nosamu 15435c6bea desktop: Support `file` URLs 2023-02-16 19:46:16 +02:00
relrelb a7235febea core: Use unnamed field in `Character::Bitmap`
Since `initial_data` was removed from `Character::Bitmap` in #9143,
it now holds a single field. Move back to an unnamed field, which
aligns with the other `Character` enum variants.
2023-02-16 19:02:57 +02:00
renovate[bot] 43628fdef5 fix(deps): update rust crate winit to 0.28.1 2023-02-16 18:11:12 +02:00
TÖRÖK Attila c9864bbeb4 tests: Require the "mp3" feature of core as well, just to be sure. 2023-02-16 06:23:35 +01:00
TÖRÖK Attila 77cfb5ab4c core: Fix a clippy lint when building without the "mp3" feature. 2023-02-16 06:23:35 +01:00