-
-
Notifications
You must be signed in to change notification settings - Fork 877
avm2: Move DisplayObject assignment into an initializer #11084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8dc9eb2
to
fa6c168
Compare
Progresses #11051. |
fa6c168
to
3b4e0e1
Compare
4b93adf
to
07f1bae
Compare
8810763
to
7b31eeb
Compare
@@ -19,8 +19,6 @@ pub fn init<'gc>( | |||
args: &[Value<'gc>], | |||
) -> Result<Value<'gc>, Error<'gc>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Sound also be moved to an instance allocator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test - it looks like Sound is a 'normal' object (the initialization happens during the super()
call, not during the allocator).
7b31eeb
to
894438f
Compare
I found regression, this commit brings back flickering buttons/sliders in #10208 and PortageCS5.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why super_init
got removed from Sound
and ApplicationDomain
- is there some subtlety of initialization I'm missing? I thought they were "normal" (i.e. no native-allocated fields). I try to keep super_init
in native code since the AS3 compiler automatically inserts constructsuper
everywhere anyway, but this isn't particularly important with EventDispatcher
being lazy.
The regression @SN902 found is worth looking into but I won't be able to do that for a few more days. Looking at the original PR #10734 it looks like you correctly carried forward everything from that, so it SHOULDN'T be broken, which suggests that we might need to move the check somewhere else, or set a flag here that play/goto checks for.
} else { | ||
if character.is_some() { | ||
//TODO: Determine if mismatched symbols will still work as a | ||
//regular BitmapData subclass, or if this should throw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My gut feeling is that it should throw, but I'm not going to ask for it to throw until/unless we have tests that go that way.
core/src/display_object/graphic.rs
Outdated
context: &mut UpdateContext<'_, 'gc>, | ||
avm2_object: Avm2Object<'gc>, | ||
) -> Self { | ||
pub fn new_with_avm2(context: &mut UpdateContext<'_, 'gc>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This title has become a bit of a misnomer now that it just constructs an empty graphic without taking an AVM2 object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've renamed this to empty
avm2_object: Avm2Object<'gc>, | ||
movie: Arc<SwfMovie>, | ||
) -> Self { | ||
pub fn new_with_avm2(activation: &mut Activation<'_, 'gc>, movie: Arc<SwfMovie>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've renamed this to empty
@kmeisthax: The 'super_init' removes were drive by fixes. Those calls were in I discussed the regression on Discord, but forgot to leave a comment on the pr- I fixed it in |
With this PR, #8947 is occurring again 😦
Note: To test this game on desktop you'll need to merge in #11159 because I broke left/right arrow key controls on desktop with my text control PR (sorry!) |
Tell me, will the "Super goblin war machine" game I submitted for revival to the Ruffle team will work, or have you already become discouraged? I realize there have been any problems recently, so please give me a specific answer. |
@KrzysztofoGuard The answer to your question is here #11051 (comment). There some more things we need to figure out before the game will work at all. |
I can confirm that with #11195 also merged in, Pursuit of Hat no longer regresses! |
Should close #8409 with pony towers being unable to damage targets. |
Found regression V8MuscleCars.zip after intro this game stuck on black screen with ERROR ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x2a000207ba8 }) to handler FunctionObject(FunctionObject { ptr: 0x2a07acda048 }) : TypeError: Error 1009: Cannot access a property or method of a null object reference. (accessing field: numChildren) |
9c61410
to
6c698cf
Compare
@SN902 I pushed a new commit which should fix the regression |
Fixed |
6c698cf
to
07c09f0
Compare
07c09f0
to
b2b1dff
Compare
No description provided.