projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed changing back link in hall of fame to "next" only when needed
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index ed086dc30bd694862bf2cbdb891941aa6e80113a..d7b7aab06fec3fab3ef4c56128fcd1eede25b47d 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-4339,6
+4339,14
@@
static int getAlignYOffsetFromTreeInfo(TreeInfo *ti)
return align_yoffset;
}
return align_yoffset;
}
+static void StartPlayingFromHallOfFame(void)
+{
+ level_nr = scores.next_level_nr;
+ LoadLevel(level_nr);
+
+ StartGameActions(network.enabled, setup.autorecord, level.random_seed);
+}
+
static void DrawChooseTree(TreeInfo **ti_ptr)
{
int fade_mask = REDRAW_FIELD;
static void DrawChooseTree(TreeInfo **ti_ptr)
{
int fade_mask = REDRAW_FIELD;
@@
-4354,7
+4362,11
@@
static void DrawChooseTree(TreeInfo **ti_ptr)
{
execSetupArtwork();
}
{
execSetupArtwork();
}
- else // GAME_MODE_LEVELS
+ else if (game_status == GAME_MODE_SCORES && scores.continue_playing)
+ {
+ StartPlayingFromHallOfFame();
+ }
+ else
{
SetGameStatus(GAME_MODE_MAIN);
{
SetGameStatus(GAME_MODE_MAIN);
@@
-4893,15
+4905,17
@@
static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
node_cursor->cl_first = ti->cl_first;
node_cursor->cl_cursor = ti->cl_cursor;
node_cursor->cl_first = ti->cl_first;
node_cursor->cl_cursor = ti->cl_cursor;
+
*ti_ptr = node_cursor->node_group;
DrawChooseTree(ti_ptr);
return;
}
}
*ti_ptr = node_cursor->node_group;
DrawChooseTree(ti_ptr);
return;
}
}
- else if (
dx == -1
&& ti->node_parent)
+ else if (
(dx == -1 || button == MB_MENU_CONTINUE)
&& ti->node_parent)
{
{
- FadeSetLeaveMenu();
+ if (game_status != GAME_MODE_SCORES)
+ FadeSetLeaveMenu();
PlaySound(SND_MENU_ITEM_SELECTING);
PlaySound(SND_MENU_ITEM_SELECTING);
@@
-4984,6
+4998,7
@@
static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
node_cursor->cl_first = ti->cl_first;
node_cursor->cl_cursor = ti->cl_cursor;
node_cursor->cl_first = ti->cl_first;
node_cursor->cl_cursor = ti->cl_cursor;
+
*ti_ptr = node_cursor->node_group;
DrawChooseTree(ti_ptr);
}
*ti_ptr = node_cursor->node_group;
DrawChooseTree(ti_ptr);
}
@@
-5002,6
+5017,7
@@
static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
node_cursor->cl_first = ti->cl_first;
node_cursor->cl_cursor = ti->cl_cursor;
node_cursor->cl_first = ti->cl_first;
node_cursor->cl_cursor = ti->cl_cursor;
+
*ti_ptr = node_cursor;
if (ti->type == TREE_TYPE_LEVEL_DIR)
*ti_ptr = node_cursor;
if (ti->type == TREE_TYPE_LEVEL_DIR)
@@
-5094,8
+5110,8
@@
static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
{
if (scores.continue_playing && scores.continue_on_return)
{
{
if (scores.continue_playing && scores.continue_on_return)
{
- Start
GameActions(network.enabled, setup.autorecord,
- level.random_seed);
+ Start
PlayingFromHallOfFame();
+
return;
}
else if (!scores.continue_on_return)
return;
}
else if (!scores.continue_on_return)
@@
-5295,6
+5311,9
@@
static void DrawHallOfFame_setScoreEntries(void)
if (score_entry_current == NULL)
score_entry_current = getFirstValidTreeInfoEntry(score_entries);
if (score_entry_current == NULL)
score_entry_current = getFirstValidTreeInfoEntry(score_entries);
+ if (score_entries != NULL && scores.continue_playing)
+ setString(&score_entries->node_group->name, BACKLINK_TEXT_NEXT);
+
// ("score_entries" and "score_entry_current" may be NULL here)
}
// ("score_entries" and "score_entry_current" may be NULL here)
}