summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context.h5
-rw-r--r--include/pso/TMenuList.h2
-rw-r--r--include/pso/TPlyGuildCardTag.h3
-rw-r--r--src/pso/TPlyGuildCardTag.cpp9
4 files changed, 19 insertions, 0 deletions
diff --git a/context.h b/context.h
index 2539293..76183b7 100644
--- a/context.h
+++ b/context.h
@@ -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);