Commit Graph
88 Commits
Author SHA1 Message Date
Sean Hunt c7578b7c34 Add POSIX implementation of regex.
This also includes documentation of the regex engine in posixregex.c,
because I couldn't think of anywhere better to put it.
2015-04-12 11:46:56 -04:00
Sean Hunt 302ad5025f Catch regex matching errors to avoid crashing. 2015-04-12 11:46:56 -04:00
Sean Hunt 80aa109855 Use extern.h for regexes.
I was planning to do this anyway, but it created an include loop that
was breaking it on Windows.
2015-04-12 11:46:54 -04:00
Sean Hunt b86ad06d6b Implement a new system-based matching harness.
The intent is to look for platform-specific facilities for regex
matching, to provide portable MENUCOLORS configuration files.

This is a prototype implementation being committed to see if Windows can
use the POSIX regex implementation provided with the C++11 standard
library. If this works, I will write a harness for POSIX regexes and for
pmatch(), and those can be linked in by platforms as appropriate.

pmatch() should be used only as a very last resort, because it breaks
compatibility between platforms.
2015-04-12 11:46:26 -04:00
Sean Hunt a3387432ac Document wallification changes. 2015-04-12 11:45:29 -04:00
Sean Hunt 0edd645384 Fix Sanctum phasing bug. 2015-04-10 09:14:23 -04:00
Sean Hunt 6a116ee59c Restore the insect legs on Baalzebub's level. 2015-04-10 09:14:23 -04:00
Sean Hunt f523055746 Make WALLIFIED_MAZE into a level flag.
It should now be randomly disabled for a 3rd of Gehennom, to make things
a tad more interesting there. It's also disabled in Baalzebub's lair,
to make things a little more interesting.

Still don't know why the beetle is disappearing.
2015-04-09 13:27:44 -04:00
Sean Hunt 951de70b36 Do not clean tribute file on Unix. 2015-04-07 20:44:54 -04:00
Sean Hunt 05c284b2e8 Add quotes for Eric and Moving Pictures. 2015-04-07 12:48:55 -04:00
Sean Hunt 4e8e1889ef Add some quotes.
Please correct the formatting if need be.
2015-04-04 00:39:24 -04:00
Sean Hunt d5a2dcf8c7 Fix the Unix build. 2015-04-04 00:39:11 -04:00
Sean Hunt 2a9c913c1c Add new hallucinatory gods. 2015-03-29 19:10:46 -04:00
Sean Hunt 94256853c6 Fix a compiler warning. 2015-03-29 18:20:26 -04:00
Sean Hunt 907a2dfee0 Fix a memory leak on termination.
Found by Alex Smith.
2015-03-25 14:34:28 -04:00
Sean Hunt e41b3f7143 Fix use-after-frees on dipped objects. 2015-03-23 11:42:36 -04:00
Sean Hunt f8baf4bd8e Make a few fixes to code that was confusing indent 2015-03-17 18:47:14 +02:00
Sean Hunt b4fa80ec7d Print lava item destructions only if surviving.
This partially reverts commit 72c2ae233d
in order to prevent players from using hangups during the destruction
messages to save themselves.
2015-03-17 18:47:12 +02:00
Sean Hunt b98fd27f9d Merge fire-based erosion to common codepaths.
This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.

This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
2015-03-17 18:47:10 +02:00
Sean Hunt d58a9bb56e Fold get_wet() into water_damage().
This now ensures that dipping into water works like other sources of
water damage. There is a potentially significant gameplay change here:
dipping a container into uncursed water will wet all its contents. If
this is a problem, then we should add another parameter to water_damage
which will suppress this behaviour for dipping.
2015-03-17 18:47:08 +02:00
Sean Hunt cd83f7e802 Rename rust_dmg() to erode_obj(). 2015-03-17 18:47:07 +02:00
Sean Hunt 04a0331ccc Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-17 18:47:04 +02:00
Sean Hunt 4e05b9a1ec A lot more cleanup to rust and water. 2015-03-17 18:47:01 +02:00
Sean Hunt 5532600f1a Cover a couple of corner cases with rust_dmg(). 2015-03-17 18:47:00 +02:00
Sean Hunt 48b048f921 Remove the victim argument to rust_dmg().
The argument can be calculated from `otmp`.
2015-03-17 18:46:58 +02:00
Sean Hunt 2b1820a67b Factor out a new is_moat function.
The fact that Juiblex's swamp is MOAT but not moat is weird and should
probably be looked at at some point.
2015-03-17 18:46:57 +02:00
Sean Hunt 07da4a740e Fix some warnings on the unconditionals branch. 2015-03-17 18:46:48 +02:00
Sean Hunt 5fb3fea9c6 Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.

This compiles, but I have not done extensive testing.

