resonance 1.0.1
Loading...
Searching...
No Matches
MetFreqMakerInventoryScreen Class Reference

Inventory of the FreQ maker, the part browser and colour palette beside the canvas. More...

#include <metfreqmakerinventoryscreen.h>

Inheritance diagram for MetFreqMakerInventoryScreen:
Collaboration diagram for MetFreqMakerInventoryScreen:

Public Member Functions

 MetFreqMakerInventoryScreen (MetRenderer *pRenderer, int nPriority)
 Construct the screen.
virtual ~MetFreqMakerInventoryScreen ()
 Delete the seven views and every part mesh, and empty the five name lists.
virtual void EnterAndShow ()
 Show the screen with no editing mode active.
virtual void OnPanelActivated ()
 Start browsing the inventory.
virtual int PollContainerLoad ()
 Report the container load finished once the FreQ maker assets and the directions screen's container are both resident.
virtual void HandleCommand (const MetScreenCommand *pCommand)
 Apply one command to the grid, the palette, or the part under edit, by editing mode.
virtual void PlaySlideSound (int nSelector)
 Play the base slide sound while an editing mode is active.
virtual void PlayLeaveSound (int nSelector)
 Play the base leave sound while an editing mode is active.
virtual void PlayHighSound (int nSelector)
 Play SND_MET_FM_PART_SELECT while the inventory is browsed.
virtual void PlayCycleLeftSound (int nSelector)
 Play SND_MET_FM_PART_SELECT while the inventory is browsed.
virtual void PlayCycleRightSound (int nSelector)
 Play SND_MET_FM_PART_SELECT while the inventory is browsed.
virtual void OnRepeatingSoundFinished (Rnd::Button *pButton)
 Make this screen the active panel again, through ActivateNamedPanel() with MetFreqMakerInventoryScreen.
virtual void ResolveContainerViews ()
 Resolve the base views, list every part template on its page, and resolve the screen's objects.
virtual void OnEnterFinished ()
 Hide the palette and the inventory, and return the palette cursor to its starting cell and colour.
void ShowHeadPage ()
 Show the head page.
void ShowFacePage ()
 Show the face page.
void ShowBodyPage ()
 Show the body page.
void ShowDetailsPage ()
 Show the details page.
void ShowLogosPage ()
 Show the logos page.
void HidePages ()
 Hide every page, the palette, and the inventory decorations, and clear the heading.
void ShowEditPage ()
 Rebuild the edit page from the canvas's parts and show it.
virtual void PlayMoveSound ()
 Play SND_MET_FM_COLOR_MOVE in the colour mode or SND_MET_FM_PART_MOVE in the part mode.
virtual void PlayFlipSound ()
 Play SND_MET_FM_FLIP_BUBBLE.
virtual void PlayModeToggleSound ()
 Play SND_MET_FM_TOGGLE.
virtual void PlayToggleSound ()
 Play SND_MET_FM_TOGGLE.
virtual void PlayDeleteSound ()
 Play SND_MET_FM_DELETE.
Public Member Functions inherited from MetScreen
 MetScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
 Construct a screen and start its container load.
virtual ~MetScreen ()
 Unregister from the renderer and release the container.
void DeliverCommand (const MetScreenCommand *pCommand)
 Play the sound one navigation command calls for and then act on the command.
void UpdateAnimationFrame (float flTime)
 Drive the frame of whichever animation is running and run the idle hook when none is.
void UpdateFrame (float flTime)
 Advance one screen by one frame.
virtual void PushNamedScreen (const HxStr &name)
 Bring one named screen onto the renderer's screen stack.
virtual void ActivateNamedPanel (const HxStr &name)
 Make one named screen the renderer's active panel.
virtual void ExitScreenByName (const HxStr &name)
 Start one named screen's exit animation.
virtual void BeginExit ()
 Start this screen's exit animation at the renderer's current time.
virtual void OnUnusedHook ()
 Do nothing.
virtual void OnKeyboardDismissed ()
 Take control back after the keyboard screen has finished.
virtual void OnDrawPass ()
 Contribute to the renderer's draw pass.
virtual void OnDestroying ()
 Release what the screen acquired, ahead of the rest of destruction.
