diff --git a/src/nebulae.c b/src/nebulae.c index ce1c629..22d6d0a 100644 --- a/src/nebulae.c +++ b/src/nebulae.c @@ -488,12 +488,15 @@ static int nebu_generate(void) { /* Warn user of what is happening. */ loadscreen_render(0.05, "Generating Nebulae..."); + /* Get resolution. */ w = SCREEN_W; h = SCREEN_H; + /* Try to make the directory first if it fails. */ + lfile_dirMakeExist("%sgen", lfile_basePath()); + /* Generate all the nebulae backgrounds. */ nebu = noise_genNebulaeMap(w, h, NEBULAE_Z, 5.); - lfile_dirMakeExist("%sgen", lfile_basePath()); /* Save each nebulae as an image. */ for(i = 0; i < NEBULAE_Z; i++) {