Conflicts:
	include/config.h
	include/decl.h
	include/extern.h
	include/global.h
	include/tradstdc.h
	include/wintty.h
	src/drawing.c
	src/files.c
	src/hacklib.c
	src/mapglyph.c
	src/options.c
	sys/winnt/nttty.c
	win/tty/getline.c
	win/tty/topl.c
	win/tty/wintty.c
2015-03-17 18:46:45 +02:00
Sean Hunt fb46fed99d Make EXP_ON_BOTL unconditional. 2015-03-17 18:46:44 +02:00
Sean Hunt f27d319e68 Make REDO unconditional. 2015-03-17 18:46:41 +02:00
Sean Hunt 11d11c5de3 Make LOADSYMSETS unconditional.
There are some bugs here, but this functionality should make it into the release
in some form.
2015-03-17 18:46:39 +02:00
Sean Hunt 3481ec6589 Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-03-17 18:46:37 +02:00
Sean Hunt 8798197d85 Make BARGETHROUGH unconditional. 2015-03-17 18:46:35 +02:00
Sean Hunt dcc2f8ba93 Make SEDUCE unconditional. 2015-03-17 18:46:32 +02:00
Sean Hunt 05f7a63728 Make GOLDOBJ unconditional. 2015-03-17 18:46:23 +02:00
Sean Hunt cc7ab4a2da Make WIZARD unconditional. 2015-03-17 18:46:17 +02:00
Sean Hunt eca41ae060 Make DUNGEON_OVERVIEW unconditional. 2015-03-17 18:46:12 +02:00
Sean Hunt ffd201495c Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-03-17 18:46:08 +02:00
Sean Hunt bb647dc33c Make TOURIST unconditional. 2015-03-17 18:46:01 +02:00
Sean Hunt 44ca9fc16a Make SINKS unconditional. 2015-03-17 18:45:58 +02:00
Sean Hunt 161070ce56 Make KOPS unconditional. 2015-03-17 18:45:56 +02:00
Sean Hunt 9759f5bf6d Make STEED unconditional. 2015-03-17 18:45:49 +02:00
Sean Hunt aba6ecb7b3 Make ELBERETH unconditional. 2015-03-17 18:45:45 +02:00
Sean Hunt b777aff284 Add fixes notes for the recent lava changes. 2015-03-17 18:44:58 +02:00
Sean Hunt 0fcd4c0093 Remove the 'nul' variable. 2015-03-17 18:44:58 +02:00
Sean Hunt 38964dc56c Clean up lava messages a little.
This change has two parts.

First, the Book of the Dead now has a special message in lava. This was
originally added by Steve Melenchuk (aka Grunt) as a precaution against the Book
burning up. While I'm pretty sure that the Book can't burn up in the current
codepath, the message is a nice touch and it doesn't help to add a safety check.

Second, always print the inventory destruction messages. The reason for this is
fairly subtle, but relates to the timing. By not printing the messages when
dying, the visible effect to the player is that if they have lifesaving, the
items burn up before they die, but if they do not, they burn up after they
die---the fact that they do burn up is visible in the dump or bonesfile.
2015-03-17 18:44:57 +02:00
Sean Hunt c6628bcbff Clean up the lava code a little. 2015-03-17 18:44:56 +02:00
Sean Hunt 9644ec781a Destroy water walking boots on lava first.
This avoids a player being left standing on lava if their boots are burned up and
they survive the damage.

This change is originally due to Steve Melenchuk, fixed up by Derrick Sund.
2015-03-17 18:44:56 +02:00
Sean Hunt e95bd8ec5b Fix warning with verbalize1 2015-03-17 18:44:56 +02:00
Sean Hunt 07cf4e9657 Replace && with & in blindness timeout check.
Caught by clang.
2015-03-17 18:44:55 +02:00
Sean Hunt 01756b33fa Fix a few compiler (clang) warnings. 2015-03-17 18:44:54 +02:00
Sean Hunt ea46c93b88 +x .sh files in unix dir; ignore Makefiles 2015-03-17 18:44:52 +02:00
Sean Hunt f64e530bff Make a few fixes to code that was confusing indent 2015-03-02 13:25:41 -05:00
Sean Hunt bd62873ee2 Print lava item destructions only if surviving.
This partially reverts commit 72c2ae233d
in order to prevent players from using hangups during the destruction
messages to save themselves.
2015-03-02 12:52:04 -05:00
Sean Hunt 777328bd5c Merge fire-based erosion to common codepaths.
This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.

