Aaron Hill
45960de7dc
avm2: Correctly implement DisplayObject.mask
...
The stub implementation was breaking code that relied on being
able to set a value for 'mask' and then retrieve it
(which used to work on a dynamic class like `MovieClip`).
2022-09-05 16:43:20 -07:00
dependabot[bot]
7f40b42131
build(deps): bump serde-xml-rs from 0.5.1 to 0.6.0
...
Bumps [serde-xml-rs](https://github.com/RReverser/serde-xml-rs ) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/RReverser/serde-xml-rs/releases )
- [Commits](https://github.com/RReverser/serde-xml-rs/compare/0.5.1...0.6.0 )
---
updated-dependencies:
- dependency-name: serde-xml-rs
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 16:27:37 -07:00
dependabot[bot]
aacc3c231a
build(deps): bump clap from 3.2.18 to 3.2.20
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.18 to 3.2.20.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.20/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.18...v3.2.20 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 14:47:03 -07:00
onkrot
1e0b59dbad
avm2: Implement `String`.`localeCompare`, `search`, `toLocaleLowerCase`, `toLocaleUpperCase` methods.
2022-09-05 12:15:53 -07:00
=
2b3249c9a4
core: Made core no longer depend on software video decoders
2022-09-04 17:46:58 -07:00
=
f0013bdec8
video: Moved individual decoders to software video backend
2022-09-04 17:46:58 -07:00
=
bf242bfb09
video: Moved SoftwareVideoBackend to software decoder crate
2022-09-04 17:46:58 -07:00
=
7c839ef8ae
video: Add software video crate, moved VideoDecoder to it
2022-09-04 17:46:58 -07:00
=
8b12185d61
video: Moved NullVideoBackend from core to video
2022-09-04 17:46:58 -07:00
=
aff49cd891
video: Moved VideoBackend from core to video
2022-09-04 17:46:58 -07:00
=
7c464295e2
video: Moved VideoStreamHandle from core to video
2022-09-04 17:46:58 -07:00
=
fd7086adef
video: Moved EncodedFrame, DecodedFrame and FrameDependency from core to video
2022-09-04 17:46:58 -07:00
=
b7cf800f88
video: Made ruffle_video crate, moved core video Error to it
2022-09-04 17:46:58 -07:00
=
72da1535b7
core: Made video::Error not depend on invidiaul codecs
2022-09-04 17:46:58 -07:00
Adrian Wielgosik
acdb767862
avm2: Swap Multiname flags to bitflags
2022-09-04 16:56:32 -07:00
Adrian Wielgosik
782f670c39
avm2: Store uninitialized Multinames in txunit, behind Gc
2022-09-04 16:56:32 -07:00
Adrian Wielgosik
c28549ed9e
avm2: Store multi-namespaces behind Gc And single namespaces directly
2022-09-04 16:56:32 -07:00
EmperorBale
dd2bc1ea78
avm2: Add automatic linting for AS3 playerglobals
2022-09-04 16:33:35 -07:00
=
ce0752c225
avm1: Removed export of SystemPrototypes and SharedObject
2022-09-04 12:27:29 -07:00
=
6ed1dd5942
avm1: Replace avm1::AvmString with string::AvmString
2022-09-04 12:27:29 -07:00
=
ddaee950f8
avm1: Removed all public access into Avm1 modules, export only what's needed
2022-09-04 12:27:29 -07:00
=
7d7309d165
avm1: Moved start_drag from Avm1 root to activation module
2022-09-04 12:27:29 -07:00
=
f2c9ae7c50
avm1: Moved root_error_handler from avm1 root to runtime module
2022-09-04 12:27:29 -07:00
=
7645c84980
avm1: Moved skip_actions from avm1 root to runtime module
2022-09-04 12:27:29 -07:00
=
2d24ed539e
avm1: Moved Avm1 struct into its own file, fixing field access as needed
2022-09-04 12:27:29 -07:00
Adrian Wielgosik
9cf6f64d06
avm2: Guarantee that int+/-int makes an int
2022-09-04 08:57:18 +03:00
Adrian Wielgosik
cc6abab72f
avm2: Remove Value::Unsigned, add minimal implicit int->float conversion
2022-09-04 08:57:18 +03:00
TÖRÖK Attila
2b681e85b2
avm2: Remove unnecessary `extends Object` from some class stubs
...
As it's implicit.
2022-09-03 10:43:33 -07:00
TÖRÖK Attila
27b67d01d0
avm2: `Vector` -> `Vector.<Number>` in `ShaderEvent`
2022-09-03 10:43:33 -07:00
TÖRÖK Attila
92a2b6206e
avm2: Fix the stub for `Vector`
2022-09-03 10:43:33 -07:00
relrelb
32c55dda22
core: Avoid some clones of `Matrix` and `ColorTransform`
...
Change `set_matrix` and `set_color_transform` to accept owned structs,
instead of references. This allows callers that already have an owned
struct to pass it directly, thus saving an unnecessary borrow + clone.
This also aligns with other methods, such as `set_sound_transform`,
which currently accepts an owned struct.
2022-09-03 09:36:51 -07:00
TÖRÖK Attila
2e3fad9165
core: Log errors coming from timer callbacks
2022-09-02 22:22:03 -07:00
TÖRÖK Attila
89434d65e8
core: Don't panic when an error occurs in an AVM2 timer callback
2022-09-02 22:22:03 -07:00
TÖRÖK Attila
f75eee389a
core/mp3: More lenient MP3 buffer underrun detection
2022-09-02 20:38:24 -07:00
relrelb
fb39bb2b71
swf: Remove `Copy` from `Rectangle`
...
Use `.clone()` explicitly where needed.
2022-09-02 18:21:13 -07:00
relrelb
299da43c16
swf: Extract `ShapeFlag`
2022-09-02 18:21:13 -07:00
Aaron Hill
ae452d29b8
avm2: Stub DisplayObject.mask getter/setter
...
This allows the loaded ArmorGames API swf to run in
'This is the only level too'
2022-09-02 17:12:18 -07:00
relrelb
af006a3053
avm1: Introduce `NativeObject`
...
The existing `Object` enum representation is problematic for inherited
native objects, since "regular" `ScriptObject`s cannot be turned into
native objects, but rather a completely new native object needs to be
created. `TObject::create_bare_object` is an attempt to aid this
situation, but it works only for `ActionExtends` inheritance, and not
when the user manually wires up `prototype`/`__proto__` (#701 ).
In Flash, it seems like derived constructors initially have a "regular"
`this` object. But once the `super()` constructor is invoked, the same
`this` object becomes a native object.
To allow this in Ruffle, introduce a new `NativeObject` enum, and
store it as a member in `ScriptObject`. For a start, move `TextFormatObject`
from the `Object` enum to `NativeObject`. The plan is to gradually
move all `Object` enum variants to `NativeObject`, except for `ScriptObject`.
2022-09-02 16:41:27 -07:00
golfinq
08917b49cb
avm2: Add actionscript event classes
2022-09-02 14:35:01 -07:00
Aaron Hill
7a7ea87679
avm2: Implement Sprite.startDrag and Sprite.stopDrag
...
For now, I've left 'dropTarget' unimplemented - unlike in
AVM1, the drop target can be non-interactive objects like `Shape`,
so we'll need additional refactoring to implement it.
This allows 'This is the only level too' to be playable
2022-09-02 13:03:14 -07:00
relrelb
d2a463b08f
core: Remove unused parameter of `MovieClip::show_frame`
2022-09-02 10:42:09 -07:00
relrelb
16a1b7b832
swf: Remove `length` parameter of `read_frame_label`
...
Use `unwrap_or_default()` to optionally read a byte.
Also remove unused `context` parameter of `MovieClip::frame_label`.
2022-09-02 10:42:09 -07:00
relrelb
9ec3137891
swf: Remove `tag_length` parameter of `read_define_button_cxform`
...
It was not needed since `Reader` accounts for it internally.
2022-09-02 10:42:09 -07:00
relrelb
3da3567365
core: Avoid some allocations on JPEG tags
...
Read a slice instead of allocating a new `Vec`.
2022-09-02 10:42:09 -07:00
relrelb
cc166439d8
avm2: `Activation::is_of_type` is infallible
2022-09-02 10:10:40 -07:00
relrelb
ce5bf557f5
avm2: `ExternalValue::from_avm2` is infallible
2022-09-02 10:10:40 -07:00
relrelb
c2e78ffead
chore: Appease clippy
...
Resolve 2 instances of `only_used_in_recursion`.
2022-09-02 10:10:40 -07:00
relrelb
0d6462cfab
render: Remove `gc-arena` dependency
...
It was only used to make structs `#[derive(gc_arena::Collect)]`, and
generally it doesn't make much sense that `render` needs to be GC-aware.
So instead annotate `render` fields in `core` with `#[collect(require_static)]`.
2022-09-02 09:49:18 -07:00
Aaron Hill
cc9e283191
avm2: Improve Debug impl for EventObject
2022-08-30 09:35:20 -05:00
Aaron Hill
1a7c5339a7
avm2: Implement DisplayObject.localToGlobal and DisplayObject.globalToLocal
...
While writing tests for these methods, I discovered and fixed some
issues with how 'scrollRect' interacted with 'dobj.transform.matrix'
2022-08-29 23:12:40 -05:00