From 495ec4123426f06a4d196175d71633250bc93d7e Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 30 Apr 2024 19:44:06 +0200 Subject: [PATCH] content stuff --- src/content/content.hpp | 21 +++------------------ src/main.cpp | 2 +- src/main_screen.cpp | 2 -- src/main_screen.hpp | 4 ---- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/content/content.hpp b/src/content/content.hpp index ed59887..75925bb 100644 --- a/src/content/content.hpp +++ b/src/content/content.hpp @@ -1,28 +1,13 @@ #pragma once -#include -#include #include +#include #include #include #include -enum class Content : uint32_t {}; -using ContentRegistry = entt::basic_registry; -using ContentHandle = entt::basic_handle; - -struct ContentStore { - static constexpr const char* version {"1"}; - - ContentRegistry _reg; - - ContentRegistry& registry(void); - ContentHandle objectHandle(const Content e); - -}; - namespace Content1::Components { // TODO: design it as a tree? @@ -33,7 +18,7 @@ namespace Content1::Components { struct TagVideoStream {}; struct TimingTiedTo { - entt::dense_set ties; + entt::dense_set ties; }; // the associated messages, if any @@ -59,6 +44,6 @@ namespace Content1::Components { // TODO: i have no idea struct RawFile2ReadFromContentFactoryI { - virtual std::shared_ptr open(ContentHandle h) = 0; + virtual std::shared_ptr open(ObjectHandle h) = 0; }; diff --git a/src/main.cpp b/src/main.cpp index 951ad36..3840c06 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -83,7 +83,7 @@ int main(int argc, char** argv) { } else { // HACK SDLVideoCameraContent vcc; auto* reader = vcc.aquireReader(); - for (size_t i = 0; i < 200; i++) { + for (size_t i = 0; i < 20; i++) { std::this_thread::sleep_for(std::chrono::milliseconds(50)); auto new_frame_opt = reader->getNext(); if (new_frame_opt.has_value()) { diff --git a/src/main_screen.cpp b/src/main_screen.cpp index 14b20d9..285f1a4 100644 --- a/src/main_screen.cpp +++ b/src/main_screen.cpp @@ -71,8 +71,6 @@ MainScreen::MainScreen(SimpleConfigModel&& conf_, SDL_Renderer* renderer_, Theme g_provideInstance("RegistryMessageModel", "host", &rmm); g_provideInstance("MessageSerializerNJ", "host", &msnj); - g_provideInstance("ContentStore", "host", &cs); - g_provideInstance("ToxI", "host", &tc); g_provideInstance("ToxPrivateI", "host", &tpi); g_provideInstance("ToxEventProviderI", "host", &tc); diff --git a/src/main_screen.hpp b/src/main_screen.hpp index 7c76417..1aa5939 100644 --- a/src/main_screen.hpp +++ b/src/main_screen.hpp @@ -12,8 +12,6 @@ #include #include "./tox_private_impl.hpp" -#include "./content/content.hpp" - #include #include #include @@ -60,8 +58,6 @@ struct MainScreen final : public Screen { MessageSerializerNJ msnj; MessageTimeSort mts; - ContentStore cs; - ToxEventLogger tel{std::cout}; ToxClient tc; ToxPrivateImpl tpi;