mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-11-03 23:33:01 +00:00 
			
		
		
		
	rogueviz:: adjusted to pconf
This commit is contained in:
		@@ -395,15 +395,15 @@ void bantar_frame() {
 | 
			
		||||
  map<int, map<int, vector<unique_ptr<drawqueueitem>>>> xptds;
 | 
			
		||||
  for(int i=0; i<4; i++) for(auto& p: subscr[i])
 | 
			
		||||
    xptds[int(p->prio)][i].push_back(move(p));
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  for(auto& sm: xptds) for(auto& sm2: sm.second) {
 | 
			
		||||
    int i = sm2.first;
 | 
			
		||||
    ptds.clear();
 | 
			
		||||
    for(auto& p: sm2.second) ptds.push_back(move(p));
 | 
			
		||||
 | 
			
		||||
    vid.scale = .5;
 | 
			
		||||
    vid.xposition = (!(i&2)) ? xdst : -xdst;
 | 
			
		||||
    vid.yposition = (!(i&1)) ? ydst : -ydst;
 | 
			
		||||
    pconf.scale = .5;
 | 
			
		||||
    pconf.xposition = (!(i&2)) ? xdst : -xdst;
 | 
			
		||||
    pconf.yposition = (!(i&1)) ? ydst : -ydst;
 | 
			
		||||
    calcparam();
 | 
			
		||||
    drawqueue();
 | 
			
		||||
    }
 | 
			
		||||
@@ -436,8 +436,8 @@ void bantar_anim() {
 | 
			
		||||
        breakanim = true;      
 | 
			
		||||
    }
 | 
			
		||||
  mapeditor::drawplayer = true;
 | 
			
		||||
  vid.xposition = vid.yposition = 0;
 | 
			
		||||
  vid.scale = 1;
 | 
			
		||||
  pconf.xposition = pconf.yposition = 0;
 | 
			
		||||
  pconf.scale = 1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
bool bmap;
 | 
			
		||||
 
 | 
			
		||||
@@ -638,11 +638,11 @@ void draw_ncee() {
 | 
			
		||||
  nctinf2.tvertices.clear();
 | 
			
		||||
  
 | 
			
		||||
  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) {
 | 
			
		||||
    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 xpos = scax * 2 * iter;
 | 
			
		||||
      curvepoint(hpxy(xpos-scax, map_ypos-sca2));
 | 
			
		||||
@@ -714,7 +714,7 @@ void draw_ncee() {
 | 
			
		||||
    z = !z;
 | 
			
		||||
    for(int s=0; s<3; s++) {
 | 
			
		||||
      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<bool> r(rug::display_warning, false);
 | 
			
		||||
  // vid.consider_shader_projection = false;
 | 
			
		||||
  vid.scale = 0.5;
 | 
			
		||||
  pconf.scale = 0.5;
 | 
			
		||||
  rug::init();
 | 
			
		||||
  rug::prepareTexture();
 | 
			
		||||
  rug::rugged = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -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_projection = hyperbolic ? mdPerspective : mdEquidistant;
 | 
			
		||||
  vid.rug_config.model = hyperbolic ? mdPerspective : mdEquidistant;
 | 
			
		||||
  showstartmenu = false;
 | 
			
		||||
  snubon = true;
 | 
			
		||||
  rug::invert_depth = hyperbolic;
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ void make_staircase() {
 | 
			
		||||
 | 
			
		||||
  println(hlog, "scurvature = ", scurvature, " progress = ", progress, " strafe=", strafex, ",", strafey);
 | 
			
		||||
  rug::renderonce = true;
 | 
			
		||||
  rug::rug_projection = mdPerspective;
 | 
			
		||||
  vid.rug_config.model = mdPerspective;
 | 
			
		||||
  if(scurvature > -1e-6 && scurvature < 1e-6) { 
 | 
			
		||||
    rug::gwhere = rug::rgEuclid;
 | 
			
		||||
    acurvature = 1;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user