wavelength 1.0.0
Loading...
Searching...
No Matches
TutorialGameLogic Class Reference

Rules of the tutorial song. More...

#include <tutorialgamelogic.h>

Inheritance diagram for TutorialGameLogic:
Collaboration diagram for TutorialGameLogic:

Public Types

enum  RotateMode { kRotateModeNextOnly = 100 , kRotateModePreviousOnly = 101 , kRotateModeNone = 102 , kRotateModeAll = 103 }
 Values of mRotateMode, the disable_rot argument. More...
Public Types inherited from GameLogic
enum  State {
  kStateIdle = 0 , kStatePlaying = 1 , kStatePaused = 2 , kStateSuspended = 3 ,
  kStateWon = 4 , kStateRunning = 5 , kStateEnding = 6 , kStateFinished = 7
}
 Values of mState. More...
enum  Powerup {
  kPowerupNone = 0 , kPowerupAutocatcher = 1 , kPowerupMultiplier = 2 , kPowerupSlowdown = 3 ,
  kPowerupFreestyle = 4 , kPowerupBumper = 5 , kPowerupCrippler = 6 , kPowerupCount = 7
}
 Kinds of power-up a player can hold. More...

Public Member Functions

 TutorialGameLogic (Song *pSong, DataArray *pSongConfig)
 Construct the logic of the tutorial song with a random seed.
 ~TutorialGameLogic () override
 Cancel the scheduled deactivations, restore the song speed, the game settings, and the controller bindings, and remove the script commands.
bool DispatchPriv (Message *pMsg) override
 Report the type of a message and pass it to WorldLogic::DispatchPriv().
int GetTick () override
 Report the song position in ticks.
float GetTime () override
 Report the song position on the song clock.
void Poll () override
 Advance the song, the steps, and the narration.
float GetProgress () override
 Report how far the tutorial has played, from the span set_songpos_params sets.
void HandleInput (const RotateEvent &event) override
 Pass a rotation that mRotateMode allows, unless the input is disabled.
void HandleInput (const PlayNoteEvent &event) override
 Pass a note, unless the input is disabled.
void HandleInput (const BtnEvent< 4 > &event) override
 Ignore the event.
void HandleInput (const BtnEvent< 5 > &event) override
 Deploy a power-up, unless the input or the power-ups are disabled.
void SetPaused (bool bPaused, int nPad, int nReason) override
 Pause or resume the song and the narration, and show the pause menu while paused.
void OnStart () override
 Enable the first catch tracks and start the steps.
void OnFinish (bool bWon) override
 Ignore the end of the song.
void OnBar (int nBar) override
 Record the bar, unless it precedes bar 0.
void OnSection () override
 Ignore the start of a section.
void OnPhraseCaptured (CatchTrack *pTrack, Player *pPlayer, int nBar, bool bStreak) override
 Enable the next catch tracks, unless set_manual_enable_next asked for the script to do it.
void OnPhraseEnded (Track *pTrack) override
 Ignore the end of a phrase.
void OnPhraseMissed (Track *pTrack) override
 Ignore a missed phrase.
void NotifyWhenDone (Task *pTask, const char *pszName) override
 Arrange for a task to learn when the commands of a track named "SCRIPT" ran out.
bool IsPhraseAbsent ()
 Report whether no phrase of the first player's track plays at or after the current bar.
void PlayScriptTrack (const char *pszName)
 Start the commands of a track named "SCRIPT" from the current tick.
void QueueStream (const char *pszName, bool bSkipIfBusy)
 Queue a narration stream.
void LoopTrack (int nStartBar, int nNumBars, int nBarsAhead)
 Loop a range of bars of the song from a number of bars after the recorded bar.
void SetInputDisabled (bool bDisabled)
 Disable or enable the input.
void SetRotateMode (int nMode)
 Set the rotations that pass.
void SetPowerupsDisabled (bool bDisabled)
 Disable or enable the power-ups.
void ActivateBars (int nBar, int nBars, int nTrack)
 Give a run of bars of a catch track to the first player.
void ScheduleDeactivateTrack (int nBarsAhead, int nBar, int nBars)
 Schedule the deactivation of a run of bars of the first player's track.
void CaptureTrack ()
 Capture the phrase of the recorded bar on the first player's track.
void CaptureAllTracks ()
 Capture the phrase of the current bar on every catch track for the first player.
void PlacePowerup (int nPowerup, int nTrack, int nBar)
 Place a power-up in a bar of a catch track.
void MoveTrack (int nTrack)
 Move the first player to a catch track.
void SetAutopilot (bool bAutopilot)
 Turn on or off the automatic play of the first player's track.
void SetNoSeeker (bool bNoSeeker)
 Hide or show the seeker of the first player's track.
void SetManualEnableNext (bool bManual)
 Leave the enabling of the next catch tracks to the script, or return it to the captures.
void SetSongPosParams (int nPlayedBars, int nTotalBars)
 Set the span GetProgress() measures.
void ShowStreakArrow (int nTrack, int nBarsAhead, int nUnused)
 Point at the next phrase of a catch track from a number of bars after the clock's bar.
void ScheduleSetJuice (int nBarsAhead, float fJuice)
 Schedule the first player's energy meter to change at the start of a later bar.
void ScheduleStageComplete (int nBarsAhead)
 Schedule the stage completion display at the start of a later bar.
void EnableNext ()
 Enable the next catch tracks from the bar after the current one.
void HandleInput (const BtnEvent< 3 > &event) override
 Pause the song from the controller of the player.
void HandleInput (const ChangeSectionEvent &event) override
 Ignore the event.
void HandleInput (const BtnEvent< 9 > &event) override
 Ignore the event.
void HandleInput (const BtnEvent< 10 > &event) override
 Pass the button to the player.
void HandleInput (const BtnEvent< 8 > &event) override
 Ignore the event.
void HandleInput (const StickEvent< 2 > &event) override
 Pass the stick event to the player.
void HandleInput (const StickEvent< 6 > &event) override
 Pass the stick event to the player.
Public Member Functions inherited from GameLogic
 GameLogic (Song *pSong, DataArray *pConfig, int nSeed)
 Construct the logic of a song.
 ~GameLogic () override
 Stop the song and release the players and the tracks.
void Start () override
 Start the song, the tracks, the players, and the bar counting.
void Stop () override
 Stop the song, the tracks, and the players.
bool IsFinished () const override
 Report whether Stop() ran.
int HasQuit () const override
 Report mQuit.
int IsRestartRequested () const override
 Report whether the song is to start again once it ends.
bool IsFreestyling (int nPlayer) override
 Report whether a player is on the freestyle track.
bool IsPlaying () const override
 Report whether the song is playing.
virtual bool DeploySlowdown (Player *pPlayer)
 Slow the song down for a player.
virtual bool DeployFreestyle (Player *pPlayer)
 Move a player to the freestyle track for the configured number of bars.
virtual bool DeployBumper (Player *pPlayer)
 Refuse a bumper.
virtual bool DeployCrippler (Player *pPlayer)
 Refuse a crippler.
virtual void EndFreestyle (Player *pPlayer)
 Move a player from the freestyle track back to a catch track.
bool IsFreestyleTrackActive () const
 Report whether a player is on the freestyle track while the song plays.
bool HasPhraseThisBar () const
 Report whether a catch track has a phrase in the current bar.
void EndSong ()
 Start the ending of the song.
void Finish (bool bWon)
 Stop the players at the end of the song.
void CapturePhrase (CatchTrack *pTrack, Player *pPlayer, int nBar, bool bStreak)
 Record the capture of a phrase and find the next phrase of each local player.
void ContinueStreak (Track *pTrack, int nBar, int nFromBar)
 Lengthen or reset the streak of the player of a track and find the next phrase.
void EndPhrase (Track *pTrack)
 Report the end of a phrase to the triggers and to OnPhraseEnded().
void MissPhrase (Track *pTrack)
 Record a missed phrase and report it to the triggers and to OnPhraseMissed().
void EnableNextTracks (int nBar)
 Enable the catch tracks of the next step of the song's enable order.
void EnterFreestyle (Player *pPlayer, bool bVictory)
 Move a player to the freestyle track.
void LeaveFreestyle (Player *pPlayer, int nTrack)
 Move a player from the freestyle track to a catch track and find the next phrase.
void StartSlowdown ()
 Slow the song down.
void StopSlowdown ()
 Return the song to its speed after StartSlowdown().
bool DeployAutocatcher (Player *pPlayer)
 Capture a phrase of the track of a player and pulse the controllers of every player on it.
bool DeployMultiplier (Player *pPlayer)
 Raise the multiplier of a player.
