69 void *
operator new(
size_t nSize) {
70 return PoolMemAlloc(
static_cast<int>(nSize),
"EditGemPacket", 0);
78 void operator delete(
void *pBlock) {
112 return "EditGemPacket";
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
~EditGemPacket() override=default
Destroy the object.
int GetRepeat() const
Definition editgempacket.h:136
int GetTrack() const
Definition editgempacket.h:151
EditGemPacket(int nTrack, int nSlot, int nTick, bool bRepeat)
Construct a packet for a gem placed or removed.
Definition editgempacket.h:49
EditGemPacket()
Construct a packet with no track and no gem.
Definition editgempacket.h:35
int GetTick() const
Definition editgempacket.h:146
int Type() override
Report this packet's registered identity.
Definition editgempacket.h:100
const char * GetName() const override
Report this packet's class name.
Definition editgempacket.h:111
int GetSlot() const
Definition editgempacket.h:141
Message * Clone() override
Produce a heap copy of this packet.
Definition editgempacket.h:89
void restoreGuts(BinStream &stream) override
Read the word saveGuts() writes back into the fields.
void saveGuts(BinStream &stream) const override
Write the fields packed into one word.
static Message * New()
Produce a default-constructed packet on the heap.
ExternalPacket(unsigned char nFlags=0, int nReceiver=kAllPeers)
Construct a packet from an unset sender.
Definition externalpacket.h:21
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
int g_nEditGemPacketType
Identity that EditGemPacket::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.