1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

devmods/musictable updated

This commit is contained in:
Zeno Rogue 2022-07-12 10:57:07 +02:00
parent b8ad184d70
commit 0b29dc3964

View File

@ -4,17 +4,29 @@
namespace hr { namespace hr {
string crop(string s) {
string res;
for(char c: s) if(c == '-') res = ""; else res += c;
return res;
}
string cropios(string s) {
string res;
for(char c: s) if(c == '.') return res; else res += c;
return res;
}
auto aec = auto aec =
arg::add3("-music-ios", [] { arg::add3("-music-ios", [] {
for(int i=0; i<landtypes; i++) for(int i=0; i<landtypes; i++)
if(musfname[i] == "") printf(" NULL,\n"); if(musfname[i] == "") printf(" NULL,\n");
else printf(" @\"%s\", // %2d : %s\n", musfname[i].c_str(), i, dnameof(eLand(i)).c_str()); else printf(" @\"%s\", // %2d : %s\n", cropios(musfname[i]).c_str(), i, dnameof(eLand(i)).c_str());
}) })
+ arg::add3("-music-android", [] { + arg::add3("-music-android", [] {
for(int i=0; i<landtypes; i++) for(int i=0; i<landtypes; i++)
if(musfname[i] != "") { if(musfname[i] != "") {
string s = musfname[i].substr(4, isize(musfname[i])-8); string s = musfname[i].substr(4, isize(musfname[i])-8);
printf(" if(curland == %2d) id = R.raw.%s; // %s\n", i, s.c_str(), dnameof(eLand(i)).c_str()); printf(" if(curland == %2d) id = R.raw.%s; // %s\n", i, crop(s).c_str(), dnameof(eLand(i)).c_str());
} }
}) })
+ arg::add3("-music-license", [] { + arg::add3("-music-license", [] {