1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 11:27:39 +00:00

ads-game:: show the (approximate) future

This commit is contained in:
Zeno Rogue
2022-09-18 11:24:43 +02:00
parent d76b2156f2
commit eefb91501e
3 changed files with 22 additions and 0 deletions

View File

@@ -152,6 +152,24 @@ void draw_game_cell(cell *cs, ads_matrix V, ld plev) {
queuecurve(shiftless(Id), 0xFF, shipcolor, PPR::LINE);
}
if(paused && c == vctr_ship_base && !game_over) {
vector<hyperpoint> pts;
vector<ld> times;
int ok = 0, bad = 0;
for(int i=0; i<=360; i++) {
hybrid::in_actual([&]{
auto h = ads_inverse(current_ship * vctrV_ship) * spin(i*degree) * lorentz(0, 2, 6);
auto cr = cross0(current * V * h);
pts.push_back(cr.h);
times.push_back(cr.shift);
if(cr.shift > 0 && cr.shift < 90*degree) ok++; else bad++;
});
}
if(bad == 0) {
for(auto h: pts) curvepoint(h);
queuecurve(shiftless(Id), 0x000000C0, 0x00000060, PPR::SUPERLINE);
}
}
}
void view_ads_game() {