aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement/Spline
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2014-12-29 01:00:16 +0100
committerjoschiwald <joschiwald.trinity@gmail.com>2014-12-29 01:00:16 +0100
commit9ecc578cb187cc1ae0fd454883dab0cd058d3807 (patch)
tree6322b594c6ff6958de870dc5b4f0effee1f6e5c7 /src/server/game/Movement/Spline
parent21360bb50c6a1390fbeb51c9c27bb0823ad0f252 (diff)
Core/Scripts: multiple changes
- fixed non pch build - fixed some warnings - fixed some coverity issues - some random things here and there
Diffstat (limited to 'src/server/game/Movement/Spline')
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h16
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h3
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.cpp3
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.cpp182
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.h41
-rw-r--r--src/server/game/Movement/Spline/MovementTypedefs.h16
-rw-r--r--src/server/game/Movement/Spline/MovementUtil.cpp179
7 files changed, 111 insertions, 329 deletions
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index 209f978d658..cb42e4b589e 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -22,6 +22,15 @@
#include "Spline.h"
#include "MoveSplineInitArgs.h"
+namespace WorldPackets
+{
+ namespace Movement
+ {
+ class CommonMovement;
+ class MonsterMove;
+ }
+}
+
namespace Movement
{
struct Location : public Vector3
@@ -36,11 +45,15 @@ namespace Movement
// MoveSpline represents smooth catmullrom or linear curve and point that moves belong it
// curve can be cyclic - in this case movement will be cyclic
- // point can have vertical acceleration motion componemt(used in fall, parabolic movement)
+ // point can have vertical acceleration motion component (used in fall, parabolic movement)
class MoveSpline
{
+ friend class WorldPackets::Movement::CommonMovement;
+ friend class WorldPackets::Movement::MonsterMove;
+
public:
typedef Spline<int32> MySpline;
+
enum UpdateResult
{
Result_None = 0x01,
@@ -48,7 +61,6 @@ namespace Movement
Result_NextCycle = 0x04,
Result_NextSegment = 0x08
};
- friend class PacketBuilder;
protected:
MySpline spline;
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index f9151c53fc2..d93c19ff869 100644
--- a/src/server/game/Movement/Spline/MoveSplineFlag.h
+++ b/src/server/game/Movement/Spline/MoveSplineFlag.h
@@ -18,9 +18,8 @@
#ifndef TRINITYSERVER_MOVESPLINEFLAG_H
#define TRINITYSERVER_MOVESPLINEFLAG_H
-#include "MovementTypedefs.h"
-#include <string>
+#include "MovementTypedefs.h"
namespace Movement
{
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp
index 560f40143bb..8e6fdd96280 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.cpp
+++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -18,7 +18,6 @@
#include "MoveSplineInit.h"
#include "MoveSpline.h"
-#include "MovementPacketBuilder.h"
#include "Unit.h"
#include "Transport.h"
#include "Vehicle.h"
@@ -119,7 +118,7 @@ namespace Movement
WorldPackets::Movement::MonsterMove packet;
packet.MoverGUID = unit->GetGUID();
packet.Pos = real_position;
- PacketBuilder::WriteMonsterMove(move_spline, packet.SplineData);
+ packet.InitializeSplineData(move_spline);
unit->SendMessageToSet(packet.Write(), true);
return move_spline.Duration();
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
deleted file mode 100644
index 7d2b40af409..00000000000
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "MovementPacketBuilder.h"
-#include "MoveSpline.h"
-#include "WorldPacket.h"
-#include "Object.h"
-#include "MovementPackets.h"
-
-namespace Movement
-{
- void PacketBuilder::WriteMonsterMove(const MoveSpline& move_spline, WorldPackets::Movement::MovementMonsterSpline& movementMonsterSpline)
- {
- movementMonsterSpline.ID = move_spline.m_Id;
- WorldPackets::Movement::MovementSpline& movementSpline = movementMonsterSpline.Move;
-
- MoveSplineFlag splineflags = move_spline.splineflags;
- splineflags.enter_cycle = move_spline.isCyclic();
- movementSpline.Flags = uint32(splineflags & uint32(~MoveSplineFlag::Mask_No_Monster_Move));
-
- switch (move_spline.splineflags & MoveSplineFlag::Mask_Final_Facing)
- {
- case MoveSplineFlag::Final_Point:
- movementSpline.Face = MONSTER_MOVE_FACING_SPOT;
- movementSpline.FaceSpot = move_spline.facing.f;
- break;
- case MoveSplineFlag::Final_Target:
- movementSpline.Face = MONSTER_MOVE_FACING_TARGET;
- movementSpline.FaceGUID = move_spline.facing.target;
- break;
- case MoveSplineFlag::Final_Angle:
- movementSpline.Face = MONSTER_MOVE_FACING_ANGLE;
- movementSpline.FaceDirection = move_spline.facing.angle;
- break;
- default:
- movementSpline.Face = MONSTER_MOVE_NORMAL;
- break;
- }
-
- if (splineflags.animation)
- {
- movementSpline.AnimTier = splineflags.getAnimationId();
- movementSpline.TierTransStartTime = move_spline.effect_start_time;
- }
-
- movementSpline.MoveTime = move_spline.Duration();
-
- if (splineflags.parabolic)
- {
- movementSpline.JumpGravity = move_spline.vertical_acceleration;
- movementSpline.SpecialTime = move_spline.effect_start_time;
- }
-
- Spline<int32> const& spline = move_spline.spline;
- std::vector<Vector3> const& array = spline.getPoints();
-
- if (splineflags & MoveSplineFlag::UncompressedPath)
- {
- if (!splineflags.cyclic)
- {
- uint32 count = spline.getPointCount() - 3;
- for (uint32 i = 2; i < count; ++i)
- movementSpline.Points.push_back(array[i]);
- }
- else
- {
- uint32 count = spline.getPointCount() - 3;
- movementSpline.Points.push_back(array[1]);
- for (uint32 i = 1; i < count; ++i)
- movementSpline.Points.push_back(array[i]);
- }
- }
- else
- {
- uint32 last_idx = spline.getPointCount() - 3;
- Vector3 const* real_path = &spline.getPoint(1);
-
- movementSpline.Points.push_back(real_path[last_idx]);
-
- if (last_idx > 1)
- {
- Vector3 middle = (real_path[0] + real_path[last_idx]) / 2.f;
- Vector3 offset;
- // first and last points already appended
- for (uint32 i = 1; i < last_idx; ++i)
- {
- offset = middle - real_path[i];
- movementSpline.PackedDeltas.push_back(offset);
- }
- }
- }
- }
-
- void PacketBuilder::WriteCreate(MoveSpline const& moveSpline, ByteBuffer& data)
- {
- data << uint32(moveSpline.GetId()); // ID
- if (!moveSpline.isCyclic()) // Destination
- {
- Vector3 dest = moveSpline.FinalDestination();
- data << float(dest.z);
- data << float(dest.x);
- data << float(dest.y);
- }
- else
- data << Vector3::zero();
-
- if (data.WriteBit(!moveSpline.Finalized())) // MovementSplineMove
- {
- MoveSplineFlag const& splineFlags = moveSpline.splineflags;
- data.FlushBits();
-
- data.WriteBits(moveSpline.splineflags.raw(), 25); // SplineFlags
-
- if (splineFlags.final_angle)
- data.WriteBits(3, 2); // Face
- else if (splineFlags.final_target)
- data.WriteBits(2, 2); // Face
- else if (splineFlags.final_point)
- data.WriteBits(1, 2); // Face
- else
- data.WriteBits(0, 2); // Face
-
- bool HasJumpGravity = data.WriteBit(moveSpline.splineflags & (MoveSplineFlag::Parabolic | MoveSplineFlag::Animation)); // HasJumpGravity
- bool HasSpecialTime = data.WriteBit((moveSpline.splineflags & MoveSplineFlag::Parabolic) && moveSpline.effect_start_time < moveSpline.Duration()); // HasSpecialTime
-
- data.WriteBits(uint8(moveSpline.spline.mode()), 2); // Mode
-
- data.WriteBit(0); // HasSplineFilterKey
-
- data << int32(moveSpline.timePassed()); // Elapsed
- data << uint32(moveSpline.Duration()); // Duration
- data << float(1.0f); // DurationModifier
- data << float(1.0f); // NextDurationModifier
-
- uint32 PointsCount = moveSpline.getPath().size();
- data << uint32(PointsCount);
-
- if (splineFlags.final_angle) // FaceDirection
- data << moveSpline.facing.angle;
- else if (splineFlags.final_target) // FaceGUID
- data << moveSpline.facing.target;
- else if (splineFlags.final_point) // FaceSpot
- data << moveSpline.facing.f.x << moveSpline.facing.f.y << moveSpline.facing.f.z;
-
- if (HasJumpGravity)
- data << float(moveSpline.vertical_acceleration); // JumpGravity
-
- if (HasSpecialTime)
- data << uint32(moveSpline.effect_start_time); // SpecialTime
-
- //if (HasSplineFilterKey)
- //{
- // data << uint32(FilterKeysCount);
- // for (var i = 0; i < PointsCount; ++i)
- // {
- // data << float(In);
- // data << float(Out);
- // }
-
- // data.WriteBits(FilterFlags, 2);
- //}
-
- data.append<Vector3>(&moveSpline.getPath()[0], PointsCount); // Points
- }
- }
-}
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h
deleted file mode 100644
index 720c0b3b244..00000000000
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITYSERVER_PACKET_BUILDER_H
-#define TRINITYSERVER_PACKET_BUILDER_H
-
-#include "Define.h" // for uint32
-#include "G3D/Vector3.h"
-#include "MovementPackets.h"
-using G3D::Vector3;
-
-class ByteBuffer;
-class WorldPacket;
-
-namespace Movement
-{
- class MoveSpline;
- class PacketBuilder
- {
- public:
- static void WriteMonsterMove(const MoveSpline& mov, WorldPackets::Movement::MovementMonsterSpline& movementMonsterSpline);
- static void WriteCreate(MoveSpline const& moveSpline, ByteBuffer& data);
- };
-}
-#endif // TRINITYSERVER_PACKET_BUILDER_H
diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h
index 14c4e19b19b..927707bfd56 100644
--- a/src/server/game/Movement/Spline/MovementTypedefs.h
+++ b/src/server/game/Movement/Spline/MovementTypedefs.h
@@ -21,14 +21,6 @@
#include "Common.h"
-enum MonsterMoveType
-{
- MONSTER_MOVE_NORMAL = 0,
- MONSTER_MOVE_FACING_SPOT = 1,
- MONSTER_MOVE_FACING_TARGET = 2,
- MONSTER_MOVE_FACING_ANGLE = 3
-};
-
namespace G3D
{
class Vector3;
@@ -40,6 +32,14 @@ namespace Movement
using G3D::Vector3;
using G3D::Vector4;
+ enum MonsterMoveType
+ {
+ MONSTER_MOVE_NORMAL = 0,
+ MONSTER_MOVE_FACING_SPOT = 1,
+ MONSTER_MOVE_FACING_TARGET = 2,
+ MONSTER_MOVE_FACING_ANGLE = 3
+ };
+
inline uint32 SecToMS(float sec)
{
return static_cast<uint32>(sec * 1000.f);
diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp
index 3f629238948..a7aa84f3680 100644
--- a/src/server/game/Movement/Spline/MovementUtil.cpp
+++ b/src/server/game/Movement/Spline/MovementUtil.cpp
@@ -17,8 +17,6 @@
*/
#include "MoveSplineFlag.h"
-#include <cmath>
-#include <string>
namespace Movement
{
@@ -85,103 +83,100 @@ namespace Movement
return result;
}
- #define STR(x) #x
-
- char const* g_MovementFlag_names[] =
+ char const* MovementFlagNames[] =
{
- STR(Forward ), // 0x00000001,
- STR(Backward ), // 0x00000002,
- STR(Strafe_Left ), // 0x00000004,
- STR(Strafe_Right ), // 0x00000008,
- STR(Turn_Left ), // 0x00000010,
- STR(Turn_Right ), // 0x00000020,
- STR(Pitch_Up ), // 0x00000040,
- STR(Pitch_Down ), // 0x00000080,
-
- STR(Walking ), // 0x00000100, // Walking
- STR(DisableGravity ), // 0x00000200,
- STR(Root ), // 0x00000400,
- STR(Falling ), // 0x00000800,
- STR(FallingFar ), // 0x00001000,
- STR(PendingStop ), // 0x00002000,
- STR(PendingStrafeStop ), // 0x00004000,
- STR(PendingForward ), // 0x00008000,
- STR(PendingBackward ), // 0x00010000,
- STR(PendingStrafeLeft ), // 0x00020000,
- STR(PendingStrafeRight ), // 0x00040000,
- STR(PendingRoot ), // 0x00080000,
- STR(Swimming ), // 0x00100000, // Appears With Fly Flag Also
- STR(Ascending ), // 0x00200000, // Swim Up Also
- STR(Descending ), // 0x00400000, // Swim Down Also
- STR(Can_Fly ), // 0x00800000, // Can Fly In 3.3?
- STR(Flying ), // 0x01000000, // Actual Flying Mode
- STR(Spline_Elevation ), // 0x02000000, // Used For Flight Paths
- STR(Waterwalking ), // 0x04000000, // Prevent Unit From Falling Through Water
- STR(Safe_Fall ), // 0x08000000, // Active Rogue Safe Fall Spell (Passive)
- STR(Hover ), // 0x10000000
- STR(Local_Dirty ), // 0x20000000
- STR(None31 ), // 0x40000000
- STR(None32 ), // 0x80000000
+ STRINGIZE(Forward ), // 0x00000001
+ STRINGIZE(Backward ), // 0x00000002
+ STRINGIZE(Strafe_Left ), // 0x00000004
+ STRINGIZE(Strafe_Right ), // 0x00000008
+ STRINGIZE(Turn_Left ), // 0x00000010
+ STRINGIZE(Turn_Right ), // 0x00000020
+ STRINGIZE(Pitch_Up ), // 0x00000040
+ STRINGIZE(Pitch_Down ), // 0x00000080
+ STRINGIZE(Walking ), // 0x00000100 // Walking
+ STRINGIZE(DisableGravity ), // 0x00000200
+ STRINGIZE(Root ), // 0x00000400
+ STRINGIZE(Falling ), // 0x00000800
+ STRINGIZE(FallingFar ), // 0x00001000
+ STRINGIZE(PendingStop ), // 0x00002000
+ STRINGIZE(PendingStrafeStop ), // 0x00004000
+ STRINGIZE(PendingForward ), // 0x00008000
+ STRINGIZE(PendingBackward ), // 0x00010000
+ STRINGIZE(PendingStrafeLeft ), // 0x00020000
+ STRINGIZE(PendingStrafeRight), // 0x00040000
+ STRINGIZE(PendingRoot ), // 0x00080000
+ STRINGIZE(Swimming ), // 0x00100000 // Appears With Fly Flag Also
+ STRINGIZE(Ascending ), // 0x00200000 // Swim Up Also
+ STRINGIZE(Descending ), // 0x00400000 // Swim Down Also
+ STRINGIZE(Can_Fly ), // 0x00800000 // Can Fly In 3.3?
+ STRINGIZE(Flying ), // 0x01000000 // Actual Flying Mode
+ STRINGIZE(Spline_Elevation ), // 0x02000000 // Used For Flight Paths
+ STRINGIZE(Waterwalking ), // 0x04000000 // Prevent Unit From Falling Through Water
+ STRINGIZE(Safe_Fall ), // 0x08000000 // Active Rogue Safe Fall Spell (Passive)
+ STRINGIZE(Hover ), // 0x10000000
+ STRINGIZE(Local_Dirty ), // 0x20000000
+ STRINGIZE(None31 ), // 0x40000000
+ STRINGIZE(None32 ), // 0x80000000
};
- char const* g_MovementFlagExtra_names[] =
+ char const* MovementFlagExtraNames[] =
{
- STR(NoStrafe ),
- STR(NoJump ),
- STR(FullSpeedTurning ),
- STR(FullSpeedPitching ),
- STR(Allow_Pitching ),
- STR(Unk6 ),
- STR(Unk7 ),
- STR(Unk8 ),
- STR(Unk9 ),
- STR(Unk10 ),
- STR(Unk11 ),
- STR(Unk12 ),
- STR(Unk13 ),
- STR(Interpolated_Movement),
- STR(Interpolated_Turning ),
- STR(Interpolated_Pitching),
+ STRINGIZE(NoStrafe ),
+ STRINGIZE(NoJump ),
+ STRINGIZE(FullSpeedTurning ),
+ STRINGIZE(FullSpeedPitching ),
+ STRINGIZE(Allow_Pitching ),
+ STRINGIZE(Unk6 ),
+ STRINGIZE(Unk7 ),
+ STRINGIZE(Unk8 ),
+ STRINGIZE(Unk9 ),
+ STRINGIZE(Unk10 ),
+ STRINGIZE(Unk11 ),
+ STRINGIZE(Unk12 ),
+ STRINGIZE(Unk13 ),
+ STRINGIZE(Interpolated_Movement),
+ STRINGIZE(Interpolated_Turning ),
+ STRINGIZE(Interpolated_Pitching),
};
- char const* g_SplineFlag_names[32] =
+ char const* SplineFlagNames[32] =
{
- STR(AnimBit1 ), // 0x00000001,
- STR(AnimBit2 ), // 0x00000002,
- STR(AnimBit3 ), // 0x00000004,
- STR(Unknown0 ), // 0x00000008,
- STR(FallingSlow ), // 0x00000010,
- STR(Done ), // 0x00000020,
- STR(Falling ), // 0x00000040, // Not Compartible With Trajectory Movement
- STR(No_Spline ), // 0x00000080,
- STR(Unknown2 ), // 0x00000100,
- STR(Flying ), // 0x00000200, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation
- STR(OrientationFixed ), // 0x00000400, // Model Orientation Fixed
- STR(Catmullrom ), // 0x00000800, // Used Catmullrom Interpolation Mode
- STR(Cyclic ), // 0x00001000, // Movement By Cycled Spline
- STR(Enter_Cycle ), // 0x00002000, // Everytime Appears With Cyclic Flag In Monster Move Packet
- STR(Frozen ), // 0x00004000,
- STR(TransportEnter ), // 0x00008000
- STR(TransportExit ), // 0x00010000
- STR(Unknown3 ), // 0x00020000,
- STR(Unknown4 ), // 0x00040000,
- STR(OrientationInversed), // 0x00080000, // Appears With Runmode Flag, Nodes ), // 1, Handles Orientation
- STR(SmoothGroundPath ), // 0x00100000,
- STR(Walkmode ), // 0x00200000,
- STR(UncompressedPath ), // 0x00400000,
- STR(Unknown6 ), // 0x00800000,
- STR(Animation ), // 0x01000000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement
- STR(Parabolic ), // 0x02000000, // Not Compartible With Fall Movement
- STR(Final_Point ), // 0x04000000,
- STR(Final_Target ), // 0x08000000,
- STR(Final_Angle ), // 0x10000000,
- STR(Unknown7 ), // 0x20000000,
- STR(Unknown8 ), // 0x40000000,
- STR(Unknown9 ), // 0x80000000,
+ STRINGIZE(AnimBit1 ), // 0x00000001
+ STRINGIZE(AnimBit2 ), // 0x00000002
+ STRINGIZE(AnimBit3 ), // 0x00000004
+ STRINGIZE(Unknown0 ), // 0x00000008
+ STRINGIZE(FallingSlow ), // 0x00000010
+ STRINGIZE(Done ), // 0x00000020
+ STRINGIZE(Falling ), // 0x00000040 // Not Compartible With Trajectory Movement
+ STRINGIZE(No_Spline ), // 0x00000080
+ STRINGIZE(Unknown2 ), // 0x00000100
+ STRINGIZE(Flying ), // 0x00000200 // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation
+ STRINGIZE(OrientationFixed ), // 0x00000400 // Model Orientation Fixed
+ STRINGIZE(Catmullrom ), // 0x00000800 // Used Catmullrom Interpolation Mode
+ STRINGIZE(Cyclic ), // 0x00001000 // Movement By Cycled Spline
+ STRINGIZE(Enter_Cycle ), // 0x00002000 // Everytime Appears With Cyclic Flag In Monster Move Packet
+ STRINGIZE(Frozen ), // 0x00004000
+ STRINGIZE(TransportEnter ), // 0x00008000
+ STRINGIZE(TransportExit ), // 0x00010000
+ STRINGIZE(Unknown3 ), // 0x00020000
+ STRINGIZE(Unknown4 ), // 0x00040000
+ STRINGIZE(OrientationInversed), // 0x00080000 // Appears With Runmode Flag, Nodes ), // 1, Handles Orientation
+ STRINGIZE(SmoothGroundPath ), // 0x00100000
+ STRINGIZE(Walkmode ), // 0x00200000
+ STRINGIZE(UncompressedPath ), // 0x00400000
+ STRINGIZE(Unknown6 ), // 0x00800000
+ STRINGIZE(Animation ), // 0x01000000 // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement
+ STRINGIZE(Parabolic ), // 0x02000000 // Not Compartible With Fall Movement
+ STRINGIZE(Final_Point ), // 0x04000000
+ STRINGIZE(Final_Target ), // 0x08000000
+ STRINGIZE(Final_Angle ), // 0x10000000
+ STRINGIZE(Unknown7 ), // 0x20000000
+ STRINGIZE(Unknown8 ), // 0x40000000
+ STRINGIZE(Unknown9 ), // 0x80000000
};
template<class Flags, int N>
- void print_flags(Flags t, char const* (&names)[N], std::string& str)
+ void PrintFlags(Flags t, char const* (&names)[N], std::string& str)
{
for (int i = 0; i < N; ++i)
{
@@ -193,21 +188,21 @@ namespace Movement
std::string MoveSplineFlag::ToString() const
{
std::string str;
- print_flags(raw(), g_SplineFlag_names, str);
+ PrintFlags(raw(), SplineFlagNames, str);
return str;
}
std::string MovementFlags_ToString(uint32 flags)
{
std::string str;
- print_flags(flags, g_MovementFlag_names, str);
+ PrintFlags(flags, MovementFlagNames, str);
return str;
}
std::string MovementFlagsExtra_ToString(uint32 flags)
{
std::string str;
- print_flags(flags, g_MovementFlagExtra_names, str);
+ PrintFlags(flags, MovementFlagExtraNames, str);
return str;
}
}