1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-01 09:59:03 +00:00

unspace/respace declared in global

This commit is contained in:
Zeno Rogue
2025-12-07 20:17:53 +01:00
parent c148095446
commit f1d316f7f8
3 changed files with 9 additions and 2 deletions

View File

@@ -184,4 +184,7 @@ extern shiftmatrix scrm;
struct hr_name_error : hr_exception { hr_name_error(const char *s) : hr_exception(s) {} };
string unspace(const string& s);
string respace(const string& s);
}

View File

@@ -16,6 +16,12 @@ string unspace(const string& s) {
return t;
}
string respace(const string& s) {
string t;
for(char c: s) if(c == '_') t += " "; else if(c == '@') t += "\n"; else t += c;
return t;
}
void save_map(string fname) {
in_queue.clear();
q = {};

View File

@@ -179,8 +179,6 @@ void power::init() {
reshuffle = [this] {};
}
string unspace(const string& s);
power& gen_power(int key, string name, string desc, string glyph, color_t color, powerfun pf) {
powers.emplace_back();
auto& p = powers.back();