mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-30 15:39:54 +00:00
improved handling of missing files in arb::run
This commit is contained in:
parent
22e0d8264f
commit
4f868faee4
@ -1637,16 +1637,20 @@ struct hrmap_arbi : hrmap {
|
|||||||
|
|
||||||
EX hrmap *new_map() { return new hrmap_arbi; }
|
EX hrmap *new_map() { return new hrmap_arbi; }
|
||||||
|
|
||||||
EX void run(string fname) {
|
EX void run_raw(string fname) {
|
||||||
stop_game();
|
stop_game();
|
||||||
|
set_geometry(gArbitrary);
|
||||||
|
load(fname);
|
||||||
|
ginf[gArbitrary].tiling_name = current.name;
|
||||||
|
tes = fname;
|
||||||
|
}
|
||||||
|
|
||||||
|
EX void run(string fname) {
|
||||||
eGeometry g = geometry;
|
eGeometry g = geometry;
|
||||||
arbi_tiling t = current;
|
arbi_tiling t = current;
|
||||||
auto v = variation;
|
auto v = variation;
|
||||||
set_geometry(gArbitrary);
|
|
||||||
try {
|
try {
|
||||||
load(fname);
|
run_raw(fname);
|
||||||
ginf[gArbitrary].tiling_name = current.name;
|
|
||||||
tes = fname;
|
|
||||||
}
|
}
|
||||||
catch(hr_polygon_error& poly) {
|
catch(hr_polygon_error& poly) {
|
||||||
set_geometry(g);
|
set_geometry(g);
|
||||||
@ -2087,7 +2091,7 @@ int readArgs() {
|
|||||||
else if(argis("-tes") || argis("-arbi")) {
|
else if(argis("-tes") || argis("-arbi")) {
|
||||||
PHASEFROM(2);
|
PHASEFROM(2);
|
||||||
shift();
|
shift();
|
||||||
run(args());
|
run_raw(args());
|
||||||
}
|
}
|
||||||
else if(argis("-tes-opt")) {
|
else if(argis("-tes-opt")) {
|
||||||
arg::run_arguments(current.options);
|
arg::run_arguments(current.options);
|
||||||
|
@ -662,7 +662,7 @@ EX namespace mapstream {
|
|||||||
else {
|
else {
|
||||||
string s;
|
string s;
|
||||||
f.read(s);
|
f.read(s);
|
||||||
arb::run(s);
|
arb::run_raw(s);
|
||||||
stop_game();
|
stop_game();
|
||||||
}
|
}
|
||||||
if(rk) rulegen::prepare_rules();
|
if(rk) rulegen::prepare_rules();
|
||||||
|
@ -1098,7 +1098,7 @@ bool texture_config::load() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(targetgeometry == gArbitrary) {
|
if(targetgeometry == gArbitrary) {
|
||||||
arb::run(tes);
|
arb::run_raw(tes);
|
||||||
stop_game();
|
stop_game();
|
||||||
}
|
}
|
||||||
set_geometry(targetgeometry);
|
set_geometry(targetgeometry);
|
||||||
|
Loading…
Reference in New Issue
Block a user