trunk only: preserving context (remaining 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
This commit is contained in:
27
Files
27
Files
@@ -31,19 +31,20 @@ nethack.txt recover.6 recover.txt tmac.n window.doc
|
|||||||
include:
|
include:
|
||||||
(files for all versions)
|
(files for all versions)
|
||||||
align.h amiconf.h artifact.h artilist.h attrib.h
|
align.h amiconf.h artifact.h artilist.h attrib.h
|
||||||
beconf.h color.h config.h config1.h coord.h
|
beconf.h color.h config.h config1.h context.h
|
||||||
decl.h def_os2.h dgn_file.h display.h dlb.h
|
coord.h decl.h def_os2.h dgn_file.h display.h
|
||||||
dungeon.h edog.h emin.h engrave.h epri.h
|
dlb.h dungeon.h edog.h emin.h engrave.h
|
||||||
eshk.h extern.h flag.h func_tab.h global.h
|
epri.h eshk.h extern.h flag.h func_tab.h
|
||||||
hack.h lev.h mail.h mfndpos.h micro.h
|
global.h hack.h lev.h mail.h mfndpos.h
|
||||||
mkroom.h monattk.h mondata.h monflag.h monst.h
|
micro.h mkroom.h monattk.h mondata.h monflag.h
|
||||||
monsym.h nhlan.h ntconf.h obj.h objclass.h
|
monst.h monsym.h nhlan.h ntconf.h obj.h
|
||||||
os2conf.h patchlevel.h pcconf.h permonst.h prop.h
|
objclass.h os2conf.h patchlevel.h pcconf.h permonst.h
|
||||||
qtext.h quest.h rect.h region.h rm.h
|
prop.h qtext.h quest.h rect.h region.h
|
||||||
skills.h sp_lev.h spell.h system.h tcap.h
|
rm.h skills.h sp_lev.h spell.h system.h
|
||||||
timeout.h tosconf.h tradstdc.h trampoli.h trap.h
|
tcap.h timeout.h tosconf.h tradstdc.h trampoli.h
|
||||||
unixconf.h vault.h vision.h vmsconf.h wceconf.h
|
trap.h unixconf.h vault.h vision.h vmsconf.h
|
||||||
winami.h winprocs.h wintype.h you.h youprop.h
|
wceconf.h winami.h winprocs.h wintype.h you.h
|
||||||
|
youprop.h
|
||||||
(file for tty versions)
|
(file for tty versions)
|
||||||
wintty.h
|
wintty.h
|
||||||
(files for X versions)
|
(files for X versions)
|
||||||
|
|||||||
@@ -988,7 +988,7 @@ tty_clear_nhwindow(window)
|
|||||||
break;
|
break;
|
||||||
case NHW_MAP:
|
case NHW_MAP:
|
||||||
/* cheap -- clear the whole thing and tell nethack to redraw botl */
|
/* cheap -- clear the whole thing and tell nethack to redraw botl */
|
||||||
flags.botlx = 1;
|
context.botlx = 1;
|
||||||
/* fall into ... */
|
/* fall into ... */
|
||||||
case NHW_BASE:
|
case NHW_BASE:
|
||||||
clear_screen();
|
clear_screen();
|
||||||
@@ -1766,7 +1766,7 @@ tty_putstr(window, attr, str)
|
|||||||
|
|
||||||
case NHW_STATUS:
|
case NHW_STATUS:
|
||||||
ob = &cw->data[cw->cury][j = cw->curx];
|
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) {
|
if(!cw->cury && (int)strlen(str) >= CO) {
|
||||||
/* the characters before "St:" are unnecessary */
|
/* the characters before "St:" are unnecessary */
|
||||||
nb = index(str, ':');
|
nb = index(str, ':');
|
||||||
@@ -1776,7 +1776,7 @@ tty_putstr(window, attr, str)
|
|||||||
nb = str;
|
nb = str;
|
||||||
for(i = cw->curx+1, n0 = cw->cols; i < n0; i++, nb++) {
|
for(i = cw->curx+1, n0 = cw->cols; i < n0; i++, nb++) {
|
||||||
if(!*nb) {
|
if(!*nb) {
|
||||||
if(*ob || flags.botlx) {
|
if(*ob || context.botlx) {
|
||||||
/* last char printed may be in middle of line */
|
/* last char printed may be in middle of line */
|
||||||
tty_curs(WIN_STATUS, i, cw->cury);
|
tty_curs(WIN_STATUS, i, cw->cury);
|
||||||
cl_end();
|
cl_end();
|
||||||
@@ -2281,7 +2281,7 @@ docorner(xmin, ymax)
|
|||||||
end_glyphout();
|
end_glyphout();
|
||||||
if (ymax >= (int) wins[WIN_STATUS]->offy) {
|
if (ymax >= (int) wins[WIN_STATUS]->offy) {
|
||||||
/* we have wrecked the bottom line */
|
/* we have wrecked the bottom line */
|
||||||
flags.botlx = 1;
|
context.botlx = 1;
|
||||||
bot();
|
bot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ SOURCE=..\include\config1.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\include\context.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\include\coord.h
|
SOURCE=..\include\coord.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -147,6 +147,10 @@ SOURCE=..\include\config1.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\include\context.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\include\coord.h
|
SOURCE=..\include\coord.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -628,6 +628,10 @@ SOURCE=..\include\config1.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\include\context.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\include\coord.h
|
SOURCE=..\include\coord.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -126,6 +126,10 @@ SOURCE=..\include\config1.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\include\context.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\include\coord.h
|
SOURCE=..\include\coord.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
Reference in New Issue
Block a user