mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
3d:: rotation_yz for line animation (la currently still changes directions randomly)
This commit is contained in:
parent
0f4146ac36
commit
b5127b0006
@ -224,6 +224,7 @@ void initConfig() {
|
|||||||
addsaver(conformal::bandhalf, "band width");
|
addsaver(conformal::bandhalf, "band width");
|
||||||
addsaver(conformal::bandsegment, "band segment");
|
addsaver(conformal::bandsegment, "band segment");
|
||||||
addsaver(conformal::rotation, "conformal rotation");
|
addsaver(conformal::rotation, "conformal rotation");
|
||||||
|
addsaver(conformal::rotation_xz, "conformal rotation_xz");
|
||||||
addsaver(conformal::do_rotate, "conformal rotation mode", 1);
|
addsaver(conformal::do_rotate, "conformal rotation mode", 1);
|
||||||
addsaver(conformal::model_orientation, "model orientation", 0);
|
addsaver(conformal::model_orientation, "model orientation", 0);
|
||||||
addsaver(conformal::model_orientation_yz, "model orientation-yz", 0);
|
addsaver(conformal::model_orientation_yz, "model orientation-yz", 0);
|
||||||
|
@ -273,6 +273,7 @@ namespace conformal {
|
|||||||
int bandhalf = 200;
|
int bandhalf = 200;
|
||||||
int bandsegment = 16000;
|
int bandsegment = 16000;
|
||||||
ld rotation = 0;
|
ld rotation = 0;
|
||||||
|
ld rotation_xz = 90;
|
||||||
int do_rotate = 1;
|
int do_rotate = 1;
|
||||||
ld model_orientation, halfplane_scale, model_orientation_yz;
|
ld model_orientation, halfplane_scale, model_orientation_yz;
|
||||||
ld clip_min, clip_max;
|
ld clip_min, clip_max;
|
||||||
@ -370,6 +371,7 @@ namespace conformal {
|
|||||||
v[ph+1]->at * C0;
|
v[ph+1]->at * C0;
|
||||||
|
|
||||||
View = spin(rotation * degree) * xpush(-(phase-ph) * hdist(now, next)) * View;
|
View = spin(rotation * degree) * xpush(-(phase-ph) * hdist(now, next)) * View;
|
||||||
|
if(DIM == 3) View = cspin(0, 2, rotation_xz * degree) * View;
|
||||||
playermoved = false;
|
playermoved = false;
|
||||||
centerover.at = v[ph]->base;
|
centerover.at = v[ph]->base;
|
||||||
compute_graphical_distance();
|
compute_graphical_distance();
|
||||||
@ -704,6 +706,12 @@ namespace conformal {
|
|||||||
dialog::addBoolItem(XLAT("rotation"), do_rotate == 2, 'r');
|
dialog::addBoolItem(XLAT("rotation"), do_rotate == 2, 'r');
|
||||||
if(do_rotate == 0) dialog::lastItem().value = XLAT("NEVER");
|
if(do_rotate == 0) dialog::lastItem().value = XLAT("NEVER");
|
||||||
dialog::lastItem().value += " " + its(rotation) + "°";
|
dialog::lastItem().value += " " + its(rotation) + "°";
|
||||||
|
|
||||||
|
if(DIM == 3) {
|
||||||
|
dialog::addBoolItem(XLAT("rotation (x/z plane)"), do_rotate == 2, 'k');
|
||||||
|
if(do_rotate == 0) dialog::lastItem().value = XLAT("NEVER");
|
||||||
|
dialog::lastItem().value += " " + its(rotation_xz) + "°";
|
||||||
|
}
|
||||||
|
|
||||||
// if(pmodel == mdBand && sphere)
|
// if(pmodel == mdBand && sphere)
|
||||||
if(pmodel != mdPerspective)
|
if(pmodel != mdPerspective)
|
||||||
@ -959,9 +967,10 @@ namespace conformal {
|
|||||||
}
|
}
|
||||||
else if(uni == 'a')
|
else if(uni == 'a')
|
||||||
pushScreen(history_menu);
|
pushScreen(history_menu);
|
||||||
else if(uni == 'r') {
|
else if(uni == 'r' || uni == 'k') {
|
||||||
if(rotation < 0) rotation = 0;
|
ld& selected_rotation = uni == 'r' ? rotation : rotation_xz;
|
||||||
dialog::editNumber(rotation, 0, 360, 90, 0, XLAT("rotation"),
|
if(selected_rotation < 0) selected_rotation = 0;
|
||||||
|
dialog::editNumber(selected_rotation, 0, 360, 90, 0, XLAT("rotation"),
|
||||||
"This controls the automatic rotation of the world. "
|
"This controls the automatic rotation of the world. "
|
||||||
"It affects the line animation in the history mode, and "
|
"It affects the line animation in the history mode, and "
|
||||||
"lands which have a special direction. Note that if finding this special direction is a part of the puzzle, "
|
"lands which have a special direction. Note that if finding this special direction is a part of the puzzle, "
|
||||||
|
1
hyper.h
1
hyper.h
@ -1395,6 +1395,7 @@ namespace conformal {
|
|||||||
extern bool includeHistory;
|
extern bool includeHistory;
|
||||||
extern bool use_atan;
|
extern bool use_atan;
|
||||||
extern ld rotation;
|
extern ld rotation;
|
||||||
|
extern ld rotation_xz;
|
||||||
extern int do_rotate;
|
extern int do_rotate;
|
||||||
extern ld model_orientation, model_orientation_yz;
|
extern ld model_orientation, model_orientation_yz;
|
||||||
extern ld halfplane_scale;
|
extern ld halfplane_scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user