resonance 1.0.1
Loading...
Searching...
No Matches
GamerCmd Class Reference

Scheduler command that runs a gamer's per-bar update. More...

#include <gamercmd.h>

Inheritance diagram for GamerCmd:
Collaboration diagram for GamerCmd:

Public Member Functions

 GamerCmd (Gamer *pGamer, int nBar)
 Prepare the update of one bar.
virtual int CmdID ()
 Report the identifier this class streams itself under.
virtual void Execute ()
 Run Gamer::OnBar() for the bar.
virtual void Print (std::ostream &stream)
 Write this command's description to stream.
Public Member Functions inherited from Sch::Command
 Command ()
 Construct a command that the scheduler has not queued.
virtual ~Command ()
 Release the command.
virtual void saveGuts (OBStream &stream) const
 Write this command's payload.
virtual void restoreGuts (IBStream &stream)
 Read this command's payload back.
Public Member Functions inherited from Attachment
 Attachment ()
virtual ~Attachment ()
int Release ()
 Give back one reference and destroy the object once the last one is gone.
virtual void Destroy ()
 Destroy the object.

Additional Inherited Members

Static Public Member Functions inherited from Sch::Command
static Command * NewCommand (int nCmdID)
 Produce a command of the identified class through the factory list.
Static Public Member Functions inherited from Attachment
static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.
Public Attributes inherited from Sch::Command
int mQueued
 Non-zero while the command sits in the scheduler's queue.
Public Attributes inherited from Attachment
int mRefs

Detailed Description

Scheduler command that runs a gamer's per-bar update.

The class has its own type-info accessor at 0x00116b70. The name is inferred from what Execute() does. Print() writes the literal {Gamer} at 0x007ce588.

Its table at 0x007ce600 has eight entries. This class supplies slots 3, 4, and 5, and inherits the rest, slot 1 being the Sch::Command destructor at 0x00116b48 and the last two being Sch::Command::saveGuts at 0x00539f20 and restoreGuts at 0x00539f28, which is what identifies the base.

Sch::Command is 0x0c bytes, so this class's own two members start at +0x0c.

CmdID() reports the word at 0x00669cb8, which is zero, and Sch::Command documents a zero result as marking the command unstreamable. So this command is never saved or loaded despite inheriting both routines.

Constructor & Destructor Documentation

◆ GamerCmd()

GamerCmd::GamerCmd ( Gamer * pGamer,
int nBar )
inline

Prepare the update of one bar.

Inline. Gamer::ScheduleBar() expands it after allocating the command at 0x001128f8.

Parameters
pGamerThe gamer to update.
nBarThe bar.

Member Function Documentation

◆ CmdID()

virtual int GamerCmd::CmdID ( )
virtual

Report the identifier this class streams itself under.

Returns
The word at 0x00669cb8, which is zero.
Ghidra address:
NTSC-U/C: 0x00116bc0
Ghidra address:
PAL: 0x00117078

Implements Sch::Command.

◆ Execute()

virtual void GamerCmd::Execute ( )
virtual

Run Gamer::OnBar() for the bar.

Ghidra address:
NTSC-U/C: 0x00116bd0
Ghidra address:
PAL: 0x00117088

Implements Sch::Command.

◆ Print()

virtual void GamerCmd::Print ( std::ostream & stream)
virtual

Write this command's description to stream.

Writes the single literal {Gamer} and nothing else.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x00116bf0
Ghidra address:
PAL: 0x001170a8

Reimplemented from Sch::Command.


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