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

World of the remix rule set. More...

#include <remix.h>

Inheritance diagram for Remix:
Collaboration diagram for Remix:

Public Member Functions

 Remix ()
 Construct a remix world.
 ~Remix () override
 Unload the effect bank and release the world.
int GetRuleSet () const override
 Report the remix rule set.
bool IsFinished () override
 Report whether the remix ended without a player abandoning it.
void Handle (const RotateEvent &event) override
 Record a rotation.
void Handle (const PlayNoteEvent &event) override
 Record a gem button.
void Handle (const BtnEvent< 8 > &event) override
 Record a button event of command 8.
void Handle (const StickEvent< 2 > &event) override
 Record a stick event of command 2.
void Handle (const StickEvent< 6 > &event) override
 Ignore a stick event of command 6.
void Handle (const BtnEvent< 3 > &event) override
 Record a button event of command 3.
void Handle (const BtnEvent< 4 > &event) override
 Ignore a button event of command 4.
void Handle (const BtnEvent< 5 > &event) override
 Ignore a button event of command 5.
void Handle (const ChangeSectionEvent &event) override
 Record a section change.
void Handle (const BtnEvent< 9 > &event) override
 Record a button event of command 9.
void Handle (const BtnEvent< 10 > &event) override
 Record a button event of command 10.
void BeginAssetLoad () override
 Load the effect bank of the remix into its synthesiser slot.
void PollAssetLoad () override
 Advance the effect bank load.
bool IsAssetLoadDone () override
 Report whether the effect bank is loaded.
void BeginSongLoad () override
 Start the song's track loader.
void PollSongLoad () override
 Advance the song load.
bool IsSongLoadDone () override
 Advance the song's track loader and report whether it finished.
void CreateLogic () override
 Build a RemixLogic for the song and install it.
void BuildTracks (int nStartTick) override
 Build the display of the song's tracks.
void UnloadFxBank ()
 Empty the synthesiser slot of the effect bank.
Public Member Functions inherited from World
 World ()
 Construct a world with no game state.
 ~World () override
 Release the world.
bool DispatchPriv (Message *pMsg) override
 Act on a message sent to the world.
virtual float GetDisplayTime ()
 Report how far the running world has played, from WorldLogic::GetProgress().
virtual void BeginEnding ()
 Start the sequence that follows the end of the game.
virtual void PollEnding ()
 Advance the sequence that follows the end of the game by one frame.
virtual bool IsEndingDone ()
 Report whether the sequence that follows the end of the game finished.
virtual void Record (const RotateEvent &event)
 Record a rotation as a serializable input command.
virtual void Record (const PlayNoteEvent &event)
 Record a gem button as a serializable input command.
virtual void Record (const BtnEvent< 8 > &event)
 Record a button event of command 8.
virtual void Record (const StickEvent< 2 > &event)
 Record a stick event of command 2.
virtual void Record (const StickEvent< 6 > &event)
 Record a stick event of command 6.
virtual void Record (const BtnEvent< 3 > &event)
 Record a button event of command 3.
virtual void Record (const BtnEvent< 4 > &event)
 Record a button event of command 4.
virtual void Record (const BtnEvent< 5 > &event)
 Record a button event of command 5.
virtual void Record (const ChangeSectionEvent &event)
 Record a section change.
virtual void Record (const BtnEvent< 9 > &event)
 Record a button event of command 9.
virtual void Record (const BtnEvent< 10 > &event)
 Record a button event of command 10.
virtual void OnStart ()
 Finish starting the song, after Start() created the logic.
void Start ()
 Start the song of a world that finished loading.
void Stop ()
 Stop the song and release what Start() and LoadAssets() created.
int IsRestartRequested ()
 Report whether the world that ended requested a restart.
bool IsFreestyling (int nPlayer)
 Report whether a player is in a freestyle while the song plays.
void Poll ()
 Advance the world by one frame.
bool IsLoaded () const
 Report whether the assets LoadAssets() started are loaded.
void LoadAssets ()
 Start loading the song and the assets of the world.
int GetTick ()
 Report the song position in ticks.
float GetTime ()
 Report the song position on the song clock.
void SetLogic (WorldLogic *pLogic)
 Destroy the installed logic and install another.
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.

Additional Inherited Members

Public Types inherited from World
enum  State {
  kStateIdle = 0 , kStateLoading = 1 , kStateLoaded = 2 , kStatePlaying = 3 ,
  kStateEnding = 4 , kStateRestarting = 5
}
 Values of mState. More...
enum  LoadStep {
  kLoadStepDemo = 0 , kLoadStepSong = 1 , kLoadStepTracks = 2 , kLoadStepMusic = 3 ,
  kLoadStepAssets = 4 , kLoadStepSession = 5 , kLoadStepComplete = 6
}
 Values of mLoadStep. More...
Protected Attributes inherited from World
std::unique_ptr< Song > mSong
DataArray * mSongConfig
int mSeed

Detailed Description

World of the remix rule set.

The RTTI records the class as deriving from World. The object is 0x54 bytes. The input events the remix acts on are recorded as serializable input commands, and RemixLogic acts on them when the commands run.

Constructor & Destructor Documentation

◆ Remix()

Remix::Remix ( )

Construct a remix world.

Ghidra address:
NTSC-U/C: 0x0012eff8
Ghidra address:
PAL: 0x001307d0

◆ ~Remix()

Remix::~Remix ( )
override

Unload the effect bank and release the world.

Ghidra address:
NTSC-U/C: 0x0012f040
Ghidra address:
PAL: 0x00130818

Member Function Documentation

◆ GetRuleSet()

int Remix::GetRuleSet ( ) const
inlineoverridevirtual

Report the remix rule set.

Returns
GameDb::kRuleSetRemix.
Ghidra address:
NTSC-U/C: 0x0033e0a0
Ghidra address:
PAL: 0x003ab5d8

Implements World.

◆ IsFinished()

bool Remix::IsFinished ( )
overridevirtual

Report whether the remix ended without a player abandoning it.

Returns
Whether the remix ended.
Ghidra address:
NTSC-U/C: 0x0012f0f0
Ghidra address:
PAL: 0x001308c8

Implements World.

◆ Handle() [1/11]

void Remix::Handle ( const RotateEvent & event)
overridevirtual

Record a rotation.

Parameters
eventThe rotation.
Ghidra address:
NTSC-U/C: 0x0012f160
Ghidra address:
PAL: 0x00130938

Implements World.

◆ Handle() [2/11]

void Remix::Handle ( const PlayNoteEvent & event)
overridevirtual

Record a gem button.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0012f188
Ghidra address:
PAL: 0x00130960

Implements World.

◆ Handle() [3/11]

void Remix::Handle ( const BtnEvent< 8 > & event)
overridevirtual

Record a button event of command 8.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0012f1b0
Ghidra address:
PAL: 0x00130988

Implements World.

◆ Handle() [4/11]

void Remix::Handle ( const StickEvent< 2 > & event)
overridevirtual

Record a stick event of command 2.

Parameters
eventThe stick position.
Ghidra address:
NTSC-U/C: 0x0012f1d8
Ghidra address:
PAL: 0x001309b0

Implements World.

◆ Handle() [5/11]

void Remix::Handle ( const StickEvent< 6 > & event)
overridevirtual

Ignore a stick event of command 6.

The body is empty.

Parameters
eventThe stick position.
Ghidra address:
NTSC-U/C: 0x0012f200
Ghidra address:
PAL: 0x001309d8

Implements World.

◆ Handle() [6/11]

void Remix::Handle ( const BtnEvent< 3 > & event)
overridevirtual

Record a button event of command 3.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0012f208
Ghidra address:
PAL: 0x001309e0

Implements World.

◆ Handle() [7/11]

void Remix::Handle ( const BtnEvent< 4 > & event)
inlineoverridevirtual

Ignore a button event of command 4.

The body is empty.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0033e0a8
Ghidra address:
PAL: 0x003ab5e0

Implements World.

◆ Handle() [8/11]

void Remix::Handle ( const BtnEvent< 5 > & event)
inlineoverridevirtual

Ignore a button event of command 5.

The body is empty.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0033e0b0
Ghidra address:
PAL: 0x003ab5e8

Implements World.

◆ Handle() [9/11]

void Remix::Handle ( const ChangeSectionEvent & event)
overridevirtual

Record a section change.

Parameters
eventThe section change.
Ghidra address:
NTSC-U/C: 0x0012f230
Ghidra address:
PAL: 0x00130a08

Implements World.

◆ Handle() [10/11]

void Remix::Handle ( const BtnEvent< 9 > & event)
overridevirtual

Record a button event of command 9.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0012f258
Ghidra address:
PAL: 0x00130a30

Implements World.

◆ Handle() [11/11]

void Remix::Handle ( const BtnEvent< 10 > & event)
overridevirtual

Record a button event of command 10.

Parameters
eventThe button.
Ghidra address:
NTSC-U/C: 0x0012f280
Ghidra address:
PAL: 0x00130a58

Implements World.

◆ BeginAssetLoad()

void Remix::BeginAssetLoad ( )
overridevirtual

Load the effect bank of the remix into its synthesiser slot.

The "game" section of the configuration supplies the bank file as "remix_fx_bank_file" and the slot as "game_fx_bank_slot". The slot is emptied first.

Ghidra address:
NTSC-U/C: 0x0012f2f8
Ghidra address:
PAL: 0x00130ad0

Implements World.

◆ PollAssetLoad()

void Remix::PollAssetLoad ( )
inlineoverridevirtual

Advance the effect bank load.

The body is empty.

Ghidra address:
NTSC-U/C: 0x0033e0c0
Ghidra address:
PAL: 0x003ab5f8

Implements World.

◆ IsAssetLoadDone()

bool Remix::IsAssetLoadDone ( )
overridevirtual

Report whether the effect bank is loaded.

Returns
Whether the bank is loaded.
Ghidra address:
NTSC-U/C: 0x0012f3e8
Ghidra address:
PAL: 0x00130c10

Implements World.

◆ BeginSongLoad()

void Remix::BeginSongLoad ( )
overridevirtual

Start the song's track loader.

Ghidra address:
NTSC-U/C: 0x0012f2a8
Ghidra address:
PAL: 0x00130a80

Implements World.

◆ PollSongLoad()

void Remix::PollSongLoad ( )
inlineoverridevirtual

Advance the song load.

The body is empty.

Ghidra address:
NTSC-U/C: 0x0033e0b8
Ghidra address:
PAL: 0x003ab5f0

Implements World.

◆ IsSongLoadDone()

bool Remix::IsSongLoadDone ( )
overridevirtual

Advance the song's track loader and report whether it finished.

Returns
Whether the song is loaded.
Ghidra address:
NTSC-U/C: 0x0012f2d0
Ghidra address:
PAL: 0x00130aa8

Implements World.

◆ CreateLogic()

void Remix::CreateLogic ( )
overridevirtual

Build a RemixLogic for the song and install it.

Ghidra address:
NTSC-U/C: 0x0012f0a0
Ghidra address:
PAL: 0x00130878

Implements World.

◆ BuildTracks()

void Remix::BuildTracks ( int nStartTick)
overridevirtual

Build the display of the song's tracks.

Each track of kind 2 or 4 adds its instrument to the first list and its kind to the second. The last track of kind 1 or 3 supplies the option.

Parameters
nStartTickThe tick the song starts at.
Ghidra address:
NTSC-U/C: 0x0012f468
Ghidra address:
PAL: 0x00130c90

Implements World.

◆ UnloadFxBank()

void Remix::UnloadFxBank ( )

Empty the synthesiser slot of the effect bank.

Ghidra address:
NTSC-U/C: 0x0012f420
Ghidra address:
PAL: 0x00130c48

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