Files
nhmall 6c0ae092c6 distinguish global variables that get written to savefile
The g? structs had a mix of variables that were written to
the savefile, and those that were not.

For better clarity and to distinguish those that end up in
the savefile, relocate some g? variables that get written
directly to the savefile into different structs.

This updates EDITLEVEL, although technically it probably
didn't need to, since savefile contents are not changing.

Details:

    gb.bases            -> svb.bases
    gb.bbubbles         -> svb.bbubbles
    gb.branches         -> svb.branches
    gc.context          -> svc.context
    gd.disco            -> svd.disco
    gd.dndest           -> svd.dndest
    gd.doors            -> svd.doors
    gd.doors_alloc      -> svd.doors_alloc
    gd.dungeon_topology -> svd.dungeon_topology
    gd.dungeons         -> svd.dungeons
    ge.exclusion_zones  -> sve.exclusion_zones
    gh.hackpid          -> svh.hackpid
    gi.inv_pos          -> svi.inv_pos
    gk.killer           -> svk.killer
    gl.lastseentyp      -> svl.lastseentyp
    gl.level            -> svl.level
    gl.level_info       -> svl.level_info
    gm.mapseenchn       -> svm.mapseenchn
    gm.moves            -> svm.moves
    gm.mvitals          -> svm.mvitals
    gn.n_dgns           -> svn.n_dgns
    gn.n_regions        -> svn.n_regions
    gn.nroom            -> svn.nroom
    go.oracle_cnt       -> svo.oracle_cnt
    gp.pl_character     -> svp.pl_character
    gp.pl_fruit         -> svp.pl_fruit
    gp.plname           -> svp.plname
    gp.program_state    -> svp.program_state
    gq.quest_status     -> svq.quest_status
    gr.rooms            -> svr.rooms
    gs.sp_levchn        -> svs.sp_levchn
    gs.spl_book         -> svs.spl_book
    gt.timer_id         -> svt.timer_id
    gt.tune             -> svt.tune
    gu.updest           -> svu.updest
    gx.xmax             -> svx.xmax
    gx.xmin             -> svx.xmin
    gy.ymax             -> svy.ymax
    gy.ymin             -> svy.ymin

Related note:
There are some pointer variables that are heads of chains that were not
moved from 'g?' to 'sv?', because they are not actually written to the
savefile directly, but the objects/monst/trap/lightsource/timer in the
chains they point to are. That can be changed, if desired.
Examples: gi.invent, gm.migrating_objs, gb.billobjs, gm.migrating_mons,
          gf.ftrap, gl.light_base, gt.timer_base
2024-07-13 14:57:50 -04:00
..

This file is sys/be/README.  It is for those intending to compile
NetHack 3.6 on a BeOS 4.5 system.

BeOS NetHack currently only supports the TTY windowing system.  In
order to compile it, it would benefit you greatly to think of your Be
system as a UNIX variant.  It is possible to compile using BeIDE.
However, there are four executables and several steps involved in making
NetHack.  Unless you are extremely familiar with the build sequence and
are willing to modify the code somewhat, I suggest you avoid it for now.
Let the UNIX Makefiles take care of all that for you.


Known problems:
+ No special characters for walls.  None of the fonts available for use
  in a tty window has the graphics characters needed to improve the look.
  If such a font existed, then all you need to do is set the dungeon,
  object, and/or monter mappings in your defaults file.
+ The arrow keys don't work.



Build instructions.  From a freshly unpacked source tree:

1. Copy the Makfiles in sys/unix to their proper spots.  You may
   use setup.sh or copy them by hand.  Using setup.sh to create
   links instead of copying the Makefiles will work, but BeOS will
   not let you edit a link.   It may be helpful to read
   sys/unix/Install.unx.

2. Edit src/Makefile:
	o Change System to SysBe.
	o Comment out the UNIX versions of SYSSRC and SYSOBJ variables.
	o Uncomment the BeOS versions of SYSRC and SYSOBJ.
	o Uncomment the BeOS versions of CC, CFLAGS, LD, and LFLAGS.  The
	  flags are different for Intel vs BeBox/Mac.
	o Uncomment one of the Intel or BeBox/Mac BeOS versions of CC, CFLAGS,
	  LD, and LFLAGS.
	o Comment out the default CFLAGS and LFLAGS.
	o Change WINTTYLIB to be -ltermcap.

3. Edit util/Makefile:
	o If on a BeBox/Mac:
	  - Uncomment the BeOS versions of CC and CFLAGS
	  - Comment out the default CFLAGS and LFLAGS.
	o If on Intel:
	  - the default values of CFLAGS and LFLAGS work fine
	o Change YACC and LEX to be bison -y and flex respectively.

4. Edit include/config.h to change HACKDIR to be the location of your
   install directory.

5. Edit top level Makefile and change GAMEDIR to match HACKDIR in
   include/config.h.  Make sure the path to GAMEDIR exists.  Change
   SHELLDIR to a "throw away" directory, like /tmp.  We don't use the
   shell.  Change CHOWN and CHGRP commands to "true", there really
   aren't groups on the BeOS.

6. Type "make install" at the top level.



It is possible that some necessary steps needed to make the game have been
omitted.  Feel free to ad-lib as necessary.