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

CHLCC intro sequence #78

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

newo-2001
Copy link
Contributor

This is a draft PR for visiblity.

This PR adds some of the animations for the quite intricate CHLCC intro sequence which involves bouncing, exploding and falling stars.
To satisfy these needs, I added a new PathAnimation class which represents something moving along a path in space.

One thing of note is that the sound that plays during the intro sequence is started from the script with a type=1 parameter. This was previously unimplemented but it seems to pause the playback of the audio immediately. This will then later be resumed by the drawing code in order to synchronize the sound with the star bouncing animation.

if (type != 2) {
PopExpression(effect);
PopExpression(loop);
ScrWork[SW_SEREQNO + channel] = effect;
Audio::Channels[Audio::AC_SE0 + channel]->Volume =
(ScrWork[SW_SEVOL + channel] / 100.0f) * 0.3f;

// Hack to prevent playing the first sound byte before pausing
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When pausing playback immediately after starting it, like this code does. A few milliseconds of sound is still played before it can be paused. This workaround is not a good solution, but I think we might have to extend the AudioChannel interface in order to support this use case.

@newo-2001 newo-2001 force-pushed the chlcc-intro-animation branch from 903c692 to 2133aa1 Compare October 15, 2024 19:26
@newo-2001 newo-2001 force-pushed the chlcc-intro-animation branch from 7dd8399 to 6b4bda3 Compare October 20, 2024 18:14
@newo-2001 newo-2001 force-pushed the chlcc-intro-animation branch from 5df5c6d to f2145d3 Compare October 21, 2024 21:08
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