Commit Graph

82 Commits

Author SHA1 Message Date
nethack.rankin
a871ad06e9 outrip() updating (trunk only)
Part II of the bones tracking patch.  Change umpteen different outrip()
routines to handle its new time_t argument, and use formatkiller() instead
of directly accessing killer.{format,name} and killed_by_prefix[].  The
latter is now static within formatkiller().

     The many sys/* and win/* changes are untested....
2012-01-24 04:26:33 +00:00
keni
b97d53fb30 cleanup: outdated SCCS lines
Pat noted that I neglected to drop the SCCS lines on the files I've been
committing, so clean up those and any others I could find where the SCCS
line date is out of date.
2012-01-10 17:47:45 +00:00
keni
c119e8c3d9 add param to ini winsys routines
Provide a mechanism for cleanly moving between tentative window system
selections during startup.  Now, before a second (or later) system is selected,
the first will be notified that it is losing control.  See window.doc.
2012-01-10 01:39:31 +00:00
keni
4e5e720334 display version and build info at startup (trunk only)
Tested on the unix port; I've updated as many other ports as I can figure
out but they're not tested.  See window.doc for info on the changed banner
lines.  Also adds the ability to override the generic "Unix" port - used now to get
"MacOSX" into the version line instead of "Unix" (so we don't scare people who don't
know what's going on).
2011-10-11 02:37:31 +00:00
keni
f6e40b8bf8 have core ask windowport if suspend is ok
PORTS: Please make sure I've done the right thing for/to your code.
This patch adds a new winproc that lets the window port approve or cancel
the suspend request - this should take care of the Mac Qt lockup issue.
In addition, Unix suspend is restricted to accounts that can use the shell
if SYSCF is defined.
2010-01-15 17:51:28 +00:00
keni
4eabcee787 Add RCS version lines 2009-05-06 10:50:32 +00:00
keni
6dee7dc521 Placeholder for Amiga large disks (untested)
placeholder so we don't lose large disk fix, but I can't test it
2008-02-17 23:49:47 +00:00
keni
6f0e178368 more SYSCF and related bits - cleanup and features
infrastructure for "system options" - things currently specified at build
 time that should be changeable at install time or run time but not really
 under user control
generalize contact info so it can be localized and it doesn't have to be
 an email address
move recently introduced WIZARDS into sysopt
drop bogus OPTIONS=wizards possibility
new function build_english_list() to comma-ize and add 'or' from a whitespace separated list: A.  A or B.  A, B, or C.
syscf file now handles: WIZARDS SUPPORT RECOVER
 SUPPORT specifies local support information
 RECOVER will eventually supply port-specific and/or localized info on how
  to run recover (or get it run for you).
Note: in sys/msdos I changed sys.o (generated from pcsys.c) to pcsys.o
Note: sys/msdos/Makefile.GCC has 2 rules for sys.o (now pcsys.o)
2008-01-31 00:56:59 +00:00
nethack.rankin
054a74d378 yn_function (trunk only)
Explicitly truncate the query prompt string to QBUFSZ-1 characters.
For tty and Amiga, no longer include the choices and default within that
length limit; use a bigger buffer to hold them along with the prompt.
[See cvs log for doc/window.doc for more details.]
2006-10-22 05:59:26 +00:00
nethack.allison
8fc01eb6b1 window port change - putmixed() (trunk only)
Add putmixed() to the window port. It allows map symbols to
be included in the string by encoding them in a unique fashion.
This was done because Unicode symbols, for instance, could be
longer than the size of a char.

The encoding of the map symbols in this patch is done by
prefixing a glyph value with \GXXXX, where XXXX is a
random value for the current game. The reason for the random
prefix is to minimize the possibility that a player can trigger
the escape sequence processing within text under their control
(dog names, etc.) the way they could if the sequence was fixed
in the source code. The random prefix remains the same throughout
the lifetime of a game because message window strings are
saved in the save file.

(There was actually a bug present because of the embedded
character even before the recent symbol changes, because if
someone was using a  different set of characters between games,
the saved messages would reflect the original characters, rather
than the current. That bug was introduced with the ability to
save messages to the savefile.)

A window port does not have to supply an XXX_putmixed() routine,
it can use genl_putmixed() which uses the old behavior of
embedding the sequence as a character within the string
and calling putstr(). genl_putmixed() takes care of the decoding
of the escape sequence.

This also #ifdef's out code in pager.c for converting a glyph
to a character, and uses mapglyph() to do that instead. Does
anyone see a problem with doing that through mapglyph instead
of repeating similar code within pager.c?
2006-10-17 23:06:31 +00:00
nethack.allison
374e9fbbb4 more symbol stuff (trunk only)
- reduce the number of symbol tables for each graphics
set {PRIMARY, ROGUESET} from three {map, oc, mon}
tables for each of the display symbols, the loadable symbols,
and the rogue symbols, to one continguous table for
each:
showsyms: the current display symbols
l_syms: the loaded, alterable symbols
r_syms: the rogue symbols

- Modify mapglyph so that the index into the symbolt table is
available as a return value (it was a void function), rather than
just the char converted from the glyph.
- That makes it possible for a window port to use the same
index value to extract from another table (perhaps a unicode
table) for a different set of display symbols. The  index
is much more useful than trying to convert the character
into another type of symbol, as some contributed patches
have done.
- It is much easier to load a single alternative flat table to
make substitutions, since the corresponding value just
has to get placed into the same index offset in the
alternative table.

This also fixes a bug I found in botl.c, where you could
go to the rogue level, and the bottom line gold symbol
was not being updated with the new character as it should.
The reason was because the gold value had not changed,
only the field symbol used had changed.

This updates multiple ports to place a (void) cast on
the mapglyph call, now that it returns a value, so this
is going to generate a lot of diff e-mails.
2006-10-01 19:30:08 +00:00
nethack.allison
143790540b mextra follow up bit 3
More Makefile tweaks
2006-01-07 13:38:29 +00:00
nethack.allison
faa5458843 mextra-related port Makefile mods
This attempts to modify the various Makefiiles for the mextra changes.
Port teams should verify that the modifications are valid.
2006-01-06 05:52:48 +00:00
nethack.allison
e7b25a1900 more trunk 3.5 2005-01-02 20:55:41 +00:00
nethack.allison
e9b022d579 housekeeping: mark trunk sources 3.5 (misc) 2005-01-02 17:21:18 +00:00
nethack.allison
10480f4397 core support for status field highlighting (trunk only)
This provides the core support needed for status field highlighting.
This patch doesn't actually perform status field highlighting for any port,
but provides the core hooks for doing so.

The syntax is:
OPTIONS=hilite_status:{fieldname}/{threshold}/{below}/{above}
where {fieldname} is the name of a status field.
           {threshold} is the value used as the threshold to trigger a display
                             change.  It can also be set to "updown" to trigger
                             a display change whenever it rises or whenever it falls.
                             If you end the threshold value with %, then it signifies
                             that you want to trigger the display change based on the
                             percentage of maximum.
         {below}, {above}
                        are the color or display attribute that you want to use when
                        the field value is underneath the threshold. Supported display
                        fields are:  normal, inverse, bold, black, red, green,
                                         brown, blue, magenta, cyan, gray, orange,
                                         bright-green, yellow, bright-blue, bright-magenta,
                                         bright-cyan, or white.
Valid field names are:
        alignment, armor-class, carrying-capacity,
        charisma, condition, constitution, dexterity,
        dungeon-level, experience-level, experience,
        gold, HD, hitpoints-max, hitpoints, hunger,
        intelligence, power-max, power, score,
        strength, time, title, wisdom

Refer to window.doc for details. Guidebook updates to come later.
2003-11-30 05:51:53 +00:00
nethack.allison
586a805c8f status display - port modules (trunk only)
Introduction of a new set of window port status display
routines.  The new routines are conditional on
	STATUS_VIA_WINDOWPORT
being defined in config.h. See the experimental section,
where the #define resides for the time being.
2003-11-23 06:47:13 +00:00
nethack.allison
7bab241f17 flag adjustments (trunk only)
Move all system or port specific flags to sysflags which is used only if
SYSFLAGS is defined, and leave everything else in flags unconditional.
2003-11-09 11:48:38 +00:00
nethack.allison
f6f6c1f0d5 saving message history (trunk only)
On September 11, 2003 "<Someone>" wrote:
> When we're going to have a different save file format, could
> the last messages in the message history be saved as well, so
> ^P would work the same before and after saving (possibly
> including a few less messages to make room for the startup
> messages?).

This seemed like a reasonable request. This patch:
- adds the core support required.
- adds the tty supporting routines.
2003-10-05 13:43:16 +00:00
cohrs
559be58c21 conflicting delayed killers
Introduce a new set of functions to manage delayed killers in the trunk, used
in addressing the various reports of delayed killer confusion.  Since existing
delayed killers are related to player properties, the delayed killers are
keyed by uprop indexes.  I did this to avoid adding yet another set of
similar identifiers.
- the new delayed_killer() is used for stoning, sliming, sickness, and
delayed self-genocide while polymorphed.  Some other timed events don't
use it (and didn't use the old delayed_killer variable) because they
use a fixed message when the timeout occurs.
- A new data structure, struct kinfo, is used to track both delayed and
immediate killers.  This encapsulates all the info involved with
identifying a killer.  The structure contains a buffer, which subsumes the
old killer_buf and several other buffers that didn't/couldn't use killer_buf.
- the killer list is saved and restored as part of the game state.
- the special case of usick_cause was removed and a delayed killer list
entry is now used in its place
- common code dealing with (un)sliming is moved to a new make_slimed function
- attempted to update all make dependencies for new end.c -> lev.h
dependency, sorry if I messed any up
2003-09-29 19:24:20 +00:00
nethack.allison
18e971e442 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
2003-09-21 11:56:11 +00:00
nethack.allison
99bcdf6a4e expand wincap options to second field
<Someone> wishes to add a couple of new options to the wince port ("run fullscreen" and "do not use CE software keyboard").

The wincap field was full, so this adds a second field for
additional options.
2003-07-17 01:35:31 +00:00
keni
6692b3a984 (keni, for jhsa)
here are two minor patches for amigaport (ppc/gcc related, compiletime).
Teemu noticed these during a testcompile for 341 tarball today.

-jhsa

*** sys/amiga/amidos.p	2003/02/20 15:36:28	1.1
--- sys/amiga/amidos.p	2003/02/20 14:30:12
***************
*** 37,42 ****
  #ifndef	strcmpi
  int FDECL(strcmpi, (char * , char *));
  #endif
! #if !defined(memcmp) && !defined(AZTEC_C) && !defined(_DCC)
  int FDECL(memcmp, (unsigned char * , unsigned char * , int ));
  #endif
--- 37,42 ----
  #ifndef	strcmpi
  int FDECL(strcmpi, (char * , char *));
  #endif
! #if !defined(memcmp) && !defined(AZTEC_C) && !defined(_DCC) && !defined(__GNUC__)
  int FDECL(memcmp, (unsigned char * , unsigned char * , int ));
  #endif
*** sys/amiga/amiwind.c	2000/11/30 16:39:25	1.3
--- sys/amiga/amiwind.c	2003/02/20 14:31:06
***************
*** 21,31 ****

  #define BufferQueueChar(ch) (KbdBuffer[KbdBuffered++] = (ch))

- #ifdef __GNUC__ /* Conflicting includefiles ... */
- struct Device *ConsoleDevice;
- #else
  struct Library *ConsoleDevice;
