1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed pseudogonal to pseudohedral

This commit is contained in:
Zeno Rogue 2021-10-15 22:38:24 +02:00
parent cb75ba44dc
commit ce4be1bc6b
4 changed files with 7 additions and 7 deletions

View File

@ -2184,7 +2184,7 @@ EX void show3D() {
dialog::addBoolItem_action(XLAT("fixed Y/Z rotation"), vid.fixed_yz, 'Z'); dialog::addBoolItem_action(XLAT("fixed Y/Z rotation"), vid.fixed_yz, 'Z');
if(WDIM == 2 && GDIM == 3) { if(WDIM == 2 && GDIM == 3) {
add_edit(vid.pseudogonal); add_edit(vid.pseudohedral);
// add_edit(vid.depth_bonus); // add_edit(vid.depth_bonus);
} }
@ -2303,8 +2303,8 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
param_f(linepatterns::parallel_max, "parallel_max") param_f(linepatterns::parallel_max, "parallel_max")
->editable(0, 360*degree, 15*degree, "last parallel drawn", "", 'n'); ->editable(0, 360*degree, 15*degree, "last parallel drawn", "", 'n');
param_f(vid.depth_bonus, "depth_bonus", 0) param_f(vid.depth_bonus, "depth_bonus", 0)
->editable(-5, 5, .1, "depth bonus in pseudogonal", "", 'b'); ->editable(-5, 5, .1, "depth bonus in pseudohedral", "", 'b');
param_b(vid.pseudogonal, "pseudogonal", false) param_b(vid.pseudohedral, "pseudogonal", false)
->editable("make the tiles flat", 'p'); ->editable("make the tiles flat", 'p');
param_f(vid.depth, "depth", "3D depth", 1) param_f(vid.depth, "depth", "3D depth", 1)
->editable(0, 5, .1, "Ground level below the plane", "", 'd') ->editable(0, 5, .1, "Ground level below the plane", "", 'd')

View File

@ -606,14 +606,14 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i
for(int t=0; t<e-s; t++) for(int t=0; t<e-s; t++)
ctr += orthogonal_move(may_kleinize(hpc[s+t]), dfloor_table[k]); ctr += orthogonal_move(may_kleinize(hpc[s+t]), dfloor_table[k]);
ctr = normalize(ctr); ctr = normalize(ctr);
if(vid.pseudogonal) for(int t=0; t<e-s; t++) { if(vid.pseudohedral) for(int t=0; t<e-s; t++) {
hyperpoint v1 = orthogonal_move(may_kleinize(hpc[s+t]), dfloor_table[k]) - ctr; hyperpoint v1 = orthogonal_move(may_kleinize(hpc[s+t]), dfloor_table[k]) - ctr;
hyperpoint v2 = orthogonal_move(may_kleinize(hpc[s+t+1]), dfloor_table[k]) - ctr; hyperpoint v2 = orthogonal_move(may_kleinize(hpc[s+t+1]), dfloor_table[k]) - ctr;
texture_order([&] (ld x, ld y) { texture_order([&] (ld x, ld y) {
hpcpush(normalize(ctr + v1 * x + v2 * y)); hpcpush(normalize(ctr + v1 * x + v2 * y));
}); });
} }
if(!vid.pseudogonal) for(int t=0; t<e-s; t++) { if(!vid.pseudohedral) for(int t=0; t<e-s; t++) {
hyperpoint v1 = may_kleinize(hpc[s+t]) - C0; hyperpoint v1 = may_kleinize(hpc[s+t]) - C0;
hyperpoint v2 = may_kleinize(hpc[s+t+1]) - C0; hyperpoint v2 = may_kleinize(hpc[s+t+1]) - C0;
texture_order([&] (ld x, ld y) { texture_order([&] (ld x, ld y) {

View File

@ -1177,7 +1177,7 @@ EX string cgi_string() {
V("ASH", ONOFF(vid.gp_autoscale_heights)); V("ASH", ONOFF(vid.gp_autoscale_heights));
V("LT", fts(vid.lake_top)); V("LT", fts(vid.lake_top));
V("LB", fts(vid.lake_bottom)); V("LB", fts(vid.lake_bottom));
if(GDIM == 3 && vid.pseudogonal) if(GDIM == 3 && vid.pseudohedral)
V("PS", fts(vid.depth_bonus)); V("PS", fts(vid.depth_bonus));
} }

View File

@ -400,7 +400,7 @@ struct videopar {
ld lake_top, lake_bottom; ld lake_top, lake_bottom;
ld rock_wall_ratio; ld rock_wall_ratio;
ld human_wall_ratio; ld human_wall_ratio;
bool pseudogonal; // in 3D modes bool pseudohedral; // in 3D modes
ld depth_bonus; // to fiix the placement of 3D models in pseudogonal -- not working currently ld depth_bonus; // to fiix the placement of 3D models in pseudogonal -- not working currently
int tc_alpha, tc_depth, tc_camera; int tc_alpha, tc_depth, tc_camera;