1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-05 03:47:58 +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:
Zeno Rogue
2018-07-19 23:46:58 +02:00
parent 8c5a88c513
commit 30cb9158cb
11 changed files with 507 additions and 440 deletions

View File

@@ -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
}