From 434b8d421e9256642b284897394b150cdfec2da7 Mon Sep 17 00:00:00 2001 From: AriAvery <41122212+AriAvery@users.noreply.github.com> Date: Wed, 6 Feb 2019 11:12:29 +0100 Subject: [PATCH] moved vec3 pos into his own files --- src/common/Common.h | 10 +--------- src/common/Vector3.cpp | 6 ++++++ src/common/Vector3.h | 18 ++++++++++++++++++ src/world/Network/Handlers/PacketHandlers.cpp | 1 + 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 src/common/Vector3.cpp create mode 100644 src/common/Vector3.h diff --git a/src/common/Common.h b/src/common/Common.h index 465a3a71..7332ee86 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -5,6 +5,7 @@ #include #include "CommonGen.h" +#include "Vector3.h" // +--------------------------------------------------------------------------- // The following enumerations are structures to require their type be included. @@ -20,15 +21,6 @@ namespace Sapphire::Common const int32_t INVALID_GAME_OBJECT_ID = 0xE0000000; const uint64_t INVALID_GAME_OBJECT_ID64 = 0xE0000000; - struct FFXIVARR_POSITION3 - { - float x; - float y; - float z; - inline bool operator == ( const FFXIVARR_POSITION3& target ) const - { return ( this->x == target.x && this->y == target.y && this->z == target.z ); } - }; - struct FFXIVARR_POSITION3_U16 { uint16_t x; diff --git a/src/common/Vector3.cpp b/src/common/Vector3.cpp new file mode 100644 index 00000000..d356b813 --- /dev/null +++ b/src/common/Vector3.cpp @@ -0,0 +1,6 @@ +#include "Vector3.h" + +inline bool Sapphire::Common::FFXIVARR_POSITION3::operator == ( const FFXIVARR_POSITION3 & target ) const +{ + return ( this->x == target.x && this->y == target.y && this->z == target.z ); +} diff --git a/src/common/Vector3.h b/src/common/Vector3.h new file mode 100644 index 00000000..407a3983 --- /dev/null +++ b/src/common/Vector3.h @@ -0,0 +1,18 @@ +#ifndef _VECTOR3_H_ +#define _VECTOR3_H_ + +namespace Sapphire +{ + namespace Common + { + struct FFXIVARR_POSITION3 + { + float x; + float y; + float z; + inline bool operator == ( const FFXIVARR_POSITION3& target ) const; + }; + } +} + +#endif \ No newline at end of file diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index 73bbfb59..6f801fea 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include