Commit Graph

1453 Commits

Author SHA1 Message Date
nhmall
478b53b4c2 Merge branch 'mouse_support' into NetHack-3.6.2-beta01 2018-11-27 22:58:42 -05:00
nhmall
d18bf800ae expand mouse_support to three values rather than boolean
On Windows only:
   0 = turn off mouse_support
   1 = turn on mouse_support and turn off QuickEdit mode
   2 = turn on mouse_support and leave QuickEdit mode untouched

More generally, but not implemented anywhere:
   0 = turn off mouse_support
   1 = turn on mouse_support and make supporting O/S adjustments
       (O/S adjustments not implented beyond Windows as yet)
   2 = turn on mouse_support and do not make OS adjustments
       (unimplemented as yet so behaves as 1)
2018-11-27 22:15:34 -05:00
PatR
5d2686e7c1 lev_comp int vs long
Fix lev_comp's variable argument usage by changing it to make
add_opvars() expect an int rather than a long when given the "i"
indicator, and add "l" for really passing a long.  The ints are
conveted to longs when setting up the interpreter.  I think I changed
just about all the integer opvars to int, although there is one use
of "l" in lev_main.c just to make sure it works.  There could be
arguments that really do need to be 'long'; if so, the add_opvars()
calls for them will have to have its indicator string updated and
possibly add or remove some casts.

There's a lot of reformatting included but it's not consistent about
tab replacement.  Some of the changes are due to renaming long-named
'variable_definitions' to 'vardefs' to shorten a bunch of lines.

