mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	whirl:: warp works
This commit is contained in:
		
							
								
								
									
										12
									
								
								graph.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								graph.cpp
									
									
									
									
									
								
							| @@ -3062,7 +3062,7 @@ bool use_swapped_duals() { | ||||
| void floorShadow(cell *c, const transmatrix& V, int col, bool warp) { | ||||
|   if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere)  | ||||
|     return; // shadows break the depth testing | ||||
|   if(shmup::on || nonbitrunc) warp = false; | ||||
|   if(shmup::on || nbtnice) warp = false; | ||||
|   dynamicval<int> p(poly_outline, OUTLINE_TRANS); | ||||
|   if(wmescher && qfi.special) { | ||||
|     queuepolyat(V * qfi.spin * shadowmulmatrix, *qfi.shape, col, PPR_WALLSHADOW); | ||||
| @@ -3076,7 +3076,7 @@ void floorShadow(cell *c, const transmatrix& V, int col, bool warp) { | ||||
|       } | ||||
|     else { | ||||
|       auto si = patterns::getpatterninfo(c, 0, 0); | ||||
|       queuepolyat(V * applyPatterndir(c, si), shTriheptaFloorShadow[ctof(c)], col, PPR_WALLSHADOW); | ||||
|       queuepolyat(V * applyPatterndir(c, si), shTriheptaFloorShadow[si.id == 13 ? 2 : ctof(c)], col, PPR_WALLSHADOW); | ||||
|       } | ||||
|     } | ||||
|   else if(is_nice_dual(c)) { | ||||
| @@ -3131,7 +3131,7 @@ void qplainfloor(cell *c, bool warp, const transmatrix &V, int col) { | ||||
| int wavephase; | ||||
|  | ||||
| void warpfloor(cell *c, const transmatrix& V, int col, int prio, bool warp) { | ||||
|   if(shmup::on || nonbitrunc) warp = false; | ||||
|   if(shmup::on || nbtnice) warp = false; | ||||
| #if CAP_TEXTURE | ||||
|   if(qfi.tinf) { | ||||
|     queuetable(V*qfi.spin, qfi.tinf->vertices, size(qfi.tinf->vertices), 0, texture::config.recolor(col), prio); | ||||
| @@ -3183,7 +3183,7 @@ void escherSidewall(cell *c, int sidepar, const transmatrix& V, int col) { | ||||
|   } | ||||
|  | ||||
| void placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, bool warp, bool mirr, int col) { | ||||
|   if(shmup::on || nonbitrunc) warp = false; | ||||
|   if(shmup::on || nbtnice) warp = false; | ||||
|   if(warp && !ishept(c) && (!c->mov[i] || !ishept(c->mov[i]))) return; | ||||
|   if(is_nice_dual(c)) { | ||||
|     if(pseudohept(c)) return; | ||||
| @@ -3998,9 +3998,9 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { | ||||
|         qfloor_eswap(c, Vf, shBigTriangle, darkena(fcol, fd, 0xFF)); | ||||
|         } | ||||
|  | ||||
|       else if(isWarped(c) && !nonbitrunc && !shmup::on) { | ||||
|       else if(isWarped(c) && !nbtnice && !shmup::on) { | ||||
|         auto si = patterns::getpatterninfo(c, 0, 0); | ||||
|         if(si.id < 13) | ||||
|         if(si.id < 14) | ||||
|           qfloor(c, Vf, applyPatterndir(c, si), shTriheptaFloor[si.id], darkena(fcol, fd, 0xFF)); | ||||
|         else | ||||
|           qfloor(c, Vf, shFloor[ctof(c)], darkena(fcol, fd, 0xFF)); | ||||
|   | ||||
							
								
								
									
										1
									
								
								init.cpp
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								init.cpp
									
									
									
									
									
								
							| @@ -387,6 +387,7 @@ void addMessage(string s, char spamtype = 0); | ||||
| #define ALPHA (M_PI*2/S7) | ||||
| #define S7 ginf[geometry].sides | ||||
| #define S3 ginf[geometry].vertex | ||||
| #define hyperbolic_not37 ((S7 > 7 || S3 > 3) && hyperbolic) | ||||
| #define weirdhyperbolic ((S7 > 7 || S3 > 3 || whirl::whirl) && hyperbolic) | ||||
| #define stdhyperbolic (S7 == 7 && S3 == 3 && !whirl::whirl) | ||||
|  | ||||
|   | ||||
							
								
								
									
										15
									
								
								pattern2.cpp
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								pattern2.cpp
									
									
									
									
									
								
							| @@ -618,9 +618,11 @@ namespace patterns { | ||||
|       u += 2; | ||||
|       if(!ishept(c->mov[v])) qhex++; | ||||
|       } | ||||
|     if(u == 8 && qhex == 2) si.id = 12; | ||||
|     else if(u == 2 && qhex == 1) si.id = 8; | ||||
|     else if(u == 6 && qhex == 2) si.id = 10; | ||||
|     if(u == 8 && qhex == 2) u = 12; | ||||
|     else if(u == 2 && qhex == 1) u = 8; | ||||
|     else if(u == 6 && qhex == 2) u = 10; | ||||
|     if(whirl::whirl && pseudohept(c) && !ishept(c)) | ||||
|       u = 13; | ||||
|     si.id = u; | ||||
|  | ||||
|     if(u == 6) { | ||||
| @@ -678,7 +680,7 @@ namespace patterns { | ||||
|     val_all(c, si, 0, 0); | ||||
|      | ||||
|     // get id: | ||||
|     if(stdhyperbolic && isWarped(c))  | ||||
|     if((whirl::whirl? (S3==3) : !weirdhyperbolic) && isWarped(c))  | ||||
|       val_warped(c, si); | ||||
|     else { | ||||
|       si.id = ishept(c) ? 1 : 0; | ||||
| @@ -975,7 +977,10 @@ bool warptype(cell *c) { | ||||
|     else  | ||||
|       return c->master->distance & 1; | ||||
|     } | ||||
|   else return pattern_threecolor(c) == 0; | ||||
|   else if(whirl::whirl) | ||||
|     return pseudohept(c); | ||||
|   else | ||||
|     return pattern_threecolor(c) == 0; | ||||
|   } | ||||
|  | ||||
| namespace patterns { | ||||
|   | ||||
							
								
								
									
										10
									
								
								polygons.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								polygons.cpp
									
									
									
									
									
								
							| @@ -976,7 +976,7 @@ hpcshape | ||||
|   shWave[8][2],   | ||||
|   shFloor[2], shBFloor[2], shMFloor2[2], shMFloor3[2], shMFloor4[2], | ||||
|   shCircleFloor, | ||||
|   shFloorShadow[2], shTriheptaFloorShadow[2], shTriheptaEucShadow[3], | ||||
|   shFloorShadow[2], shTriheptaFloorShadow[3], shTriheptaEucShadow[3], | ||||
|   shWall[2], shMineMark[2], shFan, | ||||
|   shStarFloor[3], shCloudFloor[3], shTriFloor[3], shZebra[5], | ||||
|   shSwitchFloor[3], shSwitchDisk, | ||||
| @@ -993,7 +993,7 @@ hpcshape | ||||
|   shMercuryBridge[2], | ||||
|   shLeafFloor[2], | ||||
|   shBarrowFloor[3], | ||||
|   shTriheptaFloor[13], shTriheptaFloor2[2], shTriheptaEuc[3], | ||||
|   shTriheptaFloor[14], shTriheptaFloor2[2], shTriheptaEuc[3], | ||||
|   shCross, shGiantStar[2], shLake, shMirror, | ||||
|   shHalfFloor[3], shHalfMirror[3], | ||||
|   shGem[2], shStar, shDisk, shDiskT, shDiskS, shDiskM, shDiskSq, shRing,    | ||||
| @@ -1350,6 +1350,12 @@ void buildpolys() { | ||||
|   bshape(shTriheptaFloorShadow[1], PPR_FLOOR); | ||||
|   for(int t=0; t<=S7; t++) hpcpush(ddi(t*S12 + tshift1, trihepta1*SHADMUL) * C0); | ||||
|    | ||||
|   bshape(shTriheptaFloor[13], PPR_FLOOR); | ||||
|   for(int t=0; t<=S6; t++) hpcpush(ddi(t*S14 + S7, trihepta0*1.6) * C0); | ||||
|  | ||||
|   bshape(shTriheptaFloorShadow[2], PPR_FLOOR); | ||||
|   for(int t=0; t<=S6; t++) hpcpush(ddi(t*S14 + S7, trihepta0*SHADMUL*1.6) * C0); | ||||
|  | ||||
|   {double x = hexvdist; | ||||
|   bshape(shFullFloor[0], PPR_FLOOR); | ||||
|   x *= bscale6; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue