53 void *
operator new(
size_t nSize) {
54 return PoolMemAlloc(
static_cast<int>(nSize),
"PreviewPacket", 0);
62 void operator delete(
void *pBlock) {
96 return "PreviewPacket";
126 mPreviewing = nPreviewing;
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
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 Type() override
Report this packet's registered identity.
Definition previewpacket.h:84
void saveGuts(BinStream &stream) const override
Write the fields packed into one word.
void SetSection(int nSection)
Definition previewpacket.h:135
Message * Clone() override
Produce a heap copy of this packet.
Definition previewpacket.h:73
PreviewPacket()
Construct a packet with no section.
Definition previewpacket.h:35
const char * GetName() const override
Report this packet's class name.
Definition previewpacket.h:95
int GetSection() const
Definition previewpacket.h:130
void restoreGuts(BinStream &stream) override
Read the word saveGuts() writes back into the fields.
void SetPreviewing(int nPreviewing)
Definition previewpacket.h:125
~PreviewPacket() override=default
Destroy the object.
int GetPreviewing() const
Definition previewpacket.h:120
static Message * New()
Produce a default-constructed packet on the heap.
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.
int g_nPreviewPacketType
Identity that PreviewPacket::Type() reports.