1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-16 10:14:48 +00:00

texture:: save arb filename

This commit is contained in:
Zeno Rogue 2020-05-30 20:07:50 +02:00
parent 4f70b5ceff
commit edc86a70d1

View File

@ -942,6 +942,8 @@ eGeometry targetgeometry;
string csymbol; string csymbol;
string tes;
void init_textureconfig() { void init_textureconfig() {
#if CAP_CONFIG #if CAP_CONFIG
texturesavers = move(savers); texturesavers = move(savers);
@ -954,6 +956,7 @@ void init_textureconfig() {
addsaver(View[i][j], "viewmatrix_" + its(i) + its(j), i==j ? 1 : 0); addsaver(View[i][j], "viewmatrix_" + its(i) + its(j), i==j ? 1 : 0);
addsaverenum(targetgeometry, "geometry", gNormal); addsaverenum(targetgeometry, "geometry", gNormal);
addsaver(tes, "tes", "");
addsaverenum(pmodel, "used model", mdDisk); addsaverenum(pmodel, "used model", mdDisk);
addsaver(vid.yshift, "Y shift", 0); addsaver(vid.yshift, "Y shift", 0);
addsaver(pconf.yposition, "Y position", 0); addsaver(pconf.yposition, "Y position", 0);
@ -1012,6 +1015,8 @@ bool texture_config::save() {
cell *ctr = centerover; cell *ctr = centerover;
si_save = patterns::getpatterninfo0(ctr); si_save = patterns::getpatterninfo0(ctr);
if(arb::in()) tes = arb::current.filename;
if(arcm::in()) csymbol = arcm::current.symbol; if(arcm::in()) csymbol = arcm::current.symbol;
else csymbol = ""; else csymbol = "";
@ -1051,6 +1056,10 @@ bool texture_config::load() {
return false; return false;
} }
} }
if(targetgeometry == gArbitrary) {
arb::run(tes);
stop_game();
}
set_geometry(targetgeometry); set_geometry(targetgeometry);
start_game(); start_game();
return config.load(); return config.load();