new build system config
This commit is contained in:
parent
96867d6e1b
commit
5ab93d62ad
50 changed files with 81 additions and 46 deletions
34
game/Build-Game.lua
Normal file
34
game/Build-Game.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
project "Game"
|
||||
kind "ConsoleApp"
|
||||
language "C"
|
||||
staticruntime "Off"
|
||||
targetdir "bin/%{cfg.buildcfg}"
|
||||
|
||||
files { "src/*.c" }
|
||||
includedirs {
|
||||
"src/",
|
||||
"../core/src"
|
||||
}
|
||||
links {
|
||||
"Fencer-Core"
|
||||
}
|
||||
|
||||
targetdir ("../bin" .. OutputDir .. "/%{prj.name}" )
|
||||
objdir ("../intermediate" .. OutputDir .. "/%{prj.name}" )
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines { "DEBUG" }
|
||||
runtime "Debug"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines { "RELEASE" }
|
||||
runtime "Release"
|
||||
optimize "On"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Dist"
|
||||
defines { "DIST" }
|
||||
runtime "Release"
|
||||
optimize "On"
|
||||
symbols "Off"
|
||||
25
game/src/fencer.c
Normal file
25
game/src/fencer.c
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "camera.h"
|
||||
#include "program.h"
|
||||
|
||||
static
|
||||
void play() {
|
||||
g_camera.fov = 40;
|
||||
}
|
||||
|
||||
static
|
||||
void tick() {}
|
||||
|
||||
static
|
||||
void draw() {}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
struct ProgramSettings config = {
|
||||
.target_fps = 240,
|
||||
.title = "fencer",
|
||||
.view_resolution = {1920, 1080},
|
||||
.on_play = &play,
|
||||
.on_tick = &tick,
|
||||
.on_draw = &draw
|
||||
};
|
||||
program_run(&config);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue