]> granicus.if.org Git - nethack/commitdiff
trunk only: preserving context (sys files)
authornethack.allison <nethack.allison>
Sun, 21 Sep 2003 11:56:11 +0000 (11:56 +0000)
committernethack.allison <nethack.allison>
Sun, 21 Sep 2003 11:56:11 +0000 (11:56 +0000)
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

13 files changed:
sys/amiga/Makefile.agc
sys/amiga/Makefile.ami
sys/msdos/Makefile.BC
sys/msdos/Makefile.GCC
sys/msdos/Makefile.MSC
sys/os2/Makefile.os2
sys/share/pcmain.c
sys/unix/Makefile.src
sys/vms/Makefile.src
sys/vms/Makefile.utl
sys/winnt/Makefile.bcc
sys/winnt/Makefile.gcc
sys/winnt/Makefile.msc

index ea1d36b94727ea733de550fe05bea9cc4061045f..2537d8808bcf8b9d18f0ec3d07be2988bbe933b4 100644 (file)
@@ -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
 
index 5e334a974f8de4d0deb6432750128ee50ce47478..b9e830a6ab2357c1b2be3fcfdcff54f5d77e7cfc 100644 (file)
@@ -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
 
index 700816071fc30dc674d4603743f08a81e07e87d6..e78ce3c47904a11659efa835e7dbc9bc60e8185f 100644 (file)
@@ -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) \
index d7d77298d7d5cc9013d253eeda15d77621219d69..5e67522438195d2bad5fe1856b6c7805e8fec41c 100644 (file)
@@ -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)
index af70b7b34372642f4a64e4e2d5aa732cc8e60c98..7984dedaa8cb7a6849fe4e3db649a1101bf06094 100644 (file)
@@ -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 \
index 99af1d7817a9b73bb27c88042dd17365347c56c0..18ae59e012a5c8f126b0883af3af9020cef55e9e 100644 (file)
@@ -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 \
index be5ee3104d1154aa8b4256504d5ba56e0fe46f79..be4eb85f25342f3b1e2c8f38b0d36dbde778d879 100644 (file)
@@ -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);
index 1d92ef6654e6b13d3e1c8edbc0b92eab3b559c12..f61fbde3e2f824774a0ba1039be3480ff1a4ebcd 100644 (file)
@@ -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 \
index 434102679990feb95b53ae909ad9980894048f0d..b5360a3744269e48800c975770946ac7479bebbe 100644 (file)
@@ -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 \
index bc4e2e64a147c9a0559a925147e1b20d697d1a5b..bc9bf4d6c7d97ae58a09f4bac0c74552f43f3b72 100644 (file)
@@ -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
index e5063485b5b504279096f97363ab6bd26513ef82..4a2e80389a165f7676ebb9b8fae0ed95c30705f5 100644 (file)
@@ -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 \
index d3ee10cd1a4f4a43825e2dd7b31914d720cbd8af..428289f0a003766ea5aaa60b80a6c676d96ecc79 100644 (file)
@@ -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 \
index 6e8a946730978b4a69550cd49561c0f161a7cc32..df98d18cc86555d3ecaece42f0c4b0e63f54c83a 100644 (file)
@@ -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 \