This commit is contained in:
NishiOwO 2025-04-20 15:28:01 +09:00
parent 8078a8c33c
commit 9058b416ae
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
12 changed files with 3994 additions and 2 deletions

View File

@ -7,4 +7,5 @@
- [Lua](https://lua.org)
- [stb](https://github.com/nothings/stb)
- [miniaudio](https://github.com/mackron/miniaudio)
- [jar](https://github.com/kd7tck/jar)
- [Premake5](https://premake.github.io)

1
engine/external/jar/README.md vendored Normal file
View File

@ -0,0 +1 @@
This is modified version of [jar](https://github.com/kd7tck/jar).

1384
engine/external/jar/jar_mod.h vendored Normal file

File diff suppressed because it is too large Load Diff

2534
engine/external/jar/jar_xm.h vendored Normal file

File diff suppressed because it is too large Load Diff

2
engine/gf_jar_mod.c Normal file
View File

@ -0,0 +1,2 @@
#define JAR_MOD_IMPLEMENTATION
#include <jar_mod.h>

2
engine/gf_jar_xm.c Normal file
View File

@ -0,0 +1,2 @@
#define JAR_XM_IMPLEMENTATION
#include <jar_xm.h>

View File

@ -11,6 +11,7 @@
#include <gf_macro.h>
/* Type */
#include <gf_type/input.h>
/* Engine */

View File

@ -113,6 +113,14 @@
#define GF_EXPOSE_FONT
#endif
#ifndef GF_EXPOSE_INPUT
/**
* @~english
* @brief Expose input interface properties
*/
#define GF_EXPOSE_INPUT
#endif
#ifndef GF_EXPOSE_GRAPHIC
/**
* @~english

View File

@ -0,0 +1,34 @@
/**
* @file gf_type/compat.h
* @~english
* @brief Type definitions for C99 types in C89
*/
#ifndef __GF_TYPE_COMPAT_H__
#define __GF_TYPE_COMPAT_H__
#ifdef __STDC_VERSION__
#if __STDC_VERSION__ >= 199901L
#define GF_IS_C99
#endif
#endif
#ifdef GF_IS_C99
#include <stdbool.h>
#include <stdint.h>
#define gf_true true
#define gf_false false
typedef bool gf_bool_t;
typedef uint8_t gf_uint8_t;
typedef uint16_t gf_uint16_t;
typedef uint32_t gf_uint32_t;
typedef uint64_t gf_uint64_t;
typedef int8_t gf_int8_t;
typedef int16_t gf_int16_t;
typedef int32_t gf_int32_t;
typedef int64_t gf_int64_t;
#else
#endif
#endif

View File

@ -0,0 +1,24 @@
/**
* @file gf_type/input.h
* @~english
* @brief Type definitions related to input interface
*/
#ifndef __GF_TYPE_INPUT_H__
#define __GF_TYPE_INPUT_H__
#include <gf_pre.h>
#include <gf_macro.h>
#ifdef GF_EXPOSE_INPUT
/* External library */
/* Engine */
#include <gf_type/draw.h>
#include <gf_type/core.h>
/* Standard */
#else
#endif
#endif

View File

@ -286,7 +286,8 @@ project("GoldFish")
"external/lua",
"external/zlib",
"external/miniaudio",
"external/stb"
"external/stb",
"external/jar",
})
files({
"include/**.h",

View File

@ -1,2 +1,2 @@
#!/bin/sh
exec clang-format --verbose -i `find engine src "(" -name "*.c" -or -name "*.h" ")" -and -not -path "engine/external/*"`
exec clang-format --verbose -i `find engine src "(" -name "*.c" -or -name "*.h" ")" -and -not -path "engine/external/*"` engine/external/jar/*.h