EmperorBale
7a4a4f7c9a
avm2: Fix function double borrow panic
2023-03-25 21:57:04 -07:00
Tom Schuster
53d9118834
avm2: Implement XML set for simple element cases
2023-03-25 20:40:44 -07:00
Lord-McSweeney
3bfa2deb5c
avm2: Log error message instead of error object
2023-03-26 02:20:18 +00:00
Aaron Hill
b140029e95
render: Fix BitmapData.applyFilter with non-full sourceRect
...
Previously, we were scaling down the source image to fit into
the smaller sourceRect, instead of cropping at the original scale.
This broke the background textures in Fancy Pants World 4 Part 2,
as the scaled-down output image resulted in a smaller rectangle
being returned from 'getColorBoundsRect'
We now crop the image by properly constructing the UV-coordinate
transformation matrix. We were also using the wrong value for the
'destPoint' y coordinate, which I fixed.
This slightly changes the image output of two tests - the new images
now more closely match the Flash output.
2023-03-25 18:44:01 -07:00
Moulins
5b4096de8b
wstr: Revert incorrect optimization in hash calculation
...
Calling `Hash::write_bytes` isn't guaranteed to be equivalent to a
sequence of `Hash::write_u8`.
Additionally, make sure the hash is truly prefix-free by hashing the
length first.
2023-03-25 18:27:51 -07:00
David Wendt
65d2fca7bd
chore: Rename `NetStream.toggle_pause` to match `StreamManager::toggle_paused`
2023-03-25 15:30:02 -06:00
David Wendt
6689b547f8
chore: Re-alphabetize `globals.as`
2023-03-25 15:30:02 -06:00
David Wendt
66efb02f46
chore: `NetStreamInfo.as` formatting
2023-03-25 15:30:02 -06:00
David Wendt
0fd6fbc6d6
chore: Explicitly type `NetStream` constants as `String`
2023-03-25 15:30:02 -06:00
David Wendt
d9dcc49bc1
core: If a timeline video gets a `NetStream` attached to it, timeline seeking should be a no-op.
2023-03-25 15:30:02 -06:00
David Wendt
afb0cd3b5e
avm1,avm2: Implement `pause`/`resume` based methods.
...
For AVM1, `pause` handles three different functions; while AVM2 splits that into `pause`, `resume`, and `togglePause`.
2023-03-25 15:30:02 -06:00
David Wendt
6217397482
avm1,avm2: Implement `NetStream.play`.
...
So far this just sticks the stream into the playback list and kicks off a download; we do not actually support decoding, seeking, or any of the other things that we expect `play` to do.
2023-03-25 15:30:02 -06:00
David Wendt
273b0a4a76
core: `NetStream` should be a self-owning pointer type.
2023-03-25 15:30:02 -06:00
David Wendt
c104413e85
core: Implement `bytesLoaded`/`bytesTotal` for streams.
...
This treats the buffer as both the loaded and total size. Future changes to allow, e.g., streaming fetch would need this code to change.
2023-03-25 15:30:02 -06:00
David Wendt
fb7ad56bca
avm2: Implement `Video.attachNetStream`.
2023-03-25 15:30:02 -06:00
David Wendt
77404de850
avm1: Implement `Video.attachVideo`
2023-03-25 15:30:02 -06:00
David Wendt
9c13232aa3
core: Add a type to hold playing streams.
...
Calling `StreamManager::tick` advances all streams to the appropriate time. This is an unlocked timestep to support things like non-stage-FPS video and the like.
2023-03-25 15:30:02 -06:00
David Wendt
6729c31623
avm2: Stub all `flash.net.NetStream` methods and related classes.
2023-03-25 15:30:02 -06:00
David Wendt
35ebdd5e97
avm2: Add stub impl of `NetStream` class & object type
2023-03-25 15:30:02 -06:00
David Wendt
ca2f5257f3
avm1: Stub implementation of the NetStream class that allows us to create streams.
2023-03-25 15:30:02 -06:00
David Wendt
38ed0dada4
core: Stub implementation of NetStream loading.
...
The actual use cases for `NetStream` almost certainly require streaming download but I'm not ready to implement that just yet.
2023-03-25 15:30:02 -06:00
David Wendt
db7ff77c4e
core: Add a stub implementation of `NetStream` videos.
2023-03-25 15:30:02 -06:00
Gleb Piskunov
2cb32e88df
avm2: Fix bad Graphics.drawRoundRectComplex() stub ( #10368 )
...
Co-authored-by: Gleb Piskunov <emgfc@ya.ru>
2023-03-25 18:30:18 +00:00
relrelb
7cdac78321
chore: Remove `static_assertions` dependency
...
`static_assertions` seems unmaintained, and anyway `assert!()` is
usable in `const` contexts since Rust 1.57.0:
https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html#panic-in-const-contexts
So simply use the suggested method instead.
Also the `rustversion` dependency is no longer needed because
https://github.com/rust-lang/rust/pull/94075 already landed in stable.
2023-03-25 15:14:36 +03:00
relrelb
c68a4b0099
web: Remove deprecated `indentation` Stylelint rule
...
Stylelint 15.0.0 deprecated `indentation`: https://stylelint.io/migration-guide/to-15
Prettier already enforces indentation, so it can be removed from
`.stylelintrc.yaml`.
2023-03-25 10:16:49 +03:00
relrelb
3c69bb27db
web: Enforce ESLint's `spaced-comment` rule
2023-03-25 10:03:55 +03:00
relrelb
39b53c76d6
ci: Deny warnings on Web
...
As suggested in https://github.com/ruffle-rs/ruffle/pull/6935#pullrequestreview-967181111 .
2023-03-24 19:16:32 -07:00
David Wendt
37e1bdb43a
chore: `Promise.all` needs an array
2023-03-24 20:03:11 -06:00
Mike Welsh
1726d24098
tests: Add tests for calling undefined AVM2 function
2023-03-24 18:21:32 -07:00
Mike Welsh
e1b24712cf
avm2: Throw AVM error on calling undefined function
2023-03-24 18:21:32 -07:00
Daniel Jacobs
2ced2d2300
web: Don't polyfill with self-hosted Ruffle while extension is loading
2023-03-24 17:58:54 -07:00
Wumbo
f6a139235b
web: Increase spacing between Ruffle logo and options
2023-03-25 00:27:06 +03:00
Wumbo
8d56c8b7ad
web: Change Ruffle logo hover animation
2023-03-25 00:27:06 +03:00
Wumbo
07a09d3204
web: Improve styling of nightly watermark in extension menu
2023-03-25 00:27:06 +03:00
Nathan Adams
eb44cc5395
render: Made ShapeHandle an Arc of an internal, droppable mesh
2023-03-23 01:44:27 -07:00
Nathan Adams
cc8ac4fde1
render: Remove RenderBackend::replace_shape
2023-03-23 01:44:27 -07:00
Toad06
4161050db5
tests: `XML.getBytesLoaded` and `XML.getBytesTotal` in avm1`
2023-03-22 17:51:42 -07:00
Toad06
ab71370cb7
avm1: Minimal implementation of `XML.getBytesTotal` and `XML.getBytesLoaded`
2023-03-22 17:51:42 -07:00
Mike Welsh
44c9e3073c
tests: Test full TypeError message in removeChild test
2023-03-22 17:13:36 -07:00
Mike Welsh
123f9e088c
avm2: Fix null parameter error message
2023-03-22 17:13:36 -07:00
nosamu
f97827ef9c
web: Display config parse errors
2023-03-22 16:51:55 -07:00
EmperorBale
b2c79f9ea2
avm2: Make `resolve_parameters` throw an AVM error
2023-03-22 16:35:48 -07:00
TÖRÖK Attila
f8ea7acb14
web/audio: nit: Rename probation_time to probation_elapsed everywhere
2023-03-22 16:14:55 -07:00
Adrian Wielgosik
d77cf83e07
avm2: Fix si8/si16 opcodes
2023-03-22 22:55:43 +01:00
EmperorBale
fe54fb15f7
avm2: Show AS3 stack traces when logging level is `INFO`
2023-03-22 14:29:42 -07:00
EmperorBale
a63ee977fa
avm2: Reduce size of `CallNode` from 56 bytes to 24
2023-03-22 14:29:42 -07:00
Mike Welsh
1d12fc6169
render: Fix types depending on `tessellator` feature
2023-03-22 20:30:39 +01:00
Marty_SVK
de44c5494e
avm2: Stub Mouse.registerCursor and Mouse.unregisterCursor
2023-03-22 20:15:53 +01:00
Lord-McSweeney
98c19cc199
avm2: Stub NetConnection.close
2023-03-21 23:47:03 -07:00
yoganlava
2dee8338c8
avm2: Fix double borrow when setting local XMLList property
2023-03-21 19:21:18 -07:00