From 7a1ae2534787fb9a879273e47465c57b25c4e43b Mon Sep 17 00:00:00 2001 From: Armin Co <armin.co@hs-bochum.de> Date: Sat, 25 Apr 2020 17:30:24 +0200 Subject: [PATCH] Move config into core part. --- qpong_core/CMakeLists.txt | 2 +- {gtk_qpong_app => qpong_core}/Config.cpp | 1 + {gtk_qpong_app => qpong_core}/Config.hpp | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) rename {gtk_qpong_app => qpong_core}/Config.cpp (99%) rename {gtk_qpong_app => qpong_core}/Config.hpp (99%) diff --git a/qpong_core/CMakeLists.txt b/qpong_core/CMakeLists.txt index b6f2974..d2b3482 100644 --- a/qpong_core/CMakeLists.txt +++ b/qpong_core/CMakeLists.txt @@ -4,4 +4,4 @@ if(APPLE) endif() # Core QPong library -add_library(qpong_core Particle.cpp ImageBuffer.cpp Player.cpp) \ No newline at end of file +add_library(qpong_core Particle.cpp ImageBuffer.cpp Player.cpp Config.cpp) \ No newline at end of file diff --git a/gtk_qpong_app/Config.cpp b/qpong_core/Config.cpp similarity index 99% rename from gtk_qpong_app/Config.cpp rename to qpong_core/Config.cpp index 9dee6d3..356879f 100644 --- a/gtk_qpong_app/Config.cpp +++ b/qpong_core/Config.cpp @@ -8,6 +8,7 @@ #include<iostream> #include<fstream> +using namespace QPong; const char* toStr(Setting s) { diff --git a/gtk_qpong_app/Config.hpp b/qpong_core/Config.hpp similarity index 99% rename from gtk_qpong_app/Config.hpp rename to qpong_core/Config.hpp index 4b745b1..2a1ab38 100644 --- a/gtk_qpong_app/Config.hpp +++ b/qpong_core/Config.hpp @@ -12,6 +12,8 @@ #include<map> #include<vector> +namespace QPong { + enum class Setting { @@ -90,5 +92,5 @@ private: inline static double s_momentumImageScale = 55580.0; }; - +} #endif \ No newline at end of file -- GitLab