This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
2015-03-02 12:50:03 -05:00
Sean Hunt 3acd3c4a00 Fold get_wet() into water_damage().
This now ensures that dipping into water works like other sources of
water damage. There is a potentially significant gameplay change here:
dipping a container into uncursed water will wet all its contents. If
this is a problem, then we should add another parameter to water_damage
which will suppress this behaviour for dipping.
2015-03-02 12:50:01 -05:00
Sean Hunt 57dcad3774 Rename rust_dmg() to erode_obj(). 2015-03-02 12:50:01 -05:00
Sean Hunt 3a049cf66e Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-02 12:50:00 -05:00
Sean Hunt 7e0d552b06 A lot more cleanup to rust and water. 2015-03-02 12:49:59 -05:00
Sean Hunt d588210a77 Cover a couple of corner cases with rust_dmg(). 2015-03-02 12:49:57 -05:00
Sean Hunt 9c4b0113aa Remove the victim argument to rust_dmg().
The argument can be calculated from `otmp`.
2015-03-02 12:49:57 -05:00
Sean Hunt 5ffd5a3000 Factor out a new is_moat function.
The fact that Juiblex's swamp is MOAT but not moat is weird and should
probably be looked at at some point.
2015-03-02 12:49:56 -05:00
Sean Hunt 17ea9ff9ab Fix some warnings on the unconditionals branch. 2015-02-27 19:34:31 -05:00
Sean Hunt a3faa93403 Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.

This compiles, but I have not done extensive testing.

Conflicts:
	include/config.h
	include/decl.h
	include/extern.h
	include/global.h
	include/tradstdc.h
	include/wintty.h
	src/drawing.c
	src/files.c
	src/hacklib.c
	src/mapglyph.c
	src/options.c
	sys/winnt/nttty.c
	win/tty/getline.c
	win/tty/topl.c
	win/tty/wintty.c
2015-02-27 19:34:29 -05:00
Sean Hunt 7c09285a8c Make EXP_ON_BOTL unconditional. 2015-02-27 19:34:26 -05:00
Sean Hunt 0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Sean Hunt d218bedbf7 Make LOADSYMSETS unconditional.
There are some bugs here, but this functionality should make it into the release
in some form.
2015-02-27 19:33:51 -05:00
Sean Hunt 74e741bbbc Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-02-27 19:33:50 -05:00
Sean Hunt b138d380ea Make BARGETHROUGH unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt 6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt 4f59f5c6fd Make WIZARD unconditional. 2015-02-27 19:33:22 -05:00
Sean Hunt ad82ca80f3 Make DUNGEON_OVERVIEW unconditional. 2015-02-27 19:33:20 -05:00
Sean Hunt 1edadd1d48 Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-02-27 19:33:16 -05:00
Sean Hunt 260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt 5ee71d2757 Make SINKS unconditional. 2015-02-27 19:33:06 -05:00
Sean Hunt b066b7c170 Make KOPS unconditional. 2015-02-27 19:33:04 -05:00
Sean Hunt 9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
Sean Hunt 264dc66129 Make ELBERETH unconditional. 2015-02-27 19:32:53 -05:00
Sean Hunt 0d9ae1d293 Add fixes notes for the recent lava changes. 2015-02-20 12:59:45 -05:00
Sean Hunt a3b1cb8432 Remove the 'nul' variable. 2015-02-18 23:51:31 -05:00
Sean Hunt 72c2ae233d Clean up lava messages a little.
This change has two parts.

First, the Book of the Dead now has a special message in lava. This was
originally added by Steve Melenchuk (aka Grunt) as a precaution against the Book
burning up. While I'm pretty sure that the Book can't burn up in the current
codepath, the message is a nice touch and it doesn't help to add a safety check.

Second, always print the inventory destruction messages. The reason for this is
fairly subtle, but relates to the timing. By not printing the messages when
dying, the visible effect to the player is that if they have lifesaving, the
items burn up before they die, but if they do not, they burn up after they
die---the fact that they do burn up is visible in the dump or bonesfile.
2015-02-18 23:24:41 -05:00
Sean Hunt ad4f3fc0fe Clean up the lava code a little. 2015-02-18 23:19:23 -05:00
Sean Hunt d34bc6fd73 Destroy water walking boots on lava first.
This avoids a player being left standing on lava if their boots are burned up and
they survive the damage.

This change is originally due to Steve Melenchuk, fixed up by Derrick Sund.
2015-02-18 23:05:37 -05:00
Sean Hunt ca6bbf8bc3 Fix warning with verbalize1 2015-02-18 21:48:34 -05:00
Sean Hunt 7e93cadc1c Replace && with & in blindness timeout check.
Caught by clang.
2015-02-16 00:24:05 -05:00
Sean Hunt 862d32c2ec Fix a few compiler (clang) warnings. 2015-02-16 00:23:48 -05:00
Sean Hunt 967364b6ed +x .sh files in unix dir; ignore Makefiles 2015-02-13 11:39:37 -05:00