summaryrefslogtreecommitdiff
path: root/games
AgeCommit message (Collapse)Author
2019-05-11add an example to the man page. discovered by mlarkinTed Unangst
2019-05-09rm lists of hereditary wizards and bad users to ensure level playing fieldTed Unangst
ok benno mlarkin tb
2019-04-08macro args and punctuation should be space spearated;Jason McIntyre
from fabio scotoni
2019-04-05Fix hack(6).Anthony J. Bentley
- Write savegames and scorefiles to the current directory instead of /var - Save oc_name and oc_descr alongside oc_uname in all situations - When a levitation potion times out, explicitly float down These patches were contributed last year by "tonypony76"; thanks! ok deraadt@, with added enthusiasm from tedu@
2019-02-26g/c unused robots_roll file.Theo Buehler
From Randy Hartman
2019-02-06missing word found in my treeIngo Schwarze
2019-02-03give the fake latin proverb "per aspera ad astra" in the moreIngo Schwarze
commonly used and metrically and logically more pleasant word order, and fix the wrong translation; translation error reported by Alessandro de Laurenzis on tech@; OK pascal@ jmc@
2019-01-20printing the pinball bonus in the corner is confusing when you lose.Ted Unangst
just let the bonus happen if it does, players will figure it out.
2019-01-20remove some obsolete comments about deleted codeTed Unangst
2019-01-20quick fix to keep the cursor in the corner during space warp.Ted Unangst
less distracting this way.
2019-01-20if the snake ran over the money, print the treasure instead of empty.Ted Unangst
bug noticed by mlarkin
2019-01-06allow q to exit the program.Ted Unangst
ok cheloha deraadt schwarze
2018-12-27convert to unsigned variables to avoid some overflows.Ted Unangst
analysis and patch from David Fifield
2018-12-20Move a badly positioned parenthesis that caused nonsensical movementIngo Schwarze
properties for the Wumpus. The bug has been present since 4.3BSD-Reno and was introduced by Keith Bostic on February 14, 1990 when committing the major rewrite from Dave Taylor. Patch (accompanied by a detailed functional and historical analysis) from David Fifield <david at bamsoftware dot com> on bugs@. With all the bats in these caves, how could a bug possibly survive for twenty-eight years?
2018-10-16More fixes from David Fifield:Theo Buehler
First, fill a missing pixel in the glyph for 'U'. Second, fix an off-by-one in the line output routine. This caused an extra space character to be output at the end of every line. It might have caused a buffer overflow if any glyph had used the entire possible width of 132 pixels, but as it is the widest is only 124 pixels. Third, output blank lines instead of lines full of spaces (the number of spaces was equal to the width of the most recent non-blank line). Finally, add bounds checks to protect against buffer overflows that could arise in case the data table were ever modified to draw out of bounds (characters wider or taller than 132 pixels, or a two-byte code where the second byte is past the end of the table). ok bcallah
2018-10-16Remove unused data table entries: 174 out of 9271 entries of the bitmapTheo Buehler
data table are unused and can be eliminated by rendering al glyphs and re-encoding them. A few more entries can be eliminated through more efficient encoding. Patch generated with a python program by David Fifield. For details see https://marc.info/?l=openbsd-bugs&m=153955110702704&w=2 ok bcallah
2018-09-15Fix fortune underlines and use the right number of underscores in Notes.Anthony J. Bentley
ok sthen@
2018-08-24During our refactor with tedu@ tb@ and myself we moved the score file to theRicardo Mestre
user's home folder and setgid was removed. Therefore it's not possible to have a single score file with all the users anymore but we forgot to change a comment that still implied that. Suggested by tb@ to just delete the comment.
2018-08-24Remove a few too early pledge(2)s on games/ and apply them a little bit laterRicardo Mestre
but with much reduced permissions ("stdio tty" if ncurses based and "stdio" for the ones that only perform basic operations). There's still a few games that we cannot yet remove their fs access, through pledge(2), since they open files on demand and too late, this might get revisited in the future. OK tb@
2018-08-23reduce pledge(2) to "stdio tty" after ncurses initialization. robots(6) uses aRicardo Mestre
scorefile nevertheless an fd is opened way in advance and therefore we can disable any further access to the filesystem. OK tb@
2018-08-23reduce pledge(2) to "stdio tty" after ncurses initialization.Ricardo Mestre
OK tb@
2018-08-09The game is playable without the need to access any files therefore we canRicardo Mestre
effectively disable all fs access by dropping "rpath wpath cpath" from pledge(2) right at the beginning of the program. "looks right" tb@
2018-08-06Drop "rpath" from pledge(2) after ncurses initialization.Ricardo Mestre
Discussed with and OK tb@ OK cheloha@ on previous version
2018-08-05remove duplicate installation of the SIGINT handler;Ingo Schwarze
from Martin Kopta <martin at kopta dot eu>
2018-04-25Use a NUMKEYS macro instead of magic and use a more familiar idiomTheo Buehler
in for loops. ok stsp, bcallah
2018-02-07slightly reduce the difficulty of the adventure game that is readingTed Unangst
the battlestar code by reformatting a few lines. special request from mlarkin so he'll go back to fixing meltdown.
2018-01-23Fix table wrt missing element and `, detailed analysis and diff fromOtto Moerbeek
David Fifield; ok tb@
2018-01-12apostrophe fix;Jason McIntyre
2017-12-24Consolidate printf(3) calls at the end of main().cheloha
Makes reading the classification algorithm easier. ok tb@
2017-12-24Use more libm.cheloha
adj360() is a modulo operation: use fmod(3) to simplify things. Adding 0.5 to the phase to steer implicit truncation is a hack: use lround(3) to simplify things. Product of a discussion with pjanzen@/jca@/tb@ regarding floating-point rounding and the importance of correctly classifying a gibbous moon. ok pjanzen@ jca@ tb@
2017-12-23As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).cheloha
ok tb@ jca@
2017-12-11The code can be simplified by using clock_gettime(2)'s CLOCK_REALTIMETheo Buehler
instead of gettimeofday(2). From Scott Cheloha, ok jca
2017-11-25than -> thenTheo Buehler
from scott cheloha
2017-11-02Straightforward conversion to strtonum. Slight change of behavior in thatTheo Buehler
trailing whitespace is no longer permitted when invoked from stdin. From Scott Cheloha. ok jca
2017-10-27Use <elf.h> instead of <elf_abi.h>Martin Pieuchot
ok jasper@, jca@, deraadt@
2017-08-15typo: on -> ofTheo Buehler
From Scott Cheloha
2017-08-13replace gettimeofday with monotonic gettime. from Scott ChelohaTed Unangst
ok tb
2017-08-10convert source code frequencies to match those in the man pageTed Unangst
2017-08-10Treat backspace as printable in sanitize() for non-UTF8 locales.Todd C. Miller
Fixes printing of fortunes that use a combination of backspace and underbars for underlining in non-UTF8 locales. OK schwarze@
2017-07-13Convert fprintf(stderr, ...) to errx/warnx (with slight change of output).Theo Buehler
From Scott Cheloha
2017-07-13Use an umlaut in Mobius and uppercase one instance of möbius visible inTheo Buehler
bentley's previous commit.
2017-07-13Convert fortunes to UTF-8 from the old "backspace punctuation" method.Anthony J. Bentley
suggested by tedu, ok schwarze@ stsp@ tb@
2017-07-12Inspect LC_CTYPE and if it isn't UTF-8, weed out bytes that are notIngo Schwarze
printable ASCII. That makes using UTF-8 in fortune datfiles safe. Potential usefulness of UTF-8 in fortune datfiles noticed by bentley@. OK tedu@ millert@.
2017-07-11User count checks have been compiled out since 1998, get rid of them.Frederic Cambus
OK mlarkin@
2017-07-10remove misc. depend and yacc nits that no longer matter.Marc Espie
okay millert@
2017-07-09have bsd.prog.mk/bsd.lib.mk generate .y -> .c/.h rules without intermediateMarc Espie
files. This fixes up parallel builds in the default case. FreeBSD does something similar. okay millert@
2017-07-09Remove old junk. From Matthew MartinTheo Buehler
ok bentley
2017-07-07we're not shooting yacceptionMarc Espie
okay millert@
2017-07-01missed BUILDFIRST. Allow stuff to proceed without dependsMarc Espie
as found by krw@
2017-06-30Add missing rot13 function prototypeRicardo Mestre