- #endif

  #include "NH:sys/amiga/amimenu.c"

--- 21,27 ----
2003-02-20 16:36:02 +00:00
keni
bca0aca579 <email deleted> Thu Jul 25 13:59:29 2002
<email deleted>
 <email deleted>
 Subject: patch: missing amiga bits

Hi,

here are some missing bits from the amigafiles.

Current source compiles fine, seems to work ok (launches, runs, opens windows
and quits as usual). I haven't had much time to test it rigorously (or play
at all), but I don't remember there having been any major changes that would've
affected the amigaport, so it probably should be okay as it is.

-jhsa
2002-07-26 10:47:34 +00:00
nethack.allison
14ec6fe03b some 3.4.1 preparation
Update patchlevel.h
Update some strings from 3.4.0 to 3.4.1.
2002-03-29 06:30:33 +00:00
keni
354d47ce5d One last (for now) bit for amiga makefile for sas/c.
This fixes make install to actually install and build everything needed.
-jhsa
2002-02-28 14:53:37 +00:00
keni
1b1532dbab patch from Janne: delete old files, update docs, tids 2002-02-22 12:13:46 +00:00
nethack.allison
56db1baadb Remove Amiga ship directory. 2002-02-10 21:38:38 +00:00
nethack.allison
742e1e8c90 3.3.2 to 3.4.0 2002-02-04 16:11:00 +00:00
nethack.allison
cb6a93641b Adjust window-port related option processing
to allow common parsing in the core, and direct access to the
results by the window port.

