53 void *
operator new(
size_t nSize) {
54 return PoolMemAlloc(
static_cast<int>(nSize),
"FXPacket", 0);
62 void operator delete(
void *pBlock) {
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
ExternalPacket(unsigned char nFlags=0, int nReceiver=kAllPeers)
Construct a packet from an unset sender.
Definition externalpacket.h:21
Message * Clone() override
Produce a heap copy of this packet.
Definition fxpacket.h:73
static Message * New()
Produce a default-constructed packet on the heap.
int GetOn() const
Definition fxpacket.h:130
void SetType(int nType)
Definition fxpacket.h:165
void PrintExtra(PrnStream &stream) const override
Write the section, the track, the effect, and the switch to a diagnostic stream.
int GetType() const
Definition fxpacket.h:160
int Type() override
Report this packet's registered identity.
Definition fxpacket.h:84
void SetTrack(int nTrack)
Definition fxpacket.h:155
const char * GetName() const override
Report this packet's class name.
Definition fxpacket.h:95
void SetSection(int nSection)
Definition fxpacket.h:145
int GetTrack() const
Definition fxpacket.h:150
int GetSection() const
Definition fxpacket.h:140
void SetOn(int nOn)
Definition fxpacket.h:135
void restoreGuts(BinStream &stream) override
Read the two bytes saveGuts() writes back into the fields.
void saveGuts(BinStream &stream) const override
Write the payload packed into two bytes.
FXPacket()
Construct a packet with no section and no track.
Definition fxpacket.h:35
~FXPacket() override=default
Destroy the object.
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
static constexpr unsigned char kFlagGuaranteed
Bit of mFlags that NetTransport::Send() turns into its guaranteed delivery bit.
Definition packet.h:28
Text output stream.
Definition prnstream.h:16
int g_nFXPacketType
Identity that FXPacket::Type() reports.
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.