mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	animations in product (untested)
This commit is contained in:
		| @@ -289,7 +289,7 @@ EX namespace history { | |||||||
|       v[ph+1]->at * C0; |       v[ph+1]->at * C0; | ||||||
|    |    | ||||||
|     View = xpush(-(phase-ph) * hdist(now, next)) * View; |     View = xpush(-(phase-ph) * hdist(now, next)) * View; | ||||||
|     if(WDIM == 2) { |     if(WDIM == 2 || prod) { | ||||||
|       View = models::rotmatrix() * View; |       View = models::rotmatrix() * View; | ||||||
|       } |       } | ||||||
|     else { |     else { | ||||||
|   | |||||||
| @@ -590,6 +590,8 @@ EX void apply() { | |||||||
|   int t = ticks - lastticks; |   int t = ticks - lastticks; | ||||||
|   lastticks = ticks; |   lastticks = ticks; | ||||||
|  |  | ||||||
|  |   auto& LPV = prod ? nisot::local_perspective : View; | ||||||
|  |  | ||||||
|   switch(ma) { |   switch(ma) { | ||||||
|     case maTranslation: |     case maTranslation: | ||||||
|       if(history::on) { |       if(history::on) { | ||||||
| @@ -621,13 +623,13 @@ EX void apply() { | |||||||
|  |  | ||||||
|     case maRotation: |     case maRotation: | ||||||
|       if(GDIM == 3) { |       if(GDIM == 3) { | ||||||
|         View = spin(-movement_angle * degree) * View; |         LPV = spin(-movement_angle * degree) * LPV; | ||||||
|         View = cspin(1, 2, normal_angle * degree) * View; |         LPV = cspin(1, 2, normal_angle * degree) * LPV; | ||||||
|         } |         } | ||||||
|       View = spin(2 * M_PI * t / period) * View; |       LPV = spin(2 * M_PI * t / period) * LPV; | ||||||
|       if(GDIM == 3) { |       if(GDIM == 3) { | ||||||
|         View = cspin(2, 1, normal_angle * degree) * View; |         LPV = cspin(2, 1, normal_angle * degree) * LPV; | ||||||
|         View = spin(movement_angle * degree) * View; |         LPV = spin(movement_angle * degree) * LPV; | ||||||
|         } |         } | ||||||
|       break; |       break; | ||||||
|      |      | ||||||
| @@ -635,7 +637,7 @@ EX void apply() { | |||||||
|       View = solmul(cspin(0, GDIM-1, movement_angle * degree) * ypush(shift_angle * degree) * xpush(cycle_length * t / period) * ypush(-shift_angle * degree) *  |       View = solmul(cspin(0, GDIM-1, movement_angle * degree) * ypush(shift_angle * degree) * xpush(cycle_length * t / period) * ypush(-shift_angle * degree) *  | ||||||
|         cspin(0, GDIM-1, -movement_angle * degree), nisot::local_perspective, View); |         cspin(0, GDIM-1, -movement_angle * degree), nisot::local_perspective, View); | ||||||
|       moved(); |       moved(); | ||||||
|       View = cspin(0, GDIM-1, 2 * M_PI * t / period) * View; |       LPV = cspin(0, GDIM-1, 2 * M_PI * t / period) * LPV; | ||||||
|       if(clearup) { |       if(clearup) { | ||||||
|         viewcenter()->wall = waNone; |         viewcenter()->wall = waNone; | ||||||
|         } |         } | ||||||
| @@ -844,12 +846,14 @@ EX void show() { | |||||||
|   if(among(pmodel, mdJoukowsky, mdJoukowskyInverted)) { |   if(among(pmodel, mdJoukowsky, mdJoukowskyInverted)) { | ||||||
|     animator(XLAT("Möbius transformations"), skiprope_rotation, 'S'); |     animator(XLAT("Möbius transformations"), skiprope_rotation, 'S'); | ||||||
|     } |     } | ||||||
|  |   if(!prod) { | ||||||
|     dialog::addBoolItem(XLAT("circle"), ma == maCircle, '4'); |     dialog::addBoolItem(XLAT("circle"), ma == maCircle, '4'); | ||||||
|     dialog::add_action([] () { ma = maCircle;  |     dialog::add_action([] () { ma = maCircle;  | ||||||
|       rotation_center_h = viewctr; |       rotation_center_h = viewctr; | ||||||
|       rotation_center_c = centerover; |       rotation_center_c = centerover; | ||||||
|       rotation_center_View = View; |       rotation_center_View = View; | ||||||
|       }); |       }); | ||||||
|  |     } | ||||||
|   dialog::addBoolItem_choice(XLAT("translation")+"+"+XLAT("rotation"), ma, maTranslationRotation, '5'); |   dialog::addBoolItem_choice(XLAT("translation")+"+"+XLAT("rotation"), ma, maTranslationRotation, '5'); | ||||||
|   switch(ma) { |   switch(ma) { | ||||||
|     case maCircle: { |     case maCircle: { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue