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

Files
win/tty/wintty.c
win/win32/dgncomp.dsp
win/win32/makedefs.dsp
win/win32/nethackw.dsp
win/win32/tilemap.dsp

diff --git a/Files b/Files
index 3019334d8ff62e75a79cba6d898aade595c290e5..1f0f44951bf8312481b42c60dd062421a59aef80 100644 (file)
--- a/Files
+++ b/Files
@@ -31,19 +31,20 @@ nethack.txt     recover.6       recover.txt     tmac.n          window.doc
 include:
 (files for all versions)
 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       dgn_file.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           mail.h          mfndpos.h       micro.h
-mkroom.h        monattk.h       mondata.h       monflag.h       monst.h
-monsym.h        nhlan.h         ntconf.h        obj.h           objclass.h
-os2conf.h       patchlevel.h    pcconf.h        permonst.h      prop.h
-qtext.h         quest.h         rect.h          region.h        rm.h
-skills.h        sp_lev.h        spell.h         system.h        tcap.h
-timeout.h       tosconf.h       tradstdc.h      trampoli.h      trap.h
-unixconf.h      vault.h         vision.h        vmsconf.h       wceconf.h
-winami.h        winprocs.h      wintype.h       you.h           youprop.h
+beconf.h        color.h         config.h        config1.h       context.h
+coord.h         decl.h          def_os2.h       dgn_file.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           mail.h          mfndpos.h
+micro.h         mkroom.h        monattk.h       mondata.h       monflag.h
+monst.h         monsym.h        nhlan.h         ntconf.h        obj.h
+objclass.h      os2conf.h       patchlevel.h    pcconf.h        permonst.h
+prop.h          qtext.h         quest.h         rect.h          region.h
+rm.h            skills.h        sp_lev.h        spell.h         system.h
+tcap.h          timeout.h       tosconf.h       tradstdc.h      trampoli.h
+trap.h          unixconf.h      vault.h         vision.h        vmsconf.h
+wceconf.h       winami.h        winprocs.h      wintype.h       you.h
+youprop.h
 (file for tty versions)
 wintty.h
 (files for X versions)
index 2e1a90edb2384ac83641c83eab1caa68b02f93cf..9a09117704724d35f23650d89987a51908bdbbf7 100644 (file)
@@ -988,7 +988,7 @@ tty_clear_nhwindow(window)
        break;
     case NHW_MAP:
        /* cheap -- clear the whole thing and tell nethack to redraw botl */
-       flags.botlx = 1;
+       context.botlx = 1;
        /* fall into ... */
     case NHW_BASE:
        clear_screen();
@@ -1766,7 +1766,7 @@ tty_putstr(window, attr, str)
 
     case NHW_STATUS:
        ob = &cw->data[cw->cury][j = cw->curx];
-       if(flags.botlx) *ob = 0;
+       if(context.botlx) *ob = 0;
        if(!cw->cury && (int)strlen(str) >= CO) {
            /* the characters before "St:" are unnecessary */
            nb = index(str, ':');
@@ -1776,7 +1776,7 @@ tty_putstr(window, attr, str)
        nb = str;
        for(i = cw->curx+1, n0 = cw->cols; i < n0; i++, nb++) {
            if(!*nb) {
-               if(*ob || flags.botlx) {
+               if(*ob || context.botlx) {
                    /* last char printed may be in middle of line */
                    tty_curs(WIN_STATUS, i, cw->cury);
                    cl_end();
@@ -2281,7 +2281,7 @@ docorner(xmin, ymax)
     end_glyphout();
     if (ymax >= (int) wins[WIN_STATUS]->offy) {
                                        /* we have wrecked the bottom line */
-       flags.botlx = 1;
+       context.botlx = 1;
        bot();
     }
 }
index 6182655864cb4e897eed9feeaf99f67ef373bb30..c63dd265b0af9975cd0ca12601a36119759871db 100644 (file)
@@ -142,6 +142,10 @@ SOURCE=..\include\config1.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\include\context.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\include\coord.h
 # End Source File
 # Begin Source File
index 0a2f6ca47f7d35397fd273920ef33a3680cc061d..780c57a3989e301e62091e6b6f0e7ddb5d1c1162 100644 (file)
@@ -147,6 +147,10 @@ SOURCE=..\include\config1.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\include\context.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\include\coord.h
 # End Source File
 # Begin Source File
index 43d178edb54e45db8414d88f288ac4c5d1ada2b8..8e28fccf9c16ae0cff7a9a4688ff92707e95d6a8 100644 (file)
@@ -628,6 +628,10 @@ SOURCE=..\include\config1.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\include\context.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\include\coord.h
 # End Source File
 # Begin Source File
index 75bd7c24da86bcdd8c3494ca3024759aa0fc8a99..024c0f17e4539941497af4cb4ed0f5b99312dd9a 100644 (file)
@@ -126,6 +126,10 @@ SOURCE=..\include\config1.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\include\context.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\include\coord.h
 # End Source File
 # Begin Source File