racing::add_debug

This commit is contained in:
Zeno Rogue 2018-12-23 13:10:46 +01:00
parent 2bc66342dd
commit d65c41db12
3 changed files with 12 additions and 1 deletions

View File

@ -431,7 +431,7 @@ struct debugScreen {
}
dialog::addBack();
dialog::display();
keyhandler = [this, what] (int sym, int uni) {
handlePanning(sym, uni);
dialog::handleNavigation(sym, uni);

View File

@ -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);

View File

@ -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) {