Public Member Functions inherited from WorldLogic
 WorldLogic ()
 Construct the logic and give the input of every controller to the world.
 ~WorldLogic () override
 Release the logic.
bool DispatchPriv (Message *pMsg) override
 Pass a JoypadConnectionMsg to OnJoypadConnection() and ignore any other message.
void AllNotesOff ()
 Silence every synthesiser channel.
void ScheduleControllerCheck ()
 Pause the song again one tick from now when a controller is disconnected.
int OnJoypadConnection (JoypadConnectionMsg *pMsg)
 Pause the playing song when the controller of a player is disconnected.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
virtual bool Dispatch (Message *pMsg)
 Accept a message.
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.
virtual bool Dispatch (Message *msg)
 Handle a message.
Public Member Functions inherited from TaskDoneNotifier
virtual ~TaskDoneNotifier ()
 Release the notifier.

Additional Inherited Members

Static Public Member Functions inherited from WorldLogic
static int FindDisconnectedPad ()
 Find the controller of a player on this console that is disconnected.
Static Public Member Functions inherited from TaskDoneNotifier
static void ReportDone (Task *pTask)
 Tell a waiting task that its work is done.
Protected Member Functions inherited from GameLogic
void AssignTracks ()
 Assign each player to a random catch track.
void ApplyFreestyleEffect (int nSet)
 Apply one effect set of the song.
void ShowPowerupText (const char *pszToken, int nPlayer)
 Show the localised text of a power-up.
void CreateTracks (int *pFreestyleType, int *pFreestyleInstrument)
 Create the catch tracks and the freestyle track of the song.
void TickBar ()
 Count one bar, starting the next section when it begins.
void AdvanceSection ()
 Start the next section.
void ClearNextPhrase (int nPlayer)
 Forget the next phrase of a player.
void FindNextPhrase (int nPlayer, int nTrack, int nFromBar)
 Find the first phrase on another catch track at or after a bar, and point the player at it.
void PlaceRandomPowerups ()
 Place a random power-up in every bar of every catch track.
void PlacePowerups ()
 Place the power-ups of every section in the busiest bars of the catch tracks.
Static Protected Member Functions inherited from GameLogic
static int GetControllerArgument (DataArray *pCommand)
 Report the controller argument of a script command.
static void OnAutocatcherCommand (DataArray *pCommand, void *pUserData)
 Deploy the autocatcher for a controller on the autocatcher script command.
static void OnMultiplierCommand (DataArray *pCommand, void *pUserData)
 Deploy the multiplier for a controller on the multiplier script command.
static void OnSlowCommand (DataArray *pCommand, void *pUserData)
 Turn the slowdown on or off outside an online game on the slow script command.
static void OnFreestyleCommand (DataArray *pCommand, void *pUserData)
 Deploy the freestyle for a controller on the freestyle script command.
static void OnFreestyleToggleCommand (DataArray *pCommand, void *pUserData)
 Move the player of a controller onto or off the freestyle track on the freestyle_toggle script command.
static void OnBumperCommand (DataArray *pCommand, void *pUserData)
 Deploy the bumper for a controller on the bumper script command.
static void OnCripplerCommand (DataArray *pCommand, void *pUserData)
 Deploy the crippler for a controller on the crippler script command.
static void OnPowerupCommand (DataArray *pCommand, void *pUserData)
 Give a power-up to the player of a controller on the powerup script command while the power-up cheat is on.
Protected Attributes inherited from GameLogic
Song * mSong
int mState
int mPaused
int mTicksPerBar
int mNumBars
PlayMap * mPlayMap
std::vector< std::unique_ptr< Player > > mPlayers
std::vector< LocalPlayer * > mLocalPlayers
std::vector< std::unique_ptr< CatchTrack > > mCatchTracks
std::unique_ptr< FreestyleTrack > mFreestyleTrack
std::unique_ptr< GameTrackSelector > mTrackSelector
std::unique_ptr< SpeedRamp > mSpeedRamp
int mPhraseThisBar
int mQuit
int mReserved60
int mSectionStartBar
int mNextSectionBar
int mSection
WorldBeat mWorldBeat
int mSavedState
int mReserved8c
int mSlowdown
int mNextEnableStep
std::vector< PlayerData > mPlayerData
Ptr< Command > mBarCmd
Ptr< Command > mStopSlowdownCmd
Rand mRand
int mEndTick

