|
resonance 1.0.1
|
Powerbar source that deals a powerbar to scattered bars of a track once, at construction. More...
#include <gamepowerbarmgr.h>


Classes | |
| struct | Bar |
| One bar's entry in mBars. More... | |
Public Member Functions | |
| GamePowerbarMgr (PlayMap *pMap, PhraseDatabase *pDatabase, const TrackData *pTrackData, int bRandomKind, int nTrack, int bMultiplayer, int nMinGap, int nMaxGap) | |
| Size mBars to the last step of the play map and deal the powerbars. | |
| virtual int | GetPowerbar (int nBar) |
| 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. | |
Powerbar source that deals a powerbar to scattered bars of a track once, at construction.
It has PowerbarMgr as its one base. Its table is at 0x007e3878. The allocations in PhraseMgr's routine at 0x001ba3d8 measure the object at 0x40 bytes for both subclasses. SoloPowerbarMgr and MultiPowerbarMgr differ only in the constant arguments their constructors pass here.
The deleting destructor at 0x001c6090 is implicitly declared.
| GamePowerbarMgr::GamePowerbarMgr | ( | PlayMap * | pMap, |
| PhraseDatabase * | pDatabase, | ||
| const TrackData * | pTrackData, | ||
| int | bRandomKind, | ||
| int | nTrack, | ||
| int | bMultiplayer, | ||
| int | nMinGap, | ||
| int | nMaxGap ) |
Size mBars to the last step of the play map and deal the powerbars.
Every draw comes from the R250 generator through RandomInt() and RandomFloat(). Starting at a bar drawn from [0, 10), the constructor visits bars at gaps drawn from [nMinGap, nMaxGap). A visited bar that has gems and whose next bar is not a step start gets a powerbar. With bRandomKind set the powerbar is 3 or 12 with even odds. Otherwise the bar's position through the track selects a row of the weighted table at 0x0068c790, and a second draw selects the powerbar within that row.
| pMap | The play map. |
| pDatabase | The phrase database of the track. |
| pTrackData | The track description. |
| bRandomKind | Non-zero to choose between the two powerbars with even odds. |
| nTrack | The track's index. |
| bMultiplayer | Stored in mMultiplayer. SoloPowerbarMgr passes 0 and MultiPowerbarMgr 1. |
| nMinGap | The shortest gap between two dealt bars. |
| nMaxGap | The gap the draw stops below. |
|
virtual |
| nBar | The bar. |
Implements PowerbarMgr.