pkgsrc/games/ularn/patches/patch-af
agc dc08309f80 Initial import of ularn-6.12.92 into the packages collection.
Provided in PR 12072 by Ben Collver (collver@linuxfreemail.com).

Ularn is a fantasy games in which your child has contracted a strange dis-
ease, and none of your home remedies seem to have any effect.  You set
out to find a remedy in a limited amount of time, and to collect gold
along the way of course!

Ularn is based on larn, and adds the concept of character classes.
2001-04-27 15:27:30 +00:00

65 lines
1.5 KiB
Text

$NetBSD: patch-af,v 1.1.1.1 2001/04/27 15:27:30 agc Exp $
--- diag.c.orig Fri Jun 19 13:55:29 1992
+++ diag.c Sat Jan 13 17:52:26 2001
@@ -61,7 +61,7 @@
FILE *dfile;
-diag()
+void diag(void)
{
int i, j;
@@ -75,10 +75,10 @@
fprintf(dfile, "Hit points: %2ld(%2ld)\n", c[HP], c[HPMAX]);
- fprintf(dfile, "gold: %ld Experience: %ld Character level: %d Level in caverns: %ld\n",
- (long) c[GOLD],
- (long) c[EXPERIENCE],
- (long) c[LEVEL],
+ fprintf(dfile, "gold: %ld Experience: %ld Character level: %ld Level in caverns: %d\n",
+ c[GOLD],
+ c[EXPERIENCE],
+ c[LEVEL],
level);
fprintf(dfile, "\nFor the c[] array:\n");
@@ -143,12 +143,12 @@
fprintf(dfile, "\nAvailable potions:\n\n");
for (i = 0; i < MAXPOTION; i++)
- fprintf(dfile, "%20s\n", &potionname[i][1]);
+ fprintf(dfile, "%20s\n", potionname[i]);
fflush(dfile);
fprintf(dfile, "\nAvailable scrolls:\n\n");
for (i = 0; i < MAXSCROLL; i++)
- fprintf(dfile, "%20s\n", &scrollname[i][1]);
+ fprintf(dfile, "%20s\n", scrollname[i]);
fflush(dfile);
fprintf(dfile, "\nSpell list:\n\n");
@@ -184,17 +184,16 @@
/*
draw the whole screen
*/
-diagdrawscreen()
+void diagdrawscreen(void)
{
int i, j, k;
/* east west walls of this line */
for (i = 0; i < MAXY; i++) {
for (j = 0; j < MAXX; j++)
- if (k = mitem[j][i].mon)
- fprintf(dfile, "%c", monstnamelist[k]);
- else
- fprintf(dfile, "%c", objnamelist[item[j][i]]);
+ k = mitem[j][i].mon;
+ fprintf(dfile, "%c",
+ k ? monstnamelist[k] : objnamelist[item[j][i]]);
fprintf(dfile, "\n");
}
}