Commit graph

34 commits

Author SHA1 Message Date
John "Elwin" Edwards
f5c2898524 Makefile fixes related to installation.
'make install' and 'make uninstall' should now work correctly, placing
the documentation in the proper places.  Any directories needed will be
created.
2016-02-26 17:30:30 -05:00
John "Elwin" Edwards
d20fe81e22 Update the Visual Studio project files.
These files were produced by Visual Studio 2015 on Windows 8.1.
2015-08-18 13:23:56 -04:00
John "Elwin" Edwards
13f4a96d93 XRogue: fix md_htonl() and md_ntohl().
xcrypt requires them.  The implementations in state.c used htonl() and
ntohl(), which aren't available on Windows.  So the Advanced Rogue 7
versions were copied over.

This implementation could be problematic on other systems where
sizeof(long) == 8.  Maybe someday I can convert everything to C99 and
use stdint.h.
2015-08-13 17:17:40 -04:00
John "Elwin" Edwards
b2ebcf72c9 XRogue: add and use more md_ functions.
Portable md_fileno() and md_unlink() have been added to state.c.
2015-08-13 15:15:21 -04:00
John "Elwin" Edwards
7d750a4410 XRogue: fix some header includes. 2015-08-13 14:57:26 -04:00
John "Elwin" Edwards
50961af028 Permit not defining score and log files. 2015-08-13 07:47:01 -04:00
John "Elwin" Edwards
c864015af9 Advanced Rogue family: fix messages from some scrolls.
When scrolls of magic mapping or gold detection were read, their
characteristic messages were displayed before overwriting the whole
screen to show the newly discovered information.  They are now shown
after updating the screen, so they will be visible.
2015-07-02 08:04:16 -04:00
John "Elwin" Edwards
8fed78336a ARogue family: don't hide messages caused by moving to a new level.
new_level() redraws the whole screen, including the message line, so if
msg() has just been called, the message will likely not last long
enough to be noticed.  These cases have been changed so that msg() is
called after new_level().

If a fall through a trapdoor is fatal, "You fall into a trap!" is no
longer printed, but the tombstone should make things clear.
2015-06-29 20:37:32 -04:00
John "Elwin" Edwards
419a920e1d arogue7, xrogue: fix uninitialized variables when restoring.
The save and restore code assumed sizeof(long) == 4, which is not the
case on x64.  Reading only 4 bytes from the savefile left the others
uninitialized, which led to problems like billions of experience points
or gold pieces.
2015-06-26 11:42:02 -04:00
John "Elwin" Edwards
6ab6c944fb Only include one copy of the install-sh script. 2015-06-05 18:02:17 -04:00
John "Elwin" Edwards
3a456017a7 arogue7, xrogue: set CFLAGS empty by default in the Makefiles. 2015-06-05 14:06:11 -04:00
John "Elwin" Edwards
ec3e34544a arogue7, xrogue: fix configure's wizardmode and limitscore options.
WIZARD and LIMITSCORE, when set by options to './configure', are no
longer overridden in mach_dep.h.
2015-06-05 13:57:38 -04:00
John "Elwin" Edwards
cfe8f3c281 arogue7, xrogue: add 'install' targets to Makefiles.
'make install' and 'make uninstall' should now work as expected.
2015-06-04 17:08:40 -04:00
John "Elwin" Edwards
321e437f47 Fix a typo in configure.ac.
'test' had been misspelled 'text', and the error had propagated to all
seven games.
2015-06-04 14:48:25 -04:00
John "Elwin" Edwards
d3c281122c arogue7, xrogue: begin using autoconf.
File locations can be customized via './configure'.  'make install'
does not work yet.  Options for wizard mode and load checks may not do
what is intended.

Fun fact: there's an enlightening epigraph in the introduction to the
autoconf manual.
2015-06-04 10:41:39 -04:00
John "Elwin" Edwards
97ef6ee2df arogue7, xrogue: fix save/restore of alchemy jugs.
state.c now saves the fuse that refills alchemy jugs, using the method
of numbering objects previously applied to Advanced Rogue 5.  Alchemy
jugs that are empty when the game is saved will continue to function
after it is restored.

Savefile compatibility should not be affected.
2015-05-29 17:34:04 -04:00
John "Elwin" Edwards
f5bd700b2d xrogue: escaping to a shell should not cause a move to the left.
This was due to the classic error of forgetting a break statement.
2015-05-28 13:51:01 -04:00
John "Elwin" Edwards
37cc3eeaba arogue7, xrogue: fix command repetition.
In both games, command() loops and calls the action function twice for
each command: once to schedule it by setting player.t_action and
player.t_no_move, and again, to actually do it, once player.t_no_move
has been reduced to 0.  Each loop decremented count, so repeated
commands were only repeated half the number of times the player typed.

count is now decremented only when ch has been set to the repeated
command.
2015-05-28 11:08:03 -04:00
John "Elwin" Edwards
4e5f4c52d3 arogue7, xrogue: rename daemon() to start_daemon().
This prevents conflict with the BSD/OSX daemon() system function.
2015-05-28 10:21:43 -04:00
John "Elwin" Edwards
d793ca961f arogue7, xrogue: add support for keypad 5.
Keypad 5 is now equivalent to the '.' key.

XRogue does not include md_readchar() and its ability to work around
deficiencies in the terminfo entry. So the key will not be recognized
in screen/tmux or anywhere else without the kb2 capability.  Adding
md_readchar() would be more complex than it was for Super-Rogue, since
XRogue already does KEY_* interpretation in command().
2015-05-27 17:29:32 -04:00
John "Elwin" Edwards
053a248658 arogue7, xrogue: put newlines at the end of startup messages. 2015-05-20 15:15:29 -04:00
John "Elwin" Edwards
faa24df096 xrogue: add an exit prompt.
This gives the player a chance to see the high score list when playing
via dgamelaunch.
2015-05-20 12:51:16 -04:00
John "Elwin" Edwards
e3620a3781 Advanced Rogue family: fix the "score" option.
Changing the score file (when permitted) now works again, closing the
old score file and opening the new one.
2015-05-20 08:42:17 -04:00
John "Elwin" Edwards
ea4244de91 arogue7, xrogue: prevent potential NULL dereferencing.
It is possible for getpwuid() to fail and return NULL.  Various md_get*
functions now check for this.
2015-05-18 10:53:22 -04:00
John "Elwin" Edwards
3554339257 Advanced Rogue family: overhaul privilege handling.
Advanced Rogue 5 and 7, and XRogue, now open the scorefile and logfile
at startup and then drop any set[ug]id privileges if the savedir is not
being used.
2015-05-16 13:39:26 -04:00
John "Elwin" Edwards
fe8a158d6a xrogue: call nonl() during initialization.
This prevents some confusion between CR and LF characters.
2015-05-05 20:54:33 -04:00
John "Elwin" Edwards
fb870fdb4e xrogue: don't segfault when backstabbing while empty-handed.
The code for backstabbing checked the weapon's properties without
making sure it was not NULL.
2015-05-05 12:12:20 -04:00
John "Elwin" Edwards
85a0b26fa3 xrogue: compile out wizard mode by default. 2015-05-05 12:07:12 -04:00
John "Elwin" Edwards
9c0cafd74d xrogue: record the result of each game in a logfile. 2015-05-05 11:24:02 -04:00
John "Elwin" Edwards
283506baf9 xrogue: restrict changes to the save file location.
When using the -n option, disallow changing file_name or whoami via
options or dialogs.
2015-05-02 07:31:14 -04:00
John "Elwin" Edwards
e35502804b xrogue: initial support for the -n option.
The scorefile location is also configurable now.
2015-04-22 16:03:00 -04:00
John "Elwin" Edwards
dec970210b xrogue: add missing includes.
This prevents some warnings.
2015-04-21 10:34:01 -04:00
John "Elwin" Edwards
02cec53f85 xrogue: fix definition of struct delayed_action.
Arrays of struct delayed_action were declared before the definition.
Also, daemon.c and state.c defined it differently.  The state.c
definition, in which d_arg is a union, is now used everywhere.

This is the least bad option, but fuses and daemons are still a
disheartening morass that undoubtedly shelters more bugs.
2015-04-21 10:11:02 -04:00
John "Elwin" Edwards
034d8d6484 Import XRogue 8.0 from the Roguelike Restoration Project (r1490) 2015-04-21 08:55:20 -04:00