#pragma once #include "components.hpp" #include namespace cinematic { struct Camera { components::Animation anim; sf::View view; sf::Vector2f base_size{SCREEN_WIDTH, SCREEN_HEIGHT}; sf::Vector2f size{SCREEN_WIDTH, SCREEN_HEIGHT}; sf::FloatRect camera_bounds{{0,0},{SCREEN_WIDTH, SCREEN_HEIGHT}}; sf::Vector2f aimed_at{0,0}; sf::Vector2f going_to{0,0}; Camera(sf::Vector2f base_size); void resize(float width); void scale(float ratio); void position(float x, float y); void move(float x, float y); bool playing(); void render(sf::RenderTexture& target); void play(); void style(const std::string &name); void reset(sf::RenderTexture& target); void update_camera_bounds(sf::Vector2f size); }; void init(); }