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

rogueviz:: rename nodes via color file

This commit is contained in:
Zeno Rogue 2023-05-15 02:44:03 +02:00
parent 1f834d3def
commit 71d49b7198

View File

@ -809,6 +809,15 @@ void readcolor(const string& cfname) {
vdata[getid(lab)].info = new string(buf); // replace with std::shared_ptr in C++111
continue;
}
else if(c2 == '>') {
char buf[600];
int err = fscanf(f, "%500s", buf);
if(err > 0) {
vdata[getid(lab)].name = buf;
for(char& ch: vdata[getid(lab)].name) if(ch == '_') ch = ' ';
}
continue;
}
else {
ungetc(c2, f);
char buf[600];