Moved the camera into the scene where it belongs.

This commit is contained in:
Zed A. Shaw 2025-12-29 23:37:42 -05:00
parent c71566048e
commit 5676382fbb
5 changed files with 29 additions and 27 deletions

View file

@ -5,6 +5,7 @@
#include "textures.hpp"
#include <SFML/Graphics/RenderWindow.hpp>
#include <guecs/ui.hpp>
#include "camera.hpp"
namespace scene {
using std::shared_ptr;
@ -33,11 +34,12 @@ namespace scene {
std::unordered_map<std::string, int> $actor_name_ids;
std::vector<Element> $fixtures;
std::vector<Element> $actors;
cinematic::Camera $camera;
Engine(components::AnimatedScene& scene);
void init();
void render(sf::RenderTarget& window);
void render(sf::RenderTexture& view);
bool mouse(float x, float y, guecs::Modifiers mods);
void attach_text(const std::string& actor, const std::string& text);
Element config_scene_element(nlohmann::json& config, bool and_play, bool duped);
@ -49,5 +51,8 @@ namespace scene {
void play_animations();
void apply_effect(const std::string& actor, const std::string& shader);
Element& actor_config(const std::string& actor);
void zoom(const std::string& cell);
void reset(sf::RenderTexture& view, float width, float height);
void zoom(int mid_x, int mid_y, int width, int height);
};
}