Skip to content
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

Implement ImportAssets/ImportAssets2 #16420

Merged
merged 18 commits into from
Jul 2, 2024
Merged

Conversation

wsxarcher
Copy link
Contributor

Load the ImportAssets(2) url async and copy the character requested.
This does not cover all cases because it requires extensive time of reversing the behavior of Flash but it fixes at least 2 real games I tested.

#15017 (needs to set the HTTP referral if run on desktop, works perfectly as extension)
#10305

@danielhjacobs danielhjacobs added the waiting-on-review Waiting on review from a Ruffle team member label May 23, 2024
@wsxarcher wsxarcher force-pushed the imports2 branch 2 times, most recently from 80b26bc to e92933a Compare May 25, 2024 00:02
Copy link
Member

@kmeisthax kmeisthax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you have so far largely feels correct, though I absolutely do think this needs some test cases, if only to rule out some of the speculation I put in the comments.

core/src/library.rs Outdated Show resolved Hide resolved
core/src/library.rs Outdated Show resolved Hide resolved
core/src/loader.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Show resolved Hide resolved
@wsxarcher
Copy link
Contributor Author

What you have so far largely feels correct, though I absolutely do think this needs some test cases, if only to rule out some of the speculation I put in the comments.

Testing can be tricky because of the async nature of the loading. I think flash locks the all vm to load something but in our case we cannot do it. So it works on these games because the loading is in the menu but if you make an artificial swf you need to put some arbitrary sleep and I'm not sure how to do it

core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Show resolved Hide resolved
core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Show resolved Hide resolved
core/src/loader.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/display_object/movie_clip.rs Outdated Show resolved Hide resolved
core/src/loader.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Dinnerbone Dinnerbone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit from me otherwise looks good, I'd like to get this in and then I want to work on a followup soon for testing + more edge cases

core/src/loader.rs Outdated Show resolved Hide resolved
@Dinnerbone Dinnerbone enabled auto-merge (squash) July 2, 2024 11:29
@Dinnerbone Dinnerbone merged commit fe08638 into ruffle-rs:master Jul 2, 2024
17 checks passed
@sleepycatcoding sleepycatcoding removed the waiting-on-review Waiting on review from a Ruffle team member label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

7 participants