|
resonance 1.0.1
|
Dialogue that writes a persona to a memory card, copies it to another card, or deletes it. More...
#include <metpersonasaverscreen.h>


Public Member Functions | |
| MetPersonaSaverScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetPersonaSaverScreen () |
| Delete the loaded roster. | |
| virtual void | EnterAndShow () |
| Hide the screen. | |
| virtual void | OnPanelActivated () |
| Start the request. | |
| virtual void | BeginExit () |
| Exit to the screens the request listed. | |
| virtual void | OnMsgScreenDismissed (const HxStr &name, int nChoice) |
| Act on a dismissed dialogue. | |
| virtual void | ResolveContainerViews () |
| Resolve the container views. | |
| virtual void | OnConnectState (MemcardConnectState state, int nStatus) |
| Check the target card, then load its roster. | |
| virtual void | OnCardFormatted (int nPortSlot, int nStatus) |
| Report a finished format. | |
| virtual void | OnPersonasSaved (int nPortSlot, int nStatus) |
| Report a finished roster save. | |
| virtual void | OnPersonasLoaded (int nPortSlot, int nStatus) |
| Merge the persona into the loaded roster and save it. | |
| virtual void | OnKeyboardTextEntered (const HxStr &text) |
| Take the name the keyboard committed as the persona's FreQ name. | |
| virtual void | PlayCycleLeftSound (int) |
| Silence the cycle-left sound. | |
| virtual void | PlayCycleRightSound (int) |
| Silence the cycle-right sound. | |
| 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 | 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 | 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 | HandleCommand (const MetScreenCommand *pCommand) |
| Act on a navigation command. | |
| 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 | OnRepeatingSoundFinished (Rnd::Button *pButton) |
| Act on the alternation that StartRepeatingSound() started having finished. | |
| 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 | 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. | |
| Public Member Functions inherited from MemcardUser | |
| virtual | ~MemcardUser () |
| Release the receiver. | |
| virtual void | OnAllConnectStates () |
| Report that every slot has been enquired about. | |
| virtual void | OnMinimumSaveSpace (int nPortSlot, int nSpace) |
| Report the space a save would need against the space a card has. | |
| virtual void | OnCardUnformatted (int nPortSlot, int nStatus) |
| Report a finished unformat. | |
| virtual void | OnRemixSaved (int nPortSlot, int nStatus) |
| Report a finished save of one remix. | |
| virtual void | OnGlobalSettingsSaved (int nPortSlot, int nStatus) |
| Report a finished save of the global settings. | |
| virtual void | OnJukeboxPlayListSaved (int nPortSlot, int nStatus) |
| Report a finished save of a jukebox playlist. | |
| virtual void | OnRemixesListed (int nPortSlot, int nStatus) |
| Report a finished listing of the saved remixes. | |
| virtual void | OnRemixLoaded (int nPortSlot, int nStatus) |
| Report a finished load of one remix. | |
| virtual void | OnGlobalSettingsLoaded (int nPortSlot, int nStatus) |
| Report a finished load of the global settings. | |
| virtual void | OnJukeboxPlayListLoaded (int nPortSlot, int nStatus) |
| Report a finished load of a jukebox playlist. | |
| virtual void | OnRemixDeleted (int nPortSlot, int nStatus) |
| Report a finished deletion of one remix. | |
| virtual void | UnusedFirstReport (int nPortSlot, int nStatus) |
| Do nothing. | |
| virtual void | UnusedSecondReport (int nPortSlot, int nStatus) |
| Do nothing. | |
| virtual void | OnFileLoaded (int nStatus) |
| Report a finished load of one file. | |
| virtual void | OnFileSaved (int nStatus) |
| Report a finished save of one file. | |
| Public Member Functions inherited from MetKBUser | |
| virtual | ~MetKBUser () |
Static Public Member Functions | |
| static MetPersonaSaverScreen * | New (MetRenderer *pRenderer, int nPriority) |
| Build the screen on the heap. | |
| static void | StartSave (const std::vector< HxStr > &screens, MetPersonaData *pPersona, const MemcardConnectState &slot, int nConfirmReplace, int nIsCopy) |
| Hand a save request to the registered saver screen and show it over MetLoadGameScreen. | |
| static void | StartDelete (const std::vector< HxStr > &screens, MetPersonaData *pPersona, const MemcardConnectState &slot) |
| Hand a delete request to the registered saver screen and show it over MetLoadGameScreen. | |
| 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 |
Dialogue that writes a persona to a memory card, copies it to another card, or deletes it.
Its RTTI descriptor is at 0x008f0060. It has three public non-virtual bases at fixed offsets: MetScreen at +0x00, MemcardUser at +140, and MetKBUser at +144. New() allocates 0xd8 bytes.
The 39-entry primary vtable at 0x00805600 is the same length as the MetScreen table, and the class declares no new virtual. The twenty-one-entry MemcardUser table at 0x00805550 adjusts this by -140 in every entry, and the three-entry MetKBUser table at 0x00805530 by -144.
The constructor at 0x0032ece0 takes only the renderer and the load priority, and supplies dlg for the screen name, metagame/Shared for the directory, and dialogue for the container. It zeroes mIsCopy, mConfirmReplace, and mRefreshingSettingsCard, and default-constructs the vectors and mTargetSlot.
A request runs as a chain of memory-card tasks. OnPanelActivated() starts CommitSave(), and CommitSave() requests the target card's state. OnConnectState() checks the card and loads its roster, OnPersonasLoaded() merges the persona into the roster and saves it, and OnPersonasSaved() refreshes the load list. Every failure raises a MetMsgScreen dialogue that OnMsgScreenDismissed() acts on.
| MetPersonaSaverScreen::MetPersonaSaverScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority ) |
Construct the screen.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
Delete the loaded roster.
|
static |
Build the screen on the heap.
| pRenderer | The front-end renderer the screen registers on. |
| nPriority | The load priority. |
|
static |
Hand a save request to the registered saver screen and show it over MetLoadGameScreen.
The saver is resolved under MetPersonaSaverScreen and narrowed with dynamic_cast, and the result is used without a null test. After SetSaveRequest(), mIsCopy takes nIsCopy, mConfirmReplace takes nConfirmReplace, and mIsDelete is cleared. The screen registered under MetLoadGameScreen then pushes the saver and activates it. MetStageFinishScreen, the FreQ maker, and the memory-card screens call it.
| screens | The registry keys of the screens to return to. |
| pPersona | The persona to save. |
| slot | The card location. |
| nConfirmReplace | Non-zero to prompt before saving over a persona of the same name. |
| nIsCopy | Non-zero for a copy to another card. |
|
static |
Hand a delete request to the registered saver screen and show it over MetLoadGameScreen.
The same sequence as StartSave(), except that mIsDelete is set to 1 and mIsCopy and mConfirmReplace are cleared. MetMCFreqDelScreen's slot 15 is the caller. The title is inferred.
| screens | The registry keys of the screens to return to. |
| pPersona | The persona to delete. |
| slot | The card location. |
|
virtual |
Hide the screen.
Slot 5.
The body is SetShowing(0) alone, and MetScreen::EnterAndShow() does not run.
Reimplemented from MetScreen.
|
virtual |
Start the request.
Slot 7.
Clears mRefreshingSettingsCard and runs CommitSave().
Reimplemented from MetScreen.
|
virtual |
Exit to the screens the request listed.
Slot 9.
The screen is removed from the renderer, each screen in mReturnScreens is pushed, and the first is made the active panel.
Reimplemented from MetScreen.
|
virtual |
Act on a dismissed dialogue.
Slot 15.
mem_check exits on its second button and retries otherwise. mem_format_check formats the card on its second button and retries otherwise. mem_format_done retries. format_fail retries on its first button and raises no_save_warn otherwise. The two no-space dialogues retry on their first button and exit otherwise. freq_replace saves over the old persona on its second button, and both it and new_name_required otherwise open the keyboard for a new FreQ name. freq_limit and any other dialogue exit.
In the European release the second button of mem_check and of the no-space dialogues runs LeaveWithoutSaving(), as does no_save_warn. Declining mem_format_check raises save_fail_no_format with the Save aborted. text. That dialogue acts like the no-space dialogues. The second button of freq_replace_catastrophe copies the persona over the load-list entry with the same name and runs BeginExit(), and the first opens the keyboard.
| name | The dialogue that was dismissed. |
| nChoice | The button chosen. |
Reimplemented from MetScreen.
|
virtual |
|
virtual |
Check the target card, then load its roster.
MemcardUser slot 2.
After a save to the settings card (mRefreshingSettingsCard set), the state is recorded as the first GlobalSettings::mCardSlots entry and MetMsgScreen exits. A save or copy to a card with less free space than GlobalSettings::mPersonaMinimumFreeClusters raises a no-space dialogue. Otherwise the roster is loaded into mPersonas and the progress dialogue for the save, the delete, or the copy is raised. An unformatted card raises mem_format_check, and a failed enquiry mem_check.
The European release omits the free-space test, treats a status of kMemcardStatusNotFormatted as an unformatted card, and raises the deleting dialogue for a delete. The North American release raises the save dialogue for a delete. A save that finds no card identifies the first card slot through FirstCardSlotName().
| state | The card's state, passed by value. |
| nStatus | The enquiry status. |
Reimplemented from MemcardUser.
|
virtual |
Report a finished format.
MemcardUser slot 5.
Success and status 13 both raise mem_format_done as the active panel, with the format_success or format_already text. Any other status raises format_fail.
| nPortSlot | The packed port and slot. The body does not read it. |
| nStatus | The format status. |
Reimplemented from MemcardUser.
|
virtual |
Report a finished roster save.
MemcardUser slot 7.
Success on the settings card copies the roster into MetPersonaData::loadList(), sets mRefreshingSettingsCard, and requests the card's state again. Success elsewhere exits MetMsgScreen. A full card raises a no-space dialogue, status 15 the no-card dialogue, and any other status save_fail_no_space with the save_fail_general text. In the European release both no-space texts receive nKilobytes.
| nPortSlot | The packed port and slot the roster went to. |
| nStatus | The save status. |
| nKilobytes | The kilobytes the card lacked. European release only. |
Reimplemented from MemcardUser.
|
virtual |
Merge the persona into the loaded roster and save it.
MemcardUser slot 13.
A persona without a name raises new_name_required. The roster is searched by the name the persona was last loaded under and by its present name. A delete removes the old entry, or raises mem_check when there is none. A renamed persona whose new name is taken raises new_name_required. A persona whose name is taken replaces that entry, after prompting when mConfirmReplace is set. Any other persona is appended, unless CheckPersonaLimit() refuses. Neither argument is read.
| nPortSlot | The packed port and slot. |
| nStatus | The load status. |
Reimplemented from MemcardUser.
|
virtual |
Take the name the keyboard committed as the persona's FreQ name.
MetKBUser slot 2, in the secondary table at 0x00805530 with a -144 adjustment. The body is MetPersonaData::SetName() expanded in place.
| text | The text the user entered. |
Implements MetKBUser.
|
inlinevirtual |
Silence the cycle-left sound.
Both overrides are two-instruction stubs, written inline with an empty body.
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the cycle-right sound.
Reimplemented from MetScreen.