Detailed Description

Rules of the tutorial song.

The RTTI records the class as deriving from GameLogic and from TaskDoneNotifier, the second base after the members of GameLogic. Game builds the logic while GameDb::mTutorial is set. The "script" entry of the song's configuration lists the steps, each a task that mScript runs in order once the song starts. The script commands the constructor registers drive the song: they play narration streams, run the tracks named "SCRIPT" of the MIDI file, loop the song, give bars of the catch tracks to the player, and switch the controls on and off. The logic saves the game settings and the first player's controller bindings it changes and restores them when it is destroyed. The end of the last step shows the end-of-tutorial menu.

Member Enumeration Documentation

◆ RotateMode

Values of mRotateMode, the disable_rot argument.

Enumerator
kRotateModeNextOnly 

Only rotations to the next track pass.

kRotateModePreviousOnly 

Only rotations to the previous track pass.

kRotateModeNone 

No rotation passes.

kRotateModeAll 

Every rotation passes.

Constructor & Destructor Documentation

◆ TutorialGameLogic()

TutorialGameLogic::TutorialGameLogic ( Song * pSong,
DataArray * pSongConfig )

Construct the logic of the tutorial song with a random seed.

Registers the script commands, builds the steps, saves the game settings the commands change, and switches the first player to the default controller bindings.

Parameters
pSongThe song.
pSongConfigThe entry of the song in the "songs" section.
Ghidra address:
NTSC-U/C: 0x0013f7e8
Ghidra address:
PAL: 0x00141140

◆ ~TutorialGameLogic()

TutorialGameLogic::~TutorialGameLogic ( )
override

Cancel the scheduled deactivations, restore the song speed, the game settings, and the controller bindings, and remove the script commands.

Ghidra address:
NTSC-U/C: 0x0013fcb0
Ghidra address:
PAL: 0x00141660

Member Function Documentation

◆ DispatchPriv()

bool TutorialGameLogic::DispatchPriv ( Message * pMsg)
overridevirtual

Report the type of a message and pass it to WorldLogic::DispatchPriv().

Parameters
pMsgThe message.
Returns
The result of WorldLogic::DispatchPriv().
Ghidra address:
NTSC-U/C: 0x00141168
Ghidra address:
PAL: 0x00142b28

Implements MsgSink.

◆ GetTick()

int TutorialGameLogic::GetTick ( )
overridevirtual

Report the song position in ticks.

Returns
The tick of the song scheduler's clock.
Ghidra address:
NTSC-U/C: 0x00140230
Ghidra address:
PAL: 0x00141bf0

Implements WorldLogic.

◆ GetTime()

float TutorialGameLogic::GetTime ( )
overridevirtual

Report the song position on the song clock.

Returns
The time of the song scheduler's clock.
Ghidra address:
NTSC-U/C: 0x00140250
Ghidra address:
PAL: 0x00141c10

Implements WorldLogic.

◆ Poll()

void TutorialGameLogic::Poll ( )
overridevirtual

Advance the song, the steps, and the narration.

Once the last step is done, the steps stop and the end-of-tutorial menu shows.

Ghidra address:
NTSC-U/C: 0x00140270
Ghidra address:
PAL: 0x00141c30

Reimplemented from GameLogic.

◆ GetProgress()

float TutorialGameLogic::GetProgress ( )
overridevirtual

Report how far the tutorial has played, from the span set_songpos_params sets.

Returns
The fraction, limited to the range 0 to 1.
Ghidra address:
NTSC-U/C: 0x001401a8
Ghidra address:
PAL: 0x00141b68

Reimplemented from GameLogic.

◆ HandleInput() [1/11]

void TutorialGameLogic::HandleInput ( const RotateEvent & event)
overridevirtual

Pass a rotation that mRotateMode allows, unless the input is disabled.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00140028
Ghidra address:
PAL: 0x001419e8

Reimplemented from GameLogic.

◆ HandleInput() [2/11]

void TutorialGameLogic::HandleInput ( const PlayNoteEvent & event)
overridevirtual

Pass a note, unless the input is disabled.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x001400c8
Ghidra address:
PAL: 0x00141a88

Reimplemented from GameLogic.

◆ HandleInput() [3/11]

void TutorialGameLogic::HandleInput ( const BtnEvent< 4 > & event)
overridevirtual

Ignore the event.

