mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-01 01:10:10 +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;
|
||||
}
|
||||
|
||||
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() {
|
||||
using namespace arg;
|
||||
|
||||
if(0) ;
|
||||
else if(argis("-fundamental")) {
|
||||
start_game(); starter = cwt.at;
|
||||
shift(); funmode = argi();
|
||||
shift(); color1 = arghex();
|
||||
shift(); color2 = arghex();
|
||||
shift_arg_formula(widthfactor);
|
||||
shift_arg_formula(label_scale);
|
||||
shift_arg_formula(label_dist);
|
||||
enable_fundamental();
|
||||
}
|
||||
else return 1;
|
||||
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