1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-18 15:00:26 +00:00

draw editor displays all coordinates in 3D

This commit is contained in:
Zeno Rogue 2019-04-13 13:04:17 +02:00
parent 8df0a0144b
commit 1820919095
2 changed files with 14 additions and 5 deletions

View File

@ -294,6 +294,7 @@ int main() {
allchars.insert("²");
allchars.insert("π");
allchars.insert("Θ");
allchars.insert("λ");
langPL(); langCZ(); langRU();
langTR(); langDE(); langPT();

View File

@ -1289,11 +1289,19 @@ namespace mapeditor {
if(!mouseout()) {
transmatrix T = inverse(drawtrans * rgpushxto0(ccenter));
hyperpoint mh = spintox(gpushxto0(ccenter) * coldcenter) * T * mouseh;
displayfr(vid.xres-8, vid.yres-8-fs*6, 2, vid.fsize, XLAT("x: %1", fts4(mh[0])), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*5, 2, vid.fsize, XLAT("y: %1", fts4(mh[1])), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*4, 2, vid.fsize, XLAT("z: %1", fts4(mh[2])), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*2, 2, vid.fsize, XLAT("r: %1", fts4(hdist0(mh))), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs, 2, vid.fsize, XLAT("ϕ: %1°", fts4(-atan2(mh[1], mh[0]) / degree)), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*7, 2, vid.fsize, XLAT("x: %1", fts4(mh[0])), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*6, 2, vid.fsize, XLAT("y: %1", fts4(mh[1])), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*5, 2, vid.fsize, XLAT("z: %1", fts4(mh[2])) + (DIM == 3 ? "/" + fts4(mh[3]) : ""), 0xC0C0C0, 16);
if(DIM == 3)
displayfr(vid.xres-8, vid.yres-8-fs*4, 2, vid.fsize, XLAT("w: %1", fts4(mh[3])), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*3, 2, vid.fsize, XLAT("r: %1", fts4(hdist0(mh))), 0xC0C0C0, 16);
if(DIM == 3) {
displayfr(vid.xres-8, vid.yres-8-fs, 2, vid.fsize, XLAT("ϕ: %1°", fts4(-atan2(mh[2], hypot_d(2, mh)) / degree)), 0xC0C0C0, 16);
displayfr(vid.xres-8, vid.yres-8-fs*2, 2, vid.fsize, XLAT("λ: %1°", fts4(-atan2(mh[1], mh[0]) / degree)), 0xC0C0C0, 16);
}
else {
displayfr(vid.xres-8, vid.yres-8-fs*2, 2, vid.fsize, XLAT("ϕ: %1°", fts4(-atan2(mh[1], mh[0]) / degree)), 0xC0C0C0, 16);
}
}
if(us) {