The tutorial does not change the display option.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00140128
Ghidra address:
PAL: 0x00141ae8

Reimplemented from GameLogic.

◆ HandleInput() [4/11]

void TutorialGameLogic::HandleInput ( const BtnEvent< 5 > & event)
overridevirtual

Deploy a power-up, unless the input or the power-ups are disabled.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x001400f0
Ghidra address:
PAL: 0x00141ab0

Reimplemented from GameLogic.

◆ SetPaused()

void TutorialGameLogic::SetPaused ( bool bPaused,
int nPad,
int nReason )
overridevirtual

Pause or resume the song and the narration, and show the pause menu while paused.

Parameters
bPausedWhether to pause.
nPadThe controller that requested the change.
nReasonNon-zero when a disconnected controller paused the song.
Ghidra address:
NTSC-U/C: 0x001403e0
Ghidra address:
PAL: 0x00141da0

Reimplemented from GameLogic.

◆ OnStart()

void TutorialGameLogic::OnStart ( )
overridevirtual

Enable the first catch tracks and start the steps.

Ghidra address:
NTSC-U/C: 0x001402f8
Ghidra address:
PAL: 0x00141cb8

Implements GameLogic.

◆ OnFinish()

void TutorialGameLogic::OnFinish ( bool bWon)
inlineoverridevirtual

Ignore the end of the song.

Parameters
bWonWhether the song was won.
Ghidra address:
NTSC-U/C: 0x00343af8
Ghidra address:
PAL: 0x003b1030

Implements GameLogic.

◆ OnBar()

void TutorialGameLogic::OnBar ( int nBar)
overridevirtual

Record the bar, unless it precedes bar 0.

Parameters
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x00140328
Ghidra address:
PAL: 0x00141ce8

Implements GameLogic.

◆ OnSection()

void TutorialGameLogic::OnSection ( )
inlineoverridevirtual

Ignore the start of a section.

Ghidra address:
NTSC-U/C: 0x00343ae8
Ghidra address:
PAL: 0x003b1020

Implements GameLogic.

◆ OnPhraseCaptured()

void TutorialGameLogic::OnPhraseCaptured ( CatchTrack * pTrack,
Player * pPlayer,
int nBar,
bool bStreak )
overridevirtual

Enable the next catch tracks, unless set_manual_enable_next asked for the script to do it.

Parameters
pTrackThe track the phrase was captured on.
pPlayerThe player that captured it.
nBarThe first bar the capture clears.
bStreakWhether the capture continues the streak of the player.
Ghidra address:
NTSC-U/C: 0x00140338
Ghidra address:
PAL: 0x00141cf8

Implements GameLogic.

◆ OnPhraseEnded()

void TutorialGameLogic::OnPhraseEnded ( Track * pTrack)
overridevirtual

Ignore the end of a phrase.

Parameters
pTrackThe track.
Ghidra address:
NTSC-U/C: 0x001403d8
Ghidra address:
PAL: 0x00141d98

Implements GameLogic.

◆ OnPhraseMissed()

void TutorialGameLogic::OnPhraseMissed ( Track * pTrack)
inlineoverridevirtual

Ignore a missed phrase.

Parameters
pTrackThe track the phrase was missed on.
Ghidra address:
NTSC-U/C: 0x00343af0
Ghidra address:
PAL: 0x003b1028

Implements GameLogic.

◆ NotifyWhenDone()

void TutorialGameLogic::NotifyWhenDone ( Task * pTask,
const char * pszName )
overridevirtual

Arrange for a task to learn when the commands of a track named "SCRIPT" ran out.

A track that no midi command started is reported done at once.

Parameters
pTaskThe task waiting for the track.
pszNameThe name of the commands of the track.
Ghidra address:
NTSC-U/C: 0x00140798
Ghidra address:
PAL: 0x00142158

Implements TaskDoneNotifier.

◆ IsPhraseAbsent()

bool TutorialGameLogic::IsPhraseAbsent ( )

Report whether no phrase of the first player's track plays at or after the current bar.

The name is inferred.

Returns
True when the track has no phrase left.
Ghidra address:
NTSC-U/C: 0x00140f08
Ghidra address:
PAL: 0x001428c8

◆ PlayScriptTrack()

void TutorialGameLogic::PlayScriptTrack ( const char * pszName)

Start the commands of a track named "SCRIPT" from the current tick.

