mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-24 01:04:08 +00:00
rogueviz:: adjusted to rug naming changes
This commit is contained in:
parent
63d244ce9f
commit
2a69afddb7
@ -34,7 +34,7 @@ array<hyperpoint, 3> mts;
|
|||||||
|
|
||||||
rug::rugpoint *pt(hyperpoint h, hyperpoint c, int id) {
|
rug::rugpoint *pt(hyperpoint h, hyperpoint c, int id) {
|
||||||
auto r = rug::addRugpoint(C0, -1);
|
auto r = rug::addRugpoint(C0, -1);
|
||||||
r->flat = h;
|
r->native = h;
|
||||||
r->x1 = (1 + c[0]) / 16 + (id/8) / 8.;
|
r->x1 = (1 + c[0]) / 16 + (id/8) / 8.;
|
||||||
r->y1 = (1 + c[1]) / 16 + (id%8) / 8.;
|
r->y1 = (1 + c[1]) / 16 + (id%8) / 8.;
|
||||||
r->valid = true;
|
r->valid = true;
|
||||||
@ -190,7 +190,7 @@ void run_snub(int v, int w) {
|
|||||||
create_model();
|
create_model();
|
||||||
printf("points = %d tris = %d side = %d\n", isize(rug::points), isize(rug::triangles), isize(sideangles));
|
printf("points = %d tris = %d side = %d\n", isize(rug::points), isize(rug::triangles), isize(sideangles));
|
||||||
rug::model_distance = euclid ? 4 : 2;
|
rug::model_distance = euclid ? 4 : 2;
|
||||||
rug::rug_perspective = hyperbolic;
|
rug::rug_projection = hyperbolic ? mdPerspective : mdEquidistant;
|
||||||
showstartmenu = false;
|
showstartmenu = false;
|
||||||
snubon = true;
|
snubon = true;
|
||||||
rug::invert_depth = hyperbolic;
|
rug::invert_depth = hyperbolic;
|
||||||
|
@ -30,7 +30,7 @@ hyperpoint spcoord(hyperpoint h) {
|
|||||||
|
|
||||||
rug::rugpoint *pt(hyperpoint h, hyperpoint c) {
|
rug::rugpoint *pt(hyperpoint h, hyperpoint c) {
|
||||||
auto r = rug::addRugpoint(C0, -1);
|
auto r = rug::addRugpoint(C0, -1);
|
||||||
r->flat = spcoord(h);
|
r->native = spcoord(h);
|
||||||
r->x1 = c[0];
|
r->x1 = c[0];
|
||||||
r->y1 = c[1];
|
r->y1 = c[1];
|
||||||
r->valid = true;
|
r->valid = true;
|
||||||
@ -120,17 +120,17 @@ void make_staircase() {
|
|||||||
|
|
||||||
println(hlog, "scurvature = ", scurvature, " progress = ", progress, " strafe=", strafex, ",", strafey);
|
println(hlog, "scurvature = ", scurvature, " progress = ", progress, " strafe=", strafex, ",", strafey);
|
||||||
rug::renderonce = true;
|
rug::renderonce = true;
|
||||||
rug::rug_perspective = true;
|
rug::rug_projection = mdPerspective;
|
||||||
if(scurvature > -1e-6 && scurvature < 1e-6) {
|
if(scurvature > -1e-6 && scurvature < 1e-6) {
|
||||||
rug::gwhere = gEuclid;
|
rug::gwhere = rug::rgEuclid;
|
||||||
acurvature = 1;
|
acurvature = 1;
|
||||||
}
|
}
|
||||||
else if(scurvature < 0) {
|
else if(scurvature < 0) {
|
||||||
rug::gwhere = gNormal;
|
rug::gwhere = rug::rgHyperbolic;
|
||||||
acurvature = -scurvature;
|
acurvature = -scurvature;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rug::gwhere = gSphere;
|
rug::gwhere = rug::rgSphere;
|
||||||
acurvature = scurvature;
|
acurvature = scurvature;
|
||||||
}
|
}
|
||||||
rug::ruggospeed = acurvature;
|
rug::ruggospeed = acurvature;
|
||||||
|
@ -87,13 +87,9 @@ bool sunflower_cell(cell *c, transmatrix V) {
|
|||||||
|
|
||||||
if(adjust_rug) {
|
if(adjust_rug) {
|
||||||
using namespace rug;
|
using namespace rug;
|
||||||
if(rug_perspective)
|
|
||||||
push_all_points(2, +model_distance);
|
|
||||||
|
|
||||||
model_distance = sqrt(zdensity) * distance_per_rug;
|
model_distance = sqrt(zdensity) * distance_per_rug;
|
||||||
|
|
||||||
if(rug_perspective)
|
|
||||||
push_all_points(2, -model_distance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iqty = qty;
|
iqty = qty;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user