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

Remix menu of one player during a song, a list of panels that switch effects on and off. More...

#include <remixhud.h>

Inheritance diagram for RemixHUD:
Collaboration diagram for RemixHUD:

Public Types

enum  PanelType {
  kPanelLoop = 0 , kPanelMute = 1 , kPanelChorus = 2 , kPanelStutter = 3 ,
  kPanelEffect = 4 , kPanelSolo = 5 , kPanelTempo = 6 , kPanelBoot = 7 ,
  kNumPanelTypes = 8
}
 Kind of a panel. More...
enum  Event {
  kEventNone = 0 , kEventMuteOn = 1 , kEventMuteOff = 2 , kEventLoopOn = 3 ,
  kEventLoopOff = 4 , kEventChorusOn = 5 , kEventChorusOff = 6 , kEventStutterOn = 7 ,
  kEventStutterOff = 8 , kEventEffectOn = 9 , kEventEffectOff = 10 , kEventSoloOn = 11 ,
  kEventSoloOff = 12 , kEventTempoUp = 13 , kEventTempoDown = 14 , kEventTempoOpened = 15 ,
  kEventBootFirst = 16
}
 What the player chose, as the callback receives it. More...
using Callback = void (*)(int nPlayer, int nEvent, void *pData)
 Receiver of the player's choices.

Public Member Functions

 RemixHUD (int nPlayer, const char *pszEffectLabel)
 Construct the menu of a player and add its panels.
 ~RemixHUD () override
 Release the controller when the menu has it.
void SetActive (int nActive)
 Activate or deactivate the menu.
void SetChorus (int nOn)
 Show whether chorus is on.
void SetStutter (int nOn)
 Show whether stutter is on.
void SetEffect (int nOn)
 Show whether the constructor's effect is on.
void SetTempo (float fTempo, int nDimmed)
 Show the tempo on the tempo panel and in the tempo control.
void SetLoop (int nOn)
 Show whether loop is on.
void SetMute (int nOn)
 Record whether mute is on, shown only in kModeMute.
void SetSolo (int nOn)
 Show whether solo is on.
void SetMode (int nMode)
 Set the mode of the player's track.
void RemovePeer (int nPeer)
 Remove a player from the players the host can remove.
void SetCallback (Callback pfnCallback, void *pData)
 Set the receiver of the player's choices.
void OpenTempo ()
 Open the panel at index 1, the tempo panel when the menu has one, unless the tempo control is already open with an entry chosen.
void CloseTempo ()
 Close the tempo control when it is open.
void SetFocused (int nFocused)
 Give the controller to the menu or take it away.
bool DispatchPriv (Message *pMsg) override
 Act on a press of the player's controller.
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.

Static Public Attributes

static constexpr int kModeMute = 4
 Value of SetMode() under which the mute panel can be chosen.

Detailed Description

Remix menu of one player during a song, a list of panels that switch effects on and off.

The RTTI records MsgSink as the one base and the nested RemixHUD::Panel. The session builds one for each player. The menu takes the player's controller while it is both active and focused, draws itself through the remix sub-panels of TheGfxManager, and reports what the player chose through a callback.

Member Typedef Documentation

◆ Callback

using RemixHUD::Callback = void (*)(int nPlayer, int nEvent, void *pData)

Receiver of the player's choices.

Parameters
nPlayerThe player's index.
nEventOne of Event.
pDataThe data SetCallback() received.

Member Enumeration Documentation

◆ PanelType

Kind of a panel.

A kind also indexes mPanelOfType.

Enumerator
kPanelLoop 

REMIX_LOOP.

kPanelMute 

REMIX_MUTE in kModeMute, blank otherwise, and always last.

kPanelChorus 

REMIX_CHORUS.

kPanelStutter 

REMIX_STUTTER.

kPanelEffect 

The effect whose label the constructor receives.

kPanelSolo 

REMIX_SOLO, absent with several players on one console.

kPanelTempo 

REMIX_TEMPO, for the first player of a console game only.

kPanelBoot 

REMIX_BOOT, for the host of an online game only.

kNumPanelTypes 

The number of kinds.

◆ Event

What the player chose, as the callback receives it.

Enumerator
kEventNone 

A panel with nothing to switch.

kEventMuteOn 

Mute, chosen while off.

kEventMuteOff 

Mute, chosen while on.

kEventLoopOn 

Loop, chosen while off.

kEventLoopOff 

Loop, chosen while on.

kEventChorusOn 

Chorus, chosen while off.

kEventChorusOff 

Chorus, chosen while on.

kEventStutterOn 

Stutter, chosen while off.

kEventStutterOff 

Stutter, chosen while on.

kEventEffectOn 

The constructor's effect, chosen while off.

kEventEffectOff 

The constructor's effect, chosen while on.

kEventSoloOn 

Solo, chosen while off.

kEventSoloOff 

Solo, chosen while on.

kEventTempoUp 

Up in the tempo control.

kEventTempoDown 

Down in the tempo control.

kEventTempoOpened 

The tempo control opened.

kEventBootFirst 

Removal of player 0. Player n adds n.

Constructor & Destructor Documentation

◆ RemixHUD()

RemixHUD::RemixHUD ( int nPlayer,
const char * pszEffectLabel )

Construct the menu of a player and add its panels.

Parameters
nPlayerThe player's index.
pszEffectLabelThe label of the kPanelEffect panel.
Ghidra address:
NTSC-U/C: 0x00151a80
Ghidra address:
PAL: 0x001532c8

◆ ~RemixHUD()

RemixHUD::~RemixHUD ( )
override

Release the controller when the menu has it.

Ghidra address:
NTSC-U/C: 0x00151ce8
Ghidra address:
PAL: 0x00153530

Member Function Documentation

◆ SetActive()

void RemixHUD::SetActive ( int nActive)

Activate or deactivate the menu.

Deactivation closes an open sub-panel and removes the cursor.

Parameters
nActiveNon-zero to activate.
Ghidra address:
NTSC-U/C: 0x00151ea0
Ghidra address:
PAL: 0x001536e8

◆ SetChorus()

void RemixHUD::SetChorus ( int nOn)

Show whether chorus is on.

Parameters
nOnNon-zero when on.
Ghidra address:
NTSC-U/C: 0x00151f78
Ghidra address:
PAL: 0x001537c0

◆ SetStutter()

void RemixHUD::SetStutter ( int nOn)

Show whether stutter is on.

Parameters
nOnNon-zero when on.
Ghidra address:
NTSC-U/C: 0x00151fd0
Ghidra address:
PAL: 0x00153818

◆ SetEffect()

void RemixHUD::SetEffect ( int nOn)

Show whether the constructor's effect is on.

Parameters
nOnNon-zero when on.
Ghidra address:
NTSC-U/C: 0x00152028
Ghidra address:
PAL: 0x00153870

◆ SetTempo()

void RemixHUD::SetTempo ( float fTempo,
int nDimmed )

Show the tempo on the tempo panel and in the tempo control.

A menu with no tempo panel ignores the call.

Parameters
fTempoThe tempo, truncated for display.
nDimmedNon-zero to show the tempo panel unlit.
Ghidra address:
NTSC-U/C: 0x00152080
Ghidra address:
PAL: 0x001538c8

◆ SetLoop()

void RemixHUD::SetLoop ( int nOn)

Show whether loop is on.

Parameters
nOnNon-zero when on.
Ghidra address:
NTSC-U/C: 0x00152168
Ghidra address:
PAL: 0x001539b0

◆ SetMute()

void RemixHUD::SetMute ( int nOn)

Record whether mute is on, shown only in kModeMute.

Parameters
nOnNon-zero when on.
Ghidra address:
NTSC-U/C: 0x001521c0
Ghidra address:
PAL: 0x00153a08

◆ SetSolo()

void RemixHUD::SetSolo ( int nOn)

Show whether solo is on.

A menu with no solo panel ignores the call.

Parameters
nOnNon-zero when on.
Ghidra address:
NTSC-U/C: 0x00152228
Ghidra address:
PAL: 0x00153a70

◆ SetMode()

void RemixHUD::SetMode ( int nMode)

Set the mode of the player's track.

The mode decides whether the mute panel can be chosen.

Parameters
nModeThe mode. kModeMute labels and enables the mute panel.
Ghidra address:
NTSC-U/C: 0x00152288
Ghidra address:
PAL: 0x00153ad0

◆ RemovePeer()

void RemixHUD::RemovePeer ( int nPeer)

Remove a player from the players the host can remove.

Parameters
nPeerThe player's index.
Ghidra address:
NTSC-U/C: 0x00152380
Ghidra address:
PAL: 0x00153bc8

◆ SetCallback()

void RemixHUD::SetCallback ( Callback pfnCallback,
void * pData )

Set the receiver of the player's choices.

Parameters
pfnCallbackThe receiver.
pDataThe data the receiver receives.
Ghidra address:
NTSC-U/C: 0x00152428
Ghidra address:
PAL: 0x00153c70

◆ OpenTempo()

void RemixHUD::OpenTempo ( )

Open the panel at index 1, the tempo panel when the menu has one, unless the tempo control is already open with an entry chosen.

Ghidra address:
NTSC-U/C: 0x00153828
Ghidra address:
PAL: 0x00155090

◆ CloseTempo()

void RemixHUD::CloseTempo ( )

Close the tempo control when it is open.

Ghidra address:
NTSC-U/C: 0x00153890
Ghidra address:
PAL: 0x001550f8

◆ SetFocused()

void RemixHUD::SetFocused ( int nFocused)

Give the controller to the menu or take it away.

The change matters only while active.

Parameters
nFocusedNon-zero to give the controller.
Ghidra address:
NTSC-U/C: 0x001538d8
Ghidra address:
PAL: 0x00155140

◆ DispatchPriv()

bool RemixHUD::DispatchPriv ( Message * pMsg)
overridevirtual

Act on a press of the player's controller.

Parameters
pMsgThe message.
Returns
False. The message is never reported as handled.
Ghidra address:
NTSC-U/C: 0x00153dc8
Ghidra address:
PAL: 0x00155630

Implements MsgSink.

Member Data Documentation

◆ kModeMute

int RemixHUD::kModeMute = 4
staticconstexpr

Value of SetMode() under which the mute panel can be chosen.


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