ddnet/src/game/server/eventhandler.h
Chairn a69dc599a9 Huge variable naming format
Fix pointer and pointer array variable naming

Huge renaming to match our rules

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[
            (?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[

Further format static variables

Format almost all pointer names accordingly

Used regex: (?!(return)\b)\b\w+
\*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p]

clang-format

Fix CI fail

Fix misnamed non pointer as pointer and non array as array

Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b
            (?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[]

clang-format

Revert to SCREAMING_SNAKE_CASE and reinstate dead code
2022-07-08 18:01:29 +02:00

40 lines
947 B
C++

/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_SERVER_EVENTHANDLER_H
#define GAME_SERVER_EVENTHANDLER_H
#include <stdint.h>
class CEventHandler
{
enum
{
MAX_EVENTS = 128,
MAX_DATASIZE = 128 * 64,
};
int m_aTypes[MAX_EVENTS]; // TODO: remove some of these arrays
int m_aOffsets[MAX_EVENTS];
int m_aSizes[MAX_EVENTS];
int64_t m_aClientMasks[MAX_EVENTS];
char m_aData[MAX_DATASIZE];
class CGameContext *m_pGameServer;
int m_CurrentOffset;
int m_NumEvents;
public:
CGameContext *GameServer() const { return m_pGameServer; }
void SetGameServer(CGameContext *pGameServer);
CEventHandler();
void *Create(int Type, int Size, int64_t Mask = -1LL);
void Clear();
void Snap(int SnappingClient);
void EventToSixup(int *pType, int *pSize, const char **ppData);
};
#endif