68 void *
operator new(
size_t nSize) {
69 return PoolMemAlloc(
static_cast<int>(nSize),
"CapturePacket", 0);
77 void operator delete(
void *pBlock) {
111 return "CapturePacket";
int g_nCapturePacketType
Identity that CapturePacket::Type() reports.
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
CapturePacket()
Construct a packet with no track and no bar.
Definition capturepacket.h:35
const char * GetName() const override
Report this packet's class name.
Definition capturepacket.h:110
void saveGuts(BinStream &stream) const override
Write the fields packed into one half-word.
~CapturePacket() override=default
Destroy the object.
int GetValid() const
Definition capturepacket.h:148
static Message * New()
Produce a default-constructed packet on the heap.
void SetValid(int nValid)
Definition capturepacket.h:153
int GetTrack() const
Definition capturepacket.h:143
Message * Clone() override
Produce a heap copy of this packet.
Definition capturepacket.h:88
void restoreGuts(BinStream &stream) override
Read the half-word saveGuts() writes back into the fields.
int GetBar() const
Definition capturepacket.h:138
int GetAutocatch() const
Definition capturepacket.h:133
int Type() override
Report this packet's registered identity.
Definition capturepacket.h:99
CapturePacket(int nTrack, int nBar, bool bAutocatch)
Construct a packet with every field set.
Definition capturepacket.h:48
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
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.