diff --git a/debug.cpp b/debug.cpp index 6b8387fc..82733802 100644 --- a/debug.cpp +++ b/debug.cpp @@ -431,7 +431,7 @@ struct debugScreen { } dialog::addBack(); dialog::display(); - + keyhandler = [this, what] (int sym, int uni) { handlePanning(sym, uni); dialog::handleNavigation(sym, uni); diff --git a/hyper.h b/hyper.h index 72d3614a..c8ea5357 100644 --- a/hyper.h +++ b/hyper.h @@ -4698,6 +4698,7 @@ namespace racing { void race_won(); void apply_seed(); string racetimeformat(int t); + void add_debug(cell *c); } bool subscreen_split(reaction_t for_each_subscreen); diff --git a/racing.cpp b/racing.cpp index 354d00bb..296f38a5 100644 --- a/racing.cpp +++ b/racing.cpp @@ -887,6 +887,16 @@ int get_percentage(int i) { return min(get_info(shmup::pc[i]->base).completion * 100 / (isize(track) - DROP), 100); } +void add_debug(cell *c) { + if(racing::on && racing::rti_id[c]) { + auto& r = racing::get_info(c); + dialog::addSelItem("from_track", its(r.from_track), 0); + dialog::addSelItem("from_start", its(r.from_start), 0); + dialog::addSelItem("from_goal", its(r.from_goal), 0); + dialog::addSelItem("completion", its(r.completion), 0); + } + } + } bool subscreen_split(reaction_t what) {