mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-07 20:02:50 +00:00
maTranslationRotation animation
This commit is contained in:
parent
4ae3560dda
commit
d5109fc3bb
@ -474,7 +474,7 @@ void menu() {
|
|||||||
namespace anims {
|
namespace anims {
|
||||||
|
|
||||||
enum eMovementAnimation {
|
enum eMovementAnimation {
|
||||||
maNone, maTranslation, maRotation, maCircle, maParabolic
|
maNone, maTranslation, maRotation, maCircle, maParabolic, maTranslationRotation
|
||||||
};
|
};
|
||||||
|
|
||||||
eMovementAnimation ma;
|
eMovementAnimation ma;
|
||||||
@ -614,6 +614,14 @@ void apply() {
|
|||||||
View = spin(movement_angle * degree) * View;
|
View = spin(movement_angle * degree) * View;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case maTranslationRotation:
|
||||||
|
View = cspin(0, DIM-1, movement_angle * degree) * ypush(shift_angle * degree) * xpush(cycle_length * t / period) * ypush(-shift_angle * degree) *
|
||||||
|
cspin(0, DIM-1, -movement_angle * degree) * View;
|
||||||
|
moved();
|
||||||
|
View = spin(2 * M_PI * t / period) * View;
|
||||||
|
break;
|
||||||
|
|
||||||
#if CAP_BT
|
#if CAP_BT
|
||||||
case maParabolic:
|
case maParabolic:
|
||||||
reflect_view();
|
reflect_view();
|
||||||
@ -823,6 +831,7 @@ void show() {
|
|||||||
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');
|
||||||
switch(ma) {
|
switch(ma) {
|
||||||
case maCircle: {
|
case maCircle: {
|
||||||
animator(XLAT("circle spins"), circle_spins, 'C');
|
animator(XLAT("circle spins"), circle_spins, 'C');
|
||||||
@ -853,6 +862,7 @@ void show() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case maTranslation:
|
case maTranslation:
|
||||||
|
case maTranslationRotation:
|
||||||
case maParabolic: {
|
case maParabolic: {
|
||||||
if(ma == maTranslation && conformal::on)
|
if(ma == maTranslation && conformal::on)
|
||||||
dialog::addBreak(300);
|
dialog::addBreak(300);
|
||||||
@ -1013,6 +1023,12 @@ int readArgs() {
|
|||||||
shift_arg_formula(shift_angle);
|
shift_arg_formula(shift_angle);
|
||||||
shift_arg_formula(movement_angle);
|
shift_arg_formula(movement_angle);
|
||||||
}
|
}
|
||||||
|
else if(argis("-animmoverot")) {
|
||||||
|
ma = maTranslationRotation;
|
||||||
|
shift_arg_formula(cycle_length);
|
||||||
|
shift_arg_formula(shift_angle);
|
||||||
|
shift_arg_formula(movement_angle);
|
||||||
|
}
|
||||||
else if(argis("-animpar")) {
|
else if(argis("-animpar")) {
|
||||||
ma = maParabolic;
|
ma = maParabolic;
|
||||||
shift_arg_formula(parabolic_length);
|
shift_arg_formula(parabolic_length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user