|
resonance 1.0.1
|
Base of the screens that probe for a memory card before using one. More...
#include <metmemdetectscreen.h>


Public Member Functions | |
| MetMemDetectScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file) | |
| Construct the detector. | |
| virtual | ~MetMemDetectScreen () |
| virtual void | OnMsgScreenDismissed (const HxStr &name, int nChoice) |
| Act on the player's response to one of the probe's dialogues. | |
| virtual void | UpdateIdle (float flTime) |
| Close the autosave notice once it has been up for 480 units of renderer time. | |
| virtual void | OnAllConnectStates () |
| Load the global settings from the card in port 1, or offer to format it. | |
| virtual void | OnMinimumSaveSpace (int nPortSlot, int nSpace) |
| Warn when the card in port 1 has less free space than a save needs, or show the autosave notice. | |
| virtual void | OnCardFormatted (int nPortSlot, int nStatus) |
| Report the result of formatting the card in port 1. | |
| virtual void | OnPersonasLoaded (int nPortSlot, int nStatus) |
| Run StartSaveSpaceCheck(). | |
| virtual void | OnGlobalSettingsLoaded (int nPortSlot, int nStatus) |
| Run StartLoadPersonas(). | |
| virtual void | StartDetect () |
| Show the detection notice and list the connected cards. | |
| virtual void | StartLoadPersonas () |
| Show the loading notice and load the personas from the card in port 1. | |
| virtual void | OnNoCard () |
| Respond to finding no usable card in port 1. | |
| virtual void | OnDetectFinished () |
| Respond to the probe ending. | |
| virtual void | StartSaveSpaceCheck () |
| Check the free space on the card in port 1. | |
| 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 | EnterAndShow () |
| Show this screen and start its enter animation. | |
| 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 | 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 | PlayCycleLeftSound (int nSelector) |
| Play the sound that accompanies cycling a value to the left. | |
| virtual void | PlayCycleRightSound (int nSelector) |
| Play the sound that accompanies cycling a value to the right. | |
| virtual void | PlayErrorSound (int nSelector) |
| Play the sound that accompanies a rejected input. | |
| 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. | |
| virtual void | ResolveContainerViews () |
| Resolve the three views the container produced and hide the screen. | |
| 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 | OnConnectState (MemcardConnectState state, int nStatus) |
| Report the state of one slot. | |
| virtual void | OnCardUnformatted (int nPortSlot, int nStatus) |
| Report a finished unformat. | |
| virtual void | OnPersonasSaved (int nPortSlot, int nStatus) |
| Report a finished save of the FreQ roster. | |
| 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 | 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. | |
Static Public Member Functions | |
| static MetMemDetectScreen * | New (MetRenderer *pRenderer, int nPriority) |
| Build a detector on the heap with an empty screen name, directory, and container name. | |
| 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 Attributes | |
| int | mPersonaLoadRequested |
| 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. | |
| 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. | |
Base of the screens that probe for a memory card before using one.
Its RTTI descriptor is at 0x008eff50. It has two public non-virtual bases at fixed offsets: MetScreen at +0x00 and MemcardUser at +140. The object is 0xa0 bytes, and two children fix the size independently: MetMemDetectStartup by placing FadeUser at +160 and MetMemCardLoadScreen by placing MetMemCardPickerUser at +160.
Three classes derive from the class: MetLocPickCharScreen, MetMemCardLoadScreen, and MetMemDetectStartup.
Two vtables belong to the class: the 44-entry primary at 0x007fccb8 and the 21-entry MemcardUser table at 0x007fcc08 that adjusts this by -140 in every entry. The primary is five entries longer than the MetScreen table. The five new virtuals at slots 39 through 43 are declared below in slot order.
The probe runs as a chain of memory-card tasks. StartDetect() lists the connected cards, OnAllConnectStates() loads the global settings from the card in port 1 or offers to format it, OnGlobalSettingsLoaded() starts StartLoadPersonas(), OnPersonasLoaded() starts StartSaveSpaceCheck(), and OnMinimumSaveSpace() either warns about the free space or shows the autosave notice. Each dialogue returns through OnMsgScreenDismissed(). That routine retries through StartDetect() or ends the probe through OnDetectFinished(). MetFrontEndState::mUsingMemcard records whether the probe settled on a card, 1 when it did and 0 when the player continued without one.
The translation unit spans 0x002d89c8 to 0x002df058. Besides the members below, it has the type function at 0x002dea28, per-unit copies of MsgSink and MemcardUser routines, and template library emissions.
| MetMemDetectScreen::MetMemDetectScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority, | ||
| const HxStr & | name, | ||
| const HxStr & | directory, | ||
| const HxStr & | file ) |
Construct the detector.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
| name | The screen name. |
| directory | The directory the container loads from. |
| file | The container name, without the .rnd suffix. |
|
virtual |
|
static |
Build a detector on the heap with an empty screen name, directory, and container name.
| pRenderer | The front-end renderer the screen registers on. |
| nPriority | The load priority. |
|
virtual |
Act on the player's response to one of the probe's dialogues.
Slot 15. A retry runs StartDetect(), and continuing ends the probe through OnDetectFinished(). Confirming mem_format_check formats the card in port 1. Dismissing format_success records the formatted card's free space and shows the autosave notice. A dialogue the screen does not recognise ends the probe. Declining mem_format_check clears MetFrontEndState::mUsingMemcard in the North American release only.
| name | The message screen that was dismissed. |
| nChoice | The chosen button, counted from zero. |
Reimplemented from MetScreen.
Reimplemented in MetLocPickCharScreen.
|
virtual |
Close the autosave notice once it has been up for 480 units of renderer time.
Slot 26.
| flTime | The renderer's current animation frame position. |
Reimplemented from MetScreen.
Reimplemented in MetLocPickCharScreen, and MetMemDetectStartup.
|
virtual |
Load the global settings from the card in port 1, or offer to format it.
MemcardUser slot 3. OnNoCard() runs instead when no card is listed or the first card listed is not in port 1. The European release offers the format through ShowFormatCheck().
Reimplemented from MemcardUser.
|
virtual |
Warn when the card in port 1 has less free space than a save needs, or show the autosave notice.
MemcardUser slot 4.
The European release ignores nSpace. With nSkipWarning clear it raises warn_game_no_space when the card has fewer than 128 free clusters and nCampaign is 0, or fewer than 50 and nCampaign is 1, with that figure in the text. Otherwise it shows the autosave notice.
| nPortSlot | The card the check ran on. The body does not read it. |
| nSpace | The free clusters a save needs. The European release does not read it. |
| nSkipWarning | Non-zero to show the autosave notice without testing the card. European release only. |
| nCampaign | 1 to test against the campaign figure of 50. European release only. |
Reimplemented from MemcardUser.
|
virtual |
Report the result of formatting the card in port 1.
MemcardUser slot 5.
| nPortSlot | The card that was formatted. The body does not read it. |
| nStatus | The result, 0 on success and 13 when the card was already formatted. |
Reimplemented from MemcardUser.
|
virtual |
MemcardUser slot 13.
| nPortSlot | The card the personas came from. The body does not read it. |
| nStatus | The result. The body does not read it. |
Reimplemented from MemcardUser.
Reimplemented in MetLocPickCharScreen.
|
virtual |
Run StartLoadPersonas().
MemcardUser slot 14.
| nPortSlot | The card the settings came from. The body does not read it. |
| nStatus | The result. The body does not read it. |
Reimplemented from MemcardUser.
|
virtual |
Show the detection notice and list the connected cards.
Slot 39. Clears mAutosaveNoticeTime and GlobalSettings::mCardSlots, and queues the listing with this screen as the receiver. The European release does not show the notice. The title is inferred.
Reimplemented in MetLocPickCharScreen, MetMemCardLoadScreen, and MetMemDetectStartup.
|
virtual |
Show the loading notice and load the personas from the card in port 1.
Slot 40. Sets mPersonaLoadRequested and empties MetPersonaData::loadList() before the load fills it. The title is inferred.
Reimplemented in MetLocPickCharScreen.
|
inlinevirtual |
Respond to finding no usable card in port 1.
Slot 41. The body is empty. The title is inferred from the mem_check dialogue that MetLocPickCharScreen raises in its override.
Reimplemented in MetLocPickCharScreen, MetMemCardLoadScreen, and MetMemDetectStartup.
|
inlinevirtual |
Respond to the probe ending.
Slot 42. The body is empty. The title is inferred.
Reimplemented in MetLocPickCharScreen, MetMemCardLoadScreen, and MetMemDetectStartup.
|
virtual |
Check the free space on the card in port 1.
Slot 43. Queues the check with this screen as the receiver. The title is inferred.
|
protected |