Parameters
pszNameThe name of the commands of the track.
Ghidra address:
NTSC-U/C: 0x00140518
Ghidra address:
PAL: 0x00141ed8

◆ QueueStream()

void TutorialGameLogic::QueueStream ( const char * pszName,
bool bSkipIfBusy )

Queue a narration stream.

Parameters
pszNameThe stream name.
bSkipIfBusyDrop the request when a stream is already queued.
Ghidra address:
NTSC-U/C: 0x00140830
Ghidra address:
PAL: 0x001421f0

◆ LoopTrack()

void TutorialGameLogic::LoopTrack ( int nStartBar,
int nNumBars,
int nBarsAhead )

Loop a range of bars of the song from a number of bars after the recorded bar.

Parameters
nStartBarThe first bar of the range as written.
nNumBarsThe length of the range in bars.
nBarsAheadThe bars after mBar the loop plays from.
Ghidra address:
NTSC-U/C: 0x00140850
Ghidra address:
PAL: 0x00142210

◆ SetInputDisabled()

void TutorialGameLogic::SetInputDisabled ( bool bDisabled)

Disable or enable the input.

Parameters
bDisabledDisable the input.
Ghidra address:
NTSC-U/C: 0x001408d0
Ghidra address:
PAL: 0x00142290

◆ SetRotateMode()

void TutorialGameLogic::SetRotateMode ( int nMode)

Set the rotations that pass.

Parameters
nModeOne of RotateMode.
Ghidra address:
NTSC-U/C: 0x001408d8
Ghidra address:
PAL: 0x00142298

◆ SetPowerupsDisabled()

void TutorialGameLogic::SetPowerupsDisabled ( bool bDisabled)

Disable or enable the power-ups.

Parameters
bDisabledDisable the power-ups.
Ghidra address:
NTSC-U/C: 0x001408e0
Ghidra address:
PAL: 0x001422a0

◆ ActivateBars()

void TutorialGameLogic::ActivateBars ( int nBar,
int nBars,
int nTrack )

Give a run of bars of a catch track to the first player.

Parameters
nBarThe first bar.
nBarsThe number of bars.
nTrackThe catch track.
Ghidra address:
NTSC-U/C: 0x001408e8
Ghidra address:
PAL: 0x001422a8

◆ ScheduleDeactivateTrack()

void TutorialGameLogic::ScheduleDeactivateTrack ( int nBarsAhead,
int nBar,
int nBars )

Schedule the deactivation of a run of bars of the first player's track.

The deactivation runs at the start of the bar a number of bars after the next one.

Parameters
nBarsAheadThe bars after the next bar the deactivation runs at.
nBarThe first bar to deactivate.
nBarsThe number of bars to deactivate.
Ghidra address:
NTSC-U/C: 0x00140918
Ghidra address:
PAL: 0x001422d8

◆ CaptureTrack()

void TutorialGameLogic::CaptureTrack ( )

Capture the phrase of the recorded bar on the first player's track.

Ghidra address:
NTSC-U/C: 0x00140bb0
Ghidra address:
PAL: 0x00142570

◆ CaptureAllTracks()

void TutorialGameLogic::CaptureAllTracks ( )

Capture the phrase of the current bar on every catch track for the first player.

Ghidra address:
NTSC-U/C: 0x00140c00
Ghidra address:
PAL: 0x001425c0

◆ PlacePowerup()

void TutorialGameLogic::PlacePowerup ( int nPowerup,
int nTrack,
int nBar )

Place a power-up in a bar of a catch track.

Parameters
nPowerupOne of GameLogic::Powerup.
nTrackThe catch track.
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x00140ca0
Ghidra address:
PAL: 0x00142660

◆ MoveTrack()

void TutorialGameLogic::MoveTrack ( int nTrack)

Move the first player to a catch track.

Parameters
nTrackThe catch track.
Ghidra address:
NTSC-U/C: 0x00140cd0
Ghidra address:
PAL: 0x00142690

◆ SetAutopilot()

void TutorialGameLogic::SetAutopilot ( bool bAutopilot)

Turn on or off the automatic play of the first player's track.

Parameters
bAutopilotPlay the gems automatically.
Ghidra address:
NTSC-U/C: 0x00140cf8
Ghidra address:
PAL: 0x001426b8

◆ SetNoSeeker()

void TutorialGameLogic::SetNoSeeker ( bool bNoSeeker)

