From 7ad457029a181a62ecedf011e8349f1239981b78 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Tue, 1 Dec 2020 14:02:54 +0100 Subject: [PATCH] Make it easier to see how the coordinates work in the sprite sheet --- pacman/lib/PacManAnimation.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pacman/lib/PacManAnimation.hpp b/pacman/lib/PacManAnimation.hpp index a38148b..be24c5e 100644 --- a/pacman/lib/PacManAnimation.hpp +++ b/pacman/lib/PacManAnimation.hpp @@ -19,15 +19,15 @@ public: private: uint8_t animation_position = 0; float_t animation_position_delta = 0.0; - const SDL_Rect right_wide = {0 * 32, 0, 32, 32}; - const SDL_Rect right_narrow = {1 * 32, 0, 32, 32}; - const SDL_Rect closed = {2 * 32, 0, 32, 32}; - const SDL_Rect left_narrow = {3 * 32, 0, 32, 32}; - const SDL_Rect left_wide = {4 * 32, 0, 32, 32}; - const SDL_Rect up_wide = {5 * 32, 0, 32, 32}; - const SDL_Rect up_narrow = {6 * 32, 0, 32, 32}; - const SDL_Rect down_wide = {7 * 32, 0, 32, 32}; - const SDL_Rect down_narrow = {8 * 32, 0, 32, 32}; + const SDL_Rect right_wide = {0 * 32, 0 * 32, 32, 32}; + const SDL_Rect right_narrow = {1 * 32, 0 * 32, 32, 32}; + const SDL_Rect closed = {2 * 32, 0 * 32, 32, 32}; + const SDL_Rect left_narrow = {3 * 32, 0 * 32, 32, 32}; + const SDL_Rect left_wide = {4 * 32, 0 * 32, 32, 32}; + const SDL_Rect up_wide = {5 * 32, 0 * 32, 32, 32}; + const SDL_Rect up_narrow = {6 * 32, 0 * 32, 32, 32}; + const SDL_Rect down_wide = {7 * 32, 0 * 32, 32, 32}; + const SDL_Rect down_narrow = {8 * 32, 0 * 32, 32, 32}; const SDL_Rect down_animation[4]{down_wide, down_narrow, closed, down_narrow}; const SDL_Rect left_animation[4]{left_wide, left_narrow, closed, left_narrow}; const SDL_Rect right_animation[4]{right_wide, right_narrow, closed, right_narrow};