diff options
Diffstat (limited to 'objloader.c')
-rw-r--r-- | objloader.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/objloader.c b/objloader.c index 0e6aba9..699efdd 100644 --- a/objloader.c +++ b/objloader.c @@ -29,7 +29,6 @@ static void render(ObjModel *); /* global */ int program_running = 1; -char obj_last_fname[101]; static void resize(int w, int h) { @@ -180,6 +179,12 @@ static void render(ObjModel *model) int main(int argc, char **argv) { + if (argc != 2) + { + fprintf(stderr, "da fuck think you're doing?\n"); + exit(-1); + } + SDL_Surface *screen; if (SDL_Init(SDL_INIT_VIDEO) < 0 ) @@ -224,7 +229,8 @@ int main(int argc, char **argv) /* OBJ Loading */ char *memory = NULL; - size_t bytes = ObjLoadFile("./cube/cube.obj", &memory); + /* size_t bytes = ObjLoadFile("./cube/cube.obj", &memory); */ + size_t bytes = ObjLoadFile(argv[1], &memory); ObjModel *model = ObjLoadModel(memory, bytes); if (!bytes || model == NULL) { |