Preparando la interfaz

This commit is contained in:
Clinv committed 2026-09-29 23:35:03 -03:00
commit 66bedbb5f1
17 files changed
+876

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
#pragma once
#include <cstddef>
#include <string>
#include <vector>
#include "core/Frame.hpp"
namespace tahgibu {
// Modelo de datos del proyecto. No conoce raylib ni la interfaz.
class Project {
public:
Project(); // 1280x720, FPS base kDefaultFps, un frame inicial
const std::string& name() const noexcept { return name_; }
int width() const noexcept { return width_; }
int height() const noexcept { return height_; }
float baseFps() const noexcept { return baseFps_; }
void setBaseFps(float fps) noexcept; // aplica Frame::clampFps
std::size_t frameCount() const noexcept { return frames_.size(); }
const Frame& frame(std::size_t index) const { return frames_.at(index); }
Frame& frame(std::size_t index) { return frames_.at(index); }
std::size_t addFrame(); // devuelve el índice del frame nuevo
double frameDurationSeconds(std::size_t index) const;
double totalDurationSeconds() const;
private:
std::string name_;
int width_ = 1280;
int height_ = 720;
float baseFps_ = kDefaultFps;
std::vector<Frame> frames_;
};
} // namespace tahgibu