|
resonance 1.0.1
|
Screen that deletes a remix from a memory card. More...
#include <metremixdelscreen.h>


Public Member Functions | |
| MetRemixDelScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetRemixDelScreen () |
| virtual void | EnterAndShow () |
| Hide the screen and request the remix catalogue. | |
| virtual void | OnPanelActivated () |
| Run the pending keyboard action once the panel has finished activating. | |
| virtual void | OnMsgScreenDismissed (const HxStr &name, int nChoice) |
| Act on whichever of the screen's dialogues was dismissed. | |
| virtual void | OnMsgScreenShown (const HxStr &name) |
| Make the message screen the active panel. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Act on a navigation command. | |
| virtual void | PlaySlideSound (int) |
| Silence the slide sound. | |
| virtual void | PlayCycleLeftSound (int) |
| Silence the cycle-left sound. | |
| virtual void | PlayCycleRightSound (int) |
| Silence the cycle-right sound. | |
| virtual void | OnEnterFinished () |
| Show the first catalogue row on the data screen. | |
| virtual void | OnExitFinished () |
| Release the list and depart once the exit animation has finished. | |
| virtual void | ResolveContainerViews () |
| Resolve the list title and the rest of the container objects. | |
| virtual void | OnSaveAbandoned () |
| Bring this screen back and make it the active panel again. | |
| virtual void | OnSaveDialogueClosed () |
| Bring this screen back and make it the active panel again. | |
| virtual void | OnDuplicateNameDeclined () |
| Request a remix name from the on-screen keyboard. | |
| virtual void | OnRemixLoaded (int nPortSlot, int nStatus) |
| Fill the catalogue from the card. | |
| virtual void | OnRemixDeleted (int nPortSlot, int nStatus) |
| Act on the delete the card reported. | |
| virtual void | OnKeyboardTextEntered (const HxStr &text) |
| Forward the entered name to the saver once. | |
| virtual int | ProvideText (int nItem, int nColumn, Rnd::Text *pText, int nContext) |
| Show the second string of one row of mCatalogue. | |
| virtual int | ProvideMesh (int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext) |
| Leave the cell as it is. | |
| void | SetCardSlot (MemcardConnectState slot) |
| Record the card the screen works on in mCardSlot. | |
| 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 | 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 | 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 | 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 | 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 | 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 () |
| Public Member Functions inherited from ListDataProvider | |
| virtual | ~ListDataProvider () |
Static Public Member Functions | |
| static MetRemixDelScreen * | 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 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 |
Screen that deletes a remix from a memory card.
Its RTTI descriptor is at 0x008ef690. It has three public non-virtual bases at fixed offsets, MetSaveRemix at +0x00, ListDataProvider at +232, and MetMemCardPickerUser at +236. The factory at 0x00343f30 pins the object at 0x140 bytes by requesting exactly that many with the tag MsgSink. That factory is one inlined new MetRemixDelScreen(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.
Four vtables belong to the class, the 43-entry primary at 0x008061d8, the four-entry ListDataProvider table at 0x008060e0 that adjusts this by -232, the three-entry MetKBUser table at 0x00806108 that adjusts it by -144, and the 21-entry MemcardUser table at 0x00806128 that adjusts it by -140. There is no fifth table, and the constructor writes no vptr at +0xec, which is one of the four observations that prove MetMemCardPickerUser declares no virtual function.
The constructor at 0x003394a0 takes only the renderer and the load priority. It runs the MetSaveRemix constructor at 0x00372120 with mcrd for the screen name, metagame/Shared for the directory, and memcard_remix_del for the container, writes its four vptrs, zeroes mList, mDeletePending, mCopyPending, and mCopyRecord, default-constructs the two MemcardConnectState records, zeroes mRowFont and mDimRowFont, clears MetScreen::mShowsLoadedDrawables, and pushes mem_del_remix into the container object-name vector MetScreen declares at +0x38.
The constructor addresses the span from +0x108 to +0x137 through two registers set to +0x108 and +0x120, exactly 0x18 apart, and each receives the identical five-store run from the same empty literal at 0x00805ca8. Both are MemcardConnectState records.
The destructor at 0x003397a8 restores the four vptrs, deletes mList through slot 1 of a table at +0x94 of the object itself, which is where ScrollingList places its vptr, releases the two record names in reverse order as compiler-generated member teardown, restores the ListDataProvider vptr to 0x007ec830, runs the MetSaveRemix destructor, and releases the object with the tag MsgSink.
Sixteen 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 0x00343e88, the compiler-generated GetTypeInfo, 1 0x003397a8 the destructor, 5 0x0033a098, 7 0x00344078, 15 0x0033b280, 16 0x003441a0, 19 0x00339b30, 20 0x00343f28, 23 0x00343f18, 24 0x00343f20, 33 0x00344058, 36 0x0033ce00, 38 0x00339880, 40 0x0033e5c0, 41 0x0033e6d8, and 42 0x0033e7f0. All fourteen behaviour slots are declared below.
Slot 16 is otherwise empty in every class of the subsystem, and this screen is the one class that fills it.
Slots 40 and 41 have instruction-for-instruction identical bodies at two addresses, each pushing and then activating this screen's own registry key. The vtable indices are what separates them, so the original declared two members with the same body rather than one member the compiler emitted twice.
The MemcardUser table overrides two slots this class supplies itself, 12 at 0x0033dec0 and 16 at 0x0033d768, and inherits the four MetSaveRemix supplies. The three-entry MetKBUser table overrides its one slot at 0x00344240. All three are declared below with the spelling their base gives them.
Both pure virtuals of the four-entry ListDataProvider table are supplied here, ProvideText() at 0x0033cc78 and ProvideMesh() at 0x00343f10.
Slot 5 writes MetSaveRemix::mCopying. MetSaveRemix declares the member protected on the same reasoning that moved mKeyboardPending there.
| MetRemixDelScreen::MetRemixDelScreen | ( | 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. |
|
virtual |
Hide the screen and request the remix catalogue.
Slot 5.
It hides itself through slot 17 with a zero argument, clears MetSaveRemix::mKeyboardPending and mCopyRecord, writes one into MetSaveRemix::mCopying, and points mCatalogue at the MetRemixManager catalogue for mCardSlot.
Returning from a confirmation, with mDeletePending or mCopyPending set, it reselects the first row of the existing list. Otherwise it raises the one-button no_remix dialogue when the card's listing status is 15 or the catalogue is empty, and creates a new ScrollingList when it is not, without deleting any list from an earlier entry. It then clears both flags, refills and redraws the list, pushes the help screen with the only_back_title preset and the first prompt of MetScreen::mHelpKeys, sets the title to mem_del_type formatted with the slot name, pushes the data screen, and runs the MetScreen body.
Reimplemented from MetScreen.
|
virtual |
Run the pending keyboard action once the panel has finished activating.
Slot 7.
MetScreen slot 6 is its one caller. A set MetSaveRemix::mKeyboardPending records that slot 42 requested the on-screen keyboard, and the flag is cleared before slot 40 runs so that the request runs once.
Reimplemented from MetScreen.
|
virtual |
Act on whichever of the screen's dialogues was dismissed.
Slot 15.
The name is compared against each dialogue in turn. YES on del_remix_ask and RETRY on del_fail_nocard raise the button-less del_remix progress dialogue and queue the delete of the selected row. YES on remix_copy_ask records the selected row in mCopyRecord and the next card in mCopyTarget and queues the load of the row for a copy. del_remix refills the list and requests that MetRemixManager list mCardSlot again. no_remix removes this screen from the renderer and returns to the card-type screen. Every other answer of this screen's dialogues returns to the list, and a name this screen did not raise goes to the MetSaveRemix body.
| 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 |
Make the message screen the active panel.
Slot 16.
The argument is ignored. The panel is the one registered under MetMsgScreen.
| name | The dialogue the message screen reports back, which the body does not read. |
Reimplemented from MetScreen.
|
virtual |
Act on a navigation command.
Slot 19.
An eight-entry jump table at 0x00805e00 indexed by the command code less one selects the branch, and a code outside one through eight returns at once. Codes 3, 4, and 5 route to the same return the out-of-range path uses, so the screen discards the two cycle commands and the select command. Codes 7 and 8 are two of the codes above six that the input translator at 0x002e3738 produces and that MetScreen::DeliverCommand() passes through unchanged, and this screen is one of the few that acts on them.
Codes 1 and 2 move along the list at mList and show the new row on the data screen, without testing mCatalogue for null. Code 6 departs the screen. Codes 7 and 8 do nothing with an empty catalogue, and otherwise play the toggle sound, set mCopyPending or mDeletePending respectively, clear the help text, and depart the screen.
| pCommand | The command the renderer translated from an input message. |
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the slide sound.
All three overrides are two-instruction stubs, so each was written inline with an empty body.
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the cycle-left sound.
Reimplemented from MetScreen.
|
inlinevirtual |
Silence the cycle-right sound.
Reimplemented from MetScreen.
|
virtual |
|
virtual |
Release the list and depart once the exit animation has finished.
Slot 36.
With neither mDeletePending nor mCopyPending set, it deletes the ScrollingList at mList, pushes MetLeftGizmoScreen and MetMemCardTypeScreen, and activates the latter. With mCopyPending set, it raises the remix_copy_ask confirmation, formatted with the slot name NextCardSlot() gives for mCardSlot. With only mDeletePending set, it raises the del_remix_ask confirmation. Both confirmations offer NO and YES.
Reimplemented from MetScreen.
|
virtual |
Resolve the list title and the rest of the container objects.
Slot 38.
It runs the MetSaveRemix slot 38 body, which is MetScreen's, resolves the Rnd::Text mcrd_listpan_title.txt, sets it to the configuration string mcrf_remix, and shows it. It then resolves the Rnd::Font objects font1_pink_2 into mRowFont and font1_pinkgrey_2 into mDimRowFont. The title is not tested for null.
Reimplemented from MetScreen.
|
virtual |
Bring this screen back and make it the active panel again.
Slot 40.
Pushes and then activates this screen's own registry key, MetRemixDelScreen. Slot 7 and MetSaveRemix slot 42 are the two callers.
Reimplemented from MetSaveRemix.
|
virtual |
Bring this screen back and make it the active panel again.
Slot 41.
The body is identical to slot 40's, instruction for instruction, and the two occupy separate vtable slots.
Reimplemented from MetSaveRemix.
|
virtual |
Request a remix name from the on-screen keyboard.
Slot 42.
It sets MetSaveRemix::mKeyboardPending so that slot 7 runs slot 40 once the keyboard has finished, 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, and passes it to MetKeyboardScreen::Open().
This override replaces the MetSaveRemix body, which is an alias for the empty slot 40 rather than a stub.
Reimplemented from MetSaveRemix.
|
virtual |
Fill the catalogue from the card.
MemcardUser slot 12.
A non-zero status raises the one-button remix_copy_fail dialogue with the copy_fail_general text. A zero status makes this screen MemcardManager::mUser and hands the row at mCopyRecord to MetSaveRemix::RecordPendingSave() with mCopyTarget as the target and -1 as the selector, passing the row's name, its first string, its appearances, and its last word. It also builds a two-entry list of this screen's registry key and MetHelpScreen that nothing reads. The port and slot argument is not read.
| nPortSlot | Which card port and slot reported, which the body does not read. |
| nStatus | Zero on success. |
Reimplemented from MemcardUser.
|
virtual |
Act on the delete the card reported.
MemcardUser slot 16.
A zero status exits MetMsgScreen and does nothing else. A status of 15 raises the del_fail_nocard dialogue with RETRY and CANCEL, its text formatted with the slot name of mCardSlot. Every other status raises the one-button del_remix dialogue with the del_fail text. The port and slot argument is not read.
The European release reads it. A zero status from the first slot of port 0 sets mRefreshCardPending and queries that slot's connect state instead of exiting MetMsgScreen, and OnConnectState() finishes the delete. GlobalSettings::shared() is called first and its result discarded.
| nPortSlot | Which card port and slot reported. |
| nStatus | Zero on success, and 15 for the failure the retry dialogue covers. |
Reimplemented from MemcardUser.
|
virtual |
Forward the entered name to the saver once.
MetKBUser slot 2.
A clear MetSaveRemix::mKeyboardPending discards the text. The discard ignores a keyboard result that this screen did not request.
| text | The remix name the user entered. |
Reimplemented from MetSaveRemix.
|
virtual |
Show the second string of one row of mCatalogue.
An index past the end of mCatalogue empties the text instead. The column and the context are not read.
| nItem | The row of mCatalogue. |
| nColumn | The cell index, which the body does not read. |
| pText | The cell. |
| nContext | The list context, which the body does not read. |
Implements ListDataProvider.
|
virtual |
Leave the cell as it is.
| nItem | The row, which the body does not read. |
| nColumn | The cell index, which the body does not read. |
| pMesh | The cell, which the body does not read. |
| nContext | The list context, which the body does not read. |
Implements ListDataProvider.
| void MetRemixDelScreen::SetCardSlot | ( | MemcardConnectState | slot | ) |
Record the card the screen works on in mCardSlot.
MetMemCardTypeScreen's slot 36 is the caller. The title is inferred.
| slot | The card. |