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

avm1: Fix target clip behavior in SWF5 #2593

Merged
merged 3 commits into from
Jan 21, 2021
Merged

Conversation

relrelb
Copy link
Contributor

@relrelb relrelb commented Jan 17, 2021

Fixes #2580.

@relrelb relrelb marked this pull request as draft January 17, 2021 15:52
@relrelb relrelb changed the title core: Change target clip behavior in SWF5 core: Fix target clip behavior in SWF5 Jan 17, 2021
@Toad06
Copy link
Member

Toad06 commented Jan 17, 2021

FWIW, I've tested the PR and observed a few issues on a couple of files:

  • Crazy Hunters: When you shoot the first bird bird, the next one appears in the top left corner. The next ones are likely off screen.
  • Zizzo Challenge: The game softlocks after the first mini game.

@relrelb relrelb changed the title core: Fix target clip behavior in SWF5 avm1: Fix target clip behavior in SWF5 Jan 17, 2021
@relrelb
Copy link
Contributor Author

relrelb commented Jan 17, 2021

Thank you for testing!
I think it should be okay now. Can you please confirm it on your side?

@relrelb relrelb marked this pull request as ready for review January 17, 2021 21:26
@Toad06
Copy link
Member

Toad06 commented Jan 17, 2021

All good! 👍 Thanks a lot for your work.

core/src/avm1/function.rs Outdated Show resolved Hide resolved
@Herschel Herschel merged commit ab92bc1 into ruffle-rs:master Jan 21, 2021
@relrelb relrelb deleted the target_clip branch January 21, 2021 22:55
@Toad06
Copy link
Member

Toad06 commented Jan 25, 2021

Yikes, I've tested a game (SWF version 5) that regressed because of this. For some reason, collisions don't work because code inside \DefineSprite (120: oeufs)\frame 4\DoAction is no longer executed.

FWIW, the game works when base_clip is either af.base_clip or af.base_clip.avm1_root().unwrap().

The game is unfortunately no longer available online and I own no rights on the file, but I can upload it for a short time if you want to take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

avm1: target_clip behavior difference depending on SWF version
3 participants