Aaron Hill
8b92b2cf7c
avm2: Implement adding attribute to XML object
...
We only support values that are neither XML nor XMLList,
since we can't yet properly stringify those.
Attempting to modify an existing attribute throws an error.
2023-03-16 14:41:01 -05:00
EmperorBale
fe3ba63441
tests: Add test for Namespace
2023-03-16 12:04:29 -07:00
EmperorBale
3412833ee2
avm2: Implement Namespace constructor
2023-03-16 12:04:29 -07:00
Aaron Hill
1dd0d237ab
render: Correctly handle BYTES_4 vertex data
...
Each byte gets normalized into a float in the range [0, 1]
2023-03-16 13:20:11 -05:00
Nathan Adams
d22b07167c
avm2: Implement XML.nodeKind
2023-03-16 07:34:20 +01:00
Tom Schuster
acd160674a
avm2: Stub CurrencyFormatter constructor
...
Fixes #9729
2023-03-16 06:30:16 +01:00
Lord-McSweeney
ee35dbb36e
avm2: Stub DisplayObject.accessibilityProperties
2023-03-16 06:17:44 +01:00
Lord-McSweeney
352d0df71f
avm2: Stub DisplayObject.accessibilityProperties
2023-03-16 06:17:44 +01:00
Aaron Hill
3232690c8e
avm2: Add DoAbc2 tag name to GlobalInit call stack node
...
This can help determine which DoAbc2 file contains the script
initializer that appears in a stack trace (though the name
can be empty).
2023-03-16 05:57:04 +01:00
Nathan Adams
19aee77570
avm2: Replaced args.get((d+)).cloned().unwrap_or(Value::Undefined).coerce_to_string(activation) with args.get_string(activation, \d)
2023-03-16 05:43:48 +01:00
Nathan Adams
791cb4c2a8
avm2: Replaced args.get(0).unwrap_or(&Value::Undefined).coerce_to_i32(activation) with args.get_i32(activation, 0)
2023-03-16 05:43:48 +01:00
Nathan Adams
8e1097c31e
avm2: Replaced args.get(0).unwrap_or(&Value::Undefined).coerce_to_u32(activation) with args.get_u32(activation, 0)
2023-03-16 05:43:48 +01:00
Nathan Adams
52f020a35e
avm2: Replaced args.get(0).unwrap_or(&Value::Undefined).coerce_to_string(activation) with args.get_string(activation, 0)
2023-03-16 05:43:48 +01:00
Nathan Adams
641162d4c7
avm2: Replaced args.get((d+)).cloned().unwrap_or(Value::Undefined).coerce_to_boolean() with args.get_bool(\d)
2023-03-16 05:43:48 +01:00
Nathan Adams
7e3665d12c
avm2: Simplify parameter usage in graphics
2023-03-16 05:43:48 +01:00
Nathan Adams
50cf7df15d
avm2: Simplify parameter usage in display_object
2023-03-16 05:43:48 +01:00
Nathan Adams
dbd3e6c4ab
avm2: Simplify parameter usage in bitmap
2023-03-16 05:43:48 +01:00
TÖRÖK Attila
63a1689c07
web/audio: Require quick fills for a fixed amount of time before shrinking buffers
...
Instead of a fixed number of buffer fills, which changes wildly in duration.
2023-03-16 05:28:13 +01:00
TÖRÖK Attila
6f9532e322
web/audio: Introduce a warmup period to not increase buffer size right at startup
2023-03-16 05:28:13 +01:00
Aaron Hill
b140ce6d97
avm2: Implement XML construction from XML and XMLList objects
2023-03-16 05:04:26 +01:00
TÖRÖK Attila
79dfeaf715
core/avm2: Use an actual FFT library in computeSpectrum
2023-03-16 04:42:42 +01:00
TÖRÖK Attila
96d1f19e6c
chore: Port to bitflags 2.0.0
...
* Bump bitflags to 2.0.0
* Sprinkle Clone, Copy, Eq, PartialEq, and Debug derives where needed
* Call `bits` on bitflags, as it is now a method
* Switch from `from_bits_truncate` to `from_bits_retain` on bitflags where needed
* Bump h263-rs for the bitflags 2.0.0 dependency
As part of porting to bitflags 2.0.0, see:
https://kodraus.github.io/rust/2022/10/07/bitflags2.html#upgrading-to-2x
2023-03-15 20:06:10 -07:00
Nathan Adams
2549990e2e
avm2: Implement String.prototype methods + valueOf
2023-03-16 03:43:37 +01:00
Aaron Hill
16ff2a17e3
avm2: Stub TextureBase.dispose
2023-03-15 21:13:01 -05:00
Aaron Hill
e194883ef6
naga-agal: Correctly access vertex shader FunctionArgument
...
I had previously applied this fix to fragment shaders,
but I forgot to apply it to vertex shaders as well.
2023-03-15 20:12:21 -05:00
Aaron Hill
acbc802c94
avm2: Fix VertexBuffer3D.uploadDataFromByteArray size calculation
...
We were ignoreing 'data32PerVertex'.
To make the code clearer, I've renamed the variable to
'data32_per_vertex', and made it a 'u8' (as it has a maximum of 64)
2023-03-15 19:52:09 -05:00
nosamu
6eeb2de213
avm2: Stub flash.text.TextFormat.display getter and setter
2023-03-15 16:51:58 -07:00
nosamu
9a7b8c7e6a
avm2: Add flash.text.TextFormatDisplay class
2023-03-15 16:51:58 -07:00
Nathan Adams
9c0e199fa4
avm2: Throw AVM error for null arg in removeChild()
2023-03-16 00:14:22 +01:00
Aaron Hill
92d6d652b4
avm2: Stub generateFilterRect, setStencilReferenceValue, and setSamplerStateAt
...
These are needed by Fancy Pants World 4
2023-03-15 17:53:07 -05:00
Nathan Adams
1bb8515d85
chore: Update avm2 compatibility warning to be less severe
2023-03-15 15:30:25 -07:00
nosamu
0ac697059f
avm2: Stub Loader.unloadAndStop
2023-03-15 15:08:13 -07:00
Aaron Hill
4618511771
avm2: Add custom call handlers and implement it for XML
...
The XML call handler is implemented as 'new XML(arg)',
so we get all of the related string coercions for free.
Our various native tables are starting to get somewhat wasteful -
if we add any more, we might want to consider a more compact
representation.
2023-03-15 16:47:32 -05:00
Tom Schuster
d7f99527db
avm2: Partly implement XML.toString
2023-03-15 16:18:35 -05:00
Bale
bb2d88b1d8
chore: Fix typo in comment
2023-03-15 13:57:58 -07:00
Aaron Hill
ccf263fdf4
avm2: Implement Array.removeAt
2023-03-15 14:45:57 -05:00
Daniel Jacobs
e7d2906173
ci: Use latest Node 19
...
https://github.com/nodejs/node/releases/tag/v19.8.1 was released to fix the Node 19.8.0 issue.
2023-03-15 20:20:57 +01:00
Aaron Hill
ef719c323e
avm2: Add several more Matrix3D methods
...
These implementations are ported from the MIT-licensed OpenFL
code.
2023-03-15 11:02:27 -05:00
Jay Sackwild
4707a6b0e9
core: Enable click events on non-selectable text fields ( #10005 )
2023-03-15 11:01:33 +00:00
Daniel Jacobs
5a1b43008b
web: Remove Config object; it was never a correct type for the config
2023-03-15 11:45:00 +01:00
Nathan Adams
9e6a1f3234
core: Slightly neater way to get root_mc in context_menu.rs
2023-03-15 10:18:32 +01:00
Nathan Adams
c116f29821
core: Run avm2 timers when rootless
2023-03-15 10:18:32 +01:00
Nathan Adams
22d6d21196
tests: Add avm2/rootless test for detaching and reattaching movie roots
2023-03-15 10:18:32 +01:00
Nathan Adams
a87bbfb40e
core: Don't panic flushing AVM1 sharedobjects if there's no root movie
2023-03-15 10:18:32 +01:00
Nathan Adams
75bf002fc6
core: Make Stage::root_clip() return Option
2023-03-15 10:18:32 +01:00
Nathan Adams
853a2cdcc1
avm2: Implement BitmapData.threshold
2023-03-15 01:24:20 -07:00
Aaron Hill
6bf17158cf
avm2: Skip running enter_frame for children as well
...
When we skip running a frame for a MovieCilp, we skip all
of its children as well. However, this skip 'counts' as
a skip for any children that already wanted to skip their next
frame. For example, say we create three objects in ActionScript,
and arrange them like 'obj1 -> obj2 -> obj3'.
The first 'obj1.enter_frame' call will not run a new frame
for any of the objects, but next time, 'obj1.enter_frame'
will run a new frame for all of the objects.
This fixes jacksmith, which was missing a frame1-framescript
due to 'enter_frame' getting incorrectly run for a deeply
nested child.
2023-03-14 23:19:53 -07:00
Aaron Hill
c004101bfe
core: Cache 'width' and 'height' in Bitmap when BitmapData is set
...
If you call 'BitmapData.dispose()', any Bitmap objects using it will
continue to report the original 'width' and 'height' values to
ActionScript. The values only refresh if you explicitly do
'Bitmap.bitmapData = bitmapDataObject' (including with the same
object).
Fancy Pants Adventure World 4 relies on this - it calls
BitmapData.dispose(), and then uses the width and height from
a previously-constructed Bitmap object.
2023-03-14 23:00:08 -07:00
Tom Schuster
1f8dccf5a2
avm2: Support wildcard/any name in XMLList get_property_local
...
This is similar to #10018 . Improves #8330 .
2023-03-14 20:00:05 -05:00
Aaron Hill
570b97f270
ci: Pin node to 19.7.0
...
The newly released 19.8.0 is crashing
2023-03-14 18:17:20 -06:00