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

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

#include <localplayercmd.h>

Inheritance diagram for LocalPlayerCmd:
Collaboration diagram for LocalPlayerCmd:

Public Member Functions

 LocalPlayerCmd (LocalPlayer *pPlayer, int nTick)
 Prepare the update of one bar.
virtual ~LocalPlayerCmd ()
virtual int CmdID ()
 Report sCmdID.
virtual void Execute ()
 Run LocalPlayer::OnBarTick() for the tick.
virtual void Print (std::ostream &stream)
 Write {LocalPlayerCmd}.
virtual void saveGuts (OBStream &stream) const
 Write nothing.
virtual void restoreGuts (IBStream &stream)
 Read nothing.
Public Member Functions inherited from Sch::Command
 Command ()
 Construct a command that the scheduler has not queued.
virtual ~Command ()
 Release the command.
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.

Static Public Attributes

static int sCmdID
 The class's command identifier, which the image initialises to zero.

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 local player's per-bar update.

LocalPlayerCmd is one of the five ordinary Sch::Command subclasses. Its table is at 0x007cff18 with eight entries, and it overrides saveGuts() and restoreGuts() with empty bodies of its own. LocalPlayer allocates the 0x14-byte object with the untagged allocator and expands the constructor, in LocalPlayer::AnnounceState() for the first bar and in LocalPlayer::OnBarTick() for every bar after.

Constructor & Destructor Documentation

◆ LocalPlayerCmd()

LocalPlayerCmd::LocalPlayerCmd ( LocalPlayer * pPlayer,
int nTick )
inline

Prepare the update of one bar.

Parameters
pPlayerThe player to update.
nTickThe song position the command runs at.

◆ ~LocalPlayerCmd()

virtual LocalPlayerCmd::~LocalPlayerCmd ( )
virtual
Ghidra address:
NTSC-U/C: 0x001227a8
Ghidra address:
PAL: 0x00122dc0

Member Function Documentation

◆ CmdID()

virtual int LocalPlayerCmd::CmdID ( )
virtual

Report sCmdID.

Returns
The class's command identifier.
Ghidra address:
NTSC-U/C: 0x00122840
Ghidra address:
PAL: 0x00122e58

Implements Sch::Command.

◆ Execute()

virtual void LocalPlayerCmd::Execute ( )
virtual

Run LocalPlayer::OnBarTick() for the tick.

Ghidra address:
NTSC-U/C: 0x00122820
Ghidra address:
PAL: 0x00122e38

Implements Sch::Command.

◆ Print()

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

Write {LocalPlayerCmd}.

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

Reimplemented from Sch::Command.

◆ saveGuts()

virtual void LocalPlayerCmd::saveGuts ( OBStream & stream) const
virtual

Write nothing.

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

Reimplemented from Sch::Command.

◆ restoreGuts()

virtual void LocalPlayerCmd::restoreGuts ( IBStream & stream)
virtual

Read nothing.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x00122858
Ghidra address:
PAL: 0x00122e70

Reimplemented from Sch::Command.

Member Data Documentation

◆ sCmdID

int LocalPlayerCmd::sCmdID
static

The class's command identifier, which the image initialises to zero.

Ghidra address:
NTSC-U/C: 0x0066c508
Ghidra address:
PAL: 0x006ad0d0

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