Be able to carry out uplifts during minor release lifetimes. Document a way to be able to uplift struct content without incrementing EDITLEVEL and breaking existing savefiles. Use the mechanics outlined to uplift the contents instead, where it is feasible to do so. The uplift is currently one-way only. An uplifted savefile cannot be used with an earlier build of NetHack , one built with a lower SAVEFILE_REVISION_LEVEL, than the one which wrote the savefile. The final byte (byte 79) of the 80 critical bytes in the savefile, of which 10 are reserved for future expansion and not currently used, will now be used for holding the savefile revision level (SAVEFILE_REVISION_LEVEL in include/patchlevel.h) at the time the savefile was written. That leaves 9 of the bytes available for future use.
86 lines
1.6 KiB
C
86 lines
1.6 KiB
C
/* NetHack 5.0 sfmacros.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
|
/* Copyright (c) Michael Allison, 2025. */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
/* This file is included by sfbase.c, sfstruct.c */
|
|
|
|
#if defined(SF_C) && defined(SF_A)
|
|
|
|
SF_C(struct, arti_info)
|
|
SF_C(struct, nhrect)
|
|
SF_C(struct, branch)
|
|
SF_C(struct, bubble)
|
|
SF_C(struct, cemetery)
|
|
SF_C(struct, context_info)
|
|
SF_C(struct, nhcoord)
|
|
SF_C(struct, damage)
|
|
SF_C(struct, dest_area)
|
|
SF_C(struct, dgn_topology)
|
|
SF_C(struct, dungeon)
|
|
SF_C(struct, d_level)
|
|
SF_C(struct, ebones)
|
|
SF_C(struct, edog)
|
|
SF_C(struct, egd)
|
|
SF_C(struct, emin)
|
|
SF_C(struct, engr)
|
|
SF_C(struct, epri)
|
|
SF_C(struct, eshk)
|
|
SF_C(struct, fe)
|
|
SF_C(struct, flag)
|
|
SF_C(struct, fruit)
|
|
SF_C(struct, gamelog_line)
|
|
SF_C(struct, kinfo)
|
|
SF_C(struct, levelflags)
|
|
SF_C(struct, ls_t)
|
|
SF_C(struct, linfo)
|
|
SF_C(struct, mapseen_feat)
|
|
SF_C(struct, mapseen_flags)
|
|
SF_C(struct, mapseen_rooms)
|
|
SF_C(struct, mkroom)
|
|
SF_C(struct, monst)
|
|
SF_C(struct, mvitals)
|
|
SF_C(struct, obj)
|
|
SF_C(struct, objclass)
|
|
SF_C(struct, q_score)
|
|
SF_C(struct, rm)
|
|
SF_C(struct, spell)
|
|
SF_C(struct, stairway)
|
|
SF_C(struct, s_level)
|
|
SF_C(struct, trap)
|
|
SF_C(struct, you)
|
|
SF_C(union, any)
|
|
#ifdef DEMO_UPLIFTS
|
|
SF_C(struct, mystruct)
|
|
SF_C(struct, mystruct_rev0)
|
|
#endif
|
|
|
|
SF_A(aligntyp)
|
|
SF_A(boolean)
|
|
SF_A(coordxy)
|
|
//SF_A(genericptr)
|
|
SF_A(int)
|
|
SF_A(int16)
|
|
SF_A(int32)
|
|
SF_A(int64)
|
|
SF_A(long)
|
|
SF_A(schar)
|
|
SF_A(short)
|
|
SF_A(size_t)
|
|
SF_A(time_t)
|
|
SF_A(uchar)
|
|
SF_A(uint16)
|
|
SF_A(uint32)
|
|
SF_A(uint64)
|
|
SF_A(ulong)
|
|
SF_A(unsigned)
|
|
SF_A(ushort)
|
|
SF_A(xint16)
|
|
SF_A(xint8)
|
|
|
|
#else
|
|
|
|
#error Non-productive inclusion of sfmacros.h
|
|
|
|
#endif /* SF_C && SF_A */
|
|
|