resonance 1.0.1
Loading...
Searching...
No Matches
globals.h
Go to the documentation of this file.
1#pragma once
2
4class GrooveWorld;
6class LevelData;
7class MainLoop;
8class MetaGameWorld;
9class PlayMap;
10class Ps2HardSynth;
11class ScriptSink;
12
13namespace Sch {
14class Scheduler;
15class TickClock;
16class TimeClock;
17} // namespace Sch
18
20constexpr int kLogBufferSize = 0x19000;
21
47class Globals {
48public:
59
64 virtual ~Globals();
65
71 virtual int Run() = 0;
72
78 virtual int ExitInstance() = 0;
79
86 void Init();
87
98 void Shutdown();
99
107
115
116#ifdef VIDEO_STANDARD_PAL
124 void StopMainLoop();
125#endif
126
133
140
147
154
161
168
180
191
203
214
223
232
243
254
263
274
285 int GetTempo();
286
287private:
288 GameManagerImpl *mGameManager; // +0x00
289 MainLoop *mMainLoop; // +0x04
290 Ps2HardSynth *mSynth; // +0x08
291 Sch::Scheduler *mWatchdog; // +0x0c
292 Sch::TimeClock *mWatchdogTimer; // +0x10
293 ScriptSink *mScriptSink; // +0x14
294 IOBPreallocMemStream *mLog; // +0x18
295};
296
303extern char g_abLogBuffer[kLogBufferSize];
Owner of the running game.
Definition gamemanagerimpl.h:111
Sch::TimeClock * GetWatchdogTimer()
Sch::Scheduler * GetWatchdog()
Sch::TickClock * GetSongClock()
Report the song clock of the game manager's world.
int GetPlayMode()
Report the game manager's play mode.
Globals()
Clear the service pointers.
int GetTempo()
Report the tempo of the song clock's tempo map.
MetaGameWorld * GetMetaWorld()
Report the game manager's front-end world.
virtual int Run()=0
Run the game until it exits.
LevelData * GetLevel()
Report the world's level.
void CreateSynth()
Create the hardware synth.
int GetUnwrittenValue()
Forward GameManagerImpl::GetUnwrittenValue().
int GetGameMode()
Report the game manager's game mode.
ScriptSink * GetScriptSink()
void Init()
Create every process-wide service.
IOBPreallocMemStream * GetResetLog()
Rewind the shared log stream and report it.
void RunMainLoop()
Drive the main loop until it stops.
Ps2HardSynth * GetSynth()
GameManagerImpl * GetGameManager()
virtual int ExitInstance()=0
Tear the game down as it exits.
IOBPreallocMemStream * GetLog()
int IsJukeboxMode()
Report whether the session is a jukebox session.
virtual ~Globals()
GrooveWorld * GetWorld()
Report the game manager's world.
PlayMap * GetPlayMap()
Report the play map of the world's level.
void Shutdown()
Destroy every process-wide service.
Owner of the world a game session runs in.
Definition grooveworld.h:66
Bidirectional stream over a caller-supplied byte buffer.
Definition iobpreallocmemstream.h:32
Read-only interface the game reads one converted level through.
Definition leveldata.h:27
The game's frame loop.
Definition mainloop.h:32
Owner of the front-end world, outside a game session.
Definition metagameworld.h:26
Traversal order over one playable sequence.
Definition playmap.h:47
The game's hardware synthesiser.
Definition ps2hardsynth.h:25
Scheduler that runs queued commands when their due time arrives.
Definition scheduler.h:45
Pausable view of scheduler time, together with the tempo that maps it to a song position.
Definition tickclock.h:40
Time base a scheduler measures its due times against, and the base class of Sch::TickClock.
Definition timeclock.h:23
Message sink that runs the script text a message supplies.
Definition scriptsink.h:27
char g_abLogBuffer[kLogBufferSize]
Buffer that Globals opens its log stream over.
constexpr int kLogBufferSize
Size of the buffer that Globals opens its log stream over.
Definition globals.h:20
Scheduling of timed commands.
Definition activefilter.h:9