Updated sys/share/*_yacc.c will be checked in separately.  The ones
currently in the repository won't work with patched lev_main.c due to
that renamed variable.
2018-11-27 18:21:58 -08:00
Pasi Kallinen
f942687378 Remove unnecessary define 2018-11-27 07:38:03 +02:00
Bart House
c44c0d3e01 Added support for color condition hilites to tile mode.
Code is complete but might take another pass over the code to simplify
where we can.
2018-11-25 21:04:30 -08:00
PatR
5226de8c74 warning fixups
Non-const string literals.
2018-11-25 14:31:20 -08:00
nhmall
ccd6f1cf22 more orctown-related follow-up
Under some circumstances, when all the marauding orcs belonging to the
horde operating within the gnomish mines had been provided with their
spoils and placed appropriately, there could still be some pillaged stuff
left-over on the migrating obj chain. Orcs created by regular monster
generation elsewhere would then be susceptable to receiving that stuff
until it was used up. That part is fine, except that the orcs were then
being named as part of the same horde operating within the mines. Now
they will no longer be named as part of the Gnomish Mines horde.

Mythos: There's a good chance that these particular orcs received the
stolen goods from the Gnomish Mines horde.
2018-11-25 12:47:53 -05:00
PatR
cc5bb44a9a fix #H7591 - migrating monsters vs full levels
During level change, when a monster from mydogs (monsters accompaying
hero, usually pets) couldn't be placed because the level was full, it
was set to migrate to that level (in order to get another chance to
arrive if hero left and returned).  The code sequence
 mon_arrive()-> mnexto()-> m_into_limbo()-> migrate_to_level()-> relmon()
tried to remove the monster from the map, but it wasn't necessarily on
the map (depending upon whether it couldn't arrive at all, or arrived
at the hero's spot and couldn't be moved out of the hero's way).  The
EXTRA_SANITY_CHECKS for remove_monster() issued impossible "no monster
to remove".  relmon() now checks whether monster is already off the map.

While investigating that, I discovered that pets set to re-migrate
to the same level to try again on hero's next visit didn't work at all.
migrating_mons gets processed after mydogs so moving something from
the latter to the former after arrival failure just resulted in
immediate second failure when the more general list was handled during
the hero's current arrival.  And failure to arrive from migrating_mons
would kill the monster instead of scheduling another attempt.

The sanest fix for that turned out to be to have all monsters who
can't arrive be put back on the migrating_mons list to try again upon
hero's next visit.  Pets still fail twice but are no longer discarded
during the second time, and now do arrive when hero leaves and comes
back provided he or she has opened up some space before leaving.  If
there's still no space on the next visit, monsters who can't arrive
then are scheduled to try again on the visit after that.

Recent fix for invalid corpses becomes moot.  Monsters aren't killed
during arrival failure so there are no resulting corpses to deal with.
2018-11-24 01:45:09 -08:00
nhmall
75a962aa78 Revert "Modified how we initialize save file info."
This reverts commit 44b002c9f3.
2018-11-23 22:17:35 -05:00
nhmall
66b874dce3 Revert "Added PLAYAGAIN experimental support definition."
This reverts commit ea8cf6613a.
2018-11-23 22:17:33 -05:00
nhmall
d88490fa94 Revert "Revert "Modified how we initialize save file info.""
This reverts commit 05c9ccc035.
2018-11-23 22:17:31 -05:00
nhmall
c5b283a839 Revert "Added decl_early_init() which is called when PLAYAGAIN is supported."
This reverts commit acbe4d9242.
2018-11-23 22:17:24 -05:00
nhmall
bb826992dd Revert "Previous encumberance state moved to decl.c."
This reverts commit 4e774197a6.
2018-11-23 22:17:22 -05:00
nhmall
28a953337f Revert "Moved petname_used to decl.c"
This reverts commit 6272c37035.
2018-11-23 22:17:20 -05:00
nhmall
162018060a Revert "Initial check in of icontext."
This reverts commit 5bbe3cd6bb.
2018-11-23 22:17:18 -05:00
nhmall
93ebcf0071 Revert "check."
This reverts commit 7814d9097a.
2018-11-23 22:17:16 -05:00
nhmall
7ce4c28eb9 Revert "Fixed nocreate."
This reverts commit 244a473a19.
2018-11-23 22:17:14 -05:00
nhmall
4590c9c0dd Revert "Instance variable work check-point."
This reverts commit 8e316df117.
2018-11-23 22:17:12 -05:00
nhmall
4d6e3326bb Revert "Instance variable work."
This reverts commit 14bf74c862.
2018-11-23 22:17:09 -05:00
nhmall
7ad3f32e16 Revert "Renamed instance_variables to global_variables and iv to g."
This reverts commit f9a0db6c44.
2018-11-23 22:17:07 -05:00
nhmall
414a5135b7 Revert "rumors.c static globals moved to instance_globals."
This reverts commit 6a78b203e4.
2018-11-23 22:17:05 -05:00
nhmall
bf3602eb1b Revert "rfilter initialized to UNDEFINED."
This reverts commit 716c2ceccf.
2018-11-23 22:17:03 -05:00
nhmall
5e5e321378 Revert "Renamed UNDEFINED to UNDEFINED_VALUE."
This reverts commit cee4933c24.
2018-11-23 22:17:01 -05:00
nhmall
053baa8274 Revert "restore.c globals moved to instance_globals."
This reverts commit 865c4d5a7d.
2018-11-23 22:16:59 -05:00
nhmall
04fe16d938 Revert "Moved read.c globals to instance_globals."
This reverts commit d37a91a6b8.
2018-11-23 22:16:56 -05:00
nhmall
2fb68024fe Revert "Moved potion.c globals to instance_globals."
This reverts commit d3c192e5a8.
2018-11-23 22:16:54 -05:00
nhmall
6f3f1caee3 Revert "define nhassert if not defined by port."
This reverts commit cff9fb441a.
2018-11-23 22:16:52 -05:00
nhmall
9db124f650 Revert "Fix compiler warnings in macos build."
This reverts commit 0d59f1a22b.
2018-11-23 22:16:49 -05:00
nhmall
7f023c99fb Revert "Moved sex_change_ok to instance_globals."
This reverts commit ee22210a68.
2018-11-23 22:16:47 -05:00
nhmall
44af1c78f3 Revert "topl.c globals moved to instance_globals."
This reverts commit b384223e1b.
2018-11-23 22:16:45 -05:00
nhmall
61a35d4ac0 Revert "Moved pickup globals to instance_globals."
This reverts commit 01596f1660.
2018-11-23 22:16:40 -05:00
nhmall
734a6c2ddb Revert "objnam.c globals moved to instance globals."
This reverts commit 041e55467a.
2018-11-23 22:16:35 -05:00
nhmall
3cbc6d4cf5 Revert "Modified objects initialization to support re-entry."
This reverts commit c3eefefc99.
2018-11-23 22:16:24 -05:00
nhmall
efdfd2fa1d Revert "Removing prototype for decl_globals_init()."
This reverts commit 26d03b5017.
2018-11-23 22:15:37 -05:00
Bart House
26d03b5017 Removing prototype for decl_globals_init(). 2018-11-23 15:47:18 -08:00
Bart House
c3eefefc99 Modified objects initialization to support re-entry. 2018-11-23 15:22:55 -08:00
Bart House
041e55467a objnam.c globals moved to instance globals. 2018-11-23 15:22:55 -08:00
Bart House
01596f1660 Moved pickup globals to instance_globals. 2018-11-23 15:22:55 -08:00
Bart House
b384223e1b topl.c globals moved to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
ee22210a68 Moved sex_change_ok to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
0d59f1a22b Fix compiler warnings in macos build. 2018-11-23 15:22:54 -08:00
Bart House
cff9fb441a define nhassert if not defined by port. 2018-11-23 15:22:54 -08:00
Bart House
d3c192e5a8 Moved potion.c globals to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
d37a91a6b8 Moved read.c globals to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
865c4d5a7d restore.c globals moved to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
cee4933c24 Renamed UNDEFINED to UNDEFINED_VALUE. 2018-11-23 15:22:54 -08:00
Bart House
716c2ceccf rfilter initialized to UNDEFINED. 2018-11-23 15:22:54 -08:00
Bart House
6a78b203e4 rumors.c static globals moved to instance_globals. 2018-11-23 15:22:53 -08:00
Bart House
f9a0db6c44 Renamed instance_variables to global_variables and iv to g. 2018-11-23 15:22:53 -08:00
Bart House
14bf74c862 Instance variable work. 2018-11-23 15:22:53 -08:00