wavelength 1.0.0
Loading...
Searching...
No Matches
fxmidi.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5#include "gs/muse.h"
6#include "os/ptr.h"
7
16class FxMidi {
17public:
24 FxMidi() = default;
25
32 ~FxMidi() = default;
33
44
53
55 static constexpr int kGuideTickCount = 3;
56 static constexpr int kDuelPlayerCount = 2;
63 static void PlayMenuLeft();
64
71 static void PlayMenuRight();
72
79 static void PlayMenuUp();
80
87 static void PlayMenuDown();
88
95 static void PlayMenuSelect();
96
105 static void PlayBack();
106
113 static void PlayCheat();
114
121 static void PlayProjector();
122
129 static void PlaySound0();
130
139 static void PlaySound1();
140
147 static void PlaySound2();
148
155 static void PlaySound3();
156
163 static void PlayWinSound();
164
171 static void StopLoop();
172
179 static void PlayDecrypt();
180
187 static void PlayCursorLoop();
188
195 static void StopCursorLoop();
196
203 static void PlayJuiceLowSound();
204
211 static void PlayUnlock();
212
220 static void PlayPowerupCatchSound(int nPowerup);
221
229 static void PlayPowerupSound(int nPowerup);
230
240 static void PlayGuideSound(int nLane);
241
249 static bool IsLeaderSoundPlaying();
250
258 static void PlayLeaderSound(int nSlot);
259
267 static void PlayWinnerSound(int nSlot);
268
275 static void PlayDuelLayPattern();
276
283 static void PlayDuelCatchPattern();
284
291 static void PlayDuelNice();
292
299 static void PlayDuelYouGotIt();
300
307 static void PlayDuelAlmost();
308
315 static void PlayDuelOneLetter();
316
323 static void PlayDuelAww();
324
331 static void PlayDuelPerfect();
332
339 static void PlayDuelGameTie();
340
347 static void PlayDuelGreenWins();
348
355 static void PlayDuelPurpleWins();
356
363 static void PlayDuelMiss();
364
371 static void PlayDuelMissThis();
372
379 static void PlayDuelCheer();
380
387 static void PlayEraseSound();
388
396
403 static void PlayWrong();
404
411 static void PlaySquare();
412
419 static void PlayLazySusan();
420
427 static void PlayKeyboardLeftUp();
428
435 static void PlayKeyboardBack();
436
443 static void PlayKeyboardKeyEnter();
444
451 static void PlayArenaUnlock();
452
459 static void PlaySoloPortal();
460
467 static void PlayMultiPortal();
468
475 static void PlayNetPortal();
476
483 static void StopPortals();
484
491 static void PlayTransition();
492
499 static void StopTransition();
500
503 return mMiss;
504 }
505
508 return mUncatchable;
509 }
510
513 return mCheckpointCheer;
514 }
515
518 return mCheckpointInsane;
519 }
520
523 return mWinCheer;
524 }
525
528 return mWarning;
529 }
530
533 return mGuideTicks;
534 }
535
543 return mGuideTicks[nIndex];
544 }
545
548 return mPowerupCatches;
549 }
550
558 return mPowerupCatches[nPowerup];
559 }
560
563 return mPowerupDeploys;
564 }
565
573 return mPowerupDeploys[nPowerup];
574 }
575
578 return mWrong;
579 }
580
583 return mSquare;
584 }
585
588 return mLazySusan;
589 }
590
593 return mSoloPortal;
594 }
595
598 return mMultiPortal;
599 }
600
603 return mNetPortal;
604 }
605
608 return mTravelSwoosh;
609 }
610
613 return mLeft;
614 }
615
618 return mRight;
619 }
620
623 return mUp;
624 }
625
628 return mDown;
629 }
630
633 return mSelect;
634 }
635
638 return mBack;
639 }
640
643 return mCheat;
644 }
645
648 return mProjector;
649 }
650
653 return mUnlock;
654 }
655
658 return mWins;
659 }
660
667 Ptr<Muse> &GetWins(int nColor) {
668 return mWins[nColor];
669 }
670
673 return mLeads;
674 }
675
682 Ptr<Muse> &GetLeads(int nColor) {
683 return mLeads[nColor];
684 }
685
688 return mDuelPlayers;
689 }
690
697 Ptr<Muse> &GetDuelPlayers(int nPlayer) {
698 return mDuelPlayers[nPlayer];
699 }
700
703 return mKeyboardLeftUp;
704 }
705
708 return mKeyboardRightDown;
709 }
710
713 return mKeyboardCircle;
714 }
715
718 return mKeyboardBack;
719 }
720
723 return mKeyboardKeyEnter;
724 }
725
728 return mArenaUnlock;
729 }
730
733 return mDuelLayPattern;
734 }
735
738 return mDuelCatchPattern;
739 }
740
743 return mDuelNice;
744 }
745
748 return mDuelYouGotIt;
749 }
750
753 return mDuelAlmost;
754 }
755
758 return mDuelOneLetter;
759 }
760
763 return mDuelAww;
764 }
765
768 return mDuelPerfect;
769 }
770
773 return mDuelYeah;
774 }
775
778 return mDecrypt;
779 }
780
783 return mText;
784 }
785
788 return mDuelGameTie;
789 }
790
793 return mDuelGreenWins;
794 }
795
798 return mDuelPurpleWins;
799 }
800
803 return mDuelMiss;
804 }
805
808 return mDuelMissThis;
809 }
810
813 return mDuelCheer;
814 }
815
818 return mErase;
819 }
820
823 return mEraseSection;
824 }
825
826private:
827 Ptr<Muse> mMiss;
828 Ptr<Muse> mUncatchable;
829 Ptr<Muse> mCheckpointCheer;
830 Ptr<Muse> mCheckpointInsane;
831 Ptr<Muse> mWinCheer;
832 Ptr<Muse> mWarning;
833 Ptr<Muse> mGuideTicks[kGuideTickCount];
834 Ptr<Muse> mPowerupCatches[kPowerupCount];
835 Ptr<Muse> mPowerupDeploys[kPowerupCount];
836 Ptr<Muse> mWrong;
837 Ptr<Muse> mSquare;
838 Ptr<Muse> mLazySusan;
839 Ptr<Muse> mSoloPortal;
840 Ptr<Muse> mMultiPortal;
841 Ptr<Muse> mNetPortal;
842 Ptr<Muse> mTravelSwoosh;
843 Ptr<Muse> mLeft;
844 Ptr<Muse> mRight;
845 Ptr<Muse> mUp;
846 Ptr<Muse> mDown;
847 Ptr<Muse> mSelect;
848 Ptr<Muse> mBack;
849 Ptr<Muse> mCheat;
850 Ptr<Muse> mProjector;
851 Ptr<Muse> mUnlock;
852 Ptr<Muse> mWins[kColorCount];
853 Ptr<Muse> mLeads[kColorCount];
854 Ptr<Muse> mDuelPlayers[kDuelPlayerCount];
855 Ptr<Muse> mKeyboardLeftUp;
856 Ptr<Muse> mKeyboardRightDown;
857 Ptr<Muse> mKeyboardCircle;
858 Ptr<Muse> mKeyboardBack;
859 Ptr<Muse> mKeyboardKeyEnter;
860 Ptr<Muse> mArenaUnlock;
861 Ptr<Muse> mDuelLayPattern;
862 Ptr<Muse> mDuelCatchPattern;
863 Ptr<Muse> mDuelNice;
864 Ptr<Muse> mDuelYouGotIt;
865 Ptr<Muse> mDuelAlmost;
866 Ptr<Muse> mDuelOneLetter;
867 Ptr<Muse> mDuelAww;
868 Ptr<Muse> mDuelPerfect;
869 Ptr<Muse> mDuelYeah;
870 Ptr<Muse> mDecrypt;
871 Ptr<Muse> mText;
872 Ptr<Muse> mDuelGameTie;
873 Ptr<Muse> mDuelGreenWins;
874 Ptr<Muse> mDuelPurpleWins;
875 Ptr<Muse> mDuelMiss;
876 Ptr<Muse> mDuelMissThis;
877 Ptr<Muse> mDuelCheer;
878 Ptr<Muse> mErase;
879 Ptr<Muse> mEraseSection;
880};
881
887extern std::unique_ptr<FxMidi> TheFxMidi;
static void PlayWinnerSound(int nSlot)
Play the sound that announces the winner.
Ptr< Muse > & GetKeyboardKeyEnter()
Definition fxmidi.h:722
static void PlayWinSound()
Play the sound of a won song.
static void PlayKeyboardKeyEnter()
Play the KEYBOARD_KEYENTER cue of the front-end keyboard.
Ptr< Muse > & GetDuelMissThis()
Definition fxmidi.h:807
Color
Entries of mWins and mLeads, the player colours.
Definition fxmidi.h:46
@ kColorPurple
Definition fxmidi.h:48
@ kColorYellow
Definition fxmidi.h:50
@ kColorRed
Definition fxmidi.h:49
@ kColorCount
Definition fxmidi.h:51
@ kColorGreen
Definition fxmidi.h:47
Ptr< Muse > & GetDuelCatchPattern()
Definition fxmidi.h:737
static void PlayDuelAlmost()
Play DUEL_ALMOST.
Ptr< Muse > & GetArenaUnlock()
Definition fxmidi.h:727
Ptr< Muse > & GetDown()
Definition fxmidi.h:627
Ptr< Muse > & GetWins(int nColor)
Report one of the win cues.
Definition fxmidi.h:667
static void PlayMenuUp()
Play the sound of the up directional button in the menus.
static void PlayPowerupSound(int nPowerup)
Play the sound of a deployed power-up.
Ptr< Muse > & GetDuelPurpleWins()
Definition fxmidi.h:797
Ptr< Muse > & GetKeyboardCircle()
Definition fxmidi.h:712
static void PlayMenuLeft()
Play the sound of the left directional button in the menus.
Ptr< Muse > & GetSelect()
Definition fxmidi.h:632
static void PlayJuiceLowSound()
Play the sound that warns that the juice of a solo player is low.
static void PlayDuelNice()
Play DUEL_NICE.
static void PlayCheat()
Play the sound of a cheat.
Ptr< Muse > & GetWinCheer()
Definition fxmidi.h:522
static void PlayTransition()
Start the sound of a screen that asks for a transition sound.
Ptr< Muse > & GetUnlock()
Definition fxmidi.h:652
~FxMidi()=default
Release the cues.
Ptr< Muse > & GetCheckpointInsane()
Definition fxmidi.h:517
static void PlayKeyboardBack()
Play the KEYBOARD_BACK cue of the front-end keyboard.
static void PlayEraseSound()
Play the sound of a gem or bar erased in the remix editor.
static void PlayDuelCatchPattern()
Play DUEL_CATCHPATT.
static void PlayPowerupCatchSound(int nPowerup)
Play the sound of a power-up a player caught.
FxMidi()=default
Construct a bank with every cue unset.
static void PlayBack()
Play the sound of going back a screen in the front end.
static void PlayNetPortal()
Play the NETPORTAL cue of the online button of the main menu.
Ptr< Muse > & GetCheckpointCheer()
Definition fxmidi.h:512
Ptr< Muse > & GetWrong()
Definition fxmidi.h:577
static void PlayDuelCheer()
Play DUEL_CHEER.
Ptr< Muse > * GetPowerupCatches()
Definition fxmidi.h:547
Ptr< Muse > * GetPowerupDeploys()
Definition fxmidi.h:562
Ptr< Muse > & GetBack()
Definition fxmidi.h:637
static void PlayLeaderSound(int nSlot)
Play the sound that announces a new leader.
static constexpr int kDuelPlayerCount
Definition fxmidi.h:56
Ptr< Muse > & GetDuelPlayers(int nPlayer)
Report one of the duel player cues.
Definition fxmidi.h:697
Ptr< Muse > * GetLeads()
Definition fxmidi.h:672
static void PlayCursorLoop()
Start the looping sound of a moving cursor.
Ptr< Muse > & GetCheat()
Definition fxmidi.h:642
static void PlayKeyboardLeftUp()
Play the KEYBOARD_LEFT_UP cue of the front-end keyboard.
static void PlayArenaUnlock()
Play the ARENA_UNLOCK cue of an arena that has just been unlocked.
static void PlayMultiPortal()
Play the MULTIPORTAL cue of the multiplayer button of the main menu.
Ptr< Muse > & GetNetPortal()
Definition fxmidi.h:602
Ptr< Muse > & GetPowerupDeploys(int nPowerup)
Report one of the deploy cues.
Definition fxmidi.h:572
static void PlayLazySusan()
Play the LAZYSUSAN cue.
Ptr< Muse > & GetDuelAww()
Definition fxmidi.h:762
Ptr< Muse > & GetProjector()
Definition fxmidi.h:647
Ptr< Muse > & GetTravelSwoosh()
Definition fxmidi.h:607
static void PlaySound0()
Play the sound of the first handle.
Ptr< Muse > & GetDuelGameTie()
Definition fxmidi.h:787
Ptr< Muse > & GetEraseSection()
Definition fxmidi.h:822
static void PlayGuideSound(int nLane)
Play the guide sound of a gem lane.
static void PlayMenuSelect()
Play the sound of a choice in the menus.
static void PlayDuelGameTie()
Play DUEL_GAMETIE.
Ptr< Muse > & GetMiss()
Definition fxmidi.h:502
Ptr< Muse > & GetLeft()
Definition fxmidi.h:612
static void PlayMenuDown()
Play the sound of the down directional button in the menus.
Ptr< Muse > * GetGuideTicks()
Definition fxmidi.h:532
Ptr< Muse > & GetSoloPortal()
Definition fxmidi.h:592
Ptr< Muse > & GetDuelAlmost()
Definition fxmidi.h:752
Ptr< Muse > & GetMultiPortal()
Definition fxmidi.h:597
Ptr< Muse > & GetErase()
Definition fxmidi.h:817
static void PlayWrong()
Play the WRONG cue of a choice that is not allowed.
static void StopCursorLoop()
Stop the looping sound of a moving cursor.
static void PlayDuelLayPattern()
Play DUEL_LAYPATT.
Ptr< Muse > & GetUncatchable()
Definition fxmidi.h:507
static void PlayDuelMissThis()
Play DUEL_MISSTHIS.
Ptr< Muse > & GetRight()
Definition fxmidi.h:617
Ptr< Muse > & GetKeyboardLeftUp()
Definition fxmidi.h:702
Ptr< Muse > * GetWins()
Definition fxmidi.h:657
Ptr< Muse > & GetDuelCheer()
Definition fxmidi.h:812
static void PlayProjector()
Play the sound of the projector that moves between the menu screens.
static void PlayDuelYouGotIt()
Play DUEL_YOUGOTIT.
Ptr< Muse > & GetDuelYouGotIt()
Definition fxmidi.h:747
static void StopTransition()
Stop the sound PlayTransition() started.
Ptr< Muse > & GetDuelPerfect()
Definition fxmidi.h:767
static void PlayDuelOneLetter()
Play DUEL_ONELETTER.
static void PlaySound1()
Play the sound of the second handle.
Powerup
Entries of mPowerupCatches and mPowerupDeploys.
Definition fxmidi.h:35
@ kPowerupMultiplier
Definition fxmidi.h:37
@ kPowerupCrippler
Definition fxmidi.h:41
@ kPowerupBumper
Definition fxmidi.h:40
@ kPowerupAutocatcher
Definition fxmidi.h:36
@ kPowerupFreestyler
Definition fxmidi.h:39
@ kPowerupCount
Definition fxmidi.h:42
@ kPowerupSlowdown
Definition fxmidi.h:38
Ptr< Muse > * GetDuelPlayers()
Definition fxmidi.h:687
Ptr< Muse > & GetDuelNice()
Definition fxmidi.h:742
Ptr< Muse > & GetDuelGreenWins()
Definition fxmidi.h:792
static void PlayDuelPerfect()
Play DUEL_PERFECT.
static void PlaySound3()
Play the sound of the fourth handle.
static void PlaySound2()
Play the sound of the third handle.
static void PlayDuelGreenWins()
Play DUEL_GREENWINS.
Ptr< Muse > & GetDuelLayPattern()
Definition fxmidi.h:732
Ptr< Muse > & GetKeyboardBack()
Definition fxmidi.h:717
Ptr< Muse > & GetSquare()
Definition fxmidi.h:582
Ptr< Muse > & GetDecrypt()
Definition fxmidi.h:777
Ptr< Muse > & GetLeads(int nColor)
Report one of the lead cues.
Definition fxmidi.h:682
Ptr< Muse > & GetKeyboardRightDown()
Definition fxmidi.h:707
Ptr< Muse > & GetDuelOneLetter()
Definition fxmidi.h:757
Ptr< Muse > & GetDuelYeah()
Definition fxmidi.h:772
static void PlayDuelPurpleWins()
Play DUEL_PURPLEWINS.
Ptr< Muse > & GetDuelMiss()
Definition fxmidi.h:802
Ptr< Muse > & GetUp()
Definition fxmidi.h:622
static void PlaySquare()
Play the SQUARE cue.
static constexpr int kGuideTickCount
The number of guide tick cues, and of duel player cues.
Definition fxmidi.h:55
static bool IsLeaderSoundPlaying()
Report whether a leader sound is playing.
static void PlayDuelAww()
Play DUEL_AWW.
static void StopLoop()
Stop the looping sound of a song.
Ptr< Muse > & GetLazySusan()
Definition fxmidi.h:587
static void PlayDuelMiss()
Play DUEL_MISS.
static void PlayMenuRight()
Play the sound of the right directional button in the menus.
Ptr< Muse > & GetGuideTicks(int nIndex)
Report one of the guide tick cues.
Definition fxmidi.h:542
Ptr< Muse > & GetText()
Definition fxmidi.h:782
static void PlaySoloPortal()
Play the SOLOPORTAL cue of the solo button of the main menu.
Ptr< Muse > & GetWarning()
Definition fxmidi.h:527
static void PlayUnlock()
Play the UNLOCK cue.
static void PlayDecrypt()
Play the sound of a song being decrypted.
static void PlayEraseSectionSound()
Play the sound of a section erased in the remix editor.
static void StopPortals()
Stop the three portal cues of the main menu.
Ptr< Muse > & GetPowerupCatches(int nPowerup)
Report one of the catch cues.
Definition fxmidi.h:557
Owner of one reference to an Attachment.
Definition ptr.h:16
std::unique_ptr< FxMidi > TheFxMidi
The bank of interface sounds, which GameDb::InitSfx() creates.