diff --git a/Game/Game.vcxproj b/Game/Game.vcxproj
index 953d3f4..22441d8 100644
--- a/Game/Game.vcxproj
+++ b/Game/Game.vcxproj
@@ -97,9 +97,10 @@
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\;$(SolutionDir)NothinFancy\src\include\
+ $(IntDir)obj\
- Windows
+ Console
true
mainCRTStartup
@@ -113,9 +114,10 @@
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\;$(SolutionDir)NothinFancy\src\include\
+ $(IntDir)obj\
- Console
+ Windows
true
true
true
@@ -128,9 +130,10 @@
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\;$(SolutionDir)NothinFancy\src\include\
+ $(IntDir)obj\
- Windows
+ Console
true
mainCRTStartup
@@ -144,9 +147,10 @@
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\;$(SolutionDir)NothinFancy\src\include\
+ $(IntDir)obj\
- Console
+ Windows
true
true
true
diff --git a/Game/src/Game.cpp b/Game/src/Game.cpp
index b7a65e8..9a2ebc6 100644
--- a/Game/src/Game.cpp
+++ b/Game/src/Game.cpp
@@ -1,7 +1,12 @@
-#include "Application.h"
+#include "NothinFancy.h"
+
+using namespace nf;
int main(int argc, char* argv[]) {
-
+ Config conf = { 1280, 720, false };
+ Application app(conf);
+
+
return 0;
}
\ No newline at end of file
diff --git a/NothinFancy/NothinFancy.vcxproj b/NothinFancy/NothinFancy.vcxproj
index caac4a1..d4be819 100644
--- a/NothinFancy/NothinFancy.vcxproj
+++ b/NothinFancy/NothinFancy.vcxproj
@@ -97,6 +97,7 @@
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\
+ $(IntDir)obj\
Console
@@ -112,6 +113,7 @@
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\
+ $(IntDir)obj\
Console
@@ -127,6 +129,7 @@
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\
+ $(IntDir)obj\
Console
@@ -142,6 +145,7 @@
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
$(ProjectDir)src\include\
+ $(IntDir)obj\
Console
@@ -151,12 +155,14 @@
-
-
+
+
+
+
diff --git a/NothinFancy/NothinFancy.vcxproj.filters b/NothinFancy/NothinFancy.vcxproj.filters
index 19b3816..1bb77cc 100644
--- a/NothinFancy/NothinFancy.vcxproj.filters
+++ b/NothinFancy/NothinFancy.vcxproj.filters
@@ -18,10 +18,7 @@
Source Files
-
- Source Files
-
-
+
Source Files
@@ -29,5 +26,14 @@
Header Files
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
\ No newline at end of file
diff --git a/NothinFancy/src/Application.cpp b/NothinFancy/src/Application.cpp
index 1fbebef..637876c 100644
--- a/NothinFancy/src/Application.cpp
+++ b/NothinFancy/src/Application.cpp
@@ -1,7 +1,13 @@
#include "Application.h"
+#include "Utility.h"
+#include
namespace nf {
- Application::Application(Config& config) {
+ DEBUGINIT;
+ Application::Application(Config& config) :
+ m_currentConfig(config)
+ {
+ std::cin.get();
}
}
\ No newline at end of file
diff --git a/NothinFancy/src/Config.cpp b/NothinFancy/src/Config.cpp
deleted file mode 100644
index e69de29..0000000
diff --git a/NothinFancy/src/Utility.cpp b/NothinFancy/src/Utility.cpp
new file mode 100644
index 0000000..a2826f8
--- /dev/null
+++ b/NothinFancy/src/Utility.cpp
@@ -0,0 +1,9 @@
+//TODO: Debug logger
+//TODO: Argument parser
+//TODO: Resource pack reader
+#include "Utility.h"
+#include "Config.h"
+
+namespace nf {
+
+}
\ No newline at end of file
diff --git a/NothinFancy/src/include/Application.h b/NothinFancy/src/include/Application.h
index 8db660e..6e19619 100644
--- a/NothinFancy/src/include/Application.h
+++ b/NothinFancy/src/include/Application.h
@@ -1,14 +1,14 @@
#pragma once
#include "Config.h"
+#include
namespace nf {
class Application {
public:
- Application(Config& conf) {
-
- }
-
+ Application(Config& conf);
+ Application() = delete;
+ Application(Application& other) = delete;
private:
-
+ Config m_currentConfig;
};
}
\ No newline at end of file
diff --git a/NothinFancy/src/include/Config.h b/NothinFancy/src/include/Config.h
index 1ee167d..7469562 100644
--- a/NothinFancy/src/include/Config.h
+++ b/NothinFancy/src/include/Config.h
@@ -1,12 +1,10 @@
#pragma once
namespace nf {
- class Config {
+ struct Config {
public:
- Config() {
-
- }
- private:
-
+ int m_width;
+ int m_height;
+ bool m_fullscreen;
};
}
\ No newline at end of file
diff --git a/NothinFancy/src/include/NothinFancy.h b/NothinFancy/src/include/NothinFancy.h
new file mode 100644
index 0000000..b32f466
--- /dev/null
+++ b/NothinFancy/src/include/NothinFancy.h
@@ -0,0 +1,5 @@
+//Master engine include (Is this even useful?)
+
+#include "Application.h"
+#include "Config.h"
+#include "Utility.h"
\ No newline at end of file
diff --git a/NothinFancy/src/include/Utility.h b/NothinFancy/src/include/Utility.h
new file mode 100644
index 0000000..ab2068f
--- /dev/null
+++ b/NothinFancy/src/include/Utility.h
@@ -0,0 +1,28 @@
+#pragma once
+#include
+#include
+
+
+namespace nf {
+#ifdef _DEBUG
+#define __FILENAME__ strrchr(__FILE__, '\\') + 1
+#define DEBUGINIT std::chrono::steady_clock::time_point Debug::m_initTime = std::chrono::high_resolution_clock::now();
+#define Log(x) Debug::LogImp(x) s
+#define Error(x) Debug::ErrorImp(x,__FILENAME__, __LINE__);\
+DebugBreak();
+
+ class Debug {
+ private:
+ static std::chrono::steady_clock::time_point m_initTime;
+ public:
+ static void LogImp(char* in);
+ static void LogImp(std::string& in);
+ static void ErrorImp(char* in, char* filename, int line);
+ };
+
+#else
+#define DEBUGINIT
+#define Log(x)
+#define Error(x)
+#endif
+}
\ No newline at end of file