wavelength 1.0.0
Loading...
Searching...
No Matches
MultiMuse Class Reference

Muse that plays other muses, each at a tick of its own. More...

#include <multimuse.h>

Inheritance diagram for MultiMuse:
Collaboration diagram for MultiMuse:

Classes

struct  TimedMuse
 One muse of the sequence and its tick. More...
class  MultiMuseCmd
 Command that starts the muses of the next tick of a sequence. More...

Public Member Functions

 MultiMuse (int nStopPrevious)
 Construct an empty sequence.
 ~MultiMuse () override
 Stop the sequence and release the muses.
void Play (Scheduler *pScheduler) override
 Play from the start.
void PlayFrom (Scheduler *pScheduler, int nOffset) override
 Play from a tick of the sequence to its end.
void PlayWindow (Scheduler *pScheduler, int nStart, int nEnd) override
 Play the part of the sequence in a window of ticks.
bool IsPlaying () override
 Report whether the sequence plays.
int GetLength () override
 Report the length of the sequence.
void Stop () override
 Withdraw the queued command and stop every muse.
Muse * Clone () override
 Produce a copy of the sequence and of each muse on the heap.
void SetNoteCB (NoteCB *pNoteCB) override
 Set the receiver of the notes of every muse of the sequence.
void Add (Muse *pMuse, int nTick)
 Insert a muse at a tick, after the muses of the same tick.
Public Member Functions inherited from Muse
 ~Muse () override
 Release the muse.
Public Member Functions inherited from Attachment
 Attachment ()
 Construct an object with no reference.
virtual ~Attachment ()
 Release the object.
void AddRef ()
 Take one reference.
void Release ()
 Give back one reference and delete the object once the last one is gone.

Static Public Member Functions

static void * operator new (size_t nSize)
 Allocate a sequence from the pool.
static void operator delete (void *pBlock)
 Return a sequence to the pool.
Static Public Member Functions inherited from Attachment
static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.

Detailed Description

Muse that plays other muses, each at a tick of its own.

The RTTI includes the class name and records Muse as the base, and the nested MultiMuse::MultiMuseCmd and MultiMuse::TimedMuse. The allocations come from the pool of fixed-size blocks, billed to the tag "MultiMuse". The muses are kept in tick order. While the sequence plays, a command starts the muses of each tick in turn.

Constructor & Destructor Documentation

◆ MultiMuse()

MultiMuse::MultiMuse ( int nStopPrevious)
explicit

Construct an empty sequence.

Parameters
nStopPreviousNon-zero to stop the muses of a tick when the next tick starts.
Ghidra address:
NTSC-U/C: 0x0015a008
Ghidra address:
PAL: 0x0015b7f8

◆ ~MultiMuse()

MultiMuse::~MultiMuse ( )
override

Stop the sequence and release the muses.

Ghidra address:
NTSC-U/C: 0x0015a100
Ghidra address:
PAL: 0x0015b8f0

Member Function Documentation

◆ operator new()

void * MultiMuse::operator new ( size_t nSize)
inlinestatic

Allocate a sequence from the pool.

Parameters
nSizeThe object size.
Returns
The block.

◆ operator delete()

void MultiMuse::operator delete ( void * pBlock)
inlinestatic

Return a sequence to the pool.

Parameters
pBlockThe block.

◆ Play()

void MultiMuse::Play ( Scheduler * pScheduler)
overridevirtual

Play from the start.

Parameters
pSchedulerThe scheduler that plays the muses.
Ghidra address:
NTSC-U/C: 0x0015a198
Ghidra address:
PAL: 0x0015b988

Implements Muse.

◆ PlayFrom()

void MultiMuse::PlayFrom ( Scheduler * pScheduler,
int nOffset )
overridevirtual

Play from a tick of the sequence to its end.

Parameters
pSchedulerThe scheduler that plays the muses.
nOffsetThe tick to start from.
Ghidra address:
NTSC-U/C: 0x0015a1c8
Ghidra address:
PAL: 0x0015b9b8

Implements Muse.

◆ PlayWindow()

void MultiMuse::PlayWindow ( Scheduler * pScheduler,
int nStart,
int nEnd )
overridevirtual

Play the part of the sequence in a window of ticks.

The muses that start at or before the window start at once, from the matching place.

Parameters
pSchedulerThe scheduler that plays the muses.
nStartThe first tick of the window.
nEndThe tick after the window.
Ghidra address:
NTSC-U/C: 0x0015a1f8
Ghidra address:
PAL: 0x0015b9e8

Implements Muse.

◆ IsPlaying()

bool MultiMuse::IsPlaying ( )
overridevirtual

Report whether the sequence plays.

Returns
Whether muses wait to start or a started muse plays.
Ghidra address:
NTSC-U/C: 0x0015a378
Ghidra address:
PAL: 0x0015bb68

Implements Muse.

◆ GetLength()

int MultiMuse::GetLength ( )
overridevirtual

Report the length of the sequence.

Returns
The tick at which the last muse ends.
Ghidra address:
NTSC-U/C: 0x0015a3f8
Ghidra address:
PAL: 0x0015bbe8

Implements Muse.

◆ Stop()

void MultiMuse::Stop ( )
overridevirtual

Withdraw the queued command and stop every muse.

Ghidra address:
NTSC-U/C: 0x0015a560
Ghidra address:
PAL: 0x0015bd50

Implements Muse.

◆ Clone()

Muse * MultiMuse::Clone ( )
overridevirtual

Produce a copy of the sequence and of each muse on the heap.

Returns
The copy, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015a618
Ghidra address:
PAL: 0x0015be08

Implements Muse.

◆ SetNoteCB()

void MultiMuse::SetNoteCB ( NoteCB * pNoteCB)
overridevirtual

Set the receiver of the notes of every muse of the sequence.

Parameters
pNoteCBThe receiver, or null.
Ghidra address:
NTSC-U/C: 0x0015a6d8
Ghidra address:
PAL: 0x0015bec8

Implements Muse.

◆ Add()

void MultiMuse::Add ( Muse * pMuse,
int nTick )

Insert a muse at a tick, after the muses of the same tick.

A muse added to a playing sequence ahead of the next muse to start is scheduled.

Parameters
pMuseThe muse. The sequence takes a reference.
nTickThe tick.
Ghidra address:
NTSC-U/C: 0x0015a760
Ghidra address:
PAL: 0x0015bf50

The documentation for this class was generated from the following file: