1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-10 10:43:03 +00:00

arbiquotient:: changed the mirror symbol from ^ to $ because ^ was parsed incorrectly

This commit is contained in:
Zeno Rogue
2025-10-10 12:07:54 +02:00
parent 6f78190aea
commit 4cf129c28e
4 changed files with 6 additions and 6 deletions

View File

@@ -487,7 +487,7 @@ EX bool export_tes(string fname) {
for(auto v: af.connections) {
if(ct++) print(f, ",");
print(f, v &~ quotientspace::symmask);
if(v & quotientspace::symmask) print(f, "^");
if(v & quotientspace::symmask) print(f, "$");
}
println(f, ")");
}

View File

@@ -1252,7 +1252,7 @@ EX void load(const string& fname, bool load_as_slided IS(false), bool keep_slide
auto& con = c.quotients.back().connections;
con.push_back(ep.iparse(0));
while(true) {
if(ep.eat("^")) con.back() ^= quotientspace::symmask;
if(ep.eat("$")) con.back() ^= quotientspace::symmask;
else if(ep.eat(",")) con.push_back(ep.iparse(0));
else if(ep.eat(")")) break;
else throw hr_parse_exception("expecing ), ^ or comma, " + ep.where());

View File

@@ -9,10 +9,10 @@ repeat(0, 4)
#/ four self-connected edges
quotient(0,1,2,3)
#/ four mirrors
quotient(0^,1^,2^,3^)
quotient(0$,1$,2$,3$)
#/ tiny torus
quotient(2,3,0,1)
#/ whirlwind
quotient(1,0,2^,3^)
quotient(1,0,2$,3$)
#/ three squares
quotient(0,4,8,10^,1,11^,9,7,2,6,3^,5^)
quotient(0,4,8,10$,1,11$,9,7,2,6,3$,5$)

View File

@@ -128,7 +128,7 @@ The exported file will include a copy of the definition of shapes, although it m
You can see the files `44.tes` and `73.tes` as examples of the format. The format consists of a line starting with `#/ description`, and then list all the connections of the first tile
in the orbifold, then all the connections of the second tile, and so on. Connections are indexed from 0, and every connection is simply the index of another edge it connects to.
If a connection is mirrored, the symbol `^` appears after the index. The first tile is always of the first type listed in the file, and the other tiles are always listed in the order
If a connection is mirrored, the symbol `$` appears after the index. The first tile is always of the first type listed in the file, and the other tiles are always listed in the order
of appearance -- thus, for example, the second tile will be always the first connection of the first tile that does not connect to itself. This way, there is no need to list the types
of tiles.