9front - general discussion about 9front
 help / color / mirror / Atom feed
From: kemal <kemali13@protonmail.com>
To: "9front@9front.org" <9front@9front.org>
Subject: [9front] Re: games/glendy: don't use lucida sans in menus by default
Date: Fri, 02 Apr 2021 19:29:50 +0000	[thread overview]
Message-ID: <TLSaKvRhnxKkhHcIxk1z33Y3VuE88V_NoSNgdzhdI0U-dvmbQjDli72xFc9iHZnITEjqCEt2axugaHi914hkdpIaBuobI6Vetz5jjllgvpU=@protonmail.com> (raw)
In-Reply-To: <UwQEF1wh1b-Twr_cFGp5FLEQaMccLIyRMnSUjlfRw9N-CVu4z80-9MM-bifRov4iz8KohUGnu66kmMKWF4oA5ENBmV9xfjxl5jk7SS8vOKo=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

i have found one bug. when i put glenda in a position like this

(see attachment, excuse my excellent screenshot skills :D. i need
to play a lot)

i somehow win, but the glenda can escape from there. diff renewed
to fix that bug. in addition, i have changed the games manpage
to include more info about glendy.

diff -r cc26fdf57bb2 sys/man/1/games
--- a/sys/man/1/games	Sat Mar 13 14:57:53 2021 +0100
+++ b/sys/man/1/games	Fri Apr 02 22:29:07 2021 +0300
@@ -200,7 +200,9 @@
 add gibberish diagrams, equations and tables.
 .TP
 .B glendy
-Don't let the rabbit escape.
+Don't let the rabbit escape. Button 2 presents a menu that you
+can set the difficulty level from. Button 3 presents a menu
+that you can either play a new game, reset the game or exit.
 .TP
 .B juggle
 Display the juggling
diff -r cc26fdf57bb2 sys/src/games/glendy.c
--- a/sys/src/games/glendy.c	Sat Mar 13 14:57:53 2021 +0100
+++ b/sys/src/games/glendy.c	Fri Apr 02 22:29:07 2021 +0300
@@ -386,11 +386,10 @@
 			nextdir = (nrand(++count) == 0)?dir:nextdir;
 		}
 	}
-	if(min < 100)
+	if(min <= 100)
 		domove(nextdir, p.x, p.y);
-	else
+	else
 		finished = Won;
-
 	if(eqpt(findglenda(), Pt(-1, -1)))
 		finished = Lost;
 }
@@ -473,11 +472,7 @@

 	allocimages();
 	initlevel();	/* must happen before "eresized" */
-	eresized(0);
-
-	fontname = "/lib/font/bit/lucidasans/unicode.8.font";
-	if((font = openfont(display, fontname)) == nil)
-		sysfatal("font '%s' not found", fontname);
+	eresized(0);

 	for(;;) {
 		e = event(&ev);

[-- Attachment #2: unknown.png --]
[-- Type: image/png, Size: 2855 bytes --]

  reply	other threads:[~2021-04-02 20:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 18:34 [9front] " kemal
2021-04-02 19:29 ` kemal [this message]
2021-04-02 19:51   ` [9front] " kemal
2021-04-02 19:56     ` kemal
2021-04-02 20:07       ` kemal
2021-04-02 20:20         ` cinap_lenrek
2021-04-02 20:05   ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='TLSaKvRhnxKkhHcIxk1z33Y3VuE88V_NoSNgdzhdI0U-dvmbQjDli72xFc9iHZnITEjqCEt2axugaHi914hkdpIaBuobI6Vetz5jjllgvpU=@protonmail.com' \
    --to=kemali13@protonmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).