Commit graph

31 commits

Author SHA1 Message Date
John "Elwin" Edwards
7fac45d848 UltraRogue: fix changing the score option.
Changing the score file now works again, if use_savedir is not set.  If
it is, an error message is shown.
2017-12-29 17:38:08 -05:00
John "Elwin" Edwards
61e05e655c UltraRogue: ask about unidentified magic items by default. 2017-12-29 14:16:24 -05:00
John "Elwin" Edwards
338214459d Fix a portability issue with md_hasclreol().
Some games' implementation of md_hasclreol() poked around in ncurses
internals, which does not work for some ncurses build configuration.
Most games did not actually call md_hasclreol(), so it was removed.
There is a standard terminfo function which can retrieve the value of
the clr_eol capability, so this was used for rogue5.
2017-12-27 10:26:06 -05:00
John "Elwin" Edwards
a489fa501e UltraRogue: fix options menu.
When displaying options, get_restr() did not position the cursor
correctly, resulting in values being duplicated.
2017-11-26 11:34:45 -05:00
John "Elwin" Edwards
5e60293223 UltraRogue: add a sanity check to do_fuses().
The d_id field, which indicates which fuse function to call, is now
checked to make sure it is not out of range.  do_daemons() already
checks.
2017-11-24 16:22:10 -05:00
John "Elwin" Edwards
1e2f3f5803 UltraRogue: compile out the built-in memory checking.
Functions in memory.c tracked and instrumented memory allocation.  This
mechanism logged information to a text file and also added a 16KB guard
area to every allocation.  Neither of these are desirable in a multi-
user environment, so the whole memory tracking subsystem has been
disabled.

The behavior can be enabled with a configure flag, but it would be a
better idea to use Valgrind to deal with memory bugs.
2017-11-24 13:22:26 -05:00
John "Elwin" Edwards
359d0987a4 Remove version numbers from docdir paths.
Most Unix systems prefer to omit the versions.
2017-10-16 19:53:38 -04:00
John "Elwin" Edwards
79765ae3b2 UltraRogue: don't swap signal handlers.
In md_shellescape(), signal handlers for SIGINT and SIGQUIT were saved
and restored, but exchanged in the process.  This was fixed in the
other games by commit 600873555ec0.

Deleting md_shellescape() might have been a better fix.  It is
apparently unused.
2017-09-29 21:21:50 -04:00
John "Elwin" Edwards
614dcfffd2 Fix more header-related warnings.
This fixes all current default warnings with GCC7 on Linux.  That does
not mean the code is anywhere close to clean.
2017-09-22 16:24:40 -04:00
John "Elwin" Edwards
90d5708d84 Fix a few more compiler warnings. 2017-09-18 19:36:14 -04:00
John "Elwin" Edwards
0936c8f216 Excise md_putchar().
The function wrapped the standard putchar(), doing nothing beside
discarding the return value.  That could cause problems with tputs(),
which expects an int to be returned.
2017-09-18 19:11:57 -04:00
John "Elwin" Edwards
034331e23c UltraRogue: fix Y2K bug on tombstone.
Years were being displayed as "191XX" instead of "20XX".
2017-09-11 17:46:42 -04:00
John "Elwin" Edwards
6164897cfc UltraRogue: prevent bad array accesses in call().
Marking non-magic items caused segfaults because item_color was set to
NULL.  item_type could also be used as an out-of-bounds index.  These
problems have been fixed by only using these variables when the mark
argument is false, in which case they are properly initialized.

A fall-through case statement was also fixed.
2017-09-10 21:04:22 -04:00
John "Elwin" Edwards
b521be16e8 UltraRogue: build and install documentation in the Makefile. 2017-09-09 07:25:23 -04:00
John "Elwin" Edwards
3a9054acbf UltraRogue: add install and uninstall targets to the Makefile. 2017-09-05 21:03:26 -04:00
John "Elwin" Edwards
e3c596c443 UltraRogue: begin autoconfiscation.
Build options can now be set with configure.
2017-09-04 21:08:09 -04:00
John "Elwin" Edwards
6c46840eab UltraRogue: add the autosave feature.
UltraRogue now automatically saves the game when SIGHUP or SIGTERM is
received.
2017-09-03 19:58:22 -04:00
John "Elwin" Edwards
8c77aafa62 UltraRogue: compile out wizard mode by default.
Define WIZARD to enable it.  There will be a configure option for this,
once there is a configure script.
2017-03-05 20:14:11 -05:00
John "Elwin" Edwards
9a9c016bae UltraRogue: check the return value from getpwuid().
It is possible for getpwuid() to return NULL.  Such a failure will no
longer cause a segfault.  However, the call to getpwuid() may normally
not be reachable.
2017-03-01 20:40:18 -05:00
John "Elwin" Edwards
ee3408932f UltraRogue: fix the arrow keys.
The startup sequence now calls keypad() to turn on curses recognition
of special keys.
2017-02-28 21:14:53 -05:00
John "Elwin" Edwards
8eebfc0c85 UltraRogue: add logging.
The log file's name is temporarily defined in main.c.
2017-02-26 16:51:29 -05:00
John "Elwin" Edwards
92d1275f42 UltraRogue: flush output when exiting. 2017-02-26 14:58:49 -05:00
John "Elwin" Edwards
8690ea40f3 UltraRogue: add location for character files.
When using the -n option, UltraRogue will look for character files in a
single location, similar to save files.

The location is chosen by defining CHRDIR in getplay.c, at least until
UltraRogue gets integrated with the build systems.
2017-02-19 19:47:09 -05:00
John "Elwin" Edwards
d309fcdd46 UltraRogue: make scorefile location configurable. 2017-02-15 20:38:12 -05:00
John "Elwin" Edwards
a8a6e1ce7a UltraRogue: fix a segfault related to restoring monsters.
The functions for restoring saved games failed to properly correct the
t_chasee pointer of monsters chasing the player.  Such monsters would
attempt to chase NULL instead, with predictable results.
2017-02-14 20:42:33 -05:00
John "Elwin" Edwards
fc0b18d304 UltraRogue: restrict changing name and save file.
When the -n option is in use, player name and save file location cannot
be changed.  The score file is also restricted.
2017-02-12 20:16:57 -05:00
John "Elwin" Edwards
7b42d453f0 UltraRogue: don't overwrite the savefile name when restoring. 2017-02-09 20:13:25 -05:00
John "Elwin" Edwards
403d9ec171 UltraRogue: add the -n option. 2017-02-09 16:29:45 -05:00
John "Elwin" Edwards
ed27d7a24f UltraRogue: fix crash when restoring.
The r_flags field in struct room was being written as an int and read
as a short.  This caused the restore functions to receive the wrong
data, usually an impossible string length, and abort.

This breaks save compatibility, though the save files had problems
anyway: the r_fires field should have been used, instead of reading and
writing r_flags twice.
2017-02-08 19:50:36 -05:00
John "Elwin" Edwards
b100b40846 UltraRogue: fix various build failures. 2017-01-31 20:33:49 -05:00
John "Elwin" Edwards
11c74c273d Import UltraRogue from the Roguelike Restoration Project (r1490) 2017-01-31 19:56:04 -05:00