Browse Source

Refurbish table in GetOffsetForWalking

pull/2356/head
obligaron 5 years ago committed by Anders Jenbo
parent
commit
72692028f7
  1. 4
      Source/scrollrt.cpp

4
Source/scrollrt.cpp

@ -251,10 +251,10 @@ const char *const PlayerModeNames[] = {
Displacement GetOffsetForWalking(const AnimationInfo &animationInfo, const Direction dir, bool cameraMode /*= false*/)
{
// clang-format off
// DIR_S, DIR_SW, DIR_W, DIR_NW, DIR_N, DIR_NE, DIR_E, DIR_SE,
// DIR_S, DIR_SW, DIR_W, DIR_NW, DIR_N, DIR_NE, DIR_E, DIR_SE,
constexpr Displacement StartOffset[8] = { { 0, -32 }, { 32, -16 }, { 32, -16 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { -32, -16 }, { -32, -16 } };
constexpr Displacement MovingOffset[8] = { { 0, 32 }, { -32, 16 }, { -64, 0 }, { -32, -16 }, { 0, -32 }, { 32, -16 }, { 64, 0 }, { 32, 16 } };
constexpr bool IsDiagionalWalk[8] = { false, true, false, true, false, true, false, true };
constexpr bool IsDiagionalWalk[8] = { false, true, false, true, false, true, false, true };
// clang-format on
float fAnimationProgress = animationInfo.GetAnimationProgress();

Loading…
Cancel
Save