move a pair of functions from save.c to restore.c

A utility that links only with restore.o needs to find them.
This commit is contained in:
nhmall
2026-04-13 09:08:53 -04:00
parent efaabc3203
commit 8c8121eb3c
5 changed files with 20 additions and 19 deletions

View File

@@ -1889,6 +1889,7 @@ vconfig_error_add(const char *str, va_list the_args)
config_erradd(buf);
}
#ifndef SFCTOOL
void
rcfile(void)
{
@@ -2022,6 +2023,7 @@ config_unmatched_ignored(void)
return TRUE;
return FALSE;
}
#endif /* SFCTOOL */
#ifdef SYSCF
#ifdef SYSCF_FILE

View File

@@ -1313,6 +1313,21 @@ rest_adjust_levelflags(void)
/* adjust timestamps */
relative_time_to_moves(&svl.level.flags.stasis_until);
}
void
moves_to_relative_time(long *timestamp)
{
long prevts = *timestamp;
*timestamp = prevts - svm.moves;
}
void
relative_time_to_moves(long *timestamp)
{
long prevts = *timestamp;
*timestamp = svm.moves + prevts;
}
/* "name-role-race-gend-algn" occurs very early in a save file; sometimes we
want the whole thing, other times just "name" (for svp.plname[]) */

View File

@@ -1052,22 +1052,6 @@ save_msghistory(NHFILE *nhfp)
/* note: we don't attempt to handle release_data() here */
}
void
moves_to_relative_time(long *timestamp)
{
long prevts = *timestamp;
*timestamp = prevts - svm.moves;
}
void
relative_time_to_moves(long *timestamp)
{
long prevts = *timestamp;
*timestamp = svm.moves + prevts;
}
/* also called by prscore(); this probably belongs in dungeon.c... */
void
free_dungeons(void)