mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-09 15:39:55 +00:00
refactored hybrid::set_plevel
This commit is contained in:
parent
e07dfc00d3
commit
56d421a5ce
@ -1246,6 +1246,14 @@ EX namespace hybrid {
|
||||
#define PIA(x) hr::hybrid::in_actual([&] { return (x); })
|
||||
#endif
|
||||
|
||||
EX void set_plevel(ld lev) {
|
||||
stop_game();
|
||||
vid.plevel_factor = 1;
|
||||
check_cgi(); cgi.prepare_basics();
|
||||
vid.plevel_factor = lev / cgi.plevel;
|
||||
check_cgi();
|
||||
}
|
||||
|
||||
struct hrmap_hybrid : hrmap {
|
||||
|
||||
hrmap *underlying_map;
|
||||
@ -3049,11 +3057,7 @@ EX namespace nisot {
|
||||
}
|
||||
else if(argis("-prodlevel")) {
|
||||
/* specify an exact value for cgi.plevel */
|
||||
stop_game();
|
||||
vid.plevel_factor = 1;
|
||||
check_cgi(); cgi.prepare_basics();
|
||||
shift(); vid.plevel_factor = argf() / cgi.plevel;
|
||||
check_cgi();
|
||||
shift(); hybrid::set_plevel(argf());
|
||||
return 0;
|
||||
}
|
||||
else if(argis("-s2xe")) {
|
||||
|
Loading…
Reference in New Issue
Block a user