mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-01 09:20:09 +00:00
rogueviz::fundamental::modernized hooks
This commit is contained in:
parent
81505b2ce7
commit
642f88f902
@ -227,24 +227,32 @@ void fundamental_marker() {
|
|||||||
vid.linewidth /= widthfactor;
|
vid.linewidth /= widthfactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void enable_fundamental() {
|
||||||
|
start_game(); starter = cwt.at;
|
||||||
|
rogueviz::rv_hook(hooks_frame, 100, fundamental_marker);
|
||||||
|
rogueviz::rv_hook(hooks_clearmemory, 100, [] { same.clear(); gm.clear(); });
|
||||||
|
}
|
||||||
|
|
||||||
int readArgs() {
|
int readArgs() {
|
||||||
using namespace arg;
|
using namespace arg;
|
||||||
|
|
||||||
if(0) ;
|
if(0) ;
|
||||||
else if(argis("-fundamental")) {
|
else if(argis("-fundamental")) {
|
||||||
start_game(); starter = cwt.at;
|
|
||||||
shift(); funmode = argi();
|
shift(); funmode = argi();
|
||||||
shift(); color1 = arghex();
|
shift(); color1 = arghex();
|
||||||
shift(); color2 = arghex();
|
shift(); color2 = arghex();
|
||||||
shift_arg_formula(widthfactor);
|
shift_arg_formula(widthfactor);
|
||||||
shift_arg_formula(label_scale);
|
shift_arg_formula(label_scale);
|
||||||
shift_arg_formula(label_dist);
|
shift_arg_formula(label_dist);
|
||||||
|
enable_fundamental();
|
||||||
}
|
}
|
||||||
else return 1;
|
else return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto fundamentalhook = addHook(hooks_args, 100, readArgs) + addHook(hooks_frame, 100, fundamental_marker) + addHook(hooks_clearmemory, 100, [] { same.clear(); gm.clear(); });
|
auto fundamentalhook = addHook(hooks_args, 100, readArgs);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user