head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.44 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.42 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.40 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.38 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.36 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.34 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.32 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.30 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.28 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.26 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.24 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.22 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.20 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.18 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.16 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.14 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.12 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.10 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.8 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.6 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.4 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.2 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.1.1.1.0.18 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-2004Q3:1.1.1.1.0.16 pkgsrc-2004Q3-base:1.1.1.1 pkgsrc-2004Q2:1.1.1.1.0.14 pkgsrc-2004Q2-base:1.1.1.1 pkgsrc-2004Q1:1.1.1.1.0.12 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-2003Q4:1.1.1.1.0.10 pkgsrc-2003Q4-base:1.1.1.1 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.2 date 2005.02.28.02.48.56; author ben; state dead; branches; next 1.1; 1.1 date 2001.04.27.15.27.31; author agc; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.04.27.15.27.31; author agc; state Exp; branches; next ; desc @@ 1.2 log @Remove ularn package, as the code is unmaintained and messy. @ text @$NetBSD: patch-ag,v 1.1 2001/04/27 15:27:31 agc Exp $ --- display.c.orig Fri Jun 19 13:55:30 1992 +++ display.c Sat Jan 13 21:53:21 2001 @@@@ -1,4 +1,5 @@@@ /* display.c */ +#include #include "header.h" #include "player.h" #include "itm.h" @@@@ -8,7 +9,7 @@@@ static int minx,maxx,miny,maxy,k,m; static char always=0; char bot1f=0, bot2f=0, bot3f=0; -static char mimicmonst=MIMIC; +static int mimicmonst=MIMIC; #define botsub(idx,x,y,str) \ if (c[(idx)] != cbak[(idx)]) { \ @@@@ -17,7 +18,7 @@@@ lprintf(str,c[(idx)]); \ } -bottomdo() +void bottomdo(void) { if (bot1f) { bot3f=bot1f=bot2f=0; @@@@ -35,12 +36,12 @@@@ } /* update only the gold number on the bottomline, called from ogold() */ -bottomgold() { botsub(GOLD,72,19,"%-8d"); } +void bottomgold(void) { botsub(GOLD,72,19,"%-8d"); } /* update number of spells called from regen() */ -bot_spellx() { botsub(SPELLS,9,18,"%2d"); } +void bot_spellx(void) { botsub(SPELLS,9,18,"%2d"); } -bot_linex() +void bot_linex(void) { int i; char buf[12]; @@@@ -65,7 +66,7 @@@@ /* c[HP], c[HPMAX], c[STRENGTH]+c[STREXTRA], */ /* c[INTELLIGENCE]); */ - sprintf(buf, "%d (%d)", c[HP], c[HPMAX]); + sprintf(buf, "%ld (%ld)", c[HP], c[HPMAX]); /* 12345 111122 222222 3 */ /* 678901 345678 0 */ lprintf("HP: %11s STR=%-2d INT=%-2d ", @@@@ -147,7 +148,7 @@@@ special routine to update hp and level fields on bottom lines called in monster.c hitplayer() and spattack() */ -bot_hpx() +void bot_hpx(void) { if (c[EXPERIENCE] != cbak[EXPERIENCE]) { recalc(); @@@@ -164,26 +165,26 @@@@ int typ; char *string; } bot_data[] = { - STEALTH, "stealth", - UNDEADPRO, "undead pro", - SPIRITPRO, "spirit pro", - CHARMCOUNT, "Charm", - TIMESTOP, "Time Stop", - HOLDMONST, "Hold Monst", - GIANTSTR, "Giant Str", - FIRERESISTANCE,"Fire Resit", - DEXCOUNT, "Dexterity", - STRCOUNT, "Strength", - SCAREMONST, "Scare", - HASTESELF, "Haste Self", - CANCELLATION, "Cancel", - INVISIBILITY, "Invisible", - ALTPRO, "Protect 3", - PROTECTIONTIME, "Protect 2", - WTW, "Wall-Walk" + { STEALTH, "stealth" }, + { UNDEADPRO, "undead pro" }, + { SPIRITPRO, "spirit pro" }, + { CHARMCOUNT, "Charm" }, + { TIMESTOP, "Time Stop" }, + { HOLDMONST, "Hold Monst" }, + { GIANTSTR, "Giant Str" }, + { FIRERESISTANCE, "Fire Resit" }, + { DEXCOUNT, "Dexterity" }, + { STRCOUNT, "Strength" }, + { SCAREMONST, "Scare" }, + { HASTESELF, "Haste Self" }, + { CANCELLATION, "Cancel" }, + { INVISIBILITY, "Invisible" }, + { ALTPRO, "Protect 3" }, + { PROTECTIONTIME, "Protect 2" }, + { WTW, "Wall-Walk" }, }; -botside() +void botside(void) { int i,idx; @@@@ -208,7 +209,7 @@@@ always=0; } -bothp() +void bothp(void) { char buf[12]; @@@@ -216,7 +217,7 @@@@ return; cbak[HP]=c[HP]; cbak[HPMAX]=c[HPMAX]; - sprintf(buf, "%d (%d)", c[HP], c[HPMAX]); + sprintf(buf, "%ld (%ld)", c[HP], c[HPMAX]); cursor(5, 19); lprintf("%11s", buf); } @@@@ -230,7 +231,7 @@@@ d_xmax=MAXX, d_ymin=0, d_ymax=MAXY; /* for limited screen drawing */ -draws(xmin,xmax,ymin,ymax) +void draws(xmin,xmax,ymin,ymax) int xmin,xmax,ymin,ymax; { int i,idx; @@@@ -272,14 +273,14 @@@@ ** ** redraw the whole screen as the player knows it */ -drawscreen() +void drawscreen(void) { int i,j,k; int lastx,lasty; /* used to optimize the object printing */ if (d_xmin==0 && d_xmax==MAXX && d_ymin==0 && d_ymax==MAXY) { d_flag=1; - clear(); /* clear the screen */ + ularn_clear(); /* clear the screen */ } else { d_flag=0; @@@@ -293,7 +294,8 @@@@ if (know[j][i]==0) screen[j][i] = objnamelist[0]; else { - if (k=mitem[j][i].mon) { + k = mitem[j][i].mon; + if (k) { if (k==MIMIC) { if (gtime % 10 == 0) while((mimicmonst = rnd(MAXMONST))==INVISIBLESTALKER); @@@@ -382,7 +384,7 @@@@ ** ** subroutine to display a cell location on the screen */ -showcell(x,y) +void showcell(x,y) int x,y; { int i,j,k,m; @@@@ -459,7 +461,7 @@@@ ** these coordinated are not shown ** used in godirect() in monster.c for missile weapons display */ -show1cell(x,y) +void show1cell(x,y) int x,y; { if (c[BLINDCOUNT]) @@@@ -504,7 +506,7 @@@@ ** subroutine to show where the player is on the screen ** cursor values start from 1 up */ -showplayer() +void showplayer(void) { cursor(playerx+1,playery+1); oldx=playerx; @@@@ -524,7 +526,7 @@@@ char diroffx[] = { 0, 0, 1, 0, -1, 1, -1, 1, -1 }; char diroffy[] = { 0, 1, 0, -1, 0, -1, -1, 1, 1 }; -moveplayer(dir) +int moveplayer(dir) int dir; /* from = present room # direction = [1-north] [2-east] [3-south] [4-west] [5-northeast] [6-northwest] [7-southeast] [8-southwest] @@@@ -589,7 +591,7 @@@@ */ static int lincount,count; -seemagic(arg) +void seemagic(arg) int arg; { int i,number; @@@@ -620,7 +622,7 @@@@ } else { resetscroll(); - clear(); + ularn_clear(); } lprcat("The magic spells you have discovered thus far:\n\n"); @@@@ -647,9 +649,9 @@@@ lprcat("\nThe magic scrolls you have found to date are:\n\n"); count=0; for (i=0; i17) { lincount=0; more(); - clear(); + ularn_clear(); } } } @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @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. @ text @@