commit 43e5709261c80abd34a2c6bcdac6614c62106ebd
parent ff4cf6e4558768f9d7662153e37f90825316bbad
Author: William Casarin <jb55@jb55.com>
Date: Sat, 24 Jul 2021 14:34:34 -0700
wasm debug stuff
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -79,7 +79,7 @@ install: $(BIN)
install -d $(PREFIX)/bin
install $(BIN) $(PREFIX)/bin
-TAGS:
- etags $(SRCS)
+tags:
+ ctags $(SRCS)
.PHONY: TAGS
diff --git a/src/file.c b/src/file.c
@@ -2,8 +2,10 @@
#include <stdio.h>
#include <stdlib.h>
#include "file.h"
+#include "debug.h"
#include <sys/stat.h>
+#include <string.h>
time_t file_mtime(const char *filename) {
// TODO: windows file_mtime
diff --git a/src/game.c b/src/game.c
@@ -224,19 +224,28 @@ void init_resources(struct resources *res)
void game_init(struct game *game, int width, int height) {
init_resources(&game->test_resources);
+ debug("init sdl...\n");
init_sdl(&game->window, width, height);
+ debug("init gl...\n");
init_gl(&game->test_resources, width, height);
+ debug("init entities...\n");
init_entity_system();
+ debug("init geom...\n");
init_geometry_manager();
+ debug("init modelman...\n");
init_model_manager();
+ debug("init nodeman...\n");
init_node_manager();
+ debug("init user settings...\n");
init_user_settings(&game->user_settings);
check_gl();
game->wireframe = 0;
+ debug("init input...\n");
init_input(&game->input);
//init_controller(&game->input);
+ debug("init misc...\n");
init_misc(game, width, height);
}