|
resonance 1.0.1
|
Gem event a GemPacket reports. More...
#include <gem.h>

Public Member Functions | |
| void | saveGuts (OBStream &stream) const |
| Write the five values to a stream. | |
| void | restoreGuts (IBStream &stream) |
| Read the five values back from a stream. | |
| void | Print (std::ostream &stream) const |
| Write the five values to a diagnostic stream. | |
Public Attributes | |
| int | mGem |
| int | mTrans |
| int | mBar |
| Sch::Tick | mLoc |
| Player * | mPlayer |
Gem event a GemPacket reports.
The five members form a subobject of GemPacket at +0x14, because the three routines below receive packet + 0x14 as their object and address it from zero. The class has no descriptor, allocation tag, or literal. Its name comes from the debugging symbols of the North American demo release. The demo's saveGuts() and Print() have the same instructions as this class's saveGuts() and Print(). The name of each member is attested, from the label Print() writes ahead of it.
Every member is public, because the three routines are the only code in the image that refers to the subobject and no accessor exists.
| void Gem::saveGuts | ( | OBStream & | stream | ) | const |
Write the five values to a stream.
The player arrives on the wire as its identifier rather than as a pointer, and the value written is mPlayer->mPlayerId.
| stream | The stream to write to. |
| void Gem::restoreGuts | ( | IBStream & | stream | ) |
Read the five values back from a stream.
Reads mGem, mTrans, and mBar, calls Sch::Tick::restoreGuts() for mLoc, and reads the identifier into a local IDablePtr<Player>. Resolving it differs from IDablePtr's own conversion in one respect. An identifier of -1 yields a null pointer here, while the conversion the packets' Print() bodies expand would index the table at -1. The other two cases agree: kIDableUnregistered yields NullPlayer::sInstance and any other value indexes the IDable<Player> table.
| stream | The stream to read from. |
| void Gem::Print | ( | std::ostream & | stream | ) | const |
Write the five values to a diagnostic stream.
| stream | The stream to write to. |
| int Gem::mGem |
Labelled gem: . +0x00
| int Gem::mTrans |
Labelled trans:. +0x04
| int Gem::mBar |
Labelled bar:. +0x08
| Sch::Tick Gem::mLoc |
Labelled loc:. +0x0c
| Player* Gem::mPlayer |
Labelled pid:, written as its identifier. +0x10