1
0
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:
Zeno Rogue 2019-03-21 03:38:10 +01:00
parent 0f4146ac36
commit b5127b0006
3 changed files with 14 additions and 3 deletions

View File

@ -224,6 +224,7 @@ void initConfig() {
addsaver(conformal::bandhalf, "band width");
addsaver(conformal::bandsegment, "band segment");
addsaver(conformal::rotation, "conformal rotation");
addsaver(conformal::rotation_xz, "conformal rotation_xz");
addsaver(conformal::do_rotate, "conformal rotation mode", 1);
addsaver(conformal::model_orientation, "model orientation", 0);
addsaver(conformal::model_orientation_yz, "model orientation-yz", 0);

View File

@ -273,6 +273,7 @@ namespace conformal {
int bandhalf = 200;
int bandsegment = 16000;
ld rotation = 0;
ld rotation_xz = 90;
int do_rotate = 1;
ld model_orientation, halfplane_scale, model_orientation_yz;
ld clip_min, clip_max;
@ -370,6 +371,7 @@ namespace conformal {
v[ph+1]->at * C0;
View = spin(rotation * degree) * xpush(-(phase-ph) * hdist(now, next)) * View;
if(DIM == 3) View = cspin(0, 2, rotation_xz * degree) * View;
playermoved = false;
centerover.at = v[ph]->base;
compute_graphical_distance();
@ -705,6 +707,12 @@ namespace conformal {
if(do_rotate == 0) dialog::lastItem().value = XLAT("NEVER");
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 != mdPerspective)
dialog::addSelItem(XLAT("scale factor"), fts(vid.scale), 'z');
@ -959,9 +967,10 @@ namespace conformal {
}
else if(uni == 'a')
pushScreen(history_menu);
else if(uni == 'r') {
if(rotation < 0) rotation = 0;
dialog::editNumber(rotation, 0, 360, 90, 0, XLAT("rotation"),
else if(uni == 'r' || uni == 'k') {
ld& selected_rotation = uni == 'r' ? rotation : rotation_xz;
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. "
"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, "

View File

@ -1395,6 +1395,7 @@ namespace conformal {
extern bool includeHistory;
extern bool use_atan;
extern ld rotation;
extern ld rotation_xz;
extern int do_rotate;
extern ld model_orientation, model_orientation_yz;
extern ld halfplane_scale;