virtual void OnMsgScreenDismissed (const HxStr &name, int nChoice)
 Act on the choice the user made in a message dialogue.
virtual void OnMsgScreenShown (const HxStr &name)
 Act on a message dialogue becoming visible.
virtual void SetShowing (int nShowing)
 Show or hide the view and every drawable the container loaded.
virtual void BeginContainerLoad (const HxStr &directory, const HxStr &file)
 Intern a container load under this screen's container name and enqueue it.
virtual void PlayErrorSound (int nSelector)
 Play the sound that accompanies a rejected input.
virtual void UpdateIdle (float flTime)
 Advance whatever the screen updates once per frame while it is idle.
virtual void UpdateIdleAnimation (float flTime)
 Advance whatever the screen animates while it is neither entering nor exiting.
virtual void StartRepeatingSound (float flStartTime, float flInterval, Rnd::Button *pButton, int nCycles)
 Start alternating one button between its states 2 and 1.
virtual void UpdateRepeatingSound (float flTime)
 Advance the alternation that StartRepeatingSound() started.
virtual void StartEnterAnimation (float flTime)
 Rewind the enter animation and record the time it starts at.
virtual void UpdateEnterAnimation (float flTime)
 Drive the enter animation and finish it once it passes its end.
virtual void StartExitAnimation (float flTime)
 Record the time the exit animation starts at.
virtual void UpdateExitAnimation (float flTime)
 Drive the exit animation and hide the screen once it passes its end.
virtual void OnExitFinished ()
 Act on the exit animation having finished.
virtual void Draw ()
 Draw the view.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.

Static Public Member Functions

static MetFreqMakerInventoryScreen * New (MetRenderer *pRenderer, int nPriority)
 Build the screen on the heap.
Static Public Member Functions inherited from MetScreen
static std::map< HxStr, MetContainerLoad * > & ContainerLoaderMap ()
 Shared table of container loads, interned under the container name.
static std::map< HxStr, MetScreenEntry > & ScreenRegistry ()
 Shared table of live screens, interned under the screen registry key.
static MetScreen * FindScreenByName (const HxStr &name)
 Resolve one screen by its registry key.
static MetScreen * FindEndScreen (MetRenderer *pRenderer, const HxStr &name)
 Resolve one end-of-game screen by its registry key, failing fatally when it is absent.
static void CreateMainMenuScreens (MetRenderer *pRenderer)
 Create the main-menu screens.
static void DestroyAllScreens ()
 Delete every registered screen and release every container loader.
static void CreateStartupScreens (MetRenderer *pRenderer)
 Create the four screens the front end needs before its containers have loaded.
static void CreateFrontEndScreens (MetRenderer *pRenderer)
 Create every remaining front-end screen, once.
static void DestroyCategory2Screens ()
 Delete and unregister every screen in category 2.
static void DestroyCategory1Screens ()
 Delete and unregister every screen in category 1.
static void DestroyNonDefaultScreens ()
 Delete and unregister every screen outside category 0, then rewind the rndMetLocAndNet zone.
static void PollContainerLoads ()
 Poll every container load that has not finished, and hide the drawables of each that does.

Additional Inherited Members

Public Attributes inherited from MetScreen
Rnd::View * mView
 The container's root view.
int mEnterPending
 Set when the screen was pushed before its container load finished.
int mActivatePending
 Set when the screen was activated as a panel before its container load finished.
float mRepeatScale
 Scale on the input auto-repeat interval.
Protected Member Functions inherited from MetScreen
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
void ResolveAnimationViews ()
 Resolves the two animation views from the screen name and records the enter animation's end frame.
Protected Attributes inherited from MetScreen
float mAnimEndFrame
float mEnterStartTime
MetRenderer * mRenderer
int mExitChoice
int mAcceptsCommands
Rnd::View * mEnterAnim
std::vector< HxStr > mHelpKeys
int mViewsUnresolved
int mPlaysCommandSounds
int mShowsLoadedDrawables

Detailed Description

Inventory of the FreQ maker, the part browser and colour palette beside the canvas.

Its RTTI descriptor is at 0x008ef8a0. It has MetScreen as its one public non-virtual base at offset 0.

