mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
added the musictable tool
This commit is contained in:
parent
d5a20c7460
commit
fe73d29c43
27
devmods/musictable.cpp
Normal file
27
devmods/musictable.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "../hyper.h"
|
||||
|
||||
// a tool to generate the music tables for Android and iOS
|
||||
|
||||
namespace hr {
|
||||
|
||||
auto aec =
|
||||
arg::add3("-music-ios", [] {
|
||||
for(int i=0; i<landtypes; i++)
|
||||
if(musfname[i] == "") printf(" NULL,\n");
|
||||
else printf(" @\"%s\", // %2d : %s\n", musfname[i].c_str(), i, dnameof(eLand(i)).c_str());
|
||||
})
|
||||
+ arg::add3("-music-android", [] {
|
||||
for(int i=0; i<landtypes; i++)
|
||||
if(musfname[i] != "") {
|
||||
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());
|
||||
}
|
||||
})
|
||||
+ arg::add3("-music-license", [] {
|
||||
printf("musiclicense = \"");
|
||||
for(int i=0; i<isize(musiclicense); i++)
|
||||
if(musiclicense[i] == '\n') printf("\\n\"\n\""); else printf("%c", musiclicense[i]);
|
||||
printf("\";\n");
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user