1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-10 14:26:01 +00:00

orb help now lists the OSM information (required refactoring)

This commit is contained in:
Zeno Rogue
2017-10-10 12:43:41 +02:00
parent 035f1ad8de
commit 206e56942a
6 changed files with 330 additions and 180 deletions

View File

@@ -20,6 +20,28 @@ const char *dnameof(eLand l) { return linf[l].name; }
const char *dnameof(eWall w) { return winf[w].name; }
const char *dnameof(eItem i) { return iinf[i].name; }
/*
string dnameofEnum(eItem i) {
FILE *f = fopen("classes.cpp", "rt");
while(!feof(f)) {
char buf[256];
fgets(buf, 256, f);
if(strstr(buf, "eItem")) {
string ret;
int qty = i;
while(qty > -1) {
char c = fgetc(f);
if(c == ' ' || c == '\n' || c == '\r') continue;
else if(c == ',') qty--;
else if(!qty) ret += c;
}
return ret;
}
}
return "?";
}
*/
void rep(string& pattern, string what, string to) {
while(true) {
size_t at = pattern.find(what);