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

Fix crash with -nointro #488

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

pzychotic
Copy link
Contributor

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

When -no-intro is used on the command line, the game will crash in

mve_setpalette(p - 3 * start, start, count);
because the mve_setpalette callback was never assigned.

When intros are played, we arrive in mve_PlayMovie() which sets the callback with MVE_palCallbacks(CallbackSetPalette). Without intros, we arrive in mve_SequenceStart() which doesn't call MVE_palCallbacks(...).

This change will assign the missing callback before we start playing a video.

Related Issues

#289 introduced the problem

Screenshots (if applicable)

Checklist

  • I have tested my changes locally and verified that they work as intended.
  • I have documented any new or modified functionality.
  • I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

Additional Comments

@Lgt2x Lgt2x changed the title Fix crash with -no-intro Fix crash with -nointro Jul 10, 2024
Copy link
Member

@Lgt2x Lgt2x left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

@Lgt2x Lgt2x merged commit 87f6ef0 into DescentDevelopers:main Jul 10, 2024
10 checks passed
@pzychotic pzychotic deleted the fix-no-intro-crash branch July 10, 2024 23:01
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.

2 participants