From 24dd128093a1c46e14f4d8b0b9b0c9c17493bac3 Mon Sep 17 00:00:00 2001 From: Rick van Vonderen <0945444@hr.nl> Date: Thu, 12 Dec 2019 23:21:18 +0100 Subject: [PATCH] Rename Engine to Inferno --- CMakeLists.txt | 2 +- engine/src/engine.h | 15 ------------ game/src/game.cpp | 6 ++--- inferno/src/inferno.h | 15 ++++++++++++ .../src/inferno}/application.cpp | 12 +++++----- .../src/inferno}/application.h | 4 ++-- .../src/engine => inferno/src/inferno}/core.h | 0 .../src/inferno}/entrypoint.h | 10 ++++---- .../engine => inferno/src/inferno}/log.cpp | 6 ++--- .../src/engine => inferno/src/inferno}/log.h | 24 +++++++++---------- .../vendor/glad/include/KHR/khrplatform.h | 0 .../vendor/glad/include/glad/glad.h | 0 {engine => inferno}/vendor/glad/src/glad.c | 0 13 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 engine/src/engine.h create mode 100644 inferno/src/inferno.h rename {engine/src/engine => inferno/src/inferno}/application.cpp (85%) rename {engine/src/engine => inferno/src/inferno}/application.h (93%) rename {engine/src/engine => inferno/src/inferno}/core.h (100%) rename {engine/src/engine => inferno/src/inferno}/entrypoint.h (67%) rename {engine/src/engine => inferno/src/inferno}/log.cpp (88%) rename {engine/src/engine => inferno/src/inferno}/log.h (52%) rename {engine => inferno}/vendor/glad/include/KHR/khrplatform.h (100%) rename {engine => inferno}/vendor/glad/include/glad/glad.h (100%) rename {engine => inferno}/vendor/glad/src/glad.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 488d2d1..7e3b24a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # ------------------------------------------ # Set engine name -set(ENGINE "engine") +set(ENGINE "inferno") # Set project name set(GAME "game") diff --git a/engine/src/engine.h b/engine/src/engine.h deleted file mode 100644 index de7f8e2..0000000 --- a/engine/src/engine.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef ENGINE_H -#define ENGINE_H - -// This file is for use by the game - -// ----------------------------------------- - -#include "engine/application.h" -#include "engine/log.h" - -// ----------------------------------------- - -#include "engine/entrypoint.h" - -#endif // ENGINE_H diff --git a/game/src/game.cpp b/game/src/game.cpp index ac6e2f2..74b2075 100644 --- a/game/src/game.cpp +++ b/game/src/game.cpp @@ -1,13 +1,13 @@ -#include "engine.h" +#include "inferno.h" -class Game : public Engine::Application +class Game : public Inferno::Application { public: Game() {}; ~Game() {}; }; -Engine::Application* Engine::createApplication() +Inferno::Application* Inferno::createApplication() { return new Game(); } diff --git a/inferno/src/inferno.h b/inferno/src/inferno.h new file mode 100644 index 0000000..a7e2736 --- /dev/null +++ b/inferno/src/inferno.h @@ -0,0 +1,15 @@ +#ifndef INFERNO_H +#define INFERNO_H + +// This file is for use by the game + +// ----------------------------------------- + +#include "inferno/application.h" +#include "inferno/log.h" + +// ----------------------------------------- + +#include "inferno/entrypoint.h" + +#endif // INFERNO_H diff --git a/engine/src/engine/application.cpp b/inferno/src/inferno/application.cpp similarity index 85% rename from engine/src/engine/application.cpp rename to inferno/src/inferno/application.cpp index ca5213c..555c611 100644 --- a/engine/src/engine/application.cpp +++ b/inferno/src/inferno/application.cpp @@ -3,12 +3,12 @@ #include #include -#include "engine/application.h" -#include "engine/core.h" -#include "engine/event/event.h" -#include "engine/log.h" +#include "inferno/application.h" +#include "inferno/core.h" +#include "inferno/event/event.h" +#include "inferno/log.h" -namespace Engine { +namespace Inferno { Application* Application::s_instance = nullptr; @@ -34,7 +34,7 @@ namespace Engine { glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); - GLFWwindow* window = glfwCreateWindow(1280, 720, "Engine", NULL, NULL); + GLFWwindow* window = glfwCreateWindow(1280, 720, "Inferno", NULL, NULL); if (window == NULL) { NF_CORE_DANGER("Failed to create GLFW window"); glfwTerminate(); diff --git a/engine/src/engine/application.h b/inferno/src/inferno/application.h similarity index 93% rename from engine/src/engine/application.h rename to inferno/src/inferno/application.h index 5bf0ce0..5763189 100644 --- a/engine/src/engine/application.h +++ b/inferno/src/inferno/application.h @@ -1,7 +1,7 @@ #ifndef APPLICATION_H #define APPLICATION_H -namespace Engine { +namespace Inferno { class Application { @@ -26,7 +26,7 @@ namespace Engine { // @Todo // v Application -> Singleton -// - Add assert +// v Add assert // - Event class // - Event Dispatcher // - template diff --git a/engine/src/engine/core.h b/inferno/src/inferno/core.h similarity index 100% rename from engine/src/engine/core.h rename to inferno/src/inferno/core.h diff --git a/engine/src/engine/entrypoint.h b/inferno/src/inferno/entrypoint.h similarity index 67% rename from engine/src/engine/entrypoint.h rename to inferno/src/inferno/entrypoint.h index 909fca2..9a43408 100644 --- a/engine/src/engine/entrypoint.h +++ b/inferno/src/inferno/entrypoint.h @@ -7,10 +7,10 @@ #ifndef ENTRYPOINT_H #define ENTRYPOINT_H -#include "application.h" -#include "log.h" +#include "inferno/application.h" +#include "inferno/log.h" -extern Engine::Application* Engine::createApplication(); +extern Inferno::Application* Inferno::createApplication(); int main(int argc, char* argv[]) { @@ -19,11 +19,11 @@ int main(int argc, char* argv[]) (void)argv; // Initialize Log - Engine::Log::init(); + Inferno::Log::init(); NF_CORE_INFO("Initialized Log!"); // Start application - auto app = Engine::createApplication(); + auto app = Inferno::createApplication(); app->run(); delete app; diff --git a/engine/src/engine/log.cpp b/inferno/src/inferno/log.cpp similarity index 88% rename from engine/src/engine/log.cpp rename to inferno/src/inferno/log.cpp index 02f1b0c..1598fab 100644 --- a/engine/src/engine/log.cpp +++ b/inferno/src/inferno/log.cpp @@ -1,8 +1,8 @@ #include // printf -#include "log.h" +#include "inferno/log.h" -namespace Engine { +namespace Inferno { // Reserve memory std::shared_ptr Log::m_engineLogger; @@ -11,7 +11,7 @@ namespace Engine { void Log::init() { // Create engine Logger - m_engineLogger = std::make_shared("Engine"); + m_engineLogger = std::make_shared("Inferno"); // Create game Logger m_gameLogger = std::make_shared("Game"); } diff --git a/engine/src/engine/log.h b/inferno/src/inferno/log.h similarity index 52% rename from engine/src/engine/log.h rename to inferno/src/inferno/log.h index 3ddc1ea..9400d2f 100644 --- a/engine/src/engine/log.h +++ b/inferno/src/inferno/log.h @@ -3,7 +3,7 @@ #include -namespace Engine { +namespace Inferno { class Logger; @@ -40,16 +40,16 @@ namespace Engine { } -#define NF_CORE_LOG(x) Engine::Log::getEngineLogger()->log(x) -#define NF_CORE_INFO(x) Engine::Log::getEngineLogger()->info(x) -#define NF_CORE_WARN(x) Engine::Log::getEngineLogger()->warn(x) -#define NF_CORE_DANGER(x) Engine::Log::getEngineLogger()->danger(x) -#define NF_CORE_SUCCESS(x) Engine::Log::getEngineLogger()->success(x) - -#define NF_LOG(x) Engine::Log::getGameLogger()->log(x) -#define NF_INFO(x) Engine::Log::getGameLogger()->info(x) -#define NF_WARN(x) Engine::Log::getGameLogger()->warn(x) -#define NF_DANGER(x) Engine::Log::getGameLogger()->danger(x) -#define NF_SUCCESS(x) Engine::Log::getGameLogger()->success(x) +#define NF_CORE_LOG(x) Inferno::Log::getEngineLogger()->log(x) +#define NF_CORE_INFO(x) Inferno::Log::getEngineLogger()->info(x) +#define NF_CORE_WARN(x) Inferno::Log::getEngineLogger()->warn(x) +#define NF_CORE_DANGER(x) Inferno::Log::getEngineLogger()->danger(x) +#define NF_CORE_SUCCESS(x) Inferno::Log::getEngineLogger()->success(x) + +#define NF_LOG(x) Inferno::Log::getGameLogger()->log(x) +#define NF_INFO(x) Inferno::Log::getGameLogger()->info(x) +#define NF_WARN(x) Inferno::Log::getGameLogger()->warn(x) +#define NF_DANGER(x) Inferno::Log::getGameLogger()->danger(x) +#define NF_SUCCESS(x) Inferno::Log::getGameLogger()->success(x) #endif // LOG_H diff --git a/engine/vendor/glad/include/KHR/khrplatform.h b/inferno/vendor/glad/include/KHR/khrplatform.h similarity index 100% rename from engine/vendor/glad/include/KHR/khrplatform.h rename to inferno/vendor/glad/include/KHR/khrplatform.h diff --git a/engine/vendor/glad/include/glad/glad.h b/inferno/vendor/glad/include/glad/glad.h similarity index 100% rename from engine/vendor/glad/include/glad/glad.h rename to inferno/vendor/glad/include/glad/glad.h diff --git a/engine/vendor/glad/src/glad.c b/inferno/vendor/glad/src/glad.c similarity index 100% rename from engine/vendor/glad/src/glad.c rename to inferno/vendor/glad/src/glad.c