scores->last_added_local = -1;
scores->updated = FALSE;
+ scores->force_last_added = FALSE;
}
static void setScoreInfoToDefaults(void)
void MergeServerScore(void)
{
+ struct ScoreEntry last_added_entry;
boolean one_per_name = !program.many_scores_per_name;
int i;
+ if (scores.last_added >= 0)
+ last_added_entry = scores.entry[scores.last_added];
+
for (i = 0; i < server_scores.num_entries; i++)
{
int pos = addScoreEntry(&scores, &server_scores.entry[i], one_per_name);
}
if (scores.last_added >= MAX_SCORE_ENTRIES)
- scores.last_added = -1;
+ {
+ scores.last_added = MAX_SCORE_ENTRIES - 1;
+ scores.force_last_added = TRUE;
+
+ scores.entry[scores.last_added] = last_added_entry;
+ }
}
static int getElementMoveStepsizeExt(int x, int y, int direction)
int last_added_local;
boolean updated;
+ boolean force_last_added;
struct ScoreEntry entry[MAX_SCORE_ENTRIES];
};
{
int entry = first_entry + i;
boolean active = (entry == scores.last_added);
+ boolean forced = (scores.force_last_added && active);
int font_nr1 = (active ? FONT_TEXT_1_ACTIVE : FONT_TEXT_1);
int font_nr2 = (active ? FONT_TEXT_2_ACTIVE : FONT_TEXT_2);
int font_nr3 = (active ? FONT_TEXT_3_ACTIVE : FONT_TEXT_3);
int dx3 = SXSIZE - 2 * (mSX - SX + dxoff) - 5 * getFontWidth(font_nr4);
int num_dots = (dx3 - dx2) / getFontWidth(font_nr3);
int sy = mSY + 64 + i * 32;
+ char *pos_text = (forced ? "???" : int2str(entry + 1, 3));
- DrawText(mSX, sy, int2str(entry + 1, 3), font_nr1);
+ DrawText(mSX, sy, pos_text, font_nr1);
DrawText(mSX + dx1, sy, ".", font_nr1);
for (j = 0; j < num_dots; j++)