Notes:

o Adds a new field, wincap, to the window_procs
structure for setting bits related to the preference
features that the window port supports.  This allows
run-time determination of whether a particular option
setting is applicable to the running window port.  A
window-port is free to support as many, or as few,
of the available options as it wants.  Ensure that
only the ones supported have their corresponding bit
set in window_proc.wincap. [see chart in
doc/window.doc for help with that.]

o The settings I stuck into wincap for each window
port are almost certainly not accurate, so each port
team should review them.  You should only include
the ones that you will actually react to and make
adjustments for if the user changes that option.
Without the setting in wincap, the option won't even
show up in the 'O'ptions menu.

o preference_update() added to the window-port
interface, so that the window-port can be notified
if an option of interest (an option with its
corresponding bit set in wincap field) is
changed.

o provided a genl_preference_update() routine in
windows.c and used it for all the existing
window ports since they don't have a functional
one of their own yet.

o this messes around heavily with iflags and the options
arrays in options.c

o I hope I didn't break any port's existing code. I
tried not to.  The Mac however, in particular, should
be looked at because it suffered a namespace collision
with what I was working on around fontname.  It had
Mac specific font stuff in options.c. Please test
the Mac.
2002-02-03 05:31:47 +00:00
cohrs
c77073be31 sync changes since last snapshot 2002-01-07 02:12:04 +00:00
jwalz
857c608d54 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
dacd1919e8 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
92e1efc1e5 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
019a3a817e *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
2b2057baf5 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
70c553e6e7 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
b5804c2ed9 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
6e5d979cb3 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
a54adfb9a9 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
14a30e0d7b *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
1c286e1db1 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
703fb562e3 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
55b8d1d834 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
c1f344eb45 *** empty log message *** 2002-01-05 21:05:55 +00:00
jwalz
78658765d8 *** empty log message *** 2002-01-05 21:05:54 +00:00
jwalz
8972d891b1 *** empty log message *** 2002-01-05 21:05:54 +00:00
jwalz
3022824b14 *** empty log message *** 2002-01-05 21:05:54 +00:00
jwalz
7b7714b4b5 *** empty log message *** 2002-01-05 21:05:54 +00:00
jwalz
f365b3d378 *** empty log message *** 2002-01-05 21:05:54 +00:00