[Change] Try to create the gen directory before creating nebulae in case
it fails.
This commit is contained in:
		
							parent
							
								
									fbb6d44d23
								
							
						
					
					
						commit
						1c1fcd8486
					
				| @ -488,12 +488,15 @@ static int nebu_generate(void) { | |||||||
|   /* Warn user of what is happening. */ |   /* Warn user of what is happening. */ | ||||||
|   loadscreen_render(0.05, "Generating Nebulae..."); |   loadscreen_render(0.05, "Generating Nebulae..."); | ||||||
| 
 | 
 | ||||||
|  |   /* Get resolution. */ | ||||||
|   w = SCREEN_W; |   w = SCREEN_W; | ||||||
|   h = SCREEN_H; |   h = SCREEN_H; | ||||||
| 
 | 
 | ||||||
|  |   /* Try to make the directory first if it fails. */ | ||||||
|  |   lfile_dirMakeExist("%sgen", lfile_basePath()); | ||||||
|  | 
 | ||||||
|   /* Generate all the nebulae backgrounds. */ |   /* Generate all the nebulae backgrounds. */ | ||||||
|   nebu = noise_genNebulaeMap(w, h, NEBULAE_Z, 5.); |   nebu = noise_genNebulaeMap(w, h, NEBULAE_Z, 5.); | ||||||
|   lfile_dirMakeExist("%sgen", lfile_basePath()); |  | ||||||
| 
 | 
 | ||||||
|   /* Save each nebulae as an image. */ |   /* Save each nebulae as an image. */ | ||||||
|   for(i = 0; i < NEBULAE_Z; i++) { |   for(i = 0; i < NEBULAE_Z; i++) { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Allanis
						Allanis