mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	moved svg and PNG screenshot to a new file screenshots.cpp; moved some commandline arguments from commandline.cpp to their respective modules
This commit is contained in:
		
							
								
								
									
										17
									
								
								sound.cpp
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								sound.cpp
									
									
									
									
									
								
							| @@ -3,6 +3,7 @@ | ||||
|  | ||||
| namespace hr { | ||||
|  | ||||
| const char *musicfile = ""; | ||||
| bool audio; | ||||
| string musiclicense; | ||||
| string musfname[landtypes]; | ||||
| @@ -218,4 +219,20 @@ void playSound(cell *c, const string& fname, int vol) { | ||||
| void resetmusic() {} | ||||
| #endif | ||||
|  | ||||
| #if CAP_COMMANDLINE | ||||
| int read_sound_args() { | ||||
|   using namespace arg; | ||||
|   if(argis("-m")) { PHASE(1); shift(); musicfile = argcs(); } | ||||
| #if CAP_SDLAUDIO | ||||
|   else if(argis("-se")) { PHASE(1); shift(); wheresounds = args(); } | ||||
| #endif | ||||
|   else if(argis("-svol")) { PHASEFROM(2); shift(); effvolume = argi(); } | ||||
|   else return 1; | ||||
|   return 0; | ||||
|   } | ||||
|  | ||||
| auto ah_sound = addHook(hooks_args, 0, read_sound_args); | ||||
|  | ||||
| #endif | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue