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