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

Actor Cutscene system from Majora's Mask #161

Merged
merged 14 commits into from
Jan 6, 2025

Conversation

Yanis002
Copy link
Collaborator

@Yanis002 Yanis002 commented Jan 3, 2025

This ports actor cutscenes back to OoT, also I added more things that were required:

  • the cutscene manager (z_eventmgr.c in MM decomp)
  • the cutscene camera logic (cutscene_camera.c in MM decomp)
  • the letterbox system
  • a state flag to halt actors during cutscenes
  • some bits of the camera logic
  • some math functions that I don't wanna try to understand lol
  • missing HUD visibility features

draft until the other PR is merged (since I based this branch on the other one and I don't want to play with git to fix that)

@Yanis002
Copy link
Collaborator Author

Yanis002 commented Jan 3, 2025

important things to note if you want to use this:

  • the cutscene manager doesn't handle starting a cutscene through the additionalCsId field
  • to play a cutscene you have to add it to the queue and play it before the next time Play_Main calls CutsceneManager_Update. This is important as this function clears the "next cutscene queue", and the "waiting queue" is cleared after each playstate update

for reference, here's a debug thing I used to test this (I put that at the end of Play_Main):

    // get the additional cutscene id and use it if the value is not -1
    s16 optCsId = CutsceneManager_GetAdditionalCsId(0);
    s16 csId = optCsId >= 0 ? optCsId : 0;

    // check if the cutscene is the next on the queue, if it is play it,
    // otherwise add it to the queue when the button L is pressed
    if (CutsceneManager_IsNext(csId)) {
        CutsceneManager_Start(csId, &GET_PLAYER(this)->actor);
    } else if (CHECK_BTN_ALL(this->state.input[0].press.button, BTN_L)) {
        CutsceneManager_Queue(csId);
    }

    // update the cutscene manager
    CutsceneManager_Update();
    CutsceneManager_ClearWaiting();

@Yanis002 Yanis002 changed the title [Draft] Port Actor Cutscene system from Majora's Mask Actor Cutscene system from Majora's Mask Jan 5, 2025
@Yanis002 Yanis002 marked this pull request as ready for review January 5, 2025 23:17
@Yanis002 Yanis002 added the merge soon The pull request will be merged in 24 hours if nothing else comes up label Jan 6, 2025
@Yanis002 Yanis002 merged commit a449ef2 into HackerN64:main Jan 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge soon The pull request will be merged in 24 hours if nothing else comes up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant