#ifndef PACKET_CLASSES_H #define PACKET_CLASSES_H #include #include #include #include #include #include #include #include #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; TPlyGuildCardTag tag; char mesg[512]; public: void bswap() { header.bswap(); tag.bswap(); }; }; #endif