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:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user