|
resonance 1.0.1
|
Base of the three screens that pick a saved FreQ identity. More...
#include <metloadfreqbasescreen.h>


Public Member Functions | |
| MetLoadFreqBaseScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetLoadFreqBaseScreen () |
| virtual void | EnterAndShow () |
| Populate the screen and enter it. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Act on one navigation command. | |
| virtual void | PlayCycleLeftSound (int nSelector) |
| Play the cycle-left sound while the carousel is selected and has more than one entry. | |
| virtual void | PlayCycleRightSound (int nSelector) |
| Play the cycle-right sound under the same two conditions as PlayCycleLeftSound(). | |
| virtual void | OnRepeatingSoundFinished (Rnd::Button *pButton) |
| Start the exit animation once the selected button has finished alternating. | |
| virtual void | OnExitFinished () |
| Act on the departure the exit animation has just finished. | |
| virtual void | ResolveContainerViews () |
| Resolve the two cycle arrows after the container load. | |
| virtual void | UpdateNameLabel () |
| Write the selected identity's username into the first button's label. | |
| virtual void | OnNameButton () |
| Act on the first button, whose prompt is id_name. | |
| virtual void | PrepareFreqMakerForSelection () |
| Hand the selected identity to the FreQ maker. | |
| virtual void | OnEditButton () |
| Act on the second button, whose prompt is cid_edit. | |
| virtual void | OnCreateButton () |
| Act on the third button, whose prompt is id_create. | |
| virtual void | AcquireIdentityList () |
| Resolve the list of identities the carousel steps through. | |
| virtual void | BuildButtonList () |
| Rebuild the button ring and the prompts that go with it. | |
| virtual void | UpdateCycleArrows () |
| Show the two cycle arrows only while more than one identity exists. | |
| 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 | OnPanelActivated () |
| Act on this screen having become 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 int | PollContainerLoad () |
| Advance this screen's container load and resolve its views once the load finishes. | |
| 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 | PlaySlideSound (int nSelector) |
| Play the sound that accompanies sliding between screens. | |
| virtual void | PlayLeaveSound (int nSelector) |
| Play the sound that accompanies departing a screen. | |
| virtual void | PlayHighSound (int nSelector) |
| Play the sound that accompanies the emphasised selection. | |
| 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 | OnEnterFinished () |
| Act on the enter animation having finished. | |
| 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 | 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 MetScreen * | New (MetRenderer *pRenderer, int nPriority) |
| Produce a base load 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. | |
Protected Member Functions | |
| void | RefreshSelection () |
| Reapply the selected identity to the preview and the label. | |
| 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 | |
| std::vector< MetPersonaData * > * | mIdentityList |
| MetButtonList * | mButtonList |
| int | mSelectedIdentity |
| 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 |
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. | |
Base of the three screens that pick a saved FreQ identity.
Its RTTI descriptor is at 0x008f2a30. It has MetScreen as its one public non-virtual base at offset 0. The object is 0xa4 bytes, and two children fix the size independently, MetLoadFreqScreen by placing MemcardUser at +164 and MetLoadNewFreqScreen by placing MetKBUser at +164.
The European release derives the class from MetMemDetectScreen instead, with the descriptor at 0x00937a40. The object is 0xbc bytes there, and the two children place their second base at +188. MetLoadFreqScreen then has no second base, and it accesses MemcardUser through MetMemDetectScreen.
Three classes derive from the class: MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
The primary vtable at 0x007f6700 has 47 entries, eight more than the MetScreen table. The class declares eight new virtuals at slots 39 through 46. Every entry of the table was read back byte for byte and agrees with the addresses recorded on the declarations below. The European table at 0x0083a678 has 54 entries. Slots 39 through 44 are the MetMemDetectScreen virtuals, and the eight virtuals of this class follow at slots 45 through 53, with OpenFreqMakerForCreate() added as slot 50. The MemcardUser table is at 0x0083a5c8.
Three buttons drive the screen. BuildButtonList() appends cid_01.but, cid_02.but, and cid_03.but to mButtonList and rebuilds MetScreen::mHelpKeys with the prompts id_name, cid_edit, and id_create, in that order. OnExitFinished() then dispatches button 0 to OnNameButton(), button 1 to OnEditButton(), and button 2 to OnCreateButton(). The dispatch order identifies all three handlers. HandleCommand() posts the prompt at the selected index through MetHelpScreen::SetText() on every navigation command.
Selecting a button departs the screen before the action runs, and MetScreen::mExitChoice records which of the two departures is under way. The select command alternates the selected button through MetScreen::StartRepeatingSound(). OnRepeatingSoundFinished() runs once that alternation finishes, writes 2, and starts the exit animation. OnExitFinished() runs once the exit animation finishes, and the 2 sends it to the selected button's action. The back command writes 0 instead, and OnExitFinished() then restores the main menu.
The constructor at 0x00291e00 takes only the renderer and the load priority, and supplies cid for the screen name, metagame/_Solo for the directory, and create_id for the container. All three children call it, load the same container, and differ only in behaviour. It allocates a MetButtonList tagged MetButtonList into mButtonList, zeroes mSelectedIdentity, waits for the FreQ maker assets, and resolves persona_texburn_texture_1.tex into mBurnTexture. mLeftArrow and mRightArrow are written by ResolveContainerViews() rather than by the constructor.
The destructor at 0x00296ae0 restores the vptr, deletes mButtonList through slot 1 of the MetButtonList table with the deleting __in_chrg value, runs the MetScreen destructor, and releases the object with the tag MsgSink.
Seven inherited slots differ from the MetScreen table, and all seven bodies are shared by all three children. They are slots 5, 19, 23, 24, 30, 36, and 38. The European release also overrides slots 15, 39, 41, and 42.
In the European release, creating an identity from MetLoadFreqScreen checks the memory card in MEMORY CARD slot 1 first. OnCreateButton() refuses a ninth identity or a card without room with a freq_limit dialogue offering RETRY and CONTINUE. RETRY probes the cards again through StartDetect(), and OnDetectFinished() then runs OnCreateButton() again while a card is in use.
| MetLoadFreqBaseScreen::MetLoadFreqBaseScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority ) |
Construct the screen.
The European release also sets mUsingMemcardOnEnter to 1.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
|
static |
Produce a base load screen on the heap.
No call site exists.
| pRenderer | The front-end renderer the screen registers on. |
| nPriority | The load priority. |
|
virtual |
Populate the screen and enter it.
Slot 5. The three build steps run in declaration order, AcquireIdentityList() first, then BuildButtonList(), then UpdateCycleArrows(). A selection index that has run past the end of the new list is reset to the first entry. The prompt for the selected button is posted, the left gizmo screen is pushed, and the MetScreen body then runs as a direct call. The European release first records MetFrontEndState::mUsingMemcard in mUsingMemcardOnEnter.
Reimplemented from MetScreen.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Act on one navigation command.
Slot 19. A command code outside 1 through 6 is discarded. The six-entry jump table has the shape of the one MetScreen::DeliverCommand() uses. Left and right are ignored while a button rather than the identity carousel is selected, and select and back both clear the prompt by posting the empty string.
| pCommand | The command the renderer translated from an input message. |
Reimplemented from MetScreen.
|
virtual |
Play the cycle-left sound while the carousel is selected and has more than one entry.
Slot 23. The override tests neither the selector nor any recorded selector. It forwards to MetScreen with the same selector when MetButtonList::mSelected is zero and the identity list at mIdentityList has at least kMinimumCyclableEntries entries.
| nSelector | Passed through to MetScreen unchanged. |
Reimplemented from MetScreen.
|
virtual |
Play the cycle-right sound under the same two conditions as PlayCycleLeftSound().
Slot 24.
| nSelector | Passed through to MetScreen unchanged. |
Reimplemented from MetScreen.
|
virtual |
Start the exit animation once the selected button has finished alternating.
Slot 30. The two cycle arrows also alternate, through the left and right commands, and a call that reports either of them is ignored so that cycling the carousel does not depart the screen. Any other object is the button the select command alternated, and the departure runs with MetScreen::mExitChoice at 2 so that OnExitFinished() acts on the button.
| pButton | The button slot 29 finished alternating. |
Reimplemented from MetScreen.
|
virtual |
Act on the departure the exit animation has just finished.
Slot 36. MetScreen::mExitChoice selects between the two halves. A zero is the back command, and the main menu is restored by pushing MetLeftGizmoSmallScreen, MetTopLogoScreen, and MetMainScreen and activating the last. Anything else is a selected button, and the selected index picks one of OnNameButton(), OnEditButton(), and OnCreateButton(). An index outside 0 through 2 does not call a handler, and the button selection is cleared on every path.
Reimplemented from MetScreen.
|
virtual |
Resolve the two cycle arrows after the container load.
Slot 38. The MetScreen body runs first as a direct call. cid_left.but and cid_right.but are then resolved out of Rnd::TheManager and each cast to Rnd::Button, and a name that resolves to nothing stores a null rather than reporting.
Reimplemented from MetScreen.
|
virtual |
Write the selected identity's username into the first button's label.
Slot 39, and slot 45 in the European release. The username is copy-constructed out of the appearance embedded in the selected MetPersonaData and set on Rnd::Button::mText of button 0. The base body accesses the label through the same path MetButtonList::Add() uses.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Act on the first button, whose prompt is id_name.
Slot 40, and slot 46 in the European release. The body is empty here. MetLoadFreqScreen commits the selected identity to the game manager and advances, and MetLoadNewFreqScreen opens the keyboard to type a name instead. The difference fixes the slot as the name action rather than a load.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Hand the selected identity to the FreQ maker.
Slot 41, and slot 47 in the European release. The body resolves MetFreqMakerCanvasScreen and MetFreqMakerButtonsScreen through MetScreen::FindScreenByName(), passes the selected MetPersonaData to MetFreqMakerCanvasScreen::LoadPrefab() with no randomisation, selects the editing mode through MetFreqMakerButtonsScreen::SetEditing(), and clears MetFreqMakerButtonsScreen::mNewPersona. OnCreateButton() performs the exact inverse of the last two steps. The two steps separate editing an identity from creating one.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Act on the second button, whose prompt is cid_edit.
Slot 42, and slot 48 in the European release. PrepareFreqMakerForSelection() runs first, then the four FreQ maker screens are pushed with the buttons screen ahead of the other three, and the buttons screen is activated.
|
virtual |
Act on the third button, whose prompt is id_create.
Slot 43. The body passes a null persona to MetFreqMakerCanvasScreen::LoadPersona(), selects the creating mode through MetFreqMakerButtonsScreen::SetEditing(), sets MetFreqMakerButtonsScreen::mNewPersona, clears the game manager's persona list, then pushes the same four screens with the buttons screen last and activates it.
The European release moves that body to OpenFreqMakerForCreate(), and the slot is 49. The body there refuses the action while MetFrontEndState::mReturnScreen is MetLoadFreqScreen and eight or more identities exist, or while the first card slot GlobalSettings records has fewer free clusters than GlobalSettings::mPersonaMinimumFreeClusters. Either refusal exits the help screen and raises freq_limit with RETRY and CONTINUE and the ERROR title. Otherwise the help screen and MetFreqCreateScreen are pushed and the latter is activated.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Resolve the list of identities the carousel steps through.
Slot 44, and slot 51 in the European release. The body is empty here and every child supplies mIdentityList. MetLoadFreqScreen takes MetPersonaData::loadList() and MetLoadNewFreqScreen takes the list the FreQ maker asset manager vends. EnterAndShow() runs it before either of the other two build steps.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Rebuild the button ring and the prompts that go with it.
Slot 45, and slot 52 in the European release. mButtonList is emptied and the three cid_0N.but buttons are appended with an empty label each, MetScreen::mHelpKeys is emptied and id_name, cid_edit, and id_create are appended, and the selection is then moved to the first button.
Reimplemented in MetLoadFreqScreen, MetLoadNewFreqScreen, and MetLoadPreFabScreen.
|
virtual |
Show the two cycle arrows only while more than one identity exists.
Slot 46, and slot 53 in the European release. Both arrows are shown or hidden together, and both are put into state 1 when they are shown.
|
protected |
Reapply the selected identity to the preview and the label.
The body resolves cid_char.mat out of Rnd::TheManager and casts it to Rnd::Mat, runs MetPersonaData::AttachToBurnSlot() on the selected identity with slot 0, assigns mBurnTexture into the material's second stage through Rnd::Mat::Stage::SetTex(), and finishes with UpdateNameLabel(). The title is inferred from those three steps.
|
protected |
|
protected |
|
protected |