From 25e3c303b8f47785a0056077a66b7a77449ff827 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 25 Feb 2023 12:25:33 -0400 Subject: TMenuList: Add `TMenuList`, and everything else that's needed to get it working I feel this is a good starting point for working on the protocol related code. --- src/pso/TPlyGuildCardTag.cpp | 16 ++++++++++++++++ src/pso/protocol.cpp | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/pso/TPlyGuildCardTag.cpp create mode 100644 src/pso/protocol.cpp (limited to 'src/pso') diff --git a/src/pso/TPlyGuildCardTag.cpp b/src/pso/TPlyGuildCardTag.cpp new file mode 100644 index 0000000..079fcbc --- /dev/null +++ b/src/pso/TPlyGuildCardTag.cpp @@ -0,0 +1,16 @@ +#include "pso/TPlyGuildCardTag.h" +#include "pso/protocol.h" +#include + +void TPlyGuildCardTag::bswap() { + bswap_32(&guildcard_number); + bswap_16(&tag2); +} + +TPlyGuildCardTag &TPlyGuildCardTag::operator=(const TPlyGuildCardTag &src) { + tag0 = src.tag0; + tag1 = src.tag1; + tag2 = src.tag2; + guildcard_number = src.guildcard_number; + return *this; +} diff --git a/src/pso/protocol.cpp b/src/pso/protocol.cpp new file mode 100644 index 0000000..280b105 --- /dev/null +++ b/src/pso/protocol.cpp @@ -0,0 +1,9 @@ +#include "pso/protocol.h" +#include + +void bswap_32(u32 *val) {} +void bswap_16(u16 *val) {} + +void packet_header::bswap() { + bswap_16(&size); +} -- cgit v1.2.3-13-gbd6f