ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.52k stars 805 forks source link

Missing texts in HabboExperience animation #11999

Closed LauraWebdev closed 1 year ago

LauraWebdev commented 1 year ago

Describe the bug

Hey there, I'm currently trying to port the "Habbo Experience" promotional animation from 2005. The original is still available at http://images.habbo.com/downloads/experience/exp-20050704-1/index_uk.html.

While porting, I've noticed that certain texts seem to be missing. There is no output in the console that would suggest a problem is present though.

Ruffle Version: image image image

Expected behavior

The texts are displayed.

Flash Version: image image image

Affected platform

Self-hosted version

Operating system

Windows 11 latest

Browser

Microsoft Edge (Chromium based) latest

Additional information

The swf loads certain additional files on startup.

I've confirmed that the xml files are valid and the project is still working using native flash in Pale Moon. The missing texts would be in localization.xml and console.swf, however the texts in structure.xml are used properly.

This problem exists both in the self-hosted version and the browser plugin.

Dinnerbone commented 1 year ago

It looks like Buttons.init(txt, a, gfx) is getting undefined for the first argument, not sure why yet. Investigating! Seems to be called with (for example) (undefined, "r", 1.0)

Edit: The result of getUiText always seems to be undefined Edit 2: this.xml.findNode("characters",true) is null Edit 3: It looks like XML2.findNode() expects its this.childNodes to be of XML2 type, but I think prototype replacement of XML isn't supported yet

Dinnerbone commented 1 year ago

Looks like we need to migrate XMLNode to NativeObject. Part of #701

LauraWebdev commented 1 year ago

Thanks for checking it out! It's interesting this only happens to one half of the UI. Does it use a different way to display the texts within structure.xml compared to localization.xml/console.swf?

Dinnerbone commented 1 year ago

Yeah, for the "Structure" stuff (ie character texts) it seems to just use firstChild.childNodes, whereas for localisation it uses a custom findNode to try and get it. We support the first no problem, but when it's trying to change the definition of what XMLNode is to add its helper method there, we fail :(