?
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user