summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-03-03 20:15:53 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-03-03 20:15:53 -0400
commitd5e4df6806b4e9f66a7424452ad3cdaf5c24126e (patch)
tree0c6040eaaecf959ef13df45d6a69c11adac64a33
parentfedff908d0aeab43459c1f6d4da8717e97bb63bf (diff)
TPlySmth: Add `TPlySmth`
-rw-r--r--context.h18
-rw-r--r--include/pso/TPlySmth.h31
2 files changed, 49 insertions, 0 deletions
diff --git a/context.h b/context.h
index 230c1e9..8048a60 100644
--- a/context.h
+++ b/context.h
@@ -867,6 +867,24 @@ private:
TArray<TPlyInventoryItem, 30> m_items;
};
+// pso/TPlySmth.h
+class TPlySmth {
+public:
+ TPlySmth();
+
+ TPlySmth &operator=(const TPlySmth &src);
+
+ void bswap();
+
+ TPlySmth &assign(const TPlySmth &src);
+
+ PRIVATE_MEMBER_ACCESSORS_ARRAY(u8, smth, 4);
+ PRIVATE_MEMBER_ACCESSORS_ARRAY(u8, smth1, 4);
+private:
+ TArray<u8, 4> m_smth;
+ TArray<u8, 4> m_smth1;
+};
+
// pso/PSOV3EncryptionTCP.h
class PSOV3EncryptionTCP : public PSOV3Encryption {
public:
diff --git a/include/pso/TPlySmth.h b/include/pso/TPlySmth.h
new file mode 100644
index 0000000..660955f
--- /dev/null
+++ b/include/pso/TPlySmth.h
@@ -0,0 +1,31 @@
+#ifndef TPLYSMTH_H
+#define TPLYSMTH_H
+
+#include <global_types.h>
+#include <pso/protocol.h>
+#include <pso/TArray.h>
+
+class TPlySmth {
+public:
+ TPlySmth() /*{}*/;
+
+ TPlySmth &operator=(const TPlySmth &src) /*{ return assign(src); }*/;
+
+ void bswap() /*{
+ bswap_32(m_smth.at_as<u32>(0));
+ bswap_32(m_smth1.at_as<u32>(0));
+ }*/;
+
+ TPlySmth &assign(const TPlySmth &src) /*{
+ m_smth = src.m_smth;
+ m_smth1 = src.m_smth1;
+ }*/;
+
+ PRIVATE_MEMBER_ACCESSORS_ARRAY(u8, smth, 4);
+ PRIVATE_MEMBER_ACCESSORS_ARRAY(u8, smth1, 4);
+private:
+ TArray<u8, 4> m_smth;
+ TArray<u8, 4> m_smth1;
+};
+
+#endif