Browse Source

Rename Engine to Inferno

master
Rick van Vonderen 5 years ago
parent
commit
24dd128093
  1. 2
      CMakeLists.txt
  2. 15
      engine/src/engine.h
  3. 6
      game/src/game.cpp
  4. 15
      inferno/src/inferno.h
  5. 12
      inferno/src/inferno/application.cpp
  6. 4
      inferno/src/inferno/application.h
  7. 0
      inferno/src/inferno/core.h
  8. 10
      inferno/src/inferno/entrypoint.h
  9. 6
      inferno/src/inferno/log.cpp
  10. 24
      inferno/src/inferno/log.h
  11. 0
      inferno/vendor/glad/include/KHR/khrplatform.h
  12. 0
      inferno/vendor/glad/include/glad/glad.h
  13. 0
      inferno/vendor/glad/src/glad.c

2
CMakeLists.txt

@ -2,7 +2,7 @@
# ------------------------------------------ # ------------------------------------------
# Set engine name # Set engine name
set(ENGINE "engine") set(ENGINE "inferno")
# Set project name # Set project name
set(GAME "game") set(GAME "game")

15
engine/src/engine.h

@ -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

6
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: public:
Game() {}; Game() {};
~Game() {}; ~Game() {};
}; };
Engine::Application* Engine::createApplication() Inferno::Application* Inferno::createApplication()
{ {
return new Game(); return new Game();
} }

15
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

12
engine/src/engine/application.cpp → inferno/src/inferno/application.cpp

@ -3,12 +3,12 @@
#include <glad/glad.h> #include <glad/glad.h>
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#include "engine/application.h" #include "inferno/application.h"
#include "engine/core.h" #include "inferno/core.h"
#include "engine/event/event.h" #include "inferno/event/event.h"
#include "engine/log.h" #include "inferno/log.h"
namespace Engine { namespace Inferno {
Application* Application::s_instance = nullptr; Application* Application::s_instance = nullptr;
@ -34,7 +34,7 @@ namespace Engine {
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
GLFWwindow* window = glfwCreateWindow(1280, 720, "Engine", NULL, NULL); GLFWwindow* window = glfwCreateWindow(1280, 720, "Inferno", NULL, NULL);
if (window == NULL) { if (window == NULL) {
NF_CORE_DANGER("Failed to create GLFW window"); NF_CORE_DANGER("Failed to create GLFW window");
glfwTerminate(); glfwTerminate();

4
engine/src/engine/application.h → inferno/src/inferno/application.h

@ -1,7 +1,7 @@
#ifndef APPLICATION_H #ifndef APPLICATION_H
#define APPLICATION_H #define APPLICATION_H
namespace Engine { namespace Inferno {
class Application class Application
{ {
@ -26,7 +26,7 @@ namespace Engine {
// @Todo // @Todo
// v Application -> Singleton // v Application -> Singleton
// - Add assert // v Add assert
// - Event class // - Event class
// - Event Dispatcher // - Event Dispatcher
// - template // - template

0
engine/src/engine/core.h → inferno/src/inferno/core.h

10
engine/src/engine/entrypoint.h → inferno/src/inferno/entrypoint.h

@ -7,10 +7,10 @@
#ifndef ENTRYPOINT_H #ifndef ENTRYPOINT_H
#define ENTRYPOINT_H #define ENTRYPOINT_H
#include "application.h" #include "inferno/application.h"
#include "log.h" #include "inferno/log.h"
extern Engine::Application* Engine::createApplication(); extern Inferno::Application* Inferno::createApplication();
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
@ -19,11 +19,11 @@ int main(int argc, char* argv[])
(void)argv; (void)argv;
// Initialize Log // Initialize Log
Engine::Log::init(); Inferno::Log::init();
NF_CORE_INFO("Initialized Log!"); NF_CORE_INFO("Initialized Log!");
// Start application // Start application
auto app = Engine::createApplication(); auto app = Inferno::createApplication();
app->run(); app->run();
delete app; delete app;

6
engine/src/engine/log.cpp → inferno/src/inferno/log.cpp

@ -1,8 +1,8 @@
#include <cstdio> // printf #include <cstdio> // printf
#include "log.h" #include "inferno/log.h"
namespace Engine { namespace Inferno {
// Reserve memory // Reserve memory
std::shared_ptr<Logger> Log::m_engineLogger; std::shared_ptr<Logger> Log::m_engineLogger;
@ -11,7 +11,7 @@ namespace Engine {
void Log::init() void Log::init()
{ {
// Create engine Logger // Create engine Logger
m_engineLogger = std::make_shared<Logger>("Engine"); m_engineLogger = std::make_shared<Logger>("Inferno");
// Create game Logger // Create game Logger
m_gameLogger = std::make_shared<Logger>("Game"); m_gameLogger = std::make_shared<Logger>("Game");
} }

24
engine/src/engine/log.h → inferno/src/inferno/log.h

@ -3,7 +3,7 @@
#include <memory> #include <memory>
namespace Engine { namespace Inferno {
class Logger; class Logger;
@ -40,16 +40,16 @@ namespace Engine {
} }
#define NF_CORE_LOG(x) Engine::Log::getEngineLogger()->log(x) #define NF_CORE_LOG(x) Inferno::Log::getEngineLogger()->log(x)
#define NF_CORE_INFO(x) Engine::Log::getEngineLogger()->info(x) #define NF_CORE_INFO(x) Inferno::Log::getEngineLogger()->info(x)
#define NF_CORE_WARN(x) Engine::Log::getEngineLogger()->warn(x) #define NF_CORE_WARN(x) Inferno::Log::getEngineLogger()->warn(x)
#define NF_CORE_DANGER(x) Engine::Log::getEngineLogger()->danger(x) #define NF_CORE_DANGER(x) Inferno::Log::getEngineLogger()->danger(x)
#define NF_CORE_SUCCESS(x) Engine::Log::getEngineLogger()->success(x) #define NF_CORE_SUCCESS(x) Inferno::Log::getEngineLogger()->success(x)
#define NF_LOG(x) Engine::Log::getGameLogger()->log(x) #define NF_LOG(x) Inferno::Log::getGameLogger()->log(x)
#define NF_INFO(x) Engine::Log::getGameLogger()->info(x) #define NF_INFO(x) Inferno::Log::getGameLogger()->info(x)
#define NF_WARN(x) Engine::Log::getGameLogger()->warn(x) #define NF_WARN(x) Inferno::Log::getGameLogger()->warn(x)
#define NF_DANGER(x) Engine::Log::getGameLogger()->danger(x) #define NF_DANGER(x) Inferno::Log::getGameLogger()->danger(x)
#define NF_SUCCESS(x) Engine::Log::getGameLogger()->success(x) #define NF_SUCCESS(x) Inferno::Log::getGameLogger()->success(x)
#endif // LOG_H #endif // LOG_H

0
engine/vendor/glad/include/KHR/khrplatform.h → inferno/vendor/glad/include/KHR/khrplatform.h vendored

0
engine/vendor/glad/include/glad/glad.h → inferno/vendor/glad/include/glad/glad.h vendored

0
engine/vendor/glad/src/glad.c → inferno/vendor/glad/src/glad.c vendored

Loading…
Cancel
Save