The 44-entry primary vtable is at 0x007f3308, five entries longer than the MetScreen table, so the class declares five virtuals, at slots 39 through 43. The titles of those five are inferred from the sounds they play.

New() allocates 0x140 bytes. The constructor builds seven views, a main view and six pages hung from it. Slot 38 lists the part templates on the pages as meshes in a grid of eight columns, and the screen drives MetFreqMakerCanvasScreen through mCanvas.

The translation unit spans 0x0026a3b0 to 0x00273140. Besides the members below, it has the static initialiser at 0x00272030 for four grid cells, and template library emissions. It also has unreferenced out-of-line copies of inline routines. These are HxStr::operator+=(const char *) at 0x002720b8, Rnd::Mesh::MirrorX() at 0x00272328, Rnd::Mesh::ScaleUniform() at 0x002723a0, and two file-local float sign helpers at 0x00272268 and 0x002722c8.

Apart from the type function and the destructor, the slots that differ from the MetScreen table are 5, 7, 14, 19 through 24, 30, 33, 38, and 39 through 43.

Constructor & Destructor Documentation

◆ MetFreqMakerInventoryScreen()

MetFreqMakerInventoryScreen::MetFreqMakerInventoryScreen ( MetRenderer * pRenderer,
int nPriority )

Construct the screen.

Supplies fm_inventory for the screen name, metagame/persona for the directory, and freq_maker_inventory for the container. The seven views are created here rather than resolved from the container, the six pages are hidden and hung from the main view, and the palette cursor starts at column 8 and row 4.

Parameters
pRendererThe front-end renderer this screen registers on.
nPriorityThe load priority.
Ghidra address:
NTSC-U/C: 0x0026a498
Ghidra address:
PAL: 0x00281df8

◆ ~MetFreqMakerInventoryScreen()

virtual MetFreqMakerInventoryScreen::~MetFreqMakerInventoryScreen ( )
virtual

Delete the seven views and every part mesh, and empty the five name lists.

Ghidra address:
NTSC-U/C: 0x0026c230
Ghidra address:
PAL: 0x00284210

Member Function Documentation

◆ New()

MetFreqMakerInventoryScreen * MetFreqMakerInventoryScreen::New ( MetRenderer * pRenderer,
int nPriority )
static

Build the screen on the heap.

The routine at 0x00385180 that creates every front-end screen is the caller.

Parameters
pRendererThe front-end renderer the screen registers on.
nPriorityThe load priority.
Returns
The new screen.
Ghidra address:
NTSC-U/C: 0x00272440
Ghidra address:
PAL: 0x0028a8d0

◆ EnterAndShow()

virtual void MetFreqMakerInventoryScreen::EnterAndShow ( )
virtual

Show the screen with no editing mode active.

Slot 5. MetScreen::mRepeatScale becomes 1.0f.

Ghidra address:
NTSC-U/C: 0x00272528
Ghidra address:
PAL: 0x0028a9b8

Reimplemented from MetScreen.

◆ OnPanelActivated()

virtual void MetFreqMakerInventoryScreen::OnPanelActivated ( )
virtual

Start browsing the inventory.

Slot 7. The grid cursor returns to the first cell, the inventory panel is highlighted, and the directions return to the select page. On the edit page the palette cursor follows the part under the grid cursor, and on every other page the palette colour is applied and the template under the grid cursor is previewed.

Ghidra address:
NTSC-U/C: 0x00272600
Ghidra address:
PAL: 0x0028aab0

Reimplemented from MetScreen.

◆ PollContainerLoad()

virtual int MetFreqMakerInventoryScreen::PollContainerLoad ( )
virtual

Report the container load finished once the FreQ maker assets and the directions screen's container are both resident.

Slot 14. The directions screen is polled whether or not the assets are resident.

Returns
Non-zero once all three loads have finished.
Ghidra address:
NTSC-U/C: 0x0026a3b0
Ghidra address:
PAL: 0x00281cf0

Reimplemented from MetScreen.

◆ HandleCommand()

virtual void MetFreqMakerInventoryScreen::HandleCommand ( const MetScreenCommand * pCommand)
virtual

