diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-03 14:59:27 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-03 14:59:27 -0400 |
commit | 9634309c46742c13cbd198b223fe5301dab53632 (patch) | |
tree | bff7f3396fb4cc813e581ad9633511af33e91d37 | |
parent | 0799a0377ad850ef5f140dfa6098302115548712 (diff) |
TMenuList, TPlyGuildCardTag: Add constructors
-rw-r--r-- | context.h | 5 | ||||
-rw-r--r-- | include/pso/TMenuList.h | 2 | ||||
-rw-r--r-- | include/pso/TPlyGuildCardTag.h | 3 | ||||
-rw-r--r-- | src/pso/TPlyGuildCardTag.cpp | 9 |
4 files changed, 19 insertions, 0 deletions
@@ -333,6 +333,8 @@ class TMenuListEntry : public TPlyGuildCardTag { public: T entry; + TMenuListEntry() : TPlyGuildCardTag() {}; + void bswap(); void assign(const TMenuListEntry &src); @@ -623,6 +625,9 @@ static inline void operator|=(object_flags &a, object_flags b) { a = a | b; }; class TPlyGuildCardTag { public: + TPlyGuildCardTag(); + TPlyGuildCardTag(u16 tag2, u32 guildcard_number); + void bswap(); void assign(const TPlyGuildCardTag &src); void assign(const TPlyGuildCardTag *src); diff --git a/include/pso/TMenuList.h b/include/pso/TMenuList.h index 54ca441..af71a87 100644 --- a/include/pso/TMenuList.h +++ b/include/pso/TMenuList.h @@ -13,6 +13,8 @@ class TMenuListEntry : public TPlyGuildCardTag { public: T entry; + TMenuListEntry() : TPlyGuildCardTag() {}; + void bswap(); void assign(const TMenuListEntry &src); diff --git a/include/pso/TPlyGuildCardTag.h b/include/pso/TPlyGuildCardTag.h index 815685d..5808e56 100644 --- a/include/pso/TPlyGuildCardTag.h +++ b/include/pso/TPlyGuildCardTag.h @@ -13,6 +13,9 @@ struct gc_tag { class TPlyGuildCardTag { public: + TPlyGuildCardTag(); + TPlyGuildCardTag(u16 tag2, u32 guildcard_number); + void bswap(); void assign(const TPlyGuildCardTag &src); void assign(const TPlyGuildCardTag *src); diff --git a/src/pso/TPlyGuildCardTag.cpp b/src/pso/TPlyGuildCardTag.cpp index d1341c5..2626adc 100644 --- a/src/pso/TPlyGuildCardTag.cpp +++ b/src/pso/TPlyGuildCardTag.cpp @@ -2,6 +2,15 @@ #include "pso/protocol.h" #include <global_types.h> +TPlyGuildCardTag::TPlyGuildCardTag() {} + +TPlyGuildCardTag::TPlyGuildCardTag(u16 tag2, u32 guildcard_number) { + m_tag.tag0 = 0; + m_tag.tag1 = 0; + m_tag.tag2 = tag2; + m_guildcard_number = guildcard_number; +} + void TPlyGuildCardTag::bswap() { bswap_32(&m_guildcard_number); bswap_16(&m_tag.tag2); |