diff --git a/rogueviz/ads/control.cpp b/rogueviz/ads/control.cpp index 0b62c392..2eb4dfac 100644 --- a/rogueviz/ads/control.cpp +++ b/rogueviz/ads/control.cpp @@ -118,6 +118,7 @@ bool ads_turn(int idelta) { current_ship = current; vctr_ship = vctr; vctrV_ship = vctrV; + vctr_ship_base = hybrid::get_where(vctr_ship).first; view_pt = 0; } else { diff --git a/rogueviz/ads/display.cpp b/rogueviz/ads/display.cpp index 1add235a..28e1759e 100644 --- a/rogueviz/ads/display.cpp +++ b/rogueviz/ads/display.cpp @@ -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 pts; + vector 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() { diff --git a/rogueviz/ads/globals.cpp b/rogueviz/ads/globals.cpp index 58683361..440da825 100644 --- a/rogueviz/ads/globals.cpp +++ b/rogueviz/ads/globals.cpp @@ -23,6 +23,9 @@ ads_matrix current_ship; /** SL cell closest to the current view/ship */ cell *vctr, *new_vctr, *vctr_ship; +/** hyperbolic cell closest to the current view/ship */ +cell *vctr_ship_base; + /** world coordinates of vctr -- technically, this is a shiftmatrix */ ads_matrix vctrV, new_vctrV, vctrV_ship;