mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-17 14:44:08 +00:00
racing:: CAP_FILES employed
This commit is contained in:
parent
e04471a254
commit
e88db219b8
@ -100,6 +100,7 @@ array<vector<ghostmoment>, MAXPLAYER> current_history;
|
|||||||
|
|
||||||
string ghost_prefix = "default";
|
string ghost_prefix = "default";
|
||||||
|
|
||||||
|
#if CAP_FILES
|
||||||
string ghost_filename(string seed, int mcode) {
|
string ghost_filename(string seed, int mcode) {
|
||||||
if(ghost_prefix == "default") {
|
if(ghost_prefix == "default") {
|
||||||
#ifdef FHS
|
#ifdef FHS
|
||||||
@ -162,6 +163,7 @@ void write_ghosts(string seed, int mcode) {
|
|||||||
hwrite(f, (const int&) VERNUM_HEX);
|
hwrite(f, (const int&) VERNUM_HEX);
|
||||||
hwrite(f, ghostset());
|
hwrite(f, ghostset());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
transmatrix get_ghostmoment_matrix(ghostmoment& p) {
|
transmatrix get_ghostmoment_matrix(ghostmoment& p) {
|
||||||
cell *w = rti[p.where_id].c;
|
cell *w = rti[p.where_id].c;
|
||||||
@ -233,8 +235,10 @@ void generate_track() {
|
|||||||
|
|
||||||
TWIDTH = getDistLimit() - 1;
|
TWIDTH = getDistLimit() - 1;
|
||||||
|
|
||||||
|
#if CAP_FILES
|
||||||
if(ghostset().empty())
|
if(ghostset().empty())
|
||||||
read_ghosts(track_code, modecode());
|
read_ghosts(track_code, modecode());
|
||||||
|
#endif
|
||||||
|
|
||||||
track.clear();
|
track.clear();
|
||||||
|
|
||||||
@ -981,10 +985,12 @@ void race_projection() {
|
|||||||
dialog::add_action([/*this*/] () {
|
dialog::add_action([/*this*/] () {
|
||||||
dynamicval<bool> so(shmup::on, true);
|
dynamicval<bool> so(shmup::on, true);
|
||||||
dynamicval<bool> ro(racing::on, true);
|
dynamicval<bool> ro(racing::on, true);
|
||||||
|
#if CAP_FILES
|
||||||
if(race_ghosts[make_pair(new_track, modecode())].empty())
|
if(race_ghosts[make_pair(new_track, modecode())].empty())
|
||||||
read_ghosts(new_track, modecode());
|
read_ghosts(new_track, modecode());
|
||||||
else
|
else
|
||||||
println(hlog, "known ghosts: ", isize(race_ghosts[make_pair(new_track, modecode())]));
|
println(hlog, "known ghosts: ", isize(race_ghosts[make_pair(new_track, modecode())]));
|
||||||
|
#endif
|
||||||
pushScreen([/*this*/] () { track_chooser(new_track); });
|
pushScreen([/*this*/] () { track_chooser(new_track); });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user