diff options
Diffstat (limited to '')
-rw-r--r-- | src/packet/Field.cpp (renamed from code/Field.cpp) | 9 | ||||
-rw-r--r-- | src/packet/Field.hpp (renamed from code/Field.hpp) | 8 | ||||
-rw-r--r-- | src/packet/FieldParser.cpp (renamed from FieldParser.cpp) | 0 | ||||
-rw-r--r-- | src/packet/FieldParser.hpp (renamed from FieldParser.hpp) | 0 | ||||
-rw-r--r-- | src/packet/Packet.cpp (renamed from Packet.cpp) | 0 | ||||
-rw-r--r-- | src/packet/Packet.hpp (renamed from Packet.hpp) | 0 | ||||
-rw-r--r-- | src/packet/PacketBuilder.cpp (renamed from PacketBuilder.cpp) | 0 | ||||
-rw-r--r-- | src/packet/PacketBuilder.hpp (renamed from PacketBuilder.hpp) | 0 | ||||
-rw-r--r-- | src/packet/PacketParser.cpp (renamed from PacketParser.cpp) | 0 | ||||
-rw-r--r-- | src/packet/PacketParser.hpp (renamed from PacketParser.hpp) | 0 |
10 files changed, 7 insertions, 10 deletions
diff --git a/code/Field.cpp b/src/packet/Field.cpp index c95c32d..69402f1 100644 --- a/code/Field.cpp +++ b/src/packet/Field.cpp @@ -200,7 +200,7 @@ void Field::SetFloat(float value) { *p = value; } -PositionI Field::GetPosition() { +Vector Field::GetPosition() { unsigned long long t = *reinterpret_cast<unsigned long long *>(m_data); endswap(&t); int x = t >> 38; @@ -215,14 +215,11 @@ PositionI Field::GetPosition() { if (z >= pow(2, 25)) { z -= pow(2, 26); } - PositionI val; - val.SetX(x); - val.setZ(z); - val.SetY(y); + Vector val(x,y,z); return val; } -void Field::SetPosition(PositionI value) { +void Field::SetPosition(Vector value) { Clear(); m_type = Position; m_dataLength = 8; diff --git a/code/Field.hpp b/src/packet/Field.hpp index 43769dc..8be9c9b 100644 --- a/code/Field.hpp +++ b/src/packet/Field.hpp @@ -4,8 +4,8 @@ #include <cstdint> #include <string> #include <vector> -#include "utility.h" -#include "PositionI.hpp" +#include "../utility/utility.h" +#include "../utility/Vector.hpp" typedef unsigned char byte; typedef signed char sbyte; @@ -101,9 +101,9 @@ public: void SetFloat(float value); - PositionI GetPosition(); + Vector GetPosition(); - void SetPosition(PositionI value); + void SetPosition(Vector value); double GetDouble(); diff --git a/FieldParser.cpp b/src/packet/FieldParser.cpp index 500a973..500a973 100644 --- a/FieldParser.cpp +++ b/src/packet/FieldParser.cpp diff --git a/FieldParser.hpp b/src/packet/FieldParser.hpp index 274ab9e..274ab9e 100644 --- a/FieldParser.hpp +++ b/src/packet/FieldParser.hpp diff --git a/Packet.cpp b/src/packet/Packet.cpp index 695e371..695e371 100644 --- a/Packet.cpp +++ b/src/packet/Packet.cpp diff --git a/Packet.hpp b/src/packet/Packet.hpp index 67e95e5..67e95e5 100644 --- a/Packet.hpp +++ b/src/packet/Packet.hpp diff --git a/PacketBuilder.cpp b/src/packet/PacketBuilder.cpp index 4083ea3..4083ea3 100644 --- a/PacketBuilder.cpp +++ b/src/packet/PacketBuilder.cpp diff --git a/PacketBuilder.hpp b/src/packet/PacketBuilder.hpp index 2fcb737..2fcb737 100644 --- a/PacketBuilder.hpp +++ b/src/packet/PacketBuilder.hpp diff --git a/PacketParser.cpp b/src/packet/PacketParser.cpp index 488c812..488c812 100644 --- a/PacketParser.cpp +++ b/src/packet/PacketParser.cpp diff --git a/PacketParser.hpp b/src/packet/PacketParser.hpp index 8ca6195..8ca6195 100644 --- a/PacketParser.hpp +++ b/src/packet/PacketParser.hpp |