|
resonance 1.0.1
|
Solo screen that writes a finished remix to a memory card. More...
#include <metsaveremixscreen.h>


Public Member Functions | |
| MetSaveRemixScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetSaveRemixScreen () |
| void | SetPersona (MetPersonaData *pPersona) |
| Store the persona saving the remix. | |
| void | SetOwnerPad (int nPad) |
| Store the controller the save belongs to in MetSaveRemix::mOwnerPad. | |
| void | SetSaver (MetRemixSaver *pSaver) |
| Store the screen slots 40 and 41 report back to. | |
| void | SetAppearances (const std::vector< FreqAppearance > &appearances) |
| Copy the players' appearances into MetSaveRemix::mAppearances. | |
| void | SetEnteredName (const HxStr &text) |
| Assign the name typed last, mEnteredName. | |
| virtual void | EnterAndShow () |
| Show the screen and fill it from the finished session. | |
| virtual void | OnPanelActivated () |
| Return from the keyboard once the panel has finished activating. | |
| virtual void | OnMsgScreenDismissed (const HxStr &name, int nChoice) |
| Act on the discard confirmation. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Act on a navigation command from the one controller that owns the screen. | |
| virtual void | PlaySlideSound (int nSelector) |
| Play the slide sound when the selector matches MetSaveRemix::mOwnerPad. | |
| virtual void | PlayLeaveSound (int) |
| Silence the leave sound. | |
| virtual void | PlayHighSound (int) |
| Silence the high sound. | |
| virtual void | PlayCycleLeftSound (int) |
| Silence the cycle-left sound. | |
| virtual void | PlayCycleRightSound (int) |
| Silence the cycle-right sound. | |
| virtual void | OnRepeatingSoundFinished (Rnd::Button *pButton) |
| Depart to the help screen. | |
| virtual void | OnExitFinished () |
| Act on the button the user chose once the exit animation has finished. | |
| virtual void | ResolveContainerViews () |
| Resolve the three text objects the screen draws into. | |
| virtual void | OnSaveAbandoned () |
| Report to the saver through MetRemixSaver::OnSaveFinished() with a zero argument. | |
| virtual void | OnSaveDialogueClosed () |
| Report to the saver through MetRemixSaver::OnSaveFinished() with an argument of one. | |
| virtual void | OnDuplicateNameDeclined () |
| Request a remix name from the on-screen keyboard. | |
| virtual void | OnKeyboardTextEntered (const HxStr &text) |
| Draw the entered name and forward it to the saver once. | |
| Public Member Functions inherited from MetSaveRemix | |
| MetSaveRemix (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file) | |
| Construct the saver. | |
| virtual | ~MetSaveRemix () |
| virtual void | RecordPendingSave (const MemcardConnectState &selection, int nOwnerPad, HxStr remixName, HxStr levelName, std::vector< FreqAppearance > appearances, int nAlbumNumber) |
| Record the remix a save is about to write and enquire about the target card. | |
| virtual void | OnConnectState (MemcardConnectState state, int nStatus) |
| Act on the state of the card the save targets. | |
| virtual void | OnCardFormatted (int nPortSlot, int nStatus) |
| Report a finished format. | |
| virtual void | OnRemixSaved (int nPortSlot, int nStatus) |
| Report a finished remix save. | |
| virtual void | OnRemixesListed (int nPortSlot, int nStatus) |
| Check the listing of the target card before saving. | |
| 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 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 | 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. | |
| 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 | OnPersonasSaved (int nPortSlot, int nStatus) |
| Report a finished save of the FreQ roster. | |
| 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 | OnRemixLoaded (int nPortSlot, int nStatus) |
| Report a finished load of one remix. | |
| virtual void | OnPersonasLoaded (int nPortSlot, int nStatus) |
| Report a finished load of the FreQ roster. | |
| 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 MetSaveRemixScreen * | New (MetRenderer *pRenderer, int nPriority) |
| Build the screen on the heap. | |
| static void | Open (MetPersonaData *pPersona, int nPad, MetRemixSaver *pSaver, const MemcardConnectState &slot, const std::vector< FreqAppearance > &appearances, int bClearName) |
| Fill the registered save screen with a save request and bring it up 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 MetSaveRemix | |
| MemcardConnectState | mTargetSlot |
| std::vector< FreqAppearance > | mAppearances |
| HxStr | mRemixName |
| int | mOwnerPad |
| int | mCopying |
| int | mKeyboardPending |
| 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 |
Solo screen that writes a finished remix to a memory card.
Its RTTI descriptor is at 0x008ef8c0. It has MetSaveRemix as its one public non-virtual base at offset 0. Its members start at +0xe8, fixing the size of MetSaveRemix. The factory at 0x003817e0 pins the object at 0x10c bytes by requesting exactly that many with the tag MsgSink. That factory is one inlined new MetSaveRemixScreen(renderer, priority) expression emitted out of line, and the tag is MsgSink's rather than this class's, because MsgSink is the base that declares operator new. Three vtables belong to the class, the 43-entry primary at 0x0080a690, the 21-entry MemcardUser table at 0x0080a5e0 that adjusts this by -140, and the three-entry MetKBUser table at 0x0080a5c0 that adjusts it by -144. The primary is the same length as the MetSaveRemix table, and the class declares no new virtual. The MemcardUser table overrides no slot and inherits the four MetSaveRemix supplies.
The constructor at 0x0037ace0 takes only the renderer and the load priority. It runs the MetSaveRemix constructor at 0x00372120 with ers for the screen name, metagame/_Solo for the directory, and save_remix for the container, writes its own three vptrs, zeroes mButtonList, mPersona, and mDeclined, default-constructs mEnteredName, allocates a MetButtonList tagged MetButtonList into mButtonList, and pushes remix_save into the container object-name vector MetScreen declares at +0x38. It then clears MetScreen::mPlaysCommandSounds and MetSaveRemix::mKeyboardPending. Both members are protected rather than private for that reason. The image emits the mPlaysCommandSounds store on both paths of the temporary release above it, from one source statement rather than two.
The destructor at 0x00381868 restores the three vptrs, deletes mButtonList through slot 1 of the MetButtonList table with the deleting __in_chrg value, releases the mEnteredName buffer through the inlined HxStr destructor, runs the MetSaveRemix destructor, and releases the object with the tag MsgSink.
Seventeen entries of the primary table differ from the MetSaveRemix table, which a diff of the two tables settles rather than the title each routine carries. They are 0 0x00381768, the compiler-generated GetTypeInfo, 1 0x00381868 the destructor, 5 0x0037b8e8, 7 0x0037b718, 15 0x0037cac8, 19 0x0037b258, 20 0x00381968, 21 0x003817d8, 22 0x003817c0, 23 0x003817c8, 24 0x003817d0, 30 0x0037c110, 36 0x0037c260, 38 0x0037af98, 40 0x003819f0, 41 0x00381a28, and 42 0x0037ccc8. All fifteen behaviour slots are declared below. Slots 21 through 24 sit eight bytes apart and are two-instruction jr ra stubs, and the declaration order there puts leave before high, so their addresses do not ascend with the slot numbers.
The three-entry MetKBUser table overrides its one slot at 0x00381990, which is declared below with the spelling the base gives it.
The words from +0xf0 to +0xfc, which the constructor never writes, are objects. Slot 38 resolves the three Rnd::Text objects by name, and mRemixNameText is the one the entered name is drawn into. The word at +0xfc is the MetRemixSaver subobject of the screen that asked for the save, which Open() stores through SetSaver(). Both callers of Open() pass their own subobject at +140, where MetMultiSaveRemixScreen and MetSoloEndRemixScreen place MetRemixSaver.
| MetSaveRemixScreen::MetSaveRemixScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority ) |
Construct the screen.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
|
static |
Build the screen on the heap.
| pRenderer | The front-end renderer the screen registers on. |
| nPriority | The load priority. |
|
static |
Fill the registered save screen with a save request and bring it up over MetLoadGameScreen.
The screen registered as MetSaveRemixScreen receives each argument through the setters below and the location through a direct assignment to MetSaveRemix::mTargetSlot. A non-zero bClearName assigns the empty string to mEnteredName. MetLoadGameScreen then pushes the save screen and makes it the active panel. Neither screen lookup is checked for null. MetMultiSaveRemixScreen's slots 2 and 36 and MetSoloEndRemixScreen's routine at 0x00395058 call it. The title is inferred.
| pPersona | The persona saving the remix, stored through SetPersona(). May be null, in which case EnterAndShow() takes the first persona. |
| nPad | The controller that owns the save, stored through SetOwnerPad(). |
| pSaver | The screen to report back to, stored through SetSaver(). |
| slot | The memory-card location to save to. |
| appearances | The players' appearances, stored through SetAppearances(). |
| bClearName | Non-zero to empty mEnteredName through SetEnteredName(). |
| void MetSaveRemixScreen::SetPersona | ( | MetPersonaData * | pPersona | ) |
Store the persona saving the remix.
| pPersona | The persona. |
| void MetSaveRemixScreen::SetOwnerPad | ( | int | nPad | ) |
Store the controller the save belongs to in MetSaveRemix::mOwnerPad.
| nPad | The controller index. |
| void MetSaveRemixScreen::SetSaver | ( | MetRemixSaver * | pSaver | ) |
Store the screen slots 40 and 41 report back to.
| pSaver | The screen. |
| void MetSaveRemixScreen::SetAppearances | ( | const std::vector< FreqAppearance > & | appearances | ) |
Copy the players' appearances into MetSaveRemix::mAppearances.
| appearances | The appearances. |
| void MetSaveRemixScreen::SetEnteredName | ( | const HxStr & | text | ) |
Assign the name typed last, mEnteredName.
| text | The new name. |
|
virtual |
Show the screen and fill it from the finished session.
Slot 5.
It clears the two keyboard flags, becomes the renderer's active panel, runs MetRenderer::OnReturnFromGame(), and selects the first button. It then labels the player panel remix_player with the controller number, falls back to the first persona when none was given, labels mFreqNameText with the persona's name, and fills mInstructionsText from save_remix_command and the card slot's name. The European release formats the card slot's name into the save_remix_command text of the current language in place of appending it.
The remix name comes from the name typed last when there is one, from the MetRemixManager record when a saved game is loaded, and otherwise from the level's default name (code 0x325, or the shorter code 0x327 when that does not fit mRemixNameText's wrap width) with 01 appended. A name that still does not fit is a Fatal() error. It ends by setting the help text and the remix_save_options preset and running MetScreen::EnterAndShow().
Reimplemented from MetScreen.
|
virtual |
Return from the keyboard once the panel has finished activating.
Slot 7.
With no keyboard request pending (MetSaveRemix::mKeyboardPending clear) it only shows the first container object's help text. Otherwise it clears mKeyboardPending and, when a saver is set, brings back the help and save screens, reports to the saver through MetRemixSaver::SetOwnerScreenShowing() with 1, and makes the save screen the active panel.
Reimplemented from MetScreen.
|
virtual |
Act on the discard confirmation.
Slot 15.
Any other dialogue goes to MetSaveRemix::OnMsgScreenDismissed(). For discard_remix, the second button clears MetScreen::mExitChoice and mDeclined and dispatches slot 36, and the first brings back the help and save screens, reports to the saver through its slot 4 with 1 without a null check, and makes the save screen the active panel.
| name | The dialogue the screen requested, which the message screen reports back. |
| nChoice | Which of the dialogue's buttons the user chose, counted from zero. |
Reimplemented from MetSaveRemix.
|
virtual |
Act on a navigation command from the one controller that owns the screen.
Slot 19.
A command whose pad index differs from MetSaveRemix::mOwnerPad is discarded before anything else, which is the same test the sound override at slot 20 makes and is what fixes mOwnerPad as the controller index of the screen. Select with a name typed records the name, clears the active panel, starts the selection alternation, and plays the slide sound, and select with no name plays the error sound. Code 7 opens the keyboard on the typed name, and code 8 marks the save as declined, tells the saver through its slot 4 with 0, and exits. Every other code is ignored.
| pCommand | The command the renderer translated from an input message. |
Reimplemented from MetScreen.
|
virtual |
Play the slide sound when the selector matches MetSaveRemix::mOwnerPad.
This is the one sound override of the class that is not an empty stub, and the only one in the band that compares the selector against a recorded value.
| nSelector | Compared against MetSaveRemix::mOwnerPad, then passed through unchanged. |
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the leave sound.
The four overrides below are two-instruction stubs, so each was written inline with an empty body. Their declaration order puts leave before high, which is why their addresses do not ascend with the slot numbers.
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the high sound.
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the cycle-left sound.
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the cycle-right sound.
Reimplemented from MetScreen.
|
virtual |
Depart to the help screen.
Slot 30.
It records 2 in MetScreen::mExitChoice, calls the saver's slot 3 when a saver is set, exits MetHelpScreen and MetScreenTitleScreen, and begins the exit. MetScreen slot 29 passes the object it finished alternating, and this body does not read it.
| pButton | The button slot 29 finished with, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Act on the button the user chose once the exit animation has finished.
Slot 36.
With mDeclined set it clears the flag and raises discard_remix with NO and YES, with the discard_remix_changes text for a loaded game. Otherwise a back exit (MetScreen::mExitChoice of 0) reports to the saver through its slot 2 with 0, and any other exit records the save through RecordPendingSave() with the typed name, the level name, the appearances, and the album number configuration code 0x514 reads.
Reimplemented from MetScreen.
|
virtual |
Resolve the three text objects the screen draws into.
Slot 38.
It runs the MetScreen body, resolves ers_freqname_player.txt, ers_instructions.txt, and ers_remix_title_val.txt into the three text members, and adds save_copy.but with an empty label to the MetButtonList at mButtonList. The European release also sets ers_remix_title.txt to the save_remix_title text of the current language.
Reimplemented from MetScreen.
|
virtual |
Report to the saver through MetRemixSaver::OnSaveFinished() with a zero argument.
Slot 40.
A null saver does nothing.
Reimplemented from MetSaveRemix.
|
virtual |
Report to the saver through MetRemixSaver::OnSaveFinished() with an argument of one.
Slot 41.
The body differs from slot 40's in that one immediate and nothing else.
Reimplemented from MetSaveRemix.
|
virtual |
Request a remix name from the on-screen keyboard.
Slot 42.
It sets MetSaveRemix::mKeyboardPending and then builds a MetKeyboardRequest with this screen's registry key as the screen to return to, Remix name as the prompt, MetSaveRemix::mRemixName as the initial text, -1 for any controller, and this object's MetKBUser subobject as the receiver, with a width of 228, a length of 32, and the save-remix ticker text, and passes it to MetKeyboardScreen::Open().
Reimplemented from MetSaveRemix.
|
virtual |
Draw the entered name and forward it to the saver once.
MetKBUser slot 2.
The text arrives at mRemixNameText whether or not a save is pending. A clear MetSaveRemix::mKeyboardPending then discards it. The discard ignores a keyboard result this screen did not request.
| text | The remix name the user entered. |
Reimplemented from MetSaveRemix.