mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	rogueviz::kohonen:: animate option
This commit is contained in:
		| @@ -1358,8 +1358,10 @@ void neurondisttable(const string &name) { | |||||||
|   fclose(f); |   fclose(f); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | bool animate = true; | ||||||
|  |  | ||||||
| void steps() { | void steps() { | ||||||
|   if(!kohonen::finished()) { |   if(kohonen::animate && !kohonen::finished()) { | ||||||
|     unsigned int t = SDL_GetTicks(); |     unsigned int t = SDL_GetTicks(); | ||||||
|     while(SDL_GetTicks() < t+20) kohonen::step(); |     while(SDL_GetTicks() < t+20) kohonen::step(); | ||||||
|     setindex(false); |     setindex(false); | ||||||
| @@ -1749,6 +1751,7 @@ auto hooks4 = addHook(hooks_clearmemory, 100, clear) | |||||||
|     -> editable(0, 2, .2, "precise placement", "0 = make all visible, 1 = place ideally, n = place 1/n of the distance from center to ideal placement", 'p') |     -> editable(0, 2, .2, "precise placement", "0 = make all visible, 1 = place ideally, n = place 1/n of the distance from center to ideal placement", 'p') | ||||||
|     -> set_reaction([] { if((state & KS_NEURONS) && (state & KS_SAMPLES)) distribute_neurons(); }); |     -> set_reaction([] { if((state & KS_NEURONS) && (state & KS_SAMPLES)) distribute_neurons(); }); | ||||||
|     param_b(show_rings, "som_show_rings"); |     param_b(show_rings, "som_show_rings"); | ||||||
|  |     param_b(animate, "animate"); | ||||||
|     }); |     }); | ||||||
| }} | }} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue