mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
argcolor now uses parsecolor
This commit is contained in:
parent
6ca2051c96
commit
54443e365d
@ -105,11 +105,7 @@ EX namespace arg {
|
|||||||
EX bool argis(const string& s) { if(args()[0] == '-' && args()[1] == '-') return args().substr(1) == s; return args() == s; }
|
EX bool argis(const string& s) { if(args()[0] == '-' && args()[1] == '-') return args().substr(1) == s; return args() == s; }
|
||||||
|
|
||||||
EX color_t argcolor(int bits) {
|
EX color_t argcolor(int bits) {
|
||||||
string s = args();
|
return parsecolor(args(), bits == 32);
|
||||||
auto p = find_color_by_name(s);
|
|
||||||
if(p && bits == 24) return p->second;
|
|
||||||
if(p && bits == 32) return (p->second << 8) | 0xFF;
|
|
||||||
return strtoll(argcs(), NULL, 16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int parameter_id;
|
int parameter_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user