Rename Engine to Inferno
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
# ------------------------------------------
|
||||
|
||||
# Set engine name
|
||||
set(ENGINE "engine")
|
||||
set(ENGINE "inferno")
|
||||
# Set project name
|
||||
set(GAME "game")
|
||||
|
||||
|
||||
@@ -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
|
||||
+3
-3
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -3,12 +3,12 @@
|
||||
#include <glad/glad.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#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();
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <cstdio> // printf
|
||||
|
||||
#include "log.h"
|
||||
#include "inferno/log.h"
|
||||
|
||||
namespace Engine {
|
||||
namespace Inferno {
|
||||
|
||||
// Reserve memory
|
||||
std::shared_ptr<Logger> Log::m_engineLogger;
|
||||
@@ -11,7 +11,7 @@ namespace Engine {
|
||||
void Log::init()
|
||||
{
|
||||
// Create engine Logger
|
||||
m_engineLogger = std::make_shared<Logger>("Engine");
|
||||
m_engineLogger = std::make_shared<Logger>("Inferno");
|
||||
// Create game Logger
|
||||
m_gameLogger = std::make_shared<Logger>("Game");
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
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_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) 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_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
|
||||
Vendored
Reference in New Issue
Block a user