-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 00a310c
Showing
4 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.vscode | ||
/AxonEngine.make | ||
/Makefile | ||
/build |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
|
||
|
||
workspace "Axon" | ||
configurations { | ||
-- standard debug config, all symbols on | ||
"Debug64", | ||
-- release config, optimised for binary size | ||
"ReleaseSize64", | ||
-- release config, optimised for binary speed | ||
"ReleaseSpeed64", | ||
-- release config, with all optimisations turned on | ||
"Release64", | ||
|
||
-- 32-bit opposites (probably won't be used much, if at all) | ||
|
||
"Debug32", | ||
"ReleaseSize32", | ||
"ReleaseSpeed32", | ||
"Release32" | ||
} | ||
|
||
project "AxonEngine" | ||
-- Make this a library eventually | ||
kind "WindowedApp" | ||
language "C++" | ||
-- Using C++20, for concepts | ||
cppdialect "C++20" | ||
|
||
targetdir "build/bin/%{cfg.buildcfg}" | ||
objdir "build/obj/%{cfg.buildcfg}" | ||
|
||
files { | ||
"src/**.cpp", | ||
"include/**.h" | ||
} | ||
|
||
includedirs "include" | ||
links { | ||
"SDL2", | ||
"SDL2_image" | ||
} | ||
|
||
|
||
-- 32 Bit arch | ||
filter "configurations:*32" | ||
architecture "x86" | ||
|
||
|
||
filter "configurations:Debug32" | ||
defines { | ||
"AXON_DEBUG", | ||
"AXON_32" | ||
} | ||
symbols "On" | ||
optimize "Off" | ||
|
||
filter "configurations:ReleaseSize32" | ||
defines { | ||
"AXON_RELEASE_SIZE", | ||
"AXON_32" | ||
} | ||
symbols "Off" | ||
optimize "Size" | ||
|
||
filter "configurations:ReleaseSpeed32" | ||
defines { | ||
"AXON_RELEASE_SPEED", | ||
"AXON_32" | ||
} | ||
symbols "Off" | ||
optimize "Speed" | ||
|
||
filter "configurations:Release32" | ||
defines { | ||
"AXON_RELEASE", | ||
"AXON_32" | ||
} | ||
symbols "Off" | ||
optimize "Full" | ||
|
||
-- 64 Bit arch | ||
filter "configurations:*64" | ||
architecture "x86_64" | ||
|
||
filter "configurations:Debug64" | ||
defines {"AXON_DEBUG", "AXON_64"} | ||
symbols "On" | ||
optimize "Off" | ||
|
||
filter "configurations:ReleaseSize64" | ||
defines { | ||
"AXON_RELEASE_SIZE", | ||
"AXON_64" | ||
} | ||
symbols "Off" | ||
optimize "Size" | ||
|
||
filter "configurations:ReleaseSpeed64" | ||
defines { | ||
"AXON_RELEASE_SPEED", | ||
"AXON_64" | ||
} | ||
symbols "Off" | ||
optimize "Speed" | ||
|
||
filter "configurations:Release64" | ||
defines { | ||
"AXON_RELEASE", | ||
"AXON_64" | ||
} | ||
symbols "Off" | ||
optimize "Full" | ||
|
||
|
||
filter {"action:gmake*", "system:linux"} | ||
-- Warnings | ||
buildoptions { | ||
"-Wall", | ||
"-Wpedantic", | ||
"-Wextra" | ||
} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#include <iostream> | ||
#include <SDL2/SDL.h> | ||
#include <string> | ||
|
||
std::string getTitle() { | ||
std::string title = "AxonEngine ["; | ||
|
||
#ifdef AXON_DEBUG | ||
title.append("Debug, "); | ||
#else | ||
title.append("Release, "); | ||
#endif | ||
|
||
#ifdef AXON_64 | ||
title.append("64-Bit]"); | ||
#else | ||
title.append("32-Bit]"); | ||
#endif | ||
|
||
return title; | ||
} | ||
|
||
int main(int argc, const char* argv[]) { | ||
|
||
SDL_Init(SDL_INIT_VIDEO); | ||
SDL_Window* window; | ||
|
||
window = SDL_CreateWindow( | ||
getTitle().c_str(), | ||
SDL_WINDOWPOS_CENTERED, | ||
SDL_WINDOWPOS_CENTERED, | ||
1280, | ||
720, | ||
SDL_WINDOW_SHOWN | ||
); | ||
|
||
if (window == nullptr) { | ||
std::cout << "Failure to create window: \n " << SDL_GetError() << std::endl; | ||
SDL_Quit(); | ||
return -1; | ||
} | ||
|
||
SDL_Delay(5000); | ||
|
||
SDL_DestroyWindow(window); | ||
|
||
SDL_Quit(); | ||
|
||
return 0; | ||
} |