view srogue/rogue.ext @ 81:0e212d46b68f

rogue4: don't put savefile metadata into the savefile. The save_file() function in save.c stored the savefile's device number, inode number, creation time, and modification time in the file. The restore() function read them back, and apparently used to compare them to protect against cheaters. Unfortunately, the types and sizes of these numbers differ from system to system, which ruins the Roguelike Restoration Project's fine portability work. So they have been removed from the savefile. This BREAKS SAVEFILE COMPATIBILITY, but old files can be converted by excising the chunk starting at offset 0x22 with length sizeof(ino_t) + sizeof(dev_t) + 2 * sizeof(time_t). That's 0x14 on i686 and 0x20 on x86_64, at least with current versions of Linux and glibc.
author John "Elwin" Edwards
date Mon, 05 Aug 2013 20:49:41 -0700
parents 34d7a614855e
children 94a0d9dd5ce1
line wrap: on
line source

EXTTHG player;
EXTWEP weaps[];
EXTARM armors[];
EXTMON monsters[], *mtlev[];
EXTTRAP *trap_at(), traps[];
EXTROOM *roomin(), *oldrp, rooms[];
EXTCORD *rndmove(), *rnd_pos(), delta, stairs, oldpos, rndspot;
EXTLKL *mlist, *lvl_obj, *new_item(), *new_thing(), *new_monster();
EXTLKL *find_mons(), *wake_monster(), *find_obj(), *get_item();
EXTOBJ *cur_armor, *cur_weapon, *cur_ring[];
EXTMAG r_magic[], s_magic[], ws_magic[], p_magic[];
EXTMAG things[], a_magic[], w_magic[];
EXTINT max_hp, quiet, food_left, hungry_state, level, max_level;
EXTINT foodlev, total, count, demoncnt, fung_hit, ntraps;
EXTINT lastscore, purse, mpos, seed, dnum, no_food, packvol, playuid;
EXTINT curprice, trader, group, levcount, levtype, ringfood, playgid;
EXTINT chkstairs(), rollwand(), swander(), notslow(), notfight(), rnd();
EXTINT rchg_str(), wghtchk(), stomach(), doctor(), runners(), status(), sight();
extern void quit(), auto_save(), endit(), byebye(), game_err();
EXTINT prntfile(), unconfuse(), sapem();
EXTINT noteth(), notregen(), notinvinc(), unsee(), nohaste(), npch();
EXTBOOL running, nochange, after, inwhgt, isfight, firstmove, nlmove;
EXTBOOL wizard, waswizard, in_shell, amulet, door_stop, playing, use_savedir;
EXTBOOL notify, ws_know[], p_know[], s_know[], r_know[], inpool;
EXTCHAR home[], file_name[], whoami[], fruit[], curpurch[], scorefile[];
EXTCHAR *r_stones[], *p_colors[], *s_names[], *ws_type[], *ws_made[];
EXTCHAR *ws_guess[], *s_guess[], *r_guess[], *p_guess[];/*, *unctrl();*/
EXTCHAR morestr[], prbuf[], huh[], *identify(), *vowelstr();
EXTCHAR *new(), *strcpy(), *strcat(), *inv_name(), pack_char(), *prname();
EXTCHAR *num(), *getenv(), *tr_name(), *release, take, runch;
EXTCHAR retstr[], wizstr[], spacemsg[], illegal[], callit[], starlist[];
EXTSTAT max_stats, *him;
extern struct magic_info thnginfo[];
extern struct real re_stats;
extern long e_levels[];
extern struct rod ws_stuff[];
extern struct sgttyb _tty;

extern struct coord nh;
extern struct delayed_action d_list[MAXDAEMONS];
extern int between;

extern char *rainbow[NCOLORS];
extern char *sylls[NSYLS];
extern char *stones[NSTONES];
extern char *wood[NWOOD];
extern char *metal[NMETAL];