/*
- * OPTION: Forbid the use of "fiddled" savefiles. As far as I can tell,
- * a fiddled savefile is one with an internal timestamp different from
- * the actual timestamp. Thus, turning this option on forbids one from
- * copying a savefile to a different name. Combined with disabling the
- * ability to save the game without quitting, and with some method of
- * stopping the user from killing the process at the tombstone screen,
- * this should prevent the use of backup savefiles. It may also stop
- * the use of savefiles from other platforms, so be careful.
- */
-/* #define VERIFY_TIMESTAMP */
-
-
-/*
* OPTION: Forbid the "savefile over-write" cheat, in which you simply
* run another copy of the game, loading a previously saved savefile,
* and let that copy over-write the "dead" savefile later. This option
*/
#ifdef VERIFY_HONOR
# define VERIFY_SAVEFILE
-# define VERIFY_TIMESTAMPS
#endif
#ifndef HAVE_CONFIG_H
*/
bool load_player(player_type *player_ptr)
{
-#ifdef VERIFY_TIMESTAMP
- struct stat statbuf;
-#endif
-
concptr what = "generic";
current_world_ptr->game_turn = 0;
/* Process file */
if (!err)
{
-#ifdef VERIFY_TIMESTAMP
- /* Get the timestamp */
- (void)fstat(fd, &statbuf);
-#endif
-
/* Read the first four bytes */
if (fd_read(fd, (char*)(vvv), 4)) err = -1;
if (err) what = _("セーブファイルが壊れています", "Broken savefile");
}
-#ifdef VERIFY_TIMESTAMP
- /* Verify timestamp */
- if (!err && !arg_wizard)
- {
- /* Hack -- Verify the timestamp */
- if (current_world_ptr->sf_when > (statbuf.st_ctime + 100) ||
- current_world_ptr->sf_when < (statbuf.st_ctime - 100))
- {
- what = _("無効なタイム・スタンプです", "Invalid timestamp");
-
- err = -1;
- }
- }
-#endif
-
if (!err)
{
/* Give a conversion warning */