From 6d56a40ab03a80002f68e01ed814d3afbd9714c1 Mon Sep 17 00:00:00 2001
From: Atdunbg <979541498@qq.com>
Date: Wed, 16 Apr 2025 20:41:18 +0800
Subject: [PATCH] Setup basic Application and Entry Point
---
.gitignore | 7 +++
Hazel.sln | 31 +++++++++++
Hazel/Hazel.vcxproj | 94 ++++++++++++++++++++++++++++++++
Hazel/Hazel.vcxproj.filters | 36 +++++++++++++
Hazel/src/Hazel.h | 10 ++++
Hazel/src/Hazel/Application.cpp | 20 +++++++
Hazel/src/Hazel/Application.h | 20 +++++++
Hazel/src/Hazel/Core.h | 14 +++++
Hazel/src/Hazel/EntryPoint.h | 16 ++++++
Sandbox/Sandbox.vcxproj | 95 +++++++++++++++++++++++++++++++++
Sandbox/Sandbox.vcxproj.filters | 22 ++++++++
Sandbox/src/SandboxApp.cpp | 24 +++++++++
12 files changed, 389 insertions(+)
create mode 100644 .gitignore
create mode 100644 Hazel.sln
create mode 100644 Hazel/Hazel.vcxproj
create mode 100644 Hazel/Hazel.vcxproj.filters
create mode 100644 Hazel/src/Hazel.h
create mode 100644 Hazel/src/Hazel/Application.cpp
create mode 100644 Hazel/src/Hazel/Application.h
create mode 100644 Hazel/src/Hazel/Core.h
create mode 100644 Hazel/src/Hazel/EntryPoint.h
create mode 100644 Sandbox/Sandbox.vcxproj
create mode 100644 Sandbox/Sandbox.vcxproj.filters
create mode 100644 Sandbox/src/SandboxApp.cpp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3304ed3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Directories
+.vs/
+bin/
+bin-int/
+
+# Files
+*.user
\ No newline at end of file
diff --git a/Hazel.sln b/Hazel.sln
new file mode 100644
index 0000000..b97861e
--- /dev/null
+++ b/Hazel.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35825.156 d17.13
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hazel", "Hazel\Hazel.vcxproj", "{849C6C03-8690-44EE-AD89-7022698623BC}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sandbox", "Sandbox\Sandbox.vcxproj", "{67A786AC-E29D-4DEC-9CD8-4654B86AB54A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {849C6C03-8690-44EE-AD89-7022698623BC}.Debug|x64.ActiveCfg = Debug|x64
+ {849C6C03-8690-44EE-AD89-7022698623BC}.Debug|x64.Build.0 = Debug|x64
+ {849C6C03-8690-44EE-AD89-7022698623BC}.Release|x64.ActiveCfg = Release|x64
+ {849C6C03-8690-44EE-AD89-7022698623BC}.Release|x64.Build.0 = Release|x64
+ {67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Debug|x64.ActiveCfg = Debug|x64
+ {67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Debug|x64.Build.0 = Debug|x64
+ {67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Release|x64.ActiveCfg = Release|x64
+ {67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FAA4817D-A037-4E07-9AE8-B264EF56EEBF}
+ EndGlobalSection
+EndGlobal
diff --git a/Hazel/Hazel.vcxproj b/Hazel/Hazel.vcxproj
new file mode 100644
index 0000000..ba03db0
--- /dev/null
+++ b/Hazel/Hazel.vcxproj
@@ -0,0 +1,94 @@
+
+
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+ 17.0
+ Win32Proj
+ {849c6c03-8690-44ee-ad89-7022698623bc}
+ Hazel
+ 10.0
+
+
+
+ DynamicLibrary
+ true
+ v143
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v143
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)bin\$(Configuration)-$(Platform)\$(ProjectName)\
+ $(SolutionDir)bin-int\$(Configuration)-$(Platform)\$(ProjectName)\
+
+
+ $(SolutionDir)bin\${Configuration)-$(Platform)\$(Project)\
+ $(SolutionDir)bin-int\${Configuration)-$(Platform)\$(Project)\
+
+
+
+ Level3
+ true
+ HZ_PLATFORM_WINDOWS;HZ_BUILD_DLL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ Level3
+ true
+ true
+ true
+ HZ_PLATFORM_WINDOWS;HZ_BUILD_DLL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Hazel/Hazel.vcxproj.filters b/Hazel/Hazel.vcxproj.filters
new file mode 100644
index 0000000..21bb94f
--- /dev/null
+++ b/Hazel/Hazel.vcxproj.filters
@@ -0,0 +1,36 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ 头文件
+
+
+ 头文件
+
+
+ 头文件
+
+
+ 头文件
+
+
+
+
+ 源文件
+
+
+
\ No newline at end of file
diff --git a/Hazel/src/Hazel.h b/Hazel/src/Hazel.h
new file mode 100644
index 0000000..b3ef289
--- /dev/null
+++ b/Hazel/src/Hazel.h
@@ -0,0 +1,10 @@
+#pragma once
+
+// For use by Hazel Applications
+
+#include "Hazel/Application.h"
+
+
+// ------------------------ Entry Point ------------------------
+#include "Hazel/EntryPoint.h"
+// -----------------------------------------------------------------
diff --git a/Hazel/src/Hazel/Application.cpp b/Hazel/src/Hazel/Application.cpp
new file mode 100644
index 0000000..93533e3
--- /dev/null
+++ b/Hazel/src/Hazel/Application.cpp
@@ -0,0 +1,20 @@
+#include "Application.h"
+
+namespace Hazel {
+
+ Application::Application() {
+
+ }
+
+ Application::~Application() {
+
+ }
+
+ void Application::Run() {
+ while (true)
+ {
+
+ }
+ }
+
+}
diff --git a/Hazel/src/Hazel/Application.h b/Hazel/src/Hazel/Application.h
new file mode 100644
index 0000000..d167de7
--- /dev/null
+++ b/Hazel/src/Hazel/Application.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "Core.h"
+
+namespace Hazel {
+
+ class HAZEL_API Application
+ {
+ public:
+ Application();
+ virtual ~Application();
+
+ void Run();
+
+ private:
+ };
+
+ // to be defined int CLIENT
+ Application* CreateApplication();
+
+}
diff --git a/Hazel/src/Hazel/Core.h b/Hazel/src/Hazel/Core.h
new file mode 100644
index 0000000..e78e5b3
--- /dev/null
+++ b/Hazel/src/Hazel/Core.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#ifdef HZ_PLATFORM_WINDOWS
+ #ifdef HZ_BUILD_DLL
+ #define HAZEL_API __declspec(dllexport)
+ #else
+ #define HAZEL_API __declspec(dllimport)
+ #endif
+
+#else
+ #error Hazel only support Windows!
+#endif // HZ_PLATFORM_WINDOWS
+
+
diff --git a/Hazel/src/Hazel/EntryPoint.h b/Hazel/src/Hazel/EntryPoint.h
new file mode 100644
index 0000000..a85e8fc
--- /dev/null
+++ b/Hazel/src/Hazel/EntryPoint.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#ifdef HZ_PLATFORM_WINDOWS
+
+#include
+
+extern Hazel::Application* Hazel::CreateApplication();
+
+int main(int argc, char** argv[]) {
+ printf("hazel engine!");
+ auto app = Hazel::CreateApplication();
+ app->Run();
+}
+
+#endif // HZ_PLATFORM_WINDOWS
+
diff --git a/Sandbox/Sandbox.vcxproj b/Sandbox/Sandbox.vcxproj
new file mode 100644
index 0000000..f001947
--- /dev/null
+++ b/Sandbox/Sandbox.vcxproj
@@ -0,0 +1,95 @@
+
+
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 17.0
+ Win32Proj
+ {67a786ac-e29d-4dec-9cd8-4654b86ab54a}
+ Sandbox
+ 10.0
+
+
+
+ Application
+ true
+ v143
+ Unicode
+
+
+ Application
+ false
+ v143
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)bin\$(Configuration)-$(Platform)\$(ProjectName)\
+ $(SolutionDir)bin-int\$(Configuration)-$(Platform)\$(ProjectName)\
+
+
+ $(SolutionDir)bin\${Configuration)-$(Platform)\$(Project)\
+ $(SolutionDir)bin-int\${Configuration)-$(Platform)\$(Project)\
+
+
+
+ Level3
+ true
+ HZ_PLATFORM_WINDOWS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ $(SolutionDir)Hazel\src
+
+
+ Console
+ true
+
+
+
+
+ Level3
+ true
+ true
+ true
+ HZ_PLATFORM_WINDOWS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ $(SolutionDir)Hazel\src
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ {849c6c03-8690-44ee-ad89-7022698623bc}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Sandbox/Sandbox.vcxproj.filters b/Sandbox/Sandbox.vcxproj.filters
new file mode 100644
index 0000000..3b6d14b
--- /dev/null
+++ b/Sandbox/Sandbox.vcxproj.filters
@@ -0,0 +1,22 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ 源文件
+
+
+
\ No newline at end of file
diff --git a/Sandbox/src/SandboxApp.cpp b/Sandbox/src/SandboxApp.cpp
new file mode 100644
index 0000000..47ca95b
--- /dev/null
+++ b/Sandbox/src/SandboxApp.cpp
@@ -0,0 +1,24 @@
+#include
+
+class Sandbox : public Hazel::Application
+{
+public:
+ Sandbox();
+ ~Sandbox();
+
+private:
+
+};
+
+Sandbox::Sandbox()
+{
+
+}
+
+Sandbox::~Sandbox()
+{
+}
+
+Hazel::Application* Hazel::CreateApplication() {
+ return new Sandbox();
+}