mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	rogueviz::flocking:: flock shape can now be changed via command line
This commit is contained in:
		| @@ -67,6 +67,8 @@ namespace flocking { | |||||||
|    |    | ||||||
|   ld check_range = 2.5; |   ld check_range = 2.5; | ||||||
|    |    | ||||||
|  |   char shape = 'b'; | ||||||
|  |    | ||||||
|   vector<tuple<hyperpoint, hyperpoint, color_t> > lines; |   vector<tuple<hyperpoint, hyperpoint, color_t> > lines; | ||||||
|    |    | ||||||
|   // parameters of each boid |   // parameters of each boid | ||||||
| @@ -112,7 +114,7 @@ namespace flocking { | |||||||
|       vd.name = its(i+1); |       vd.name = its(i+1); | ||||||
|       vd.cp = dftcolor; |       vd.cp = dftcolor; | ||||||
|       vd.cp.color2 = ((hrand(0x1000000) << 8) + 0xFF) | 0x808080FF; |       vd.cp.color2 = ((hrand(0x1000000) << 8) + 0xFF) | 0x808080FF; | ||||||
|       vd.cp.shade = 'b'; |       vd.cp.shade = shape; | ||||||
|       vd.m->vel = ini_speed; |       vd.m->vel = ini_speed; | ||||||
|       } |       } | ||||||
|    |    | ||||||
| @@ -306,6 +308,11 @@ namespace flocking { | |||||||
|     else if(argis("-flockfollow")) { |     else if(argis("-flockfollow")) { | ||||||
|       shift(); follow = argi(); |       shift(); follow = argi(); | ||||||
|       } |       } | ||||||
|  |     else if(argis("-flockshape")) { | ||||||
|  |       shift(); shape = argcs()[0]; | ||||||
|  |       for(int i=0; i<N; i++)  | ||||||
|  |         vdata[i].cp.shade = shape; | ||||||
|  |       } | ||||||
|     #ifndef NO_THREADS |     #ifndef NO_THREADS | ||||||
|     else if(argis("-threads")) { |     else if(argis("-threads")) { | ||||||
|       shift(); threads = argi(); |       shift(); threads = argi(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue