mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 10:20:32 +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); })
|
#define PIA(x) hr::hybrid::in_actual([&] { return (x); })
|
||||||
#endif
|
#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 {
|
struct hrmap_hybrid : hrmap {
|
||||||
|
|
||||||
hrmap *underlying_map;
|
hrmap *underlying_map;
|
||||||
@ -3049,11 +3057,7 @@ EX namespace nisot {
|
|||||||
}
|
}
|
||||||
else if(argis("-prodlevel")) {
|
else if(argis("-prodlevel")) {
|
||||||
/* specify an exact value for cgi.plevel */
|
/* specify an exact value for cgi.plevel */
|
||||||
stop_game();
|
shift(); hybrid::set_plevel(argf());
|
||||||
vid.plevel_factor = 1;
|
|
||||||
check_cgi(); cgi.prepare_basics();
|
|
||||||
shift(); vid.plevel_factor = argf() / cgi.plevel;
|
|
||||||
check_cgi();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if(argis("-s2xe")) {
|
else if(argis("-s2xe")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user