1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-21 10:22:49 +00:00

rogueviz:: adjusted to pconf

This commit is contained in:
Zeno Rogue 2020-04-17 20:45:00 +02:00
parent c24658bf38
commit 894abf218f
4 changed files with 12 additions and 12 deletions

View File

@ -401,9 +401,9 @@ void bantar_frame() {
ptds.clear(); ptds.clear();
for(auto& p: sm2.second) ptds.push_back(move(p)); for(auto& p: sm2.second) ptds.push_back(move(p));
vid.scale = .5; pconf.scale = .5;
vid.xposition = (!(i&2)) ? xdst : -xdst; pconf.xposition = (!(i&2)) ? xdst : -xdst;
vid.yposition = (!(i&1)) ? ydst : -ydst; pconf.yposition = (!(i&1)) ? ydst : -ydst;
calcparam(); calcparam();
drawqueue(); drawqueue();
} }
@ -436,8 +436,8 @@ void bantar_anim() {
breakanim = true; breakanim = true;
} }
mapeditor::drawplayer = true; mapeditor::drawplayer = true;
vid.xposition = vid.yposition = 0; pconf.xposition = pconf.yposition = 0;
vid.scale = 1; pconf.scale = 1;
} }
bool bmap; bool bmap;

View File

@ -638,11 +638,11 @@ void draw_ncee() {
nctinf2.tvertices.clear(); nctinf2.tvertices.clear();
ld map_ypos = vid.yres * (mapping_split + 1) / 2 - cd->ycenter; ld map_ypos = vid.yres * (mapping_split + 1) / 2 - cd->ycenter;
ld sca2 = (vid.yres * (1-mapping_split) / 2 - 10) / vid.scale; ld sca2 = (vid.yres * (1-mapping_split) / 2 - 10) / pconf.scale;
if(show_mapping) { if(show_mapping) {
for(int iter=-10; iter<=10; iter++) { for(int iter=-10; iter<=10; iter++) {
ld maxx = period * vid.scale / 4; ld maxx = period * pconf.scale / 4;
ld scax = sca2 * maxx / 0.5; ld scax = sca2 * maxx / 0.5;
ld xpos = scax * 2 * iter; ld xpos = scax * 2 * iter;
curvepoint(hpxy(xpos-scax, map_ypos-sca2)); curvepoint(hpxy(xpos-scax, map_ypos-sca2));
@ -714,7 +714,7 @@ void draw_ncee() {
z = !z; z = !z;
for(int s=0; s<3; s++) { for(int s=0; s<3; s++) {
curvepoint(hc(c[s].x, c[s].y)); curvepoint(hc(c[s].x, c[s].y));
nctinf.tvertices.push_back(glhr::makevertex((vx[c[s].y][c[s].x]/cscale-delta)*vid.scale/2+.5, vy[c[s].y][c[s].x]*vid.scale/2+.5, 0)); nctinf.tvertices.push_back(glhr::makevertex((vx[c[s].y][c[s].x]/cscale-delta)*pconf.scale/2+.5, vy[c[s].y][c[s].x]*pconf.scale/2+.5, 0));
} }
}; };
@ -800,7 +800,7 @@ void prepare_ncee_map() {
dynamicval<int> cgl(vid.cells_generated_limit, 9999999); dynamicval<int> cgl(vid.cells_generated_limit, 9999999);
dynamicval<bool> r(rug::display_warning, false); dynamicval<bool> r(rug::display_warning, false);
// vid.consider_shader_projection = false; // vid.consider_shader_projection = false;
vid.scale = 0.5; pconf.scale = 0.5;
rug::init(); rug::init();
rug::prepareTexture(); rug::prepareTexture();
rug::rugged = false; rug::rugged = false;

View File

@ -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_projection = hyperbolic ? mdPerspective : mdEquidistant; vid.rug_config.model = hyperbolic ? mdPerspective : mdEquidistant;
showstartmenu = false; showstartmenu = false;
snubon = true; snubon = true;
rug::invert_depth = hyperbolic; rug::invert_depth = hyperbolic;

View File

@ -120,7 +120,7 @@ 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_projection = mdPerspective; vid.rug_config.model = mdPerspective;
if(scurvature > -1e-6 && scurvature < 1e-6) { if(scurvature > -1e-6 && scurvature < 1e-6) {
rug::gwhere = rug::rgEuclid; rug::gwhere = rug::rgEuclid;
acurvature = 1; acurvature = 1;