|
wavelength 1.0.0
|
Rules of one World, the base of the game, remix, and duel logic. More...
#include <worldlogic.h>


Public Member Functions | |
| WorldLogic () | |
| Construct the logic and give the input of every controller to the world. | |
| ~WorldLogic () override | |
| Release the logic. | |
| bool | DispatchPriv (Message *pMsg) override |
| Pass a JoypadConnectionMsg to OnJoypadConnection() and ignore any other message. | |
| virtual void | Start ()=0 |
| Start the song. | |
| virtual void | Stop ()=0 |
| Stop the song. | |
| virtual bool | IsFinished () const =0 |
| Report whether the song is over. | |
| virtual int | HasQuit () const =0 |
| Report whether a player quit the song. | |
| virtual int | IsRestartRequested () const =0 |
| Report whether the song is to start again once it ends. | |
| virtual bool | IsFreestyling (int nPlayer)=0 |
| Report whether a player plays the freestyle track. | |
| virtual int | GetTick ()=0 |
| Report the song position. | |
| virtual float | GetTime ()=0 |
| Report the song time. | |
| virtual void | Poll ()=0 |
| Advance the logic once per frame. | |
| virtual float | GetProgress ()=0 |
| Report how much of the song has been played. | |
| virtual void | HandleInput (const RotateEvent &event)=0 |
| Act on a rotation. | |
| virtual void | HandleInput (const PlayNoteEvent &event)=0 |
| Act on a played note. | |
| virtual void | HandleInput (const BtnEvent< 3 > &event)=0 |
| Act on a button event. | |
| virtual void | HandleInput (const BtnEvent< 4 > &event)=0 |
| Act on a button event. | |
| virtual void | HandleInput (const BtnEvent< 5 > &event)=0 |
| Act on a button event. | |
| virtual void | HandleInput (const ChangeSectionEvent &event)=0 |
| Act on a section change. | |
| virtual void | HandleInput (const BtnEvent< 9 > &event)=0 |
| Act on a button event. | |
| virtual void | HandleInput (const BtnEvent< 10 > &event)=0 |
| Act on a button event. | |
| virtual void | HandleInput (const BtnEvent< 8 > &event)=0 |
| Act on a button event. | |
| virtual void | HandleInput (const StickEvent< 2 > &event)=0 |
| Act on a stick event. | |
| virtual void | HandleInput (const StickEvent< 6 > &event)=0 |
| Act on a stick event. | |
| virtual void | SetPaused (bool bPaused, int nPad, int nReason) |
| Pause or resume the song. | |
| virtual bool | IsPlaying () const =0 |
| Report whether the song is playing. | |
| void | AllNotesOff () |
| Silence every synthesiser channel. | |
| void | ScheduleControllerCheck () |
| Pause the song again one tick from now when a controller is disconnected. | |
| int | OnJoypadConnection (JoypadConnectionMsg *pMsg) |
| Pause the playing song when the controller of a player is disconnected. | |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the pool heaps under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Return a sink to the pool heaps. | |
| virtual | ~MsgSink () |
| virtual bool | Dispatch (Message *pMsg) |
| Accept a message. | |
| void * | operator new (size_t size) |
| Allocate from the main heap under the name MsgSink. | |
| void | operator delete (void *mem) |
| Return memory to its heap. | |
| virtual | ~MsgSink () |
| Destroy the sink. | |
| virtual bool | Dispatch (Message *msg) |
| Handle a message. | |
Static Public Member Functions | |
| static int | FindDisconnectedPad () |
| Find the controller of a player on this console that is disconnected. | |
Rules of one World, the base of the game, remix, and duel logic.
The RTTI records the class as deriving from MsgSink. Every handler from Start() through IsPlaying() is pure in this class except SetPaused(). The world's input commands pass each controller event to the HandleInput() overload for its type. Only the members the derived logics here use are declared.
| WorldLogic::WorldLogic | ( | ) |
Construct the logic and give the input of every controller to the world.
|
override |
Release the logic.
|
overridevirtual |
Pass a JoypadConnectionMsg to OnJoypadConnection() and ignore any other message.
The PAL build also passes a KeyboardKeyMsg to OnKeyboardKey().
| pMsg | The message. |
Implements MsgSink.
|
pure virtual |
Start the song.
Implemented in DuelLogic, GameLogic, and RemixLogic.
|
pure virtual |
Stop the song.
Implemented in DuelLogic, GameLogic, and RemixLogic.
|
pure virtual |
Report whether the song is over.
Implemented in DuelLogic, GameLogic, and RemixLogic.
|
pure virtual |
Report whether a player quit the song.
Implemented in DuelLogic, GameLogic, and RemixLogic.
|
pure virtual |
Report whether the song is to start again once it ends.
World::IsRestartRequested() returns the value.
Implemented in DuelLogic, GameLogic, and RemixLogic.
|
pure virtual |
Report whether a player plays the freestyle track.
| nPlayer | The player index. |
Implemented in DuelLogic, GameLogic, and RemixLogic.
|
pure virtual |
Report the song position.
Implemented in DuelLogic, MultiGameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Report the song time.
Implemented in DuelLogic, MultiGameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Advance the logic once per frame.
Implemented in DuelLogic, GameLogic, RemixLogic, and TutorialGameLogic.
|
pure virtual |
Report how much of the song has been played.
Implemented in DuelLogic, GameLogic, RemixLogic, and TutorialGameLogic.
|
pure virtual |
Act on a rotation.
| event | The event. |
Implemented in DuelLogic, GameLogic, MultiGameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a played note.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a button event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a button event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a button event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a section change.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a button event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a button event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a button event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a stick event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Act on a stick event.
| event | The event. |
Implemented in DuelLogic, GameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
virtual |
Pause or resume the song.
The base body acts only on a resume, which calls ScheduleControllerCheck().
| bPaused | Pause the song. |
| nPad | The controller that paused the song, or -1. |
| nReason | Non-zero when a disconnected controller paused the song. |
Reimplemented in DuelLogic, GameLogic, MultiGameLogic, RemixLogic, SoloGameLogic, and TutorialGameLogic.
|
pure virtual |
Report whether the song is playing.
Implemented in DuelLogic, GameLogic, and RemixLogic.
| void WorldLogic::AllNotesOff | ( | ) |
Silence every synthesiser channel.
| void WorldLogic::ScheduleControllerCheck | ( | ) |
Pause the song again one tick from now when a controller is disconnected.
The pause passes the controller FindDisconnectedPad() found and a non-zero reason to SetPaused(). The name is inferred.
|
static |
Find the controller of a player on this console that is disconnected.
A demo has none. The name is inferred.
| int WorldLogic::OnJoypadConnection | ( | JoypadConnectionMsg * | pMsg | ) |
Pause the playing song when the controller of a player is disconnected.
A demo does not pause. The name is inferred.
| pMsg | The message. |