Commit graph

30 commits

Author SHA1 Message Date
John "Elwin" Edwards
9506edfdc4 Fix some 'test' failures when running 'make install'.
When shell variables are unexpectedly empty, 'test' gets the wrong
number of arguments and becomes unhappy.  Logical AND should not be
done with 'test EXPR1 -a EXPR2' in such cases, because 'test' logic
does not short-circuit.  Replace with 'test EXPR1 && test EXPR2'.
Shell logic does short-circuit, and if the first test invocation
fails, the second will never occur, and will never encounter missing
arguments.
2013-08-27 22:54:28 -07:00
John "Elwin" Edwards
1f1ae55a26 Make sure file_name contains '/' between SAVEDIR and the file name.
Duplicated slashes are not a problem.  Missing slashes are.
2013-08-27 22:25:40 -07:00
John "Elwin" Edwards
5a25cd89da rogue[345]: fix backspace key in prompts.
md_readchar() mapped KEY_BACKSPACE to CTRL-H, but get_str(), which
handles prompts for strings, only backs up when it receives the erase
character.  The key should be mapped to md_erasechar().

This fixes Red Hat Bugzilla #847852.
2013-08-27 09:25:30 -07:00
John "Elwin" Edwards
fef5939ab1 Don't set DESTDIR via configure.
DESTDIR ought to be set via option passed to 'make install'.
2013-08-26 19:58:44 -07:00
John "Elwin" Edwards
0e8809de2b Don't set the player's ISRUN flag.
rogue4 and rogue5 set the player's ISRUN flag upon exit from sleep or
holding.  This is apparently supposed to indicate that the player can
move again.  What it actually does is make it harder for monsters to
hit the player, until the flag is reset.

As this behavior makes little sense and seems like a cheat, it has
been deemed a bug and removed.
2013-08-13 09:19:56 -07:00
John "Elwin" Edwards
2d117230ed Refuse to restore if the character is dead.
This prevents recovering from death by killing the game between death
and exit, producing an automatic save.
2013-08-09 09:34:07 -07:00
John "Elwin" Edwards
5a47554e45 rogue4: don't delete the savefile if the terminal is too small.
Let the user resize the terminal and try again.
2013-08-08 14:30:12 -07:00
John "Elwin" Edwards
e375c8bd05 Properly handle invalid room references in savefiles.
In all games, rs_write_room_reference() stored -1 for a nonexistent
room, but rs_read_room_reference() did not check for out-of-bounds
values, leading to pointers to rooms[-1], which sometimes caused
crashes.  rs_read_room_reference() has now been modified to use NULL
instead.

Some of the games required further changes to replace NULL with the
pointer to the actual room.  Others are capable of handling NULL for
objects not in any room.
2013-08-08 12:41:35 -07:00
John "Elwin" Edwards
fdc346deb1 rogue4: don't put savefile metadata into the savefile.
The save_file() function in save.c stored the savefile's device number,
inode number, creation time, and modification time in the file.  The
restore() function read them back, and apparently used to compare them
to protect against cheaters.

Unfortunately, the types and sizes of these numbers differ from system
to system, which ruins the Roguelike Restoration Project's fine
portability work.  So they have been removed from the savefile.

This BREAKS SAVEFILE COMPATIBILITY, but old files can be converted by
excising the chunk starting at offset 0x22 with length sizeof(ino_t) +
sizeof(dev_t) + 2 * sizeof(time_t).  That's 0x14 on i686 and 0x20 on
x86_64, at least with current versions of Linux and glibc.
2013-08-05 20:49:41 -07:00
John "Elwin" Edwards
f56c5bd801 rogue4: fix "You found you found" bug.
Both search() and tr_name() printed "you found" when a trap was
discovered.  It has been removed from search().
2012-08-20 20:30:19 -07:00
John "Elwin" Edwards
9ed6e5e369 rogue3, rogue4: fix log message formatting for wins. 2012-08-07 21:17:29 +00:00
John "Elwin" Edwards
75f5abe998 Improve support for keypad 5. 2011-10-28 16:00:05 +00:00
John "Elwin" Edwards
617d9499e9 rogue4: update the installation instructions. 2011-10-14 16:47:52 +00:00
John "Elwin" Edwards
cec13006cf rogue4: improve defaults for SAVEDIR. 2011-10-13 17:44:29 +00:00
John "Elwin" Edwards
1a3828c466 rogue4: ported to autoconf. 2011-10-11 15:20:40 +00:00
John "Elwin" Edwards
4e48fad8ba Make sure lock_sc always returns a value. Fixes a weird bug that prevented the scorelist from updating. 2010-12-14 17:15:51 +00:00
John "Elwin" Edwards
1d8ea533bd Make sure the score list appears in all situations. 2010-12-07 16:46:07 +00:00
John "Elwin" Edwards
8d570c89a5 Fix the playback bug which was caused by CR/LF confusion 2010-02-16 00:03:06 +00:00
John "Elwin" Edwards
8d7895dd3b Added INSTALL.txt files 2010-02-13 16:25:29 +00:00
John "Elwin" Edwards
b24bc2e606 Slightly modify savefile location and prompt 2010-01-01 15:04:30 +00:00
John "Elwin" Edwards
3a3594dad7 rogue4: move the lockfile to somewhere with write permission 2009-11-26 12:50:17 +00:00
John "Elwin" Edwards
9fc2336c2d Fix variable name 2009-11-26 03:07:54 +00:00
John "Elwin" Edwards
4bc7038945 rogue4: add logging all games 2009-11-26 03:02:13 +00:00
John "Elwin" Edwards
f9c589b480 Add a file include 2009-11-24 13:04:43 +00:00
John "Elwin" Edwards
cfa162874e rogue4: make sure score list appears when exiting 2009-11-24 13:02:34 +00:00
John "Elwin" Edwards
3f546ef2eb rogue4: prevent segfault on getpwuid failure 2009-11-24 12:53:15 +00:00
John "Elwin" Edwards
437daf6c31 rogue4: ask about unidentified objects by default 2009-10-31 15:18:51 +00:00
John "Elwin" Edwards
f433b66dc8 rogue4: prevent changing name or save file when using system savedir 2009-10-31 13:20:00 +00:00
John "Elwin" Edwards
18a08fce7e rogue4: add -n option and system savedir 2009-10-31 01:51:52 +00:00
John "Elwin" Edwards
9f62c197cc Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00