about summary refs log tree commit diff stats
path: root/data/maps/icarus/rooms/Maze Wings Passage.txtpb
blob: 253325116eb9ff5d752fe32c414df1689149d415 (plain) (blame)
1
2
3
4
5
6
7
8
9
name: "Maze Wings Passage"
paintings {
  name: "WINGS12"
  path: "Components/Paintings/30 degrees/wings12"
}
paintings {
  name: "WINGS15"
  path: "Components/Paintings/30 degrees/wings15"
}
span class="w"> "consts.h" #include "system.h" #include "vector.h" class Game; class CameraSystem : public System { public: static constexpr SystemKey Key = SystemKey::Camera; CameraSystem(Game& game) : game_(game) {} const vec2i& getCameraPosition() const { return pos_; } const vec2i& getFieldOfView() const { return fov_; } void setFollowingSprite(int spriteId) { followingSprite_ = spriteId; } void lockCamera() { locked_ = true; } void unlockCamera() { locked_ = false; } // Pans over to the provided sprite over the provided amount of time. // - length is in milliseconds // Automatically locks the camera. void panToSprite(int targetId, int length); // Pans over to the provided warp point over the provided amount of time. // - length is in milliseconds // Automatically locks the camera. void panToWarpPoint(std::string_view warpPoint, int length); bool isPanning() const { return panning_; } void tick(double dt) override; void destroySprite(int spriteId) override; private: vec2i calculatePosWithCenter(vec2i center) const; Game& game_; vec2i pos_; vec2i fov_ { CANVAS_WIDTH, CANVAS_HEIGHT }; int followingSprite_ = -1; bool locked_ = true; bool panning_ = false; vec2i panStart_; vec2i panEnd_; double panLength_ = 0.0; double panThus_ = 0.0; }; #endif /* end of include guard: CAMERA_SYSTEM_H_D52ADAD3 */