From dacfbade1476d79bf7484b8817592d61ba62ee2f Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 9 Mar 2023 18:09:14 -0400 Subject: TProtocol: Start adding, and matching more command handlers Also found out alot more assumptions I had were wrong. --- include/pso/TMenuList.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'include/pso/TMenuList.h') diff --git a/include/pso/TMenuList.h b/include/pso/TMenuList.h index 3a38a66..90a7423 100644 --- a/include/pso/TMenuList.h +++ b/include/pso/TMenuList.h @@ -7,18 +7,16 @@ #include "pso/TPlyGuildCardTag.h" #include -template -class TMenuListEntry : public TPlyGuildCardTag { -public: - TMenuListEntry() : TPlyGuildCardTag() {}; - - void bswap() { - TPlyGuildCardTag::bswap(); - entry.bswap(); - }; -public: - T entry; -} __packed__; +#define TMenuListEntry(name, members) \ +class name { \ +public: \ + void bswap() { \ + tag.bswap(); \ + }; \ +public: \ + TPlyGuildCardTag tag; \ + members \ +} __packed__ template class TMenuList { @@ -38,10 +36,11 @@ public: }; public: packet_header header; - TMenuListEntry pad_entries[num_pad_entries]; - TMenuListEntry entries[num_entries]; + T pad_entries[num_pad_entries]; + T entries[num_entries]; } __packed__; +#ifdef __MWCC__ template class TMenuList { public: @@ -69,5 +68,6 @@ public: packet_header header; TMenuListEntry pad_entries[num_pad_entries]; } __packed__; +#endif #endif -- cgit v1.2.3-13-gbd6f