From: nethack.allison Date: Sun, 21 Sep 2003 11:56:11 +0000 (+0000) Subject: trunk only: preserving context (sys files) X-Git-Tag: MOVE2GIT~1766 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18e971e442c8fdc1cd17a4ae47431284373e3e5d;p=nethack trunk only: preserving context (sys files) Pat Rankin wrote: > collect them all into some new struct and > save that separately rather than jamming more non-option stuff > into struct flags. This patch: - collects all context/tracking related fields from flags into a new structure called "context." It also adds the following to the new structure: - stethoscope turn support - victual support - tin support --- diff --git a/sys/amiga/Makefile.agc b/sys/amiga/Makefile.agc index ea1d36b94..2537d8808 100644 --- a/sys/amiga/Makefile.agc +++ b/sys/amiga/Makefile.agc @@ -1267,10 +1267,10 @@ $(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h -setdate $(I)global.h -c:wait 2 -$(I)hack.h: $(I)config.h $(I)trap.h $(I)decl.h $(I)dungeon.h $(I)monsym.h \ - $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h $(I)vision.h \ - $(I)display.h $(I)wintype.h $(I)engrave.h $(I)rect.h \ - $(I)region.h $(I)trampoli.h +$(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h + $(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h + $(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h + $(I)rect.h $(I)region.h $(I)trampoli.h -setdate $(I)hack.h -c:wait 2 diff --git a/sys/amiga/Makefile.ami b/sys/amiga/Makefile.ami index 5e334a974..b9e830a6a 100644 --- a/sys/amiga/Makefile.ami +++ b/sys/amiga/Makefile.ami @@ -1607,10 +1607,10 @@ $(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h -setdate $(I)global.h -wait 2 -$(I)hack.h: $(I)config.h $(I)trap.h $(I)decl.h $(I)dungeon.h $(I)monsym.h \ - $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h $(I)vision.h \ - $(I)display.h $(I)wintype.h $(I)engrave.h $(I)rect.h \ - $(I)region.h $(I)trampoli.h +$(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h + $(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h + $(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h + $(I)rect.h $(I)region.h $(I)trampoli.h -setdate $(I)hack.h -wait 2 diff --git a/sys/msdos/Makefile.BC b/sys/msdos/Makefile.BC index 700816071..e78ce3c47 100644 --- a/sys/msdos/Makefile.BC +++ b/sys/msdos/Makefile.BC @@ -860,8 +860,8 @@ DECL_H = $(INCL)\quest.h $(INCL)\spell.h $(INCL)\color.h \ CONFIG_H = $(INCL)\config1.h $(INCL)\tradstdc.h $(INCL)\coord.h $(PCCONF_H) \ $(INCL)\config.h -HACK_H = $(CONFIG_H) $(INCL)\dungeon.h $(INCL)\align.h $(INCL)\monsym.h \ - $(INCL)\mkroom.h $(INCL)\objclass.h $(DECL_H) \ +HACK_H = $(CONFIG_H) $(INCL)\context.h $(INCL)\dungeon.h $(INCL)\align.h \ + $(INCL)\monsym.h $(INCL)\mkroom.h $(INCL)\objclass.h $(DECL_H) \ $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \ $(INCL)\vision.h $(INCL)\mondata.h $(INCL)\wintype.h \ $(INCL)\engrave.h $(INCL)\rect.h $(EXTERN_H) \ diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index d7d77298d..5e6752243 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -361,13 +361,13 @@ CONFIG_H = $(GLOBAL_H) $(INCL)/tradstdc.h $(INCL)/config1.h \ DECL_H = $(YOU_H) $(INCL)/spell.h $(INCL)/color.h \ $(INCL)/obj.h $(INCL)/onames.h $(INCL)/pm.h \ $(INCL)/decl.h -GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h -HACK_H = $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \ - $(DISPLAY_H) $(INCL)/monsym.h $(INCL)/mkroom.h \ - $(INCL)/objclass.h $(INCL)/trap.h $(INCL)/flag.h \ - $(RM_H) $(INCL)/vision.h $(INCL)/wintype.h \ - $(INCL)/engrave.h $(INCL)/rect.h \ - $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) +GLOBAL_H = $(PCCONF_H) $(INCL)/coord.h $(INCL)/global.h +HACK_H = $(CONFIG_H) $(INCL)/context.h $(DUNGEON_H) \ + $(DECL_H) $(DISPLAY_H) $(INCL)/monsym.h \ + $(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/trap.h \ + $(INCL)/flag.h $(RM_H) $(INCL)/vision.h \ + $(INCL)/wintype.h $(INCL)/engrave.h $(INCL)/rect.h \ + $(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) DLB_H = $(INCL)/dlb.h ifeq ($(SUPPRESS_GRAPHICS),Y) diff --git a/sys/msdos/Makefile.MSC b/sys/msdos/Makefile.MSC index af70b7b34..7984dedaa 100644 --- a/sys/msdos/Makefile.MSC +++ b/sys/msdos/Makefile.MSC @@ -264,7 +264,7 @@ DECL_H = $(YOU_H) $(INCL)\spell.h $(INCL)\color.h \ $(INCL)\obj.h $(INCL)\onames.h $(INCL)\pm.h \ $(INCL)\decl.h GLOBAL_H = $(PCCONF_H) $(INCL)\coord.h $(INCL)\global.h -HACK_H = $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \ +HACK_H = $(CONFIG_H) $(INCL)\context.h $(DUNGEON_H) $(DECL_H) \ $(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \ $(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \ diff --git a/sys/os2/Makefile.os2 b/sys/os2/Makefile.os2 index 99af1d781..18ae59e01 100644 --- a/sys/os2/Makefile.os2 +++ b/sys/os2/Makefile.os2 @@ -714,7 +714,7 @@ YOU_H = $(INCL)\you.h $(INCL)\attrib.h $(PERMONST_H) $(INCL)\mondata.h \ $(INCL)\monst.h $(INCL)\youprop.h $(INCL)\prop.h $(INCL)\pm.h DECL_H = $(INCL)\decl.h $(INCL)\spell.h $(INCL)\obj.h $(YOU_H) \ $(INCL)\onames.h $(INCL)\color.h -HACK_H = $(CONFIG_H) $(DECL_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ +HACK_H = $(CONFIG_H) $(INCL)\context.h $(DECL_H) $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(TRAP_H) $(INCL)\engrave.h $(INCL)\flag.h \ $(INCL)\rm.h $(INCL)\dungeon.h $(INCL)\hack.h $(INCL)\display.h \ $(INCL)\vision.h $(INCL)\wintty.h $(INCL)\wintype.h $(INCL)\align.h \ diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index be5ee3104..be4eb85f2 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -423,7 +423,7 @@ char *argv[]; } } - flags.move = 0; + context.move = 0; } else { not_recovered: player_selection(); @@ -431,7 +431,7 @@ not_recovered: if (discover) You("are in non-scoring discovery mode."); - flags.move = 0; + context.move = 0; set_wear(); (void) pickup(1); read_engr_at(u.ux,u.uy); diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 1d92ef665..f61fbde3e 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -354,9 +354,9 @@ CSOURCES = $(HACKCSRC) $(SYSSRC) $(WINCSRC) $(GENCSRC) # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. # HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \ - config.h config1.h coord.h decl.h def_os2.h display.h dlb.h dungeon.h \ - edog.h emin.h engrave.h epri.h eshk.h extern.h flag.h func_tab.h \ - global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ + config.h config1.h context.h coord.h decl.h def_os2.h display.h dlb.h \ + dungeon.h edog.h emin.h engrave.h epri.h eshk.h extern.h flag.h \ + func_tab.h global.h hack.h lev.h macconf.h mfndpos.h micro.h mkroom.h \ monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \ os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h region.h rm.h \ sp_lev.h spell.h system.h tcap.h timeout.h tosconf.h tradstdc.h \ diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index 434102679..b5360a374 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -126,9 +126,9 @@ VERSOURCES = $(HACKCSRC) $(SYSSRC) $(WINSRC) $(RANDSRC) $(GENCSRC) # and dgn_comp.h, dgn_file.h, lev_comp.h, special level & dungeon files. # HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \ - config.h config1.h coord.h decl.h def_os2.h display.h dlb.h \ - dungeon.h edog.h emin.h engrave.h epri.h eshk.h extern.h flag.h \ - func_tab.h global.h hack.h lev.h macconf.h mfndpos.h micro.h \ + config.h config1.h context.h coord.h decl.h def_os2.h display.h \ + dlb.h dungeon.h edog.h emin.h engrave.h epri.h eshk.h extern.h \ + flag.h func_tab.h global.h hack.h lev.h macconf.h mfndpos.h micro.h \ mkroom.h monattk.h mondata.h monflag.h monst.h monsym.h obj.h \ objclass.h os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h \ region.h rm.h sp_lev.h spell.h system.h tcap.h timeout.h tosconf.h \ diff --git a/sys/vms/Makefile.utl b/sys/vms/Makefile.utl index bc4e2e64a..bc9bf4d6c 100644 --- a/sys/vms/Makefile.utl +++ b/sys/vms/Makefile.utl @@ -159,7 +159,7 @@ $(MAKEDEFS) : $(MAKEOBJS) $(VMSMAKEOBJS) $(LIBOPT) @ $(TOUCH) $(MARKER) makedefs.obj : makedefs.c \ - $(CONFIG_H) $(INC)permonst.h $(INC)objclass.h \ + $(CONFIG_H) $(IN)context.h $(INC)permonst.h $(INC)objclass.h \ $(INC)monsym.h $(INC)artilist.h $(INC)dungeon.h \ $(INC)obj.h $(INC)monst.h $(INC)you.h $(INC)flag.h \ $(INC)dlb.h $(INC)patchlevel.h $(INC)qtext.h diff --git a/sys/winnt/Makefile.bcc b/sys/winnt/Makefile.bcc index e5063485b..4a2e80389 100644 --- a/sys/winnt/Makefile.bcc +++ b/sys/winnt/Makefile.bcc @@ -472,7 +472,7 @@ CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \ $(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \ $(INCL)\ntconf.h $(INCL)\nhlan.h -HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h \ +HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\context.h $(INCL)\align.h \ $(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \ $(INCL)\permonst.h $(INCL)\monattk.h \ diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index d3ee10cd1..428289f0a 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -428,7 +428,7 @@ CONFIG_H = $(INCL)/config.h $(INCL)/config1.h $(INCL)/tradstdc.h \ $(INCL)/amiconf.h $(INCL)/macconf.h $(INCL)/beconf.h \ $(INCL)/ntconf.h $(INCL)/nhlan.h -HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h \ +HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \ $(INCL)/dungeon.h $(INCL)/monsym.h $(INCL)/mkroom.h \ $(INCL)/objclass.h $(INCL)/youprop.h $(INCL)/prop.h \ $(INCL)/permonst.h $(INCL)/monattk.h \ diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 6e8a94673..df98d18cc 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -407,7 +407,7 @@ CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \ $(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \ $(INCL)\ntconf.h $(INCL)\nhlan.h -HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h \ +HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h $(INCL)\context.h \ $(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \ $(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \ $(INCL)\permonst.h $(INCL)\monattk.h \