From ca0419ab4606e7a62b332574494f4f75ad305020 Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Wed, 7 Sep 2022 15:34:45 +0000 Subject: [PATCH] ? --- source/engine/sprite.c | 1 + source/engine/texture.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/source/engine/sprite.c b/source/engine/sprite.c index a8ccfcb..ee62654 100644 --- a/source/engine/sprite.c +++ b/source/engine/sprite.c @@ -45,6 +45,7 @@ void sprite_io(struct mSprite *sprite, FILE *f, int read) fgets(path,100, f); fread(sprite, sizeof(*sprite), 1, f); sprite_loadtex(sprite, path); + printf("Tex was %s.\n", path); } else { fputs(tex_get_path(sprite->tex), f); fwrite(sprite, sizeof(*sprite), 1, f); diff --git a/source/engine/texture.c b/source/engine/texture.c index 0a79edb..959bcf1 100644 --- a/source/engine/texture.c +++ b/source/engine/texture.c @@ -53,6 +53,10 @@ struct Texture *texture_loadfromfile(const char *path) { struct Texture *new = texture_pullfromfile(path); + if (new == NULL) { + YughInfo("Texture not loaded!", 0); + } + glGenTextures(1, &new->id); tex_gpu_load(new);