Apply one command to the grid, the palette, or the part under edit, by editing mode.

Slot 19. Commands 1 through 4 move the grid cursor while no part is placed. Select picks the template or part under the grid cursor, or places the part under edit and returns to the buttons screen. Back abandons the edit, or returns to the buttons screen. Command 7 switches between the colour and the part modes. Commands 16 through 19 move the palette cursor in the colour mode and the part in the part mode. Command 8 deletes, 12 recentres, 13 and 14 reorder, and 21 mirrors the part under edit. The command codes above 6 are named nowhere in the image.

Parameters
pCommandThe command.
Ghidra address:
NTSC-U/C: 0x0026c928
Ghidra address:
PAL: 0x002849b8

Reimplemented from MetScreen.

◆ PlaySlideSound()

virtual void MetFreqMakerInventoryScreen::PlaySlideSound ( int nSelector)
virtual

Play the base slide sound while an editing mode is active.

Slot 20.

Parameters
nSelectorPassed through to MetScreen::PlaySlideSound().
Ghidra address:
NTSC-U/C: 0x00272b78
Ghidra address:
PAL: 0x0028b028

Reimplemented from MetScreen.

◆ PlayLeaveSound()

virtual void MetFreqMakerInventoryScreen::PlayLeaveSound ( int nSelector)
virtual

Play the base leave sound while an editing mode is active.

Slot 21.

Parameters
nSelectorPassed through to MetScreen::PlayLeaveSound().
Ghidra address:
NTSC-U/C: 0x00272bb8
Ghidra address:
PAL: 0x0028b068

Reimplemented from MetScreen.

◆ PlayHighSound()

virtual void MetFreqMakerInventoryScreen::PlayHighSound ( int nSelector)
virtual

Play SND_MET_FM_PART_SELECT while the inventory is browsed.

Slot 22.

Parameters
nSelectorThe selector, which the body does not read.
Ghidra address:
NTSC-U/C: 0x00272c38
Ghidra address:
PAL: 0x0028b0e8

Reimplemented from MetScreen.

◆ PlayCycleLeftSound()

virtual void MetFreqMakerInventoryScreen::PlayCycleLeftSound ( int nSelector)
virtual

Play SND_MET_FM_PART_SELECT while the inventory is browsed.

Slot 23.

Parameters
nSelectorThe selector, which the body does not read.
Ghidra address:
NTSC-U/C: 0x00272c68
Ghidra address:
PAL: 0x0028b118

Reimplemented from MetScreen.

◆ PlayCycleRightSound()

virtual void MetFreqMakerInventoryScreen::PlayCycleRightSound ( int nSelector)
virtual

Play SND_MET_FM_PART_SELECT while the inventory is browsed.

Slot 24.

Parameters
nSelectorThe selector, which the body does not read.
Ghidra address:
NTSC-U/C: 0x00272c98
Ghidra address:
PAL: 0x0028b148

Reimplemented from MetScreen.

◆ OnRepeatingSoundFinished()

virtual void MetFreqMakerInventoryScreen::OnRepeatingSoundFinished ( Rnd::Button * pButton)
virtual

Make this screen the active panel again, through ActivateNamedPanel() with MetFreqMakerInventoryScreen.

Slot 30.

Parameters
pButtonThe button slot 29 finished with, which the body does not read.
Ghidra address:
NTSC-U/C: 0x00272560
Ghidra address:
PAL: 0x0028a9f0

Reimplemented from MetScreen.

◆ ResolveContainerViews()

virtual void MetFreqMakerInventoryScreen::ResolveContainerViews ( )
virtual

Resolve the base views, list every part template on its page, and resolve the screen's objects.

Slot 38. Each template is cloned as <name>.mesh into mPartMeshes, given the template's material and scale, and placed on the page of its category at the next cell of an eight-column grid, and its name is appended to that page's name list. The main view is hung from fm_grid.view and shown, mCanvas is resolved, the palette, the inventory decorations, and both panel highlights are turned off, and the palette cursor moves to column 0 and row 0. The European release first sets COLOR.txt, fminv_limit.txt, and HEADING_ITEM.txt to their texts in the current language.

