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/packet_classes.h | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) (limited to 'include/pso/packet_classes.h') diff --git a/include/pso/packet_classes.h b/include/pso/packet_classes.h index 87e0b06..5147477 100644 --- a/include/pso/packet_classes.h +++ b/include/pso/packet_classes.h @@ -12,6 +12,90 @@ #include #include +template +struct TPlyText { + packet_header header; + char text[size]; +}; + +TMenuListEntry(GameListEntry, + u8 difficulty_tag; + u8 num_players; + char name[16]; + u8 episode; + u8 flags; +); + +TMenuListEntry(LobbyListEntry, + u32 smth; +); + +TMenuListEntry(QuestListEntry, + char name[32]; + char short_description[112]; +); + +class TPlyMeetUserExtension { +public: + TPlyGuildCardTag tags[8]; + u32 mbr_0x40; + char player_name[16]; + char player_name2[16]; +public: + void bswap() { + for (int i = 0; i < 8; ++i) { + tags[i].bswap(); + } + bswap_32(&mbr_0x40); + }; +}; + +class TPlyJoinLobbyData { +public: + TPlyGuildCardTag tag; + u32 ip_addr; + u32 client_id; + char name[16]; +public: + void bswap() { + tag.bswap(); + bswap_32(&ip_addr); + bswap_32(&client_id); + }; +}; + +class TPlyStartGame { +public: + packet_header header; + TPlyJoinLobbyData lobby_data[4]; + TPlyMeetUserExtension extension; + u8 mbr_0xe8[4]; +public: + void bswap() { + header.bswap(); + for (int i = 0; i < 4; ++i) { + lobby_data[i].bswap(); + } + extension.bswap(); + }; +}; + +class TPlyGuildCardTagPacket { +public: + packet_header header; + TPlyGuildCardTag tag; +}; + +class TPlyRecvLogin : public TPlyGuildCardTagPacket { +public: + TPlyClientConfig client_config; +public: + void bswap() { + header.bswap(); + tag.bswap(); + }; +}; + class TMessageBox { public: packet_header header; -- cgit v1.2.3-13-gbd6f