Rename Engine to Inferno
This commit is contained in:
+1
-1
@@ -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")
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
public:
|
||||||
Game() {};
|
Game() {};
|
||||||
~Game() {};
|
~Game() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
Engine::Application* Engine::createApplication()
|
Inferno::Application* Inferno::createApplication()
|
||||||
{
|
{
|
||||||
return new Game();
|
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 <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();
|
||||||
@@ -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
|
||||||
@@ -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;
|
||||||
|
|
||||||
@@ -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");
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
Vendored
Reference in New Issue
Block a user