Ghidra address:
NTSC-U/C: 0x0026b518
Ghidra address:
PAL: 0x00283008

Reimplemented from MetScreen.

◆ OnEnterFinished()

virtual void MetFreqMakerInventoryScreen::OnEnterFinished ( )
virtual

Hide the palette and the inventory, and return the palette cursor to its starting cell and colour.

Slot 33.

Ghidra address:
NTSC-U/C: 0x00272a98
Ghidra address:
PAL: 0x0028af48

Reimplemented from MetScreen.

◆ ShowHeadPage()

void MetFreqMakerInventoryScreen::ShowHeadPage ( )

Show the head page.

MetFreqMakerButtonsScreen's routine at 0x0025a3e0 calls it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026d318
Ghidra address:
PAL: 0x002853e8

◆ ShowFacePage()

void MetFreqMakerInventoryScreen::ShowFacePage ( )

Show the face page.

MetFreqMakerButtonsScreen's routine at 0x0025a3e0 calls it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026d4c8
Ghidra address:
PAL: 0x002855d8

◆ ShowBodyPage()

void MetFreqMakerInventoryScreen::ShowBodyPage ( )

Show the body page.

MetFreqMakerButtonsScreen's routine at 0x0025a3e0 calls it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026d678
Ghidra address:
PAL: 0x002857c8

◆ ShowDetailsPage()

void MetFreqMakerInventoryScreen::ShowDetailsPage ( )

Show the details page.

MetFreqMakerButtonsScreen's routine at 0x0025a3e0 calls it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026d828
Ghidra address:
PAL: 0x002859b8

◆ ShowLogosPage()

void MetFreqMakerInventoryScreen::ShowLogosPage ( )

Show the logos page.

MetFreqMakerButtonsScreen's routine at 0x0025a3e0 calls it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026d9d8
Ghidra address:
PAL: 0x00285ba8

◆ HidePages()

void MetFreqMakerInventoryScreen::HidePages ( )

Hide every page, the palette, and the inventory decorations, and clear the heading.

mCurrentView becomes null and mCurrentRowCount -1. MetFreqMakerButtonsScreen's routine at 0x0025a3e0 and its slot 36 call it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026db88
Ghidra address:
PAL: 0x00285d98

◆ ShowEditPage()

void MetFreqMakerInventoryScreen::ShowEditPage ( )

Rebuild the edit page from the canvas's parts and show it.

The previous edit meshes are deleted, and each part is copied into a new mesh named editableMesh<n>, scaled and mirrored like the part, and placed at cell n. The heading becomes FreQ. MetFreqMakerButtonsScreen's routine at 0x0025a3e0 and slot 19 call it. The title is inferred.

Ghidra address:
NTSC-U/C: 0x0026ddc8
Ghidra address:
PAL: 0x00286018

◆ PlayMoveSound()

virtual void MetFreqMakerInventoryScreen::PlayMoveSound ( )
virtual

Play SND_MET_FM_COLOR_MOVE in the colour mode or SND_MET_FM_PART_MOVE in the part mode.

Slot 39. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00272cc8
Ghidra address:
PAL: 0x0028b178

◆ PlayFlipSound()

virtual void MetFreqMakerInventoryScreen::PlayFlipSound ( )
virtual

Play SND_MET_FM_FLIP_BUBBLE.

Slot 40. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00272bf8
Ghidra address:
PAL: 0x0028b0a8

◆ PlayModeToggleSound()

virtual void MetFreqMakerInventoryScreen::PlayModeToggleSound ( )
virtual

Play SND_MET_FM_TOGGLE.

Slot 19 plays it after changing the editing mode.

Slot 41. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00272c18
Ghidra address:
PAL: 0x0028b0c8

◆ PlayToggleSound()

virtual void MetFreqMakerInventoryScreen::PlayToggleSound ( )
virtual

Play SND_MET_FM_TOGGLE.

Slot 42. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00272b38
Ghidra address:
PAL: 0x0028afe8

◆ PlayDeleteSound()

virtual void MetFreqMakerInventoryScreen::PlayDeleteSound ( )
virtual

Play SND_MET_FM_DELETE.

Slot 43. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00272b58
Ghidra address:
PAL: 0x0028b008

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