MCPcopy Create free account
hub / github.com/doldecomp/mkdd / calc

Method calc

src/Osako/MainMenuApp.cpp:649–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647}
648
649void MainMenuApp::calc() {
650 if (_18 == 1) {
651 _14++;
652 }
653 switch (_c) {
654 case 0: {
655 GetGameAudioMain()->stopSequenceBgm(30);
656 SYSTEM_StartFadeIn(30);
657 _18 = 1;
658 _c = 1;
659 break;
660 }
661 case 1: {
662 if ((_14 / 60.0f) >= 0.5f) {
663 _18 = 2;
664 _c = 3;
665 }
666 break;
667 }
668 case 2:
669 break;
670 case 3: {
671 if (gGamePad1P.testRepeat(KartGamePad::MAINSTICK_UP)) {
672 GetGameAudioMain()->startSystemSe(0x20000);
673 up();
674 }
675 else if (gGamePad1P.testRepeat(KartGamePad::MAINSTICK_DOWN)) {
676 GetGameAudioMain()->startSystemSe(0x20000);
677 down();
678 }
679 else if (gGamePad1P.testRepeat(KartGamePad::MAINSTICK_LEFT)) {
680 GetGameAudioMain()->startSystemSe(0x20000);
681 left();
682 }
683 else if (gGamePad1P.testRepeat(KartGamePad::MAINSTICK_RIGHT)) {
684 GetGameAudioMain()->startSystemSe(0x20000);
685 right();
686 }
687 if (gGamePad1P.testTrigger(KartGamePad::A)) {
688 GetGameAudioMain()->startSystemSe(0x20002);
689 decide();
690 }
691 else if (gGamePad1P.testTrigger(KartGamePad::B)) {
692 GetGameAudioMain()->startSystemSe(0x20004);
693 cancel();
694 }
695 else if (gGamePad1P.testTrigger(KartGamePad::Y)) {
696 if (mDebugMode == 2) {
697 GetGameAudioMain()->startSystemSe(0x20002);
698 switch (mCursorPos) {
699 case 5: {
700 for (int i = 0; i < 9; i++) {
701 gSystemRecord.unlockGame((SystemRecord::GameFlag)i);
702 }
703 break;
704 }
705 case 6: {
706 for (int i = 0; i < 0xd; i++) {

Callers

nothing calls this directly

Calls 7

isFinishLoadingArcFunction · 0.85
stopSequenceBgmMethod · 0.80
testRepeatMethod · 0.80
startSystemSeMethod · 0.80
testTriggerMethod · 0.80
unlockGameMethod · 0.80
unlockKartMethod · 0.80

Tested by

no test coverage detected