Compare commits
No commits in common. "695784301d22ff10dc99ee44d8d41ab82b9bdcb9" and "898c11bbdfff96a7864bc856de01bd1bd21e4575" have entirely different histories.
695784301d
...
898c11bbdf
@ -309,7 +309,7 @@ function(use_townengine target sources output_directory)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_options(${target} PRIVATE
|
target_compile_options(${target} PRIVATE
|
||||||
$<$<BOOL:${EMSCRIPTEN}>:--shell-file ${TWN_ROOT_DIR}/src/shell_minimal.html>)
|
$<$<BOOL:${EMSCRIPTEN}>:--shell-file ${TWN_ROOT_DIR}/shell_minimal.html>)
|
||||||
|
|
||||||
# system libraries
|
# system libraries
|
||||||
find_library(MATH_LIBRARY m)
|
find_library(MATH_LIBRARY m)
|
||||||
|
@ -103,7 +103,7 @@ static void benchmark(struct state *state) {
|
|||||||
void game_tick(void) {
|
void game_tick(void) {
|
||||||
if (ctx.initialization_needed) {
|
if (ctx.initialization_needed) {
|
||||||
if (!ctx.udata) {
|
if (!ctx.udata) {
|
||||||
ctx.udata = calloc(1, sizeof (struct state));
|
ctx.udata = ccalloc(1, sizeof (struct state));
|
||||||
struct state *state = ctx.udata;
|
struct state *state = ctx.udata;
|
||||||
state->r = 24;
|
state->r = 24;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
struct FilewatchEntry {
|
struct FilewatchEntry {
|
||||||
char *path;
|
char *path;
|
||||||
FilewatchCallback callback;
|
FileatchCallback callback;
|
||||||
enum FilewatchAction *actions_pending;
|
enum FilewatchAction *actions_pending;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ static void filewatch_callback(dmon_watch_id watch_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool filewatch_add_directory(char const *dir, FilewatchCallback callback) {
|
bool filewatch_add_directory(char const *dir, FileatchCallback callback) {
|
||||||
SDL_assert(dir && callback);
|
SDL_assert(dir && callback);
|
||||||
|
|
||||||
if (!filewatcher_initialized) {
|
if (!filewatcher_initialized) {
|
||||||
@ -82,7 +82,7 @@ bool filewatch_add_directory(char const *dir, FilewatchCallback callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool filewatch_add_file(char const *filepath, FilewatchCallback callback) {
|
bool filewatch_add_file(char const *filepath, FileatchCallback callback) {
|
||||||
SDL_assert(filepath && callback);
|
SDL_assert(filepath && callback);
|
||||||
|
|
||||||
if (!filewatcher_initialized) {
|
if (!filewatcher_initialized) {
|
||||||
|
@ -10,11 +10,11 @@ enum FilewatchAction {
|
|||||||
FILEWATCH_ACTION_FILE_MODIFIED,
|
FILEWATCH_ACTION_FILE_MODIFIED,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*FilewatchCallback)(char const *path, enum FilewatchAction action);
|
typedef void (*FileatchCallback)(char const *path, enum FilewatchAction action);
|
||||||
|
|
||||||
bool filewatch_add_directory(char const *dir, FilewatchCallback callback);
|
bool filewatch_add_directory(char const *dir, FileatchCallback callback);
|
||||||
|
|
||||||
bool filewatch_add_file(char const *file, FilewatchCallback callback);
|
bool filewatch_add_file(char const *file, FileatchCallback callback);
|
||||||
|
|
||||||
void filewatch_poll(void);
|
void filewatch_poll(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user