mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 22:12:59 +00:00 
			
		
		
		
	crystal:: automatically bitruncate with crystal's implementation
This commit is contained in:
		| @@ -375,6 +375,7 @@ int readArgs() { | |||||||
|     geometry = gCrystal; variation = eVariation::pure; |     geometry = gCrystal; variation = eVariation::pure; | ||||||
|     shift(); int N = argi(); |     shift(); int N = argi(); | ||||||
|     ginf[gCrystal].sides = N; |     ginf[gCrystal].sides = N; | ||||||
|  |     ginf[gCrystal].vertex = 4; | ||||||
|     if(N < MAX_EDGE) |     if(N < MAX_EDGE) | ||||||
|       ginf[gCrystal].distlimit = distlimit_table[N]; |       ginf[gCrystal].distlimit = distlimit_table[N]; | ||||||
|     add_bitruncation = false; |     add_bitruncation = false; | ||||||
| @@ -383,6 +384,8 @@ int readArgs() { | |||||||
|     stop_game(); |     stop_game(); | ||||||
|     geometry = gCrystal; variation = eVariation::bitruncated; |     geometry = gCrystal; variation = eVariation::bitruncated; | ||||||
|     ginf[gCrystal].sides = 8; |     ginf[gCrystal].sides = 8; | ||||||
|  |     ginf[gCrystal].vertex = 3; | ||||||
|  |     ginf[gCrystal].distlimit = {7, 5}; | ||||||
|     add_bitruncation = true; |     add_bitruncation = true; | ||||||
|     } |     } | ||||||
|   else if(argis("-cview")) { |   else if(argis("-cview")) { | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -4136,6 +4136,7 @@ namespace arcm { | |||||||
|   } |   } | ||||||
|  |  | ||||||
| namespace crystal { | namespace crystal { | ||||||
|  |   extern bool add_bitruncation; | ||||||
|   color_t colorize(cell *c); |   color_t colorize(cell *c); | ||||||
|   int distance(cell *c1, cell *c2); |   int distance(cell *c1, cell *c2); | ||||||
|   hrmap *new_map(); |   hrmap *new_map(); | ||||||
|   | |||||||
| @@ -1158,6 +1158,11 @@ void set_variation(eVariation target) { | |||||||
|   if(variation != target) { |   if(variation != target) { | ||||||
|     stop_game(); |     stop_game(); | ||||||
|     if(euclid6 || binarytiling) geometry = gNormal; |     if(euclid6 || binarytiling) geometry = gNormal; | ||||||
|  |     if(target == eVariation::bitruncated && geometry == gCrystal && ginf[gCrystal].sides == 8 && !crystal::add_bitruncation) { | ||||||
|  |       crystal::add_bitruncation = true; | ||||||
|  |       ginf[gCrystal].vertex = 3; | ||||||
|  |       target = eVariation::pure; | ||||||
|  |       } | ||||||
|     variation = target; |     variation = target; | ||||||
|     need_reset_geometry = true; |     need_reset_geometry = true; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue