mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	Euclidean sky as a shape
This commit is contained in:
		| @@ -674,6 +674,18 @@ void geometry_information::make_star(hpcshape& sh, ld rad) { | ||||
|     } | ||||
|   } | ||||
|  | ||||
| void geometry_information::make_euclidean_sky() { | ||||
|   bshape(cgi.shEuclideanSky, PPR::EUCLIDEAN_SKY); | ||||
|   for(int x=-20; x<20; x++) | ||||
|   for(int y=-20; y<20; y++) | ||||
|     hpcsquare( | ||||
|       zpush(cgi.WALL) * hpxy(x, y), | ||||
|       zpush(cgi.WALL) * hpxy(x, y+1), | ||||
|       zpush(cgi.WALL) * hpxy(x+1, y), | ||||
|       zpush(cgi.WALL) * hpxy(x+1, y+1) | ||||
|       ); | ||||
|   } | ||||
|  | ||||
| hyperpoint psmin(hyperpoint H) { | ||||
|   hyperpoint res; | ||||
|   res[2] = asin_auto(H[2]); | ||||
| @@ -1007,8 +1019,10 @@ void geometry_information::make_3d_models() { | ||||
|   make_ball(shDisk, orbsize*.2, 2); | ||||
|   make_ball(shHeptaMarker, zhexf*.2, 1); | ||||
|   make_ball(shSnowball, zhexf*.1, 0); | ||||
|   if(euclid) | ||||
|   if(euclid) { | ||||
|     make_ball(shSun, 0.5, 2); | ||||
|     make_euclidean_sky(); | ||||
|     } | ||||
|   else | ||||
|     make_star(shSun, 3); | ||||
|   make_star(shNightStar, 0.75); | ||||
|   | ||||
							
								
								
									
										12
									
								
								graph.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								graph.cpp
									
									
									
									
									
								
							| @@ -4622,17 +4622,7 @@ void draw_euclidean_sky() { | ||||
|   if(WDIM == 3 || GDIM == 2) return; | ||||
|   transmatrix T = ggmatrix(currentmap->gamestart()); | ||||
|   T = gpushxto0(tC0(T)) * T; | ||||
|   for(int x=-20; x<20; x++) | ||||
|   for(int y=-20; y<20; y++) { | ||||
|     curvepoint(T * zpush(cgi.WALL) * hpxy(x, y)); | ||||
|     curvepoint(T * zpush(cgi.WALL) * hpxy(x, y+1)); | ||||
|     curvepoint(T * zpush(cgi.WALL) * hpxy(x+1, y)); | ||||
|     curvepoint(T * zpush(cgi.WALL) * hpxy(x+1, y+1)); | ||||
|     curvepoint(T * zpush(cgi.WALL) * hpxy(x, y+1)); | ||||
|     curvepoint(T * zpush(cgi.WALL) * hpxy(x+1, y)); | ||||
|     } | ||||
|   queuecurve(0, 0x0044e4FF, PPR::EUCLIDEAN_SKY).flags |= POLY_TRIANGLES; | ||||
|  | ||||
|   queuepoly(T, cgi.shEuclideanSky, 0x0044e4FF); | ||||
|   queuepolyat(T * zpush(cgi.SKY+0.5) * xpush(cgi.SKY+0.5), cgi.shSun, 0xFFFF00FF, PPR::SKY); | ||||
|   } | ||||
|  | ||||
|   | ||||
							
								
								
									
										3
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -4374,7 +4374,7 @@ hpcshape | ||||
|   shKnife, shTongue, shFlailMissile, shTrapArrow, | ||||
|   shPirateHook, shPirateHood, shEyepatch, shPirateX, | ||||
|   // shScratch,  | ||||
|   shHeptaMarker, shSnowball, shSun, shNightStar, | ||||
|   shHeptaMarker, shSnowball, shSun, shNightStar, shEuclideanSky, | ||||
|   shSkeletonBody, shSkull, shSkullEyes, shFatBody, shWaterElemental, | ||||
|   shPalaceGate, shFishTail, | ||||
|   shMouse, shMouseLegs, shMouseEyes, | ||||
| @@ -4524,6 +4524,7 @@ hpcshape | ||||
|   void balltriangle(hyperpoint a, hyperpoint b, hyperpoint c, ld rad, int lev); | ||||
|   void make_ball(hpcshape& sh, ld rad, int lev); | ||||
|   void make_star(hpcshape& sh, ld rad); | ||||
|   void make_euclidean_sky(); | ||||
|   void adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye, ld shift_head, int q, ld zoom=1); | ||||
|   void shift_last_straight(ld z); | ||||
|   void queueball(const transmatrix& V, ld rad, color_t col, eItem what); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue