mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-09 23:50:08 +00:00
when watching score from custom modes, show only the current custom mode
This commit is contained in:
parent
078d16a4e4
commit
c80b34140f
2
hyper.h
2
hyper.h
@ -800,7 +800,7 @@ string XLAT(string);
|
|||||||
#define DKEY (get_direction_key(sym, uni))
|
#define DKEY (get_direction_key(sym, uni))
|
||||||
#define DIRECTIONKEY (interpret_as_direction(sym, uni) ? uni : 0)
|
#define DIRECTIONKEY (interpret_as_direction(sym, uni) ? uni : 0)
|
||||||
|
|
||||||
namespace scores { void load(); void load_only(); }
|
namespace scores { void load(); void load_only(); extern int which_mode; }
|
||||||
|
|
||||||
#if ISMOBILE
|
#if ISMOBILE
|
||||||
namespace leader { void showMenu(); void handleKey(int sym, int uni); }
|
namespace leader { void showMenu(); void handleKey(int sym, int uni); }
|
||||||
|
@ -16,6 +16,8 @@ score *currentgame;
|
|||||||
int scorefrom = 0;
|
int scorefrom = 0;
|
||||||
bool scorerev = false;
|
bool scorerev = false;
|
||||||
|
|
||||||
|
int which_mode;
|
||||||
|
|
||||||
string csub(const string& str, int q) {
|
string csub(const string& str, int q) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(int j=0; j<q && i<isize(str); j++) getnext(str.c_str(), i);
|
for(int j=0; j<q && i<isize(str); j++) getnext(str.c_str(), i);
|
||||||
@ -66,6 +68,8 @@ int modediff(score *S) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string modedesc(score *S) {
|
string modedesc(score *S) {
|
||||||
|
modecode_t mc = S->box[scores::MODECODE_BOX];
|
||||||
|
if(mc && mode_description_of.count(mc)) return mode_description_of[mc];
|
||||||
eGeometry g = (eGeometry) S->box[116];
|
eGeometry g = (eGeometry) S->box[116];
|
||||||
if(S->box[238]) g = gSphere;
|
if(S->box[238]) g = gSphere;
|
||||||
if(S->box[239]) g = gElliptic;
|
if(S->box[239]) g = gElliptic;
|
||||||
@ -215,6 +219,8 @@ void show() {
|
|||||||
|
|
||||||
score& S(scores[id]);
|
score& S(scores[id]);
|
||||||
|
|
||||||
|
if(S.box[MODECODE_BOX] != which_mode && which_mode != -1) { id++; continue; }
|
||||||
|
|
||||||
if(omit) { omit--; rank++; id++; continue; }
|
if(omit) { omit--; rank++; id++; continue; }
|
||||||
|
|
||||||
bool cur = S.box[MAXBOX-1];
|
bool cur = S.box[MAXBOX-1];
|
||||||
@ -379,6 +385,7 @@ void load_only() {
|
|||||||
|
|
||||||
void load() {
|
void load() {
|
||||||
load_only();
|
load_only();
|
||||||
|
which_mode = -1;
|
||||||
|
|
||||||
saved_modecode = modecode();
|
saved_modecode = modecode();
|
||||||
saveBox();
|
saveBox();
|
||||||
|
@ -1427,7 +1427,7 @@ void mode_screen_for_current() {
|
|||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
|
|
||||||
dialog::addSelItem(XLAT("scores recorded"), its(qty_scores_for[mc]), 's');
|
dialog::addSelItem(XLAT("scores recorded"), its(qty_scores_for[mc]), 's');
|
||||||
dialog::add_action([] { scores::load(); });
|
dialog::add_action([mc] { scores::load(); scores::which_mode = mc; });
|
||||||
|
|
||||||
dialog::addSelItem(XLAT("Yendor Challenge"), its(yendor::compute_tscore(mc)), 'y');
|
dialog::addSelItem(XLAT("Yendor Challenge"), its(yendor::compute_tscore(mc)), 'y');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user