wavelength 1.0.0
Loading...
Searching...
No Matches
multiplierpacket.h
Go to the documentation of this file.
1#pragma once
2
4#include "os/mem.h"
5
13
21public:
28 ~MultiplierPacket() override = default;
29
37 static Message *New();
38
45 void *operator new(size_t nSize) {
46 return PoolMemAlloc(static_cast<int>(nSize), "MultiplierPacket", 0);
47 }
48
54 void operator delete(void *pBlock) {
55 PoolMemFree(pBlock);
56 }
57
65 Message *Clone() override {
66 return new MultiplierPacket(*this);
67 }
68
76 int Type() override {
78 }
79
87 const char *GetName() const override {
88 return "MultiplierPacket";
89 }
90};
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
Packet that announces a player's multiplier power-up to the other consoles.
Definition multiplierpacket.h:20
~MultiplierPacket() override=default
Destroy the object.
int Type() override
Report this packet's registered identity.
Definition multiplierpacket.h:76
static Message * New()
Produce a default-constructed packet on the heap.
const char * GetName() const override
Report this packet's class name.
Definition multiplierpacket.h:87
Message * Clone() override
Produce a heap copy of this packet.
Definition multiplierpacket.h:65
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_nMultiplierPacketType
Identity that MultiplierPacket::Type() reports.