|
resonance 1.0.1
|
Event the game passes between a MsgSource and a MsgSink. More...
#include <multimusemsg.h>


Public Member Functions | |
| MultiMuseMsg (MultiMuse *pMuse) | |
| MultiMuseMsg (const MultiMuseMsg &other) | |
| virtual | ~MultiMuseMsg () |
| virtual Message * | Clone () |
| Produce a heap copy of this message. | |
| virtual int | Type () |
| Report this message's registered identity. | |
| virtual const char * | GetName () const |
| Report this message's class name. | |
| virtual void | PrintExtra (std::ostream &stream) const |
| Write the message to a diagnostic stream. | |
| virtual void | saveGuts (OBStream &stream) const |
| Write the sequence to an output stream. | |
| virtual void | restoreGuts (IBStream &stream) |
| Read the sequence back from an input stream. | |
| Public Member Functions inherited from MuseMsg | |
| MuseMsg () | |
| Start the song position at kTickInfinity. | |
| MuseMsg (int nTick) | |
| Start the song position at a tick. | |
| MuseMsg * | CloneAndShift (int nTick) |
| Copy this message and move the copy to a song position. | |
| Public Member Functions inherited from Message | |
| void * | operator new (size_t nSize) |
| Allocate a message from the tagged heap under the tag MSG. | |
| void | operator delete (void *pBlock) |
| Release a message to the tagged heap under the tag MSG. | |
| virtual | ~Message () |
| Vtable slot 1. | |
| std::ostream & | Print (std::ostream &stream) const |
| Write this message to a diagnostic stream as {GetName() PrintExtra()}. | |
Static Public Member Functions | |
| static Message * | New () |
| Produce a message with no sequence. | |
| Static Public Member Functions inherited from Message | |
| static Message * | NewMessage (int nType) |
| Produce a message of the identified class through the factory list. | |
Public Attributes | |
| MultiMuse * | mMuse |
| The sequence. | |
| Public Attributes inherited from MuseMsg | |
| int | mTick |
| The song position, in MIDI ticks. | |
Event the game passes between a MsgSource and a MsgSink.
Its RTTI descriptor is at 0x008eec98. It has MuseMsg as its one base. The object is 0xc bytes and its vtable is at 0x00812df8. Clone() delegates to the copy constructor at 0x003e38a8 rather than copying inline.
The word at +0x08 is what settles MuseMsg's payload. This class copies a word there while NoteMsg and StdMidiMsg copy bytes, and a single word store cannot straddle a base and a derived class in a member-wise copy, so +0x08 belongs to each derived class rather than to MuseMsg.
That word is a MultiMuse, and the class is how a sequence of timed messages moves between a MsgSource and a MsgSink. The copy constructor at 0x003e38a8 retains it, the destructor releases it, PrintExtra() writes it through MultiMuse::Print(), saveGuts() writes it through MultiMuse::SaveFields(), and restoreGuts() replaces it with a freshly allocated sequence.
PrintExtra() also settles MuseMsg's own member. It copies that word into a temporary and writes the temporary through Sch::Tick::Print(), so MuseMsg's payload is a song position. Both this class and StdMidiMsg initialise it to 0x2aaaaaab, which Sch::Tick documents as inside its positive infinity range.
| MultiMuseMsg::MultiMuseMsg | ( | MultiMuse * | pMuse | ) |
| pMuse | The sequence, retained when it is not null. It is stored either way. |
| MultiMuseMsg::MultiMuseMsg | ( | const MultiMuseMsg & | other | ) |
| other | The message to copy. |
|
virtual |
|
static |
Produce a message with no sequence.
New() takes 0xc bytes against the tag MultiMuseMsg and calls this with a null sequence, and the registration table at 0x003d9818 records it as this class's factory.
|
virtual |
Produce a heap copy of this message.
Implements Message.
|
virtual |
Report this message's registered identity.
Implements Message.
|
virtual |
Report this message's class name.
Implements Message.
|
virtual |
Write the message to a diagnostic stream.
Writes the inherited song position, a literal, and then the sequence.
| stream | The stream to write to. |
Reimplemented from Message.
|
virtual |
Write the sequence to an output stream.
The inherited song position is not written.
| stream | The stream to write to. |
Reimplemented from Message.
|
virtual |
Read the sequence back from an input stream.
Allocates a fresh MultiMuse with one reference and reads into it. Whatever sequence the message already stored is replaced without being released, which is faithful and leaks that sequence when the message already had one.
| stream | The stream to read from. |
Reimplemented from Message.
| MultiMuse* MultiMuseMsg::mMuse |
The sequence.
+0x08
Public because PitchPicker::OnMsg() at 0x001c2c84 reads it directly with no accessor in the image.