summary refs log tree commit diff stats
path: root/src/systems/animating.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-05-08 21:09:36 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-05-09 17:59:13 -0400
commit5c82f052c26303318e81ddd76475c1d188cc74f4 (patch)
tree3204ef94f2861224a380aa566728c02b4acd1fd9 /src/systems/animating.cpp
parent96e6f3231aed9919d660a06944f1d96dc8241f8e (diff)
downloadtherapy-5c82f052c26303318e81ddd76475c1d188cc74f4.tar.gz
therapy-5c82f052c26303318e81ddd76475c1d188cc74f4.tar.bz2
therapy-5c82f052c26303318e81ddd76475c1d188cc74f4.zip
Simplified positions/sizes with vectors
Positions and sizes are now stored as vectors (of doubles and ints, respectively). This allows for at least minor code simplification in many places, and cleans up the CollisionParams code in PonderingSystem quite a bit.
Diffstat (limited to 'src/systems/animating.cpp')
-rw-r--r--src/systems/animating.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/systems/animating.cpp b/src/systems/animating.cpp index 8543ba2..50a32fc 100644 --- a/src/systems/animating.cpp +++ b/src/systems/animating.cpp
@@ -64,10 +64,10 @@ void AnimatingSystem::render(Texture& texture)
64 } 64 }
65 65
66 Rectangle dstrect { 66 Rectangle dstrect {
67 static_cast<int>(transform.x), 67 static_cast<int>(transform.pos.x()),
68 static_cast<int>(transform.y), 68 static_cast<int>(transform.pos.y()),
69 transform.w, 69 transform.size.w(),
70 transform.h}; 70 transform.size.h()};
71 71
72 const AnimationSet& aset = sprite.animationSet; 72 const AnimationSet& aset = sprite.animationSet;
73 game_.getRenderer().blit( 73 game_.getRenderer().blit(