|
resonance 1.0.1
|
Store of one powerup at a time, which a new one replaces. More...
#include <singlepowerupcollection.h>


Public Member Functions | |
| SinglePowerupCollection (LocalPlayer *pOwner) | |
| Start with no powerup stored. | |
| virtual | ~SinglePowerupCollection () |
| Delete the stored powerup. | |
| virtual void | Add (PowerupType type) |
| Replace the stored powerup with one of the requested kind. | |
| virtual void | SelectRelative (int nDelta) |
| Do nothing. | |
| virtual void | Select (int nIndex) |
| Do nothing. | |
| virtual void | Deploy (int nTrack, int nBar) |
| Deploy the stored powerup and discard it. | |
| virtual int | HasSelection () const |
| Report whether a powerup is stored. | |
| virtual void | SendState () const |
| Send the stored kind again, for a listener that has just registered. | |
| Public Member Functions inherited from PowerupCollectionI | |
| PowerupCollectionI () | |
| virtual | ~PowerupCollectionI () |
| 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. | |
Store of one powerup at a time, which a new one replaces.
Its RTTI descriptor is at 0x008efed0. It has PowerupCollectionI as its one base at offset 0. Its table is at 0x007e4850 and has ten entries with a zero terminator at index 10, the same length as the base table. The class adds no virtual.
It overrides the destructor and four of the base's six slots. Slots 5 and 6, SelectRelative() and Select(), point at two-instruction bodies of their own at 0x001cc9f0 and 0x001cc9f8, and this toolchain re-emits an inline empty body into every translation unit that needs one, so a unique address for an empty body is no evidence of an override. Both are recorded as inherited and neither is declared. Selecting has no meaning for a store of one.
The object is 0x20 bytes. The base occupies the first 0x14 including the inherited vptr at +0x10, and the three members below follow it.
LocalPlayer's constructor allocates one at 0x0011e170 for three of its modes and stores the pointer at its own +0xa4. Its remaining mode allocates a PowerupCollection instead.
Every method name is inferred from the bodies. No method name survives anywhere in the image.
|
explicit |
Start with no powerup stored.
| pOwner | The player whose collection this is. |
|
virtual |
Delete the stored powerup.
|
virtual |
Replace the stored powerup with one of the requested kind.
The powerup already stored is deleted first, whatever its kind, so a store of one never queues. A ChoosePowerupMsg follows with the new kind and an index of 0, the one slot of the store.
| type | The kind. |
Reimplemented from PowerupCollectionI.
|
virtual |
Do nothing.
A store of one has no other entry to move to.
An empty override of its own at table slot 5, apart from the base's empty default.
| nDelta | Not read. |
Reimplemented from PowerupCollectionI.
|
virtual |
Do nothing.
A store of one has no other entry to select.
An empty override of its own at table slot 6, apart from the base's empty default.
| nIndex | Not read. |
Reimplemented from PowerupCollectionI.
|
virtual |
Deploy the stored powerup and discard it.
An empty store returns with no message, and a powerup that reports failure keeps its place. A success sends a ChoosePowerupMsg with a kind of -1, then deletes the powerup and clears both members.
| nTrack | Forwarded to Powerup::Deploy(). See PowerupCollectionI::Deploy(). |
| nBar | Forwarded to Powerup::Deploy(). See PowerupCollectionI::Deploy(). |
Reimplemented from PowerupCollectionI.
|
virtual |
Report whether a powerup is stored.
Reimplemented from PowerupCollectionI.
|
virtual |
Send the stored kind again, for a listener that has just registered.
An empty store sends nothing. The test goes through the virtual HasSelection() rather than reading the member.
Reimplemented from PowerupCollectionI.