|
resonance 1.0.1
|
Interface of the store a player draws powerups from. More...
#include <powerupcollectioni.h>


Public Member Functions | |
| PowerupCollectionI () | |
| virtual | ~PowerupCollectionI () |
| virtual void | Add (PowerupType type) |
| Store one powerup of the requested kind. | |
| virtual void | SelectRelative (int nDelta) |
| Move the selection by one step, skipping an empty entry. | |
| virtual void | Select (int nIndex) |
| Select one entry by index. | |
| virtual void | Deploy (int nTrack, int nBar) |
| Deploy the selected powerup and account for the one used. | |
| virtual int | HasSelection () const |
| Report whether an entry is selected. | |
| virtual void | SendState () const |
| Send the whole state again, for a listener that has just registered. | |
| Public Member Functions inherited from MsgSource | |
| virtual | ~MsgSource () |
| virtual void | AddSink (MsgSink *pSink) |
| Register a sink, ignoring a sink that is already registered. | |
| virtual void | RemoveSink (MsgSink *pSink) |
| Unregister the first occurrence of a sink. | |
| void | Send (Message *pMsg) const |
| Deliver a message to every registered sink, in registration order. | |
| void | ClearSinks () |
| Unregister every sink. | |
Additional Inherited Members | |
| Public Attributes inherited from MsgSource | |
| int | mGraphBuilt |
| A word no member of this class reads. | |
Interface of the store a player draws powerups from.
Its RTTI descriptor is at 0x008f0030. It has MsgSource as its one base at offset 0. The trailing letter belongs to the name the descriptor records rather than being a suffix this tree added. Its table is at 0x007e49d8 and has ten entries with a zero terminator at index 10. Slots 2 and 3 retain the MsgSource pair at 0x0054a270 and 0x0054a2f0, and the six slots after them are this class's own.
The class adds no data member. Its constructor stores the table pointer at +0x10 and does nothing else, so the object is the same 0x14 bytes MsgSource occupies. The destructor restores the MsgSource table and expands the base destructor, and nothing of its own remains in the body.
Every one of the six virtuals below is a two-instruction jr ra default, so an unoverridden slot does nothing. The two subclasses are PowerupCollection, which stores one entry per kind with a count, and SinglePowerupCollection, which stores one powerup at a time. LocalPlayer chooses between the two in its constructor at 0x0011e000 and stores the result at its own +0xa4.
Every method name here is inferred from the two subclass implementations. No method name survives anywhere in the image. The verb of each slot is recovered, so a name describing the behaviour is written rather than a slot number.
| PowerupCollectionI::PowerupCollectionI | ( | ) |
|
virtual |
|
virtual |
Store one powerup of the requested kind.
Slot 4, and an empty default.
| type | The kind, as Powerup::Type() reports it. |
Reimplemented in PowerupCollection, and SinglePowerupCollection.
|
virtual |
Move the selection by one step, skipping an empty entry.
Slot 5, and an empty default. PowerupCollection::Add() calls it with 1 once a first powerup arrives with nothing selected.
| nDelta | The step, which the one implementation applies as an addition. |
Reimplemented in PowerupCollection, and SinglePowerupCollection.
|
virtual |
Select one entry by index.
Slot 6, and an empty default.
| nIndex | The entry, or -1 for none. |
Reimplemented in PowerupCollection, and SinglePowerupCollection.
|
virtual |
Deploy the selected powerup and account for the one used.
Slot 7, and an empty default. Both implementations forward the two arguments untouched to Powerup::Deploy(). PowerupPlacer's three subclasses all dispatch this slot with two arguments, at 0x001ccf30, 0x001cdeb8, and 0x001cdfe0.
| nTrack | Whatever Player::GetTrack() reports for the deploying player, its track. The default in Player returns -1. |
| nBar | The current bar, as the song tick divided by 1920. |
Reimplemented in PowerupCollection, and SinglePowerupCollection.
|
virtual |
Report whether an entry is selected.
Slot 8, and an empty default. The default leaves the return register untouched, so the value it yields is indeterminate and the base is not meant to be called. The return type comes from the two implementations, which both compute a truth value into the register.
Reimplemented in PowerupCollection, and SinglePowerupCollection.
|
virtual |
Send the whole state again, for a listener that has just registered.
Slot 9, and an empty default.
Reimplemented in PowerupCollection, and SinglePowerupCollection.