Hide or show the seeker of the first player's track.

Parameters
bNoSeekerHide the seeker.
Ghidra address:
NTSC-U/C: 0x00140d50
Ghidra address:
PAL: 0x00142710

◆ SetManualEnableNext()

void TutorialGameLogic::SetManualEnableNext ( bool bManual)

Leave the enabling of the next catch tracks to the script, or return it to the captures.

Parameters
bManualLeave the enabling to the script.
Ghidra address:
NTSC-U/C: 0x00140da8
Ghidra address:
PAL: 0x00142768

◆ SetSongPosParams()

void TutorialGameLogic::SetSongPosParams ( int nPlayedBars,
int nTotalBars )

Set the span GetProgress() measures.

Parameters
nPlayedBarsThe bars the span counts as played at the current tick.
nTotalBarsThe length of the span in bars.
Ghidra address:
NTSC-U/C: 0x00140130
Ghidra address:
PAL: 0x00141af0

◆ ShowStreakArrow()

void TutorialGameLogic::ShowStreakArrow ( int nTrack,
int nBarsAhead,
int nUnused )

Point at the next phrase of a catch track from a number of bars after the clock's bar.

Parameters
nTrackThe catch track.
nBarsAheadThe bars after the clock's bar to search from.
nUnusedThe third argument of the command. The body does not read it.
Ghidra address:
NTSC-U/C: 0x00140f80
Ghidra address:
PAL: 0x00142940

◆ ScheduleSetJuice()

void TutorialGameLogic::ScheduleSetJuice ( int nBarsAhead,
float fJuice )

Schedule the first player's energy meter to change at the start of a later bar.

Parameters
nBarsAheadThe bars after the current bar.
fJuiceThe energy, in percent.
Ghidra address:
NTSC-U/C: 0x00140ff8
Ghidra address:
PAL: 0x001429b8

◆ ScheduleStageComplete()

void TutorialGameLogic::ScheduleStageComplete ( int nBarsAhead)

Schedule the stage completion display at the start of a later bar.

Parameters
nBarsAheadThe bars after the current bar.
Ghidra address:
NTSC-U/C: 0x001410b8
Ghidra address:
PAL: 0x00142a78

◆ EnableNext()

void TutorialGameLogic::EnableNext ( )

Enable the next catch tracks from the bar after the current one.

Ghidra address:
NTSC-U/C: 0x00140390
Ghidra address:
PAL: 0x00141d50

◆ HandleInput() [5/11]

void GameLogic::HandleInput ( const BtnEvent< 3 > & event)
overridevirtual

Pause the song from the controller of the player.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00114dd8
Ghidra address:
PAL: 0x00116570

Reimplemented from GameLogic.

◆ HandleInput() [6/11]

void GameLogic::HandleInput ( const ChangeSectionEvent & event)
inlineoverridevirtual

Ignore the event.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00337ca8
Ghidra address:
PAL: 0x003a5258

Reimplemented from GameLogic.

◆ HandleInput() [7/11]

void GameLogic::HandleInput ( const BtnEvent< 9 > & event)
inlineoverridevirtual

Ignore the event.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00337cb0
Ghidra address:
PAL: 0x003a5260

Reimplemented from GameLogic.

◆ HandleInput() [8/11]

void GameLogic::HandleInput ( const BtnEvent< 10 > & event)
overridevirtual

Pass the button to the player.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00114d00
Ghidra address:
PAL: 0x00116498

Reimplemented from GameLogic.

◆ HandleInput() [9/11]

void GameLogic::HandleInput ( const BtnEvent< 8 > & event)
inlineoverridevirtual

Ignore the event.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00337ca0
Ghidra address:
PAL: 0x003a5250

Reimplemented from GameLogic.

◆ HandleInput() [10/11]

void GameLogic::HandleInput ( const StickEvent< 2 > & event)
overridevirtual

Pass the stick event to the player.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00114d48
Ghidra address:
PAL: 0x001164e0

Reimplemented from GameLogic.

◆ HandleInput() [11/11]

void GameLogic::HandleInput ( const StickEvent< 6 > & event)
overridevirtual

Pass the stick event to the player.

Parameters
eventThe event.
Ghidra address:
NTSC-U/C: 0x00114d90
Ghidra address:
PAL: 0x00116528

Reimplemented from GameLogic.


The documentation for this class was generated from the following file: