From b1830dccae8972c158455fc2bd8f328e78c49fc2 Mon Sep 17 00:00:00 2001 From: Jordan Cristiano Date: Sun, 14 Jun 2015 17:23:09 -0400 Subject: [PATCH] Added demo message handling functions --- demboyz/demmessages/dem_consolecmd.cpp | 31 ++++++ demboyz/demmessages/dem_consolecmd.h | 16 +++ demboyz/demmessages/dem_datatables.cpp | 28 +++++ demboyz/demmessages/dem_datatables.h | 16 +++ demboyz/demmessages/dem_packet.cpp | 32 ++++++ demboyz/demmessages/dem_packet.h | 20 ++++ demboyz/demmessages/dem_stop.cpp | 25 +++++ demboyz/demmessages/dem_stop.h | 13 +++ demboyz/demmessages/dem_stringtables.cpp | 136 +++++++++++++++++++++++ demboyz/demmessages/dem_stringtables.h | 33 ++++++ demboyz/demmessages/dem_synctick.cpp | 25 +++++ demboyz/demmessages/dem_synctick.h | 13 +++ demboyz/demmessages/dem_unknown.cpp | 25 +++++ demboyz/demmessages/dem_unknown.h | 13 +++ demboyz/demmessages/dem_usercmd.cpp | 28 +++++ demboyz/demmessages/dem_usercmd.h | 17 +++ demboyz/demmessages/demhandlers.cpp | 45 ++++++++ demboyz/demmessages/demhandlers.h | 42 +++++++ demboyz/demmessages/demmessages.h | 14 +++ 19 files changed, 572 insertions(+) create mode 100644 demboyz/demmessages/dem_consolecmd.cpp create mode 100644 demboyz/demmessages/dem_consolecmd.h create mode 100644 demboyz/demmessages/dem_datatables.cpp create mode 100644 demboyz/demmessages/dem_datatables.h create mode 100644 demboyz/demmessages/dem_packet.cpp create mode 100644 demboyz/demmessages/dem_packet.h create mode 100644 demboyz/demmessages/dem_stop.cpp create mode 100644 demboyz/demmessages/dem_stop.h create mode 100644 demboyz/demmessages/dem_stringtables.cpp create mode 100644 demboyz/demmessages/dem_stringtables.h create mode 100644 demboyz/demmessages/dem_synctick.cpp create mode 100644 demboyz/demmessages/dem_synctick.h create mode 100644 demboyz/demmessages/dem_unknown.cpp create mode 100644 demboyz/demmessages/dem_unknown.h create mode 100644 demboyz/demmessages/dem_usercmd.cpp create mode 100644 demboyz/demmessages/dem_usercmd.h create mode 100644 demboyz/demmessages/demhandlers.cpp create mode 100644 demboyz/demmessages/demhandlers.h create mode 100644 demboyz/demmessages/demmessages.h diff --git a/demboyz/demmessages/dem_consolecmd.cpp b/demboyz/demmessages/dem_consolecmd.cpp new file mode 100644 index 0000000..2ce8d25 --- /dev/null +++ b/demboyz/demmessages/dem_consolecmd.cpp @@ -0,0 +1,31 @@ + +#include "dem_consolecmd.h" +#include "demofile/demofile.h" + +namespace DemHandlers +{ + bool Dem_ConsoleCmd_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_ConsoleCmd* data) + { + char command[DemMsg::Dem_ConsoleCmd::COMMAND_MAX_LENGTH]; + demofile.ReadRawData(reinterpret_cast(command), sizeof(command)); + data->command.assign(command); + return demofile.IsOk(); + } + + bool Dem_ConsoleCmd_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_ConsoleCmd* data) + { + const uint8_t* command = reinterpret_cast(data->command.data()); + demofile.WriteRawData(command, data->command.length() + 1); + return demofile.IsOk(); + } + + bool Dem_ConsoleCmd_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_ConsoleCmd* data) + { + return true; + } + + bool Dem_ConsoleCmd_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_ConsoleCmd* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_consolecmd.h b/demboyz/demmessages/dem_consolecmd.h new file mode 100644 index 0000000..df9cca6 --- /dev/null +++ b/demboyz/demmessages/dem_consolecmd.h @@ -0,0 +1,16 @@ + +#pragma once + +#include "demhandlers.h" +#include + +namespace DemMsg +{ + struct Dem_ConsoleCmd + { + static const int COMMAND_MAX_LENGTH = 1024; + std::string command; + }; +} + +DECLARE_DEM_HANDLERS(Dem_ConsoleCmd); diff --git a/demboyz/demmessages/dem_datatables.cpp b/demboyz/demmessages/dem_datatables.cpp new file mode 100644 index 0000000..1d50125 --- /dev/null +++ b/demboyz/demmessages/dem_datatables.cpp @@ -0,0 +1,28 @@ + +#include "dem_datatables.h" +#include "demofile/demofile.h" + +namespace DemHandlers +{ + bool Dem_DataTables_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_DataTables* data) + { + data->data = demofile.ReadRawData(DemMsg::Dem_DataTables::DATA_MAX_LENGTH); + return demofile.IsOk(); + } + + bool Dem_DataTables_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_DataTables* data) + { + demofile.WriteRawData(data->data.begin(), data->data.length()); + return demofile.IsOk(); + } + + bool Dem_DataTables_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_DataTables* data) + { + return true; + } + + bool Dem_DataTables_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_DataTables* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_datatables.h b/demboyz/demmessages/dem_datatables.h new file mode 100644 index 0000000..e394496 --- /dev/null +++ b/demboyz/demmessages/dem_datatables.h @@ -0,0 +1,16 @@ + +#pragma once + +#include "demhandlers.h" +#include "base/array.h" + +namespace DemMsg +{ + struct Dem_DataTables + { + static const int DATA_MAX_LENGTH = 256 * 1024; + Array data; + }; +} + +DECLARE_DEM_HANDLERS(Dem_DataTables); diff --git a/demboyz/demmessages/dem_packet.cpp b/demboyz/demmessages/dem_packet.cpp new file mode 100644 index 0000000..92f5c96 --- /dev/null +++ b/demboyz/demmessages/dem_packet.cpp @@ -0,0 +1,32 @@ + +#include "dem_packet.h" +#include "demofile/demofile.h" + +namespace DemHandlers +{ + bool Dem_Packet_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_Packet* data) + { + demofile.ReadCmdInfo(data->cmdInfo); + demofile.ReadSequenceInfo(data->sequenceNum1, data->sequenceNum2); + //data->dataLengthInBytes = demofile.ReadRawData(data->data, sizeof(data->data)); + return demofile.IsOk(); + } + + bool Dem_Packet_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_Packet* data) + { + demofile.WriteCmdInfo(data->cmdInfo); + demofile.WriteSequenceInfo(data->sequenceNum1, data->sequenceNum2); + //demofile.WriteRawData(data->data, data->dataLengthInBytes); + return demofile.IsOk(); + } + + bool Dem_Packet_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_Packet* data) + { + return true; + } + + bool Dem_Packet_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_Packet* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_packet.h b/demboyz/demmessages/dem_packet.h new file mode 100644 index 0000000..bc27ca2 --- /dev/null +++ b/demboyz/demmessages/dem_packet.h @@ -0,0 +1,20 @@ + +#pragma once + +#include "demhandlers.h" +#include "demofile/demotypes.h" +#include "netmessages/netcontants.h" + +namespace DemMsg +{ + struct Dem_Packet + { + democmdinfo_t cmdInfo; + int32_t sequenceNum1; + int32_t sequenceNum2; + //uint32_t dataLengthInBytes; + //uint8_t data[NET_MAX_PAYLOAD]; + }; +} + +DECLARE_DEM_HANDLERS(Dem_Packet); diff --git a/demboyz/demmessages/dem_stop.cpp b/demboyz/demmessages/dem_stop.cpp new file mode 100644 index 0000000..3995df3 --- /dev/null +++ b/demboyz/demmessages/dem_stop.cpp @@ -0,0 +1,25 @@ + +#include "dem_stop.h" + +namespace DemHandlers +{ + bool Dem_Stop_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_Stop* data) + { + return true; + } + + bool Dem_Stop_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_Stop* data) + { + return true; + } + + bool Dem_Stop_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_Stop* data) + { + return true; + } + + bool Dem_Stop_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_Stop* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_stop.h b/demboyz/demmessages/dem_stop.h new file mode 100644 index 0000000..97759cf --- /dev/null +++ b/demboyz/demmessages/dem_stop.h @@ -0,0 +1,13 @@ + +#pragma once + +#include "demhandlers.h" + +namespace DemMsg +{ + struct Dem_Stop + { + }; +} + +DECLARE_DEM_HANDLERS(Dem_Stop); diff --git a/demboyz/demmessages/dem_stringtables.cpp b/demboyz/demmessages/dem_stringtables.cpp new file mode 100644 index 0000000..5850963 --- /dev/null +++ b/demboyz/demmessages/dem_stringtables.cpp @@ -0,0 +1,136 @@ + +#include "dem_stringtables.h" +#include "demofile/demofile.h" +#include "netmessages/netcontants.h" +#include "sourcesdk/bitbuf.h" +#include + +static void StringTableEntry_BitRead(bf_read& bitbuf, DemMsg::Dem_StringTables::StringTableEntry* data) +{ + using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry; + { + char entryName[StringTableEntry::ENTRYNAME_MAX_LENGTH]; + bitbuf.ReadString(entryName, sizeof(entryName)); + data->entryName.assign(entryName); + } + + if (bitbuf.ReadOneBit() != 0) + { + const int32_t numBytes = bitbuf.ReadWord(); + data->data.reset(numBytes); + bitbuf.ReadBytes(data->data.begin(), numBytes); + } + else + { + data->data.reset(0); + } +} + +static void StringTableEntry_BitWrite(bf_write& bitbuf, DemMsg::Dem_StringTables::StringTableEntry* data) +{ + bitbuf.WriteString(data->entryName.c_str()); + const int32_t numDataBytes = data->data.length(); + + bitbuf.WriteOneBit(numDataBytes > 0); + if (numDataBytes > 0) + { + bitbuf.WriteWord(numDataBytes); + bitbuf.WriteBytes(data->data.begin(), numDataBytes); + } +} + +static void StringTable_BitRead(bf_read& bitbuf, DemMsg::Dem_StringTables::StringTable* data) +{ + using StringTable = DemMsg::Dem_StringTables::StringTable; + using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry; + { + char tableName[StringTable::TABLENAME_MAX_LENGTH]; + bitbuf.ReadString(tableName, sizeof(tableName)); + data->tableName.assign(tableName); + } + + data->entries1.reset(bitbuf.ReadWord()); + for (StringTableEntry& entry : data->entries1) + { + StringTableEntry_BitRead(bitbuf, &entry); + } + if (bitbuf.ReadOneBit() != 0) + { + data->entries2.reset(bitbuf.ReadWord()); + for (StringTableEntry& entry : data->entries2) + { + StringTableEntry_BitRead(bitbuf, &entry); + } + } + else + { + data->entries2.reset(0); + } +} + +static void StringTable_BitWrite(bf_write& bitbuf, DemMsg::Dem_StringTables::StringTable* data) +{ + using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry; + bitbuf.WriteString(data->tableName.c_str()); + + bitbuf.WriteWord(data->entries1.length()); + for (StringTableEntry& entry : data->entries1) + { + StringTableEntry_BitWrite(bitbuf, &entry); + } + + const int32_t entries2Count = data->entries2.length(); + bitbuf.WriteOneBit(entries2Count > 0); + if (entries2Count > 0) + { + bitbuf.WriteWord(entries2Count); + for (StringTableEntry& entry : data->entries2) + { + StringTableEntry_BitWrite(bitbuf, &entry); + } + } +} + +namespace DemHandlers +{ + bool Dem_StringTables_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_StringTables* data) + { + using StringTable = DemMsg::Dem_StringTables::StringTable; + + Array buffer = demofile.ReadRawData(MAX_STRINGTABLE_DATA); + bf_read bitbuf(buffer.begin(), buffer.length()); + + data->stringtables.reset(bitbuf.ReadByte()); + for (StringTable& table : data->stringtables) + { + StringTable_BitRead(bitbuf, &table); + } + return !bitbuf.IsOverflowed(); + } + + bool Dem_StringTables_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_StringTables* data) + { + using StringTable = DemMsg::Dem_StringTables::StringTable; + + std::unique_ptr buffer(new uint8_t[MAX_STRINGTABLE_DATA]); + bf_write bitbuf(buffer.get(), MAX_STRINGTABLE_DATA); + + bitbuf.WriteByte(data->stringtables.length()); + for (StringTable& table : data->stringtables) + { + StringTable_BitWrite(bitbuf, &table); + } + demofile.WriteRawData(bitbuf.GetBasePointer(), bitbuf.GetNumBytesWritten()); + return !bitbuf.IsOverflowed(); + } + + bool Dem_StringTables_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_StringTables* data) + { + return true; + } + + bool Dem_StringTables_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_StringTables* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_stringtables.h b/demboyz/demmessages/dem_stringtables.h new file mode 100644 index 0000000..60fca4b --- /dev/null +++ b/demboyz/demmessages/dem_stringtables.h @@ -0,0 +1,33 @@ + +#pragma once + +#include "demhandlers.h" +#include +#include "base/array.h" + +namespace DemMsg +{ + struct Dem_StringTables + { + struct StringTableEntry + { + static const int ENTRYNAME_MAX_LENGTH = 4096; + + std::string entryName; + Array data; + }; + + struct StringTable + { + static const int TABLENAME_MAX_LENGTH = 256; + + std::string tableName; + Array entries1; + Array entries2; + }; + + Array stringtables; + }; +} + +DECLARE_DEM_HANDLERS(Dem_StringTables); diff --git a/demboyz/demmessages/dem_synctick.cpp b/demboyz/demmessages/dem_synctick.cpp new file mode 100644 index 0000000..d7cce2b --- /dev/null +++ b/demboyz/demmessages/dem_synctick.cpp @@ -0,0 +1,25 @@ + +#include "dem_synctick.h" + +namespace DemHandlers +{ + bool Dem_SyncTick_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_SyncTick* data) + { + return true; + } + + bool Dem_SyncTick_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_SyncTick* data) + { + return true; + } + + bool Dem_SyncTick_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_SyncTick* data) + { + return true; + } + + bool Dem_SyncTick_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_SyncTick* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_synctick.h b/demboyz/demmessages/dem_synctick.h new file mode 100644 index 0000000..c68d3ce --- /dev/null +++ b/demboyz/demmessages/dem_synctick.h @@ -0,0 +1,13 @@ + +#pragma once + +#include "demhandlers.h" + +namespace DemMsg +{ + struct Dem_SyncTick + { + }; +} + +DECLARE_DEM_HANDLERS(Dem_SyncTick); diff --git a/demboyz/demmessages/dem_unknown.cpp b/demboyz/demmessages/dem_unknown.cpp new file mode 100644 index 0000000..a896623 --- /dev/null +++ b/demboyz/demmessages/dem_unknown.cpp @@ -0,0 +1,25 @@ + +#include "dem_unknown.h" + +namespace DemHandlers +{ + bool Dem_Unknown_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_Unknown* data) + { + return true; + } + + bool Dem_Unknown_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_Unknown* data) + { + return true; + } + + bool Dem_Unknown_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_Unknown* data) + { + return true; + } + + bool Dem_Unknown_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_Unknown* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_unknown.h b/demboyz/demmessages/dem_unknown.h new file mode 100644 index 0000000..74370d4 --- /dev/null +++ b/demboyz/demmessages/dem_unknown.h @@ -0,0 +1,13 @@ + +#pragma once + +#include "demhandlers.h" + +namespace DemMsg +{ + struct Dem_Unknown + { + }; +} + +DECLARE_DEM_HANDLERS(Dem_Unknown); diff --git a/demboyz/demmessages/dem_usercmd.cpp b/demboyz/demmessages/dem_usercmd.cpp new file mode 100644 index 0000000..ca4e499 --- /dev/null +++ b/demboyz/demmessages/dem_usercmd.cpp @@ -0,0 +1,28 @@ + +#include "dem_usercmd.h" +#include "demofile/demofile.h" + +namespace DemHandlers +{ + bool Dem_UserCmd_FileRead_Internal(DemoFileReader& demofile, DemMsg::Dem_UserCmd* data) + { + data->commandData = demofile.ReadUserCmd(data->commandNum, DemMsg::Dem_UserCmd::COMMANDDATA_MAX_LENGTH); + return demofile.IsOk(); + } + + bool Dem_UserCmd_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::Dem_UserCmd* data) + { + demofile.WriteUserCmd(data->commandNum, data->commandData.begin(), data->commandData.length()); + return demofile.IsOk(); + } + + bool Dem_UserCmd_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::Dem_UserCmd* data) + { + return true; + } + + bool Dem_UserCmd_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::Dem_UserCmd* data) + { + return true; + } +} diff --git a/demboyz/demmessages/dem_usercmd.h b/demboyz/demmessages/dem_usercmd.h new file mode 100644 index 0000000..f4bd86e --- /dev/null +++ b/demboyz/demmessages/dem_usercmd.h @@ -0,0 +1,17 @@ + +#pragma once + +#include "demhandlers.h" +#include "base/array.h" + +namespace DemMsg +{ + struct Dem_UserCmd + { + static const int COMMANDDATA_MAX_LENGTH = 256; + int32_t commandNum; + Array commandData; + }; +} + +DECLARE_DEM_HANDLERS(Dem_UserCmd); diff --git a/demboyz/demmessages/demhandlers.cpp b/demboyz/demmessages/demhandlers.cpp new file mode 100644 index 0000000..2de8b23 --- /dev/null +++ b/demboyz/demmessages/demhandlers.cpp @@ -0,0 +1,45 @@ + +#include "demhandlers.h" +#include "demmessages.h" + +#define DECLARE_DEM_HANDLER_ARRAY(funcname) \ + { \ + &DemHandlers::Dem_Unknown_##funcname, \ + &DemHandlers::Dem_Packet_##funcname, \ + &DemHandlers::Dem_Packet_##funcname, \ + &DemHandlers::Dem_SyncTick_##funcname, \ + &DemHandlers::Dem_ConsoleCmd_##funcname, \ + &DemHandlers::Dem_UserCmd_##funcname, \ + &DemHandlers::Dem_DataTables_##funcname, \ + &DemHandlers::Dem_Stop_##funcname, \ + &DemHandlers::Dem_StringTables_##funcname \ + } + +typedef bool (*DemMsgFileReadFn)(DemoFileReader& demofile, void* data); +typedef bool (*DemMsgFileWriteFn)(DemoFileWriter& demofile, void* data); +typedef bool (*DemMsgJsonReadFn)(JsonRead& jsonbuf, void* data); +typedef bool (*DemMsgJsonWriteFn)(JsonWrite& jsonbuf, void* data); + +bool DemHandlers::DemMsg_FileRead(uint32_t type, DemoFileReader& demofile, void* data) +{ + static const DemMsgFileReadFn demHandlers[] = DECLARE_DEM_HANDLER_ARRAY(FileRead); + return demHandlers[type](demofile, data); +} + +bool DemHandlers::DemMsg_FileWrite(uint32_t type, DemoFileWriter& demofile, void* data) +{ + static const DemMsgFileWriteFn demHandlers[] = DECLARE_DEM_HANDLER_ARRAY(FileWrite); + return demHandlers[type](demofile, data); +} + +bool DemHandlers::DemMsg_JsonRead(uint32_t type, JsonRead& jsonbuf, void* data) +{ + static const DemMsgJsonReadFn demHandlers[] = DECLARE_DEM_HANDLER_ARRAY(JsonRead); + return demHandlers[type](jsonbuf, data); +} + +bool DemHandlers::DemMsg_JsonWrite(uint32_t type, JsonWrite& jsonbuf, void* data) +{ + static const DemMsgJsonWriteFn demHandlers[] = DECLARE_DEM_HANDLER_ARRAY(JsonWrite); + return demHandlers[type](jsonbuf, data); +} diff --git a/demboyz/demmessages/demhandlers.h b/demboyz/demmessages/demhandlers.h new file mode 100644 index 0000000..a4759fa --- /dev/null +++ b/demboyz/demmessages/demhandlers.h @@ -0,0 +1,42 @@ + +#pragma once + +#include + +class DemoFileReader; +class DemoFileWriter; +class JsonRead; +class JsonWrite; + +#define DECLARE_DEM_HANDLERS(msgname) \ + namespace DemHandlers \ + { \ + bool msgname##_FileRead_Internal(DemoFileReader& demofile, DemMsg::msgname* data); \ + bool msgname##_FileWrite_Internal(DemoFileWriter& demofile, DemMsg::msgname* data); \ + bool msgname##_JsonRead_Internal(JsonRead& jsonbuf, DemMsg::msgname* data); \ + bool msgname##_JsonWrite_Internal(JsonWrite& jsonbuf, DemMsg::msgname* data); \ + inline bool msgname##_FileRead(DemoFileReader& demofile, void* data) \ + { \ + return msgname##_FileRead_Internal(demofile, reinterpret_cast(data)); \ + } \ + inline bool msgname##_FileWrite(DemoFileWriter& demofile, void* data) \ + { \ + return msgname##_FileWrite_Internal(demofile, reinterpret_cast(data)); \ + } \ + inline bool msgname##_JsonRead(JsonRead& jsonbuf, void* data) \ + { \ + return msgname##_JsonRead_Internal(jsonbuf, reinterpret_cast(data)); \ + } \ + inline bool msgname##_JsonWrite(JsonWrite& jsonbuf, void* data) \ + { \ + return msgname##_JsonWrite_Internal(jsonbuf, reinterpret_cast(data)); \ + } \ + } + +namespace DemHandlers +{ + bool DemMsg_FileRead(uint32_t type, DemoFileReader& demofile, void* data); + bool DemMsg_FileWrite(uint32_t type, DemoFileWriter& demofile, void* data); + bool DemMsg_JsonRead(uint32_t type, JsonRead& jsonbuf, void* data); + bool DemMsg_JsonWrite(uint32_t type, JsonWrite& jsonbuf, void* data); +} diff --git a/demboyz/demmessages/demmessages.h b/demboyz/demmessages/demmessages.h new file mode 100644 index 0000000..221e851 --- /dev/null +++ b/demboyz/demmessages/demmessages.h @@ -0,0 +1,14 @@ + +#pragma once + +#include +#include "demofile/demotypes.h" + +#include "dem_unknown.h" +#include "dem_packet.h" +#include "dem_synctick.h" +#include "dem_consolecmd.h" +#include "dem_usercmd.h" +#include "dem_datatables.h" +#include "dem_stop.h" +#include "dem_stringtables.h"