mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-21 05:20:38 +00:00
racing:: race_advance
This commit is contained in:
parent
39067a83df
commit
8635c49a5e
11
racing.cpp
11
racing.cpp
@ -15,6 +15,8 @@ bool track_ready;
|
|||||||
|
|
||||||
int TWIDTH;
|
int TWIDTH;
|
||||||
|
|
||||||
|
ld race_advance = 0;
|
||||||
|
|
||||||
static const int LENGTH = 250;
|
static const int LENGTH = 250;
|
||||||
static const int DROP = 1;
|
static const int DROP = 1;
|
||||||
|
|
||||||
@ -618,6 +620,7 @@ void set_view() {
|
|||||||
hyperpoint h = T * inverse(T1) * at * C0;
|
hyperpoint h = T * inverse(T1) * at * C0;
|
||||||
ld y = asin_auto(h[1]);
|
ld y = asin_auto(h[1]);
|
||||||
ld x = asin_auto(h[0] / cos_auto(y));
|
ld x = asin_auto(h[0] / cos_auto(y));
|
||||||
|
x += race_advance;
|
||||||
// printf("%d %lf\n", z, x);
|
// printf("%d %lf\n", z, x);
|
||||||
transmatrix Z = T1 * inverse(T) * xpush(x);
|
transmatrix Z = T1 * inverse(T) * xpush(x);
|
||||||
View = spin(race_angle * degree) * inverse(Z) * View;
|
View = spin(race_angle * degree) * inverse(Z) * View;
|
||||||
@ -850,13 +853,16 @@ struct race_configurer {
|
|||||||
case mdDisk:
|
case mdDisk:
|
||||||
pmodel = mdBand;
|
pmodel = mdBand;
|
||||||
conformal::model_orientation = race_angle;
|
conformal::model_orientation = race_angle;
|
||||||
|
race_advance = 1;
|
||||||
break;
|
break;
|
||||||
case mdBand:
|
case mdBand:
|
||||||
pmodel = mdHalfplane;
|
pmodel = mdHalfplane;
|
||||||
conformal::model_orientation = race_angle + 90;
|
conformal::model_orientation = race_angle + 90;
|
||||||
|
race_advance = 0.5;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pmodel = mdDisk;
|
pmodel = mdDisk;
|
||||||
|
race_advance = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -867,6 +873,11 @@ struct race_configurer {
|
|||||||
dialog::reaction = [q] () { conformal::model_orientation = race_angle + q; };
|
dialog::reaction = [q] () { conformal::model_orientation = race_angle + q; };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dialog::addSelItem(XLAT("race advance"), fts(race_advance), 'A');
|
||||||
|
dialog::add_action([] () {
|
||||||
|
dialog::editNumber(race_advance, 0, 360, 0.1, 1, XLAT("race advance"), "");
|
||||||
|
});
|
||||||
|
|
||||||
dialog::addItem(shmup::player_count_name(playercfg), 'n');
|
dialog::addItem(shmup::player_count_name(playercfg), 'n');
|
||||||
dialog::add_action([this] () {
|
dialog::add_action([this] () {
|
||||||
playercfg = playercfg == 1 ? 2 : 1;
|
playercfg = playercfg == 1 ? 2 : 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user