diff --git a/App/GameLayer.cpp b/App/GameLayer.cpp index 295ee0bc1f958266e34a5c702c4a13d1c43c2eb4..646b56f4a76d6ed0e61160c6011897b583e2e09b 100644 --- a/App/GameLayer.cpp +++ b/App/GameLayer.cpp @@ -5,14 +5,13 @@ #include <GL/gl3w.h> #include <GLFW/glfw3.h> -#include <imgui/imgui.h> +#include <imgui.h> #include <glm/gtc/type_ptr.hpp> #include <glm/gtc/matrix_transform.hpp> -#include <GuiCore/Log.hpp> -#include <GuiCore/Input.hpp> #include <GuiCore/Glyphs.hpp> +#include <GuiCore/Input.hpp> #include <GuiCore/Timer.hpp> #include "GameLayer.hpp" diff --git a/App/MainMenuLayer.cpp b/App/MainMenuLayer.cpp index 65b4381455b5e77555997e154affcebf2614b4c7..83fff45473f2eaa8192ae805dd618531b257443b 100644 --- a/App/MainMenuLayer.cpp +++ b/App/MainMenuLayer.cpp @@ -4,7 +4,7 @@ #include "MainMenuLayer.hpp" -#include <imgui/imgui.h> +#include <imgui.h> #include <GuiCore/Application.hpp> #include "Log.hpp" diff --git a/GuiCore/ImGuiLayer.cpp b/GuiCore/ImGuiLayer.cpp index 411c6259ff1d98efd9158e792ef536cbd9606bc7..568b96ac91488311bbdec22b1945eeb46daad445 100644 --- a/GuiCore/ImGuiLayer.cpp +++ b/GuiCore/ImGuiLayer.cpp @@ -4,7 +4,7 @@ #include <GLFW/glfw3.h> -#include <imgui/imgui.h> +#include <imgui.h> #include <imgui/backends/imgui_impl_glfw.h> #include <imgui/backends/imgui_impl_opengl3.h> diff --git a/GuiCore/Shader.cpp b/GuiCore/Shader.cpp index 65d24ee9a302a0f0389467253cdc0c8cdedf4d5c..fb6f9d74ebda3e0d51401a9ef77c4a65e7a94600 100644 --- a/GuiCore/Shader.cpp +++ b/GuiCore/Shader.cpp @@ -86,7 +86,7 @@ namespace GuiCore glLinkProgram(program); GLint isLinked = 0; - glGetProgramiv(program, GL_LINK_STATUS, (int*)&isLinked); + glGetProgramiv(program, GL_LINK_STATUS, static_cast<int*>(&isLinked)); if (isLinked == GL_FALSE) { GLint maxLength = 0; diff --git a/QPong/Particle.cpp b/QPong/Particle.cpp index 3d036b5daca4b144bc42fcc12e38214754370add..6b0dc32c34a383417cf04e1b885f28ccd5b97e19 100644 --- a/QPong/Particle.cpp +++ b/QPong/Particle.cpp @@ -3,15 +3,13 @@ /// #include <complex> +#include <App/Log.hpp> +#include <GuiCore/Timer.hpp> #include "Particle.hpp" #include "Utils.hpp" -#include "Log.hpp" -#include "Worker.hpp" - -#include <imgui.h> +#include "Workers.hpp" -#include <GuiCore/Timer.hpp> using namespace QPong; @@ -89,9 +87,15 @@ Particle::Particle(Properties properties, GameOptions &options, Player &playerOn fftw_init_threads(); fftw_plan_with_nthreads(m_properties.threads); - m_planForward = fftw_plan_dft_2d(m_properties.size, m_properties.size, (fftw_complex *)m_psi, (fftw_complex *)m_psi, FFTW_FORWARD, FFTW_MEASURE); + m_planForward = fftw_plan_dft_2d( + m_properties.size, + m_properties.size, + reinterpret_cast<fftw_complex*>(m_psi), + reinterpret_cast<fftw_complex*>(m_psi), + FFTW_FORWARD, + FFTW_MEASURE); fftw_plan_with_nthreads(m_properties.threads); - m_planBackwards = fftw_plan_dft_2d(m_properties.size, m_properties.size, (fftw_complex *)m_psi, (fftw_complex *)m_psi, FFTW_BACKWARD, FFTW_MEASURE); + m_planBackwards = fftw_plan_dft_2d(m_properties.size, m_properties.size, reinterpret_cast<fftw_complex*>(m_psi), reinterpret_cast<fftw_complex*>(m_psi), FFTW_BACKWARD, FFTW_MEASURE); int numberOfThreads = m_properties.threads; for (int i = 0; i < numberOfThreads; i++) diff --git a/QPong/Particle.hpp b/QPong/Particle.hpp index ce14cadbe337dbc6c499ad805a7dd5d66b1c6e0b..41dfa3ca86f9ce127c17545632ba3c2095b1adea 100644 --- a/QPong/Particle.hpp +++ b/QPong/Particle.hpp @@ -13,7 +13,8 @@ #include <glm/glm.hpp> #include "Bat.hpp" -#include "Player.hpp" +#include <App/Player.hpp> + namespace QPong { class WorkerParticle; @@ -37,7 +38,7 @@ namespace QPong double startValue; double hbar; int threads; - const int elements() const {return size * size;} + int elements() const {return size * size;} }; struct GameOptions diff --git a/QPong/Workers.cpp b/QPong/Workers.cpp index b8e7284adc90f94fdc3e39e3e67019cdbc670a66..1940566ce2f1436e76f943cf75b54cf091f88911 100644 --- a/QPong/Workers.cpp +++ b/QPong/Workers.cpp @@ -2,7 +2,7 @@ /// @author Armin Co /// -#include "Worker.hpp" +#include "Workers.hpp" #include <chrono> using namespace QPong; @@ -12,8 +12,8 @@ WorkerParticle::WorkerParticle(Particle *particle, int startIndex, int stopIndex , m_startIndex {startIndex} , m_stopIndex {stopIndex} , m_currentDt {0.0} - , m_isWorking {false} , m_running {true} + , m_isWorking {false} { } diff --git a/QPong/Worker.hpp b/QPong/Workers.hpp similarity index 100% rename from QPong/Worker.hpp rename to QPong/Workers.hpp diff --git a/Readme.md b/Readme.md index e301ae0ffb817e1454eb3ea30e04f1f5c27f0265..ef9217e18ba614da11c9e4e26de3fc12189a8fd4 100644 --- a/Readme.md +++ b/Readme.md @@ -7,12 +7,10 @@ git clone https://gitlab.cvh-server.de/aco/qpong --recursive ``` ## Build -The required packages are listed in the `dependencies` file. -On Debian based systems you can run the following command to install all the required packages. -``` -cd qpong -cat dependencies | xargs sudo apt install -y -``` +List of dependencies: + +``` build-essential cmake libfreetype-dev libopengl-dev libglx-dev libglfw3-dev libglm-dev libfftw3-dev ``` + Please let me know if you needed to install any additional packages on your specific system. @@ -26,4 +24,4 @@ cd .. ## Run ``` ./build/QPongApp/QPongApp -``` \ No newline at end of file +``` diff --git a/dependencies b/dependencies deleted file mode 100644 index 71359605660f5f6f10e76008ee9665179c117471..0000000000000000000000000000000000000000 --- a/dependencies +++ /dev/null @@ -1,8 +0,0 @@ -build-essential -cmake -libfreetype-dev -libopengl-dev -libglx-dev -libglfw3-dev -libglm-dev -libfftw3-dev