Merge remote-tracking branch 'origin/template' into template-test

This commit is contained in:
Sara 2023-11-22 11:45:10 +01:00
commit 9f3bfcb879
13 changed files with 26 additions and 8 deletions

6
.gitignore vendored
View file

@ -3,5 +3,11 @@
bin/
build/
intermediate/
packages/
*.vcxproj
*.vcxproj.user
compile_commands.json
Makefile
.vs
.idea
*.sln

View file

@ -1,12 +1,14 @@
workspace "Fencer-Template"
architecture "x64"
configurations { "Debug", "Release", "Dist" }
language "C"
startproject "Game"
filter "system:windows"
defines { "SDL_MAIN_HANDLED" }
buildoptions { "/EHsc", "/Zc:preprocessor" }
OutputDir = "%{cfg.system}-%{cfg.architecture}/${cfg.buildcfg}"
OutputDir = "%{cfg.system}-%{cfg.architecture}/%{cfg.buildcfg}"
group "Core"

BIN
SDL2.dll Normal file

Binary file not shown.

BIN
SDL2.lib Normal file

Binary file not shown.

BIN
SDL2_image.dll Normal file

Binary file not shown.

BIN
SDL2_image.lib Normal file

Binary file not shown.

BIN
SDL2main.lib Normal file

Binary file not shown.

BIN
SDL2test.lib Normal file

Binary file not shown.

View file

@ -6,7 +6,7 @@ project "Engine-Core"
defines { "VMATH_SDL" }
files { "src/**.c" }
files { "src/**.c", "src/**.h" }
includedirs { "src/" }
targetdir ( "../bin/" .. OutputDir .. "/%{prj.name}" )

View file

@ -23,7 +23,7 @@ static inline Asset T##_as_Asset(T* x) {\
TC_FN_TYPECHECK(asset_id, get_id_f, T*);\
TC_FN_TYPECHECK(void, set_id_f, T*, asset_id);\
TC_FN_TYPECHECK(Drop, T##_as_Drop, T*);\
static IAsset tc = (IAsset){\
static IAsset const tc = {\
.get_id = (asset_id(*const)(void*)) get_id_f,\
.set_id = (void(*const)(void*,asset_id)) set_id_f,\
};\

View file

@ -25,7 +25,7 @@ impl_Drop_for(Spritesheet,
_internal_spritesheet_destroy
)
impl_Asset_for(Spritesheet,
impl_Asset_for(Spritesheet,
spritesheet_get_asset_id,
spritesheet_set_asset_id
)

View file

@ -4,6 +4,11 @@
#include "stddef.h"
#include <math.h>
#if defined _WIN32 && ! defined isnanf
# define isnanf(x) _isnanf(x)
# define HAVE_ISNANF
#endif
#if VMATH_SDL == 1
#include <SDL2/SDL_rect.h>

View file

@ -1,12 +1,12 @@
project "Game"
kind "ConsoleApp"
kind "WindowedApp"
language "C"
staticruntime "Off"
targetdir "bin/%{cfg.buildcfg}"
defines { "VMATH_SDL" }
files { "src/*.c" }
files { "src/**.c", "src/**.h" }
includedirs {
"src/",
"../core/src"
@ -15,11 +15,16 @@ project "Game"
"Engine-Core"
}
links { "SDL2", "SDL2_image", "SDL2_ttf", "m", "cjson"}
targetdir ("../bin/" .. OutputDir .. "/%{prj.name}" )
objdir ("../intermediate/" .. OutputDir .. "/%{prj.name}" )
filter "system:linux"
links { "SDL2", "SDL2_image", "SDL2_ttf", "m", "cjson"}
filter "system:windows"
linkoptions { "/ENTRY:mainCRTStartup" }
links { "../SDL2.dll", "../SDL2_image.dll" }
filter "configurations:Debug"
defines { "DEBUG" }
runtime "Debug"