diff options
Diffstat (limited to 'src/sprite.h')
| -rw-r--r-- | src/sprite.h | 10 |
1 files changed, 10 insertions, 0 deletions
| diff --git a/src/sprite.h b/src/sprite.h index 3d2e9df..59d2caf 100644 --- a/src/sprite.h +++ b/src/sprite.h | |||
| @@ -23,6 +23,7 @@ struct SpriteFrame { | |||
| 23 | 23 | ||
| 24 | struct Animation { | 24 | struct Animation { |
| 25 | bool looping = true; | 25 | bool looping = true; |
| 26 | bool manual = false; | ||
| 26 | std::vector<int> frameIndices; | 27 | std::vector<int> frameIndices; |
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| @@ -33,9 +34,15 @@ enum class CharacterState { | |||
| 33 | Running | 34 | Running |
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 37 | enum class CharacterMedium { | ||
| 38 | Normal, | ||
| 39 | Ladder | ||
| 40 | }; | ||
| 41 | |||
| 36 | struct Movement { | 42 | struct Movement { |
| 37 | vec2i pos; | 43 | vec2i pos; |
| 38 | Direction dir; | 44 | Direction dir; |
| 45 | CharacterMedium medium; | ||
| 39 | }; | 46 | }; |
| 40 | 47 | ||
| 41 | class Sprite { | 48 | class Sprite { |
| @@ -68,6 +75,7 @@ public: | |||
| 68 | std::map<std::string, std::map<Direction, int>> nameDirToAnim; | 75 | std::map<std::string, std::map<Direction, int>> nameDirToAnim; |
| 69 | bool animFinished = false; | 76 | bool animFinished = false; |
| 70 | bool hasShadow = false; | 77 | bool hasShadow = false; |
| 78 | bool animPaused = false; | ||
| 71 | 79 | ||
| 72 | // Character | 80 | // Character |
| 73 | bool orientable = false; | 81 | bool orientable = false; |
| @@ -75,6 +83,8 @@ public: | |||
| 75 | std::vector<int> followers; | 83 | std::vector<int> followers; |
| 76 | std::deque<Movement> trail; | 84 | std::deque<Movement> trail; |
| 77 | CharacterState characterState = CharacterState::Still; | 85 | CharacterState characterState = CharacterState::Still; |
| 86 | CharacterMedium characterMedium = CharacterMedium::Normal; | ||
| 87 | Direction movementDir = Direction::down; | ||
| 78 | StepType stepType = StepType::none; | 88 | StepType stepType = StepType::none; |
| 79 | int runningSfxChannel = -1; | 89 | int runningSfxChannel = -1; |
| 80 | bool clipping = false; | 90 | bool clipping = false; |
