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

Front-end panel of Amplitude's menus, with the gizmo pyramid and the panel material animations. More...

#include <freqpanel.h>

Inheritance diagram for FreqPanel:
Collaboration diagram for FreqPanel:

Public Member Functions

 FreqPanel (DataArray *pData, const char *pszDir)
 Construct a panel from its script description.
 ~FreqPanel () override
 Destroy the panel.
void Unload () override
 Drop a reference to the panel's file, forgetting the meshes and the animation on the last reference.
void Enter (bool bForce, float fTime) override
 Start the entry animation and the entry of the panel material animation.
void Exit (bool bForce, float fTime) override
 Start the exit animation and the exit of the panel material animation.
void DrawGizmo () override
 Stretch the gizmo pyramid from the background mesh to the gizmo and draw it.
void Poll (float fTime) override
 Advance the panel to a time and move the panel animation to the panel's frame.
void Draw () override
 Move the panel material animations to the front-end time and draw the panel.
void SetShowing (bool bShowing) override
 Show or hide the panel's view and the gizmo pyramid.
void SetFocus (UIComponent *pComponent, int nButton) override
 Move the focus to a component and play the sound of the directional button that moved it.
void FinishLoad () override
 Find the meshes and animations of the panel once its file has loaded.
void ShowGizmoMesh (bool bShowing)
 Show or hide the gizmo pyramid.
void UpdateBgBox ()
 Measure the background mesh into mBgBox.
Public Member Functions inherited from UIPanel
 UIPanel (DataArray *pData, const char *pszDir)
 Construct a hidden panel from its script description.
 ~UIPanel () override
 Destroy the panel, its components, and the objects its file loaded.
bool Dispatch (Message *pMsg) override
 Offer a message to the current screen, the panel, the navigator, and the component with the focus.
bool DispatchPriv (Message *pMsg) override
 Handle a message sent to the panel.
virtual void Load ()
 Take a reference to the panel's file, queueing the file on the first reference.
virtual void Focus ()
 React to the screen giving the panel the focus by letting the navigator move the focus.
virtual void Unfocus ()
 React to the screen taking the focus away.
bool IsLoaded ()
 Report whether the panel's file has loaded, finishing the load when it has.
void AddComponent (UIComponent *pComponent)
 Register a component under its name.
void SetTextsShowing (bool bShowing)
 Show or hide every text object of the panel's file.
float ComputeFrame (float fTime)
 Report the frame of the entry and exit animation at a time.
UIComponent * FindComponent (const char *pszName, bool bFail)
 Find a component by name.
void LocalizeTexts (const char *pszFile, std::list< RndObject * > &objects)
 Collect and localise the text objects of the panel's file.
const char * GetName () const
UIComponent * GetFocus () const
int GetState () const
float GetTransitionStart () const
const std::map< const char *, std::unique_ptr< UIComponent >, StrLess > & GetComponents () const
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 ()
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.

Static Public Member Functions

static UIPanel * New (DataArray *pData, const char *pszDir)
 Create a panel from its script description.
static void Init (DataArray *pConfig)
 Read the freq_panel section of the metagame configuration.
Static Public Member Functions inherited from UIPanel
static void Init (DataArray *pConfig)
 Read the default frames of the entry and exit animation.
static UIPanel * New (DataArray *pData, const char *pszDir)
 Create a panel from its script description.

Public Attributes

Box mBgBox

Static Public Attributes

static constexpr int kNumGizmoOffsets = 3
 The number of gizmo offsets the configuration provides.
static Vector3 sGizmoOrigPos
 The position of the gizmo, the panel_gizmo_orig_pos setting.
static Vector3 sGizmoOffsets [kNumGizmoOffsets]
 The points of the gizmo the pyramids reach, the panel_gizmo_offset_1 to _3 settings.

Additional Inherited Members

Public Types inherited from UIPanel
enum  State { kStateShown = 0 , kStateHidden = 1 , kStateEntering = 2 , kStateExiting = 3 }
 Where the panel is in its entry and exit, the values of mState. More...
Protected Attributes inherited from UIPanel
float mFrame
float mIdleFrame
const char * mName
String mFile
int mState
RndView * mView
const char * mFocusName
float mLoopStart
RndAnimatable * mLoopAnim
RndAnimatable * mEnterExitAnim
float mTransitionStart
float mShownFrame
float mHiddenFrame
float mEnterMs
float mExitMs
int mEnterReversed
int mExitReversed
float mEnterStartFrame
float mExitStartFrame
int mLoadRefs
int mLoaded
DataArray * mData
std::list< RndText * > mTexts
std::map< const char *, std::unique_ptr< UIComponent >, StrLess > mComponents
std::unique_ptr< UINavigator > mNavigator
UIComponent * mFocus
RndLoader * mLoader
std::unique_ptr< RndLoader > mOwnedLoader
 The loader the panel created, or null when it has none or uses a shared one.

Detailed Description

Front-end panel of Amplitude's menus, with the gizmo pyramid and the panel material animations.

The RTTI records the class as deriving from UIPanel. The object is 0xe0 bytes, and the vtable is at 0x003cfc28. The metagame registers the class for the panel type freq_panel, and most panel classes of the menus derive from it.

Once its file has loaded, a panel clones pyramid.mesh under its own name as the gizmo mesh. The pyramid reaches from the panel's background mesh <name>_bg.mesh to the gizmo offset the panel's gizmoOffsetIndex selects, and it draws under the panel. The panel also drives the shared material animations mat_2d_always.anim and mat_2d_EE.anim, and the copy of the transform animation panel_anim_name it makes for its <name>_panel.mesh.

Constructor & Destructor Documentation

◆ FreqPanel()

FreqPanel::FreqPanel ( DataArray * pData,
const char * pszDir )

Construct a panel from its script description.

Parameters
pDataThe script description.
pszDirThe directory of the description file.
Ghidra address:
NTSC-U/C: 0x0019d568
Ghidra address:
PAL: 0x001a5280

◆ ~FreqPanel()

FreqPanel::~FreqPanel ( )
override

Destroy the panel.

Ghidra address:
NTSC-U/C: 0x0019dcd8
Ghidra address:
PAL: 0x001a59f0

Member Function Documentation

◆ New()

UIPanel * FreqPanel::New ( DataArray * pData,
const char * pszDir )
inlinestatic

Create a panel from its script description.

The metagame registers the routine for the panel type freq_panel.

Parameters
pDataThe script description.
pszDirThe directory of the description file.
Returns
The new panel.
Ghidra address:
NTSC-U/C: 0x003608d0
Ghidra address:
PAL: 0x003cede8

◆ Init()

void FreqPanel::Init ( DataArray * pConfig)
static

Read the freq_panel section of the metagame configuration.

Parameters
pConfigThe metagame section of the configuration.
Ghidra address:
NTSC-U/C: 0x0019d430
Ghidra address:
PAL: 0x001a5148

◆ Unload()

void FreqPanel::Unload ( )
overridevirtual

Drop a reference to the panel's file, forgetting the meshes and the animation on the last reference.

Ghidra address:
NTSC-U/C: 0x0019dd30
Ghidra address:
PAL: 0x001a5a48

Reimplemented from UIPanel.

Reimplemented in FreqSelPanel, HelpPanel, SoloLoseTipsPanel, and SoloWinStatsPanel.

◆ Enter()

void FreqPanel::Enter ( bool bForce,
float fTime )
overridevirtual

Start the entry animation and the entry of the panel material animation.

Parameters
bForceShow the panel at once instead of animating.
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x0019e1b8
Ghidra address:
PAL: 0x001a5ed0

Reimplemented from UIPanel.

Reimplemented in FreqSelPanel, KeyboardPanel, LaunchMTVPanel, MCDialogPanel, NetFoundPlayerPanel, NetLPadGamePanel, NetLPadPlayerPanel, NetMainPanel, NetMainPlayersPanel, NetRankedPlayersPanel, NetSortedLaunchpadsPanel, and SoloLoseTipsPanel.

◆ Exit()

void FreqPanel::Exit ( bool bForce,
float fTime )
overridevirtual

Start the exit animation and the exit of the panel material animation.

Parameters
bForceHide the panel at once instead of animating.
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x0019e230
Ghidra address:
PAL: 0x001a5f48

Reimplemented from UIPanel.

Reimplemented in KeyboardPanel, NetMainPanel, NetMainPlayersPanel, SoloWinStatsPanel, and SongPicPanel.

◆ DrawGizmo()

void FreqPanel::DrawGizmo ( )
overridevirtual

Stretch the gizmo pyramid from the background mesh to the gizmo and draw it.

Ghidra address:
NTSC-U/C: 0x0019dea0
Ghidra address:
PAL: 0x001a5bb8

Reimplemented from UIPanel.

◆ Poll()

void FreqPanel::Poll ( float fTime)
overridevirtual

Advance the panel to a time and move the panel animation to the panel's frame.

Parameters
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x0019de18
Ghidra address:
PAL: 0x001a5b30

Reimplemented from UIPanel.

Reimplemented in FullRankedPanel, KeyboardPanel, NetMainPanel, SoloLoseTipsPanel, SoloWinStatsPanel, and SongPicPanel.

◆ Draw()

void FreqPanel::Draw ( )
overridevirtual

Move the panel material animations to the front-end time and draw the panel.

Ghidra address:
NTSC-U/C: 0x0019e0d0
Ghidra address:
PAL: 0x001a5de8

Reimplemented from UIPanel.

Reimplemented in NetMainPlayersPanel.

◆ SetShowing()

void FreqPanel::SetShowing ( bool bShowing)
overridevirtual

Show or hide the panel's view and the gizmo pyramid.

Parameters
bShowingWhether the panel shows.
Ghidra address:
NTSC-U/C: 0x0019dda0
Ghidra address:
PAL: 0x001a5ab8

Reimplemented from UIPanel.

◆ SetFocus()

void FreqPanel::SetFocus ( UIComponent * pComponent,
int nButton )
overridevirtual

Move the focus to a component and play the sound of the directional button that moved it.

Parameters
pComponentThe component, or null.
nButtonThe controller button that moved the focus, or kPadNone.
Ghidra address:
NTSC-U/C: 0x0019e2a8
Ghidra address:
PAL: 0x001a5fc0

Reimplemented from UIPanel.

Reimplemented in KeyboardPanel.

◆ FinishLoad()

void FreqPanel::FinishLoad ( )
overridevirtual

Find the meshes and animations of the panel once its file has loaded.

The first load makes the panel animation, its copy of panel_anim_name, and the gizmo pyramid, and hands each to the loader so they go when the panel unloads.

Ghidra address:
NTSC-U/C: 0x0019d5a8
Ghidra address:
PAL: 0x001a52c0

Reimplemented from UIPanel.

Reimplemented in FullRankedPanel, HelpPanel, NetButtonPanel, NetMainPanel, NetMainPlayersPanel, and SongPicPanel.

◆ ShowGizmoMesh()

void FreqPanel::ShowGizmoMesh ( bool bShowing)

Show or hide the gizmo pyramid.

Parameters
bShowingWhether the pyramid shows.
Ghidra address:
NTSC-U/C: 0x0019dde0
Ghidra address:
PAL: 0x001a5af8

◆ UpdateBgBox()

void FreqPanel::UpdateBgBox ( )

Measure the background mesh into mBgBox.

Ghidra address:
NTSC-U/C: 0x0019dd70
Ghidra address:
PAL: 0x001a5a88

Member Data Documentation

◆ kNumGizmoOffsets

int FreqPanel::kNumGizmoOffsets = 3
staticconstexpr

The number of gizmo offsets the configuration provides.

◆ sGizmoOrigPos

Vector3 FreqPanel::sGizmoOrigPos
static

The position of the gizmo, the panel_gizmo_orig_pos setting.

Ghidra address:
NTSC-U/C: 0x004368d0

◆ sGizmoOffsets

Vector3 FreqPanel::sGizmoOffsets[kNumGizmoOffsets]
static

The points of the gizmo the pyramids reach, the panel_gizmo_offset_1 to _3 settings.

Ghidra address:
NTSC-U/C: 0x004368e0

◆ mBgBox

Box FreqPanel::mBgBox

The bounding box of mBgMesh in its local space.


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