summaryrefslogtreecommitdiffstats
path: root/larn
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-07-13 20:21:32 +0000
committerchristos <christos@NetBSD.org>1997-07-13 20:21:32 +0000
commitc4681dc027d7cdf9019c8e8af1ee47dc45446afd (patch)
tree1d922bff58f97096e0fa5cfe8d743f4ff8444291 /larn
parent3638c6860decfacc7974156434d4dfdd31a47443 (diff)
downloadbsdgames-darwin-c4681dc027d7cdf9019c8e8af1ee47dc45446afd.tar.gz
bsdgames-darwin-c4681dc027d7cdf9019c8e8af1ee47dc45446afd.tar.zst
bsdgames-darwin-c4681dc027d7cdf9019c8e8af1ee47dc45446afd.zip
gtime -> gltime to avoid conflict in time.h
Diffstat (limited to 'larn')
-rw-r--r--larn/create.c4
-rw-r--r--larn/data.c6
-rw-r--r--larn/diag.c8
-rw-r--r--larn/header.h4
-rw-r--r--larn/main.c4
-rw-r--r--larn/movem.c6
-rw-r--r--larn/object.c10
-rw-r--r--larn/regen.c4
-rw-r--r--larn/scores.c4
-rw-r--r--larn/store.c14
10 files changed, 32 insertions, 32 deletions
diff --git a/larn/create.c b/larn/create.c
index c8b04a70..3bba976e 100644
--- a/larn/create.c
+++ b/larn/create.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: create.c,v 1.4 1997/03/29 20:42:17 thorpej Exp $";
+static char rcsid[] = "$NetBSD: create.c,v 1.5 1997/07/13 20:21:32 christos Exp $";
#endif /* not lint */
/* create.c Larn is copyrighted 1986 by Noah Morgan. */
@@ -32,7 +32,7 @@ makeplayer()
}
playerx=rnd(MAXX-2); playery=rnd(MAXY-2);
oldx=0; oldy=25;
- gtime=0; /* time clock starts at zero */
+ gltime=0; /* time clock starts at zero */
cbak[SPELLS] = -50;
for (i=0; i<6; i++) c[i]=12; /* make the attributes, ie str, int, etc. */
recalc();
diff --git a/larn/data.c b/larn/data.c
index 811e9a05..7f57a15b 100644
--- a/larn/data.c
+++ b/larn/data.c
@@ -1,4 +1,4 @@
-/* $NetBSD: data.c,v 1.6 1997/03/29 20:42:18 thorpej Exp $ */
+/* $NetBSD: data.c,v 1.7 1997/07/13 20:21:33 christos Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)data.c 5.3 (Berkeley) 5/13/91";
#else
-static char rcsid[] = "$NetBSD: data.c,v 1.6 1997/03/29 20:42:18 thorpej Exp $";
+static char rcsid[] = "$NetBSD: data.c,v 1.7 1997/07/13 20:21:33 christos Exp $";
#endif
#endif /* not lint */
@@ -155,7 +155,7 @@ short lasthx=0,lasthy=0; /* location of monster last hit by player */
short nobeep=0; /* true if program is not to beep */
unsigned long randx=33601; /* the random number seed */
long initialtime=0; /* time playing began */
-long gtime=0; /* the clock for the game */
+long gltime=0; /* the clock for the game */
long outstanding_taxes=0; /* present tax bill from score file */
long c[100],cbak[100]; /* the character description arrays */
int enable_scroll=0; /* constant for enabled/disabled scrolling regn */
diff --git a/larn/diag.c b/larn/diag.c
index e9ca5953..26324ad3 100644
--- a/larn/diag.c
+++ b/larn/diag.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: diag.c,v 1.6 1995/04/24 12:23:49 cgd Exp $";
+static char rcsid[] = "$NetBSD: diag.c,v 1.7 1997/07/13 20:21:34 christos Exp $";
#endif /* not lint */
/* diag.c Larn is copyrighted 1986 by Noah Morgan. */
@@ -171,7 +171,7 @@ savegame(fname)
times(&cputime); /* get cpu time */
c[CPUTIME] += (cputime.tms_utime+cputime.tms_stime)/60;
lwrite((char*)&c[0],100*sizeof(long));
- lprint((long)gtime); lprc(level);
+ lprint((long)gltime); lprc(level);
lprc(playerx); lprc(playery);
lwrite((char*)iven,26); lwrite((char*)ivenarg,26*sizeof(short));
for (k=0; k<MAXSCROLL; k++) lprc(scrollname[k][0]);
@@ -213,7 +213,7 @@ restoregame(fname)
if (beenhere[k])
lrfill((char*)&cell[k*MAXX*MAXY],sizeof(struct cel)*MAXY*MAXX);
- lrfill((char*)&c[0],100*sizeof(long)); gtime = lrint();
+ lrfill((char*)&c[0],100*sizeof(long)); gltime = lrint();
level = c[CAVELEVEL] = lgetc();
playerx = lgetc(); playery = lgetc();
lrfill((char*)iven,26); lrfill((char*)ivenarg,26*sizeof(short));
@@ -271,7 +271,7 @@ restoregame(fname)
c[EXPERIENCE] = skill[24];
raiseexperience((long)tmp);
}
- getlevel(); lasttime=gtime;
+ getlevel(); lasttime=gltime;
}
/*
diff --git a/larn/header.h b/larn/header.h
index 2389d587..c3b8e392 100644
--- a/larn/header.h
+++ b/larn/header.h
@@ -1,4 +1,4 @@
-/* $NetBSD: header.h,v 1.9 1997/03/29 20:42:20 thorpej Exp $ */
+/* $NetBSD: header.h,v 1.10 1997/07/13 20:21:35 christos Exp $ */
/* header.h Larn is copyrighted 1986 by Noah Morgan. */
@@ -349,7 +349,7 @@ extern short iarg[MAXX][MAXY],ivenarg[],lasthx,lasthy,lastnum,lastpx,lastpy;
extern short nobeep,oldx,oldy,playerx,playery,level;
extern int dayplay,enable_scroll,srcount,yrepcount,userid,wisid,lfd,fd;
extern uid_t uid, euid;
-extern long initialtime,outstanding_taxes,skill[],gtime,c[],cbak[];
+extern long initialtime,outstanding_taxes,skill[],gltime,c[],cbak[];
extern unsigned long randx;
extern struct cel *cell;
extern struct monst monster[];
diff --git a/larn/main.c b/larn/main.c
index e691471d..1517c787 100644
--- a/larn/main.c
+++ b/larn/main.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: main.c,v 1.9 1996/05/22 00:36:09 mrg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.10 1997/07/13 20:21:36 christos Exp $";
#endif /* not lint */
/* main.c */
@@ -258,7 +258,7 @@ qshowstr()
{ for (i=22; i<84; i++)
for (j=0; j<=k; j++) if (i==iven[j]) show3(j); k=0; }
- lprintf("\nElapsed time is %d. You have %d mobuls left",(long)((gtime+99)/100+1),(long)((TIMELIMIT-gtime)/100));
+ lprintf("\nElapsed time is %d. You have %d mobuls left",(long)((gltime+99)/100+1),(long)((TIMELIMIT-gltime)/100));
more(); nosignal=sigsav;
}
diff --git a/larn/movem.c b/larn/movem.c
index 82b361e3..6f88ea9b 100644
--- a/larn/movem.c
+++ b/larn/movem.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: movem.c,v 1.3 1995/03/23 08:33:58 cgd Exp $";
+static char rcsid[] = "$NetBSD: movem.c,v 1.4 1997/07/13 20:21:37 christos Exp $";
#endif /* not lint */
/*
@@ -102,7 +102,7 @@ movemt(i,j)
switch(monst=mitem[i][j]) /* for half speed monsters */
{
case TROGLODYTE: case HOBGOBLIN: case METAMORPH: case XVART:
- case INVISIBLESTALKER: case ICELIZARD: if ((gtime & 1) == 1) return;
+ case INVISIBLESTALKER: case ICELIZARD: if ((gltime & 1) == 1) return;
};
if (c[SCAREMONST]) /* choose destination randomly if scared */
@@ -237,7 +237,7 @@ mmove(aa,bb,cc,dd)
};
if (tmp == TROLL) /* if a troll regenerate him */
- if ((gtime & 1) == 0)
+ if ((gltime & 1) == 0)
if (monster[tmp].hitpoints > hitp[cc][dd]) hitp[cc][dd]++;
if (i==OTRAPARROW) /* arrow hits monster */
diff --git a/larn/object.c b/larn/object.c
index 6f701bff..7ee92633 100644
--- a/larn/object.c
+++ b/larn/object.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: object.c,v 1.6 1995/04/22 07:34:09 cgd Exp $";
+static char rcsid[] = "$NetBSD: object.c,v 1.7 1997/07/13 20:21:38 christos Exp $";
#endif /* not lint */
/* object.c Larn is copyrighted 1986 by Noah Morgan. */
@@ -576,7 +576,7 @@ read_scroll(typ)
case 6: c[AGGRAVATE]+=800; return; /* aggravate monsters */
- case 7: gtime += (i = rnd(1000) - 850); /* time warp */
+ case 7: gltime += (i = rnd(1000) - 850); /* time warp */
if (i>=0) lprintf("\nYou went forward in time by %d mobuls",(long)((i+99)/100));
else lprintf("\nYou went backward in time by %d mobuls",(long)(-(i+99)/100));
adjtime((long)i); /* adjust time for time warping */
@@ -763,7 +763,7 @@ ohome()
iven[i]=0; /* remove the potion of cure dianthroritis from inventory */
clear(); lprcat("Congratulations. You found a potion of cure dianthroritis.\n");
lprcat("\nFrankly, No one thought you could do it. Boy! Did you surprise them!\n");
- if (gtime>TIMELIMIT)
+ if (gltime>TIMELIMIT)
{
lprcat("\nThe doctor has the sad duty to inform you that your daughter died!\n");
lprcat("You didn't make it in time. In your agony, you kill the doctor,\nyour wife, and yourself! Too bad!\n");
@@ -784,7 +784,7 @@ ohome()
{
clear(); lprintf("Welcome home %s. Latest word from the doctor is not good.\n",logname);
- if (gtime>TIMELIMIT)
+ if (gltime>TIMELIMIT)
{
lprcat("\nThe doctor has the sad duty to inform you that your daughter died!\n");
lprcat("You didn't make it in time. In your agony, you kill the doctor,\nyour wife, and yourself! Too bad!\n");
@@ -792,7 +792,7 @@ ohome()
}
lprcat("\nThe diagnosis is confirmed as dianthroritis. He guesses that\n");
- lprintf("your daughter has only %d mobuls left in this world. It's up to you,\n",(long)((TIMELIMIT-gtime+99)/100));
+ lprintf("your daughter has only %d mobuls left in this world. It's up to you,\n",(long)((TIMELIMIT-gltime+99)/100));
lprintf("%s, to find the only hope for your daughter, the very rare\n",logname);
lprcat("potion of cure dianthroritis. It is rumored that only deep in the\n");
lprcat("depths of the caves can this potion be found.\n\n\n");
diff --git a/larn/regen.c b/larn/regen.c
index 2f68643a..1bfe7b6b 100644
--- a/larn/regen.c
+++ b/larn/regen.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: regen.c,v 1.3 1995/03/23 08:34:11 cgd Exp $";
+static char rcsid[] = "$NetBSD: regen.c,v 1.4 1997/07/13 20:21:39 christos Exp $";
#endif /* not lint */
/* regen.c Larn is copyrighted 1986 by Noah Morgan. */
@@ -25,7 +25,7 @@ regen()
if (d[STRENGTH]<3) { d[STRENGTH]=3; flag=1; }
if ((d[HASTESELF]==0) || ((d[HASTESELF] & 1) == 0))
- gtime++;
+ gltime++;
if (d[HP] != d[HPMAX])
if (d[REGENCOUNTER]-- <= 0) /* regenerate hit points */
diff --git a/larn/scores.c b/larn/scores.c
index 1111cb41..6c5724e8 100644
--- a/larn/scores.c
+++ b/larn/scores.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$NetBSD: scores.c,v 1.8 1996/10/09 00:45:37 jtc Exp $";
+static char rcsid[] = "$NetBSD: scores.c,v 1.9 1997/07/13 20:21:39 christos Exp $";
#endif /* not lint */
/* scores.c Larn is copyrighted 1986 by Noah Morgan.
@@ -407,7 +407,7 @@ new1sub(score,i,whoo,taxes)
{
strcpy(p->who,whoo); p->score=score;
p->hardlev=c[HARDGAME]; p->suid=userid;
- p->timeused=gtime/100;
+ p->timeused=gltime/100;
}
}
diff --git a/larn/store.c b/larn/store.c
index 3f49ba61..24226e09 100644
--- a/larn/store.c
+++ b/larn/store.c
@@ -1,4 +1,4 @@
-/* $NetBSD: store.c,v 1.4 1995/03/23 08:34:20 cgd Exp $ */
+/* $NetBSD: store.c,v 1.5 1997/07/13 20:21:41 christos Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)store.c 5.4 (Berkeley) 5/13/91";
#else
-static char rcsid[] = "$NetBSD: store.c,v 1.4 1995/03/23 08:34:20 cgd Exp $";
+static char rcsid[] = "$NetBSD: store.c,v 1.5 1997/07/13 20:21:41 christos Exp $";
#endif
#endif /* not lint */
@@ -395,7 +395,7 @@ oschool()
time_used += coursetime[i-'a']*100;
if (time_used > 0)
{
- gtime += time_used;
+ gltime += time_used;
course[i-'a']++; /* remember that he has taken that course */
c[HP] = c[HPMAX]; c[SPELLS] = c[SPELLMAX]; /* he regenerated */
@@ -455,12 +455,12 @@ ointerest()
if (c[BANKACCOUNT]<0) c[BANKACCOUNT] = 0;
else if ((c[BANKACCOUNT]>0) && (c[BANKACCOUNT]<500000))
{
- i = (gtime-lasttime)/100; /* # mobuls elapsed */
+ i = (gltime-lasttime)/100; /* # mobuls elapsed */
while ((i-- > 0) && (c[BANKACCOUNT]<500000))
c[BANKACCOUNT] += c[BANKACCOUNT]/250;
if (c[BANKACCOUNT]>500000) c[BANKACCOUNT]=500000; /* interest limit */
}
- lasttime = (gtime/100)*100;
+ lasttime = (gltime/100)*100;
}
static short gemorder[26]={0}; /* the reference to screen location for each */
@@ -479,7 +479,7 @@ obanksub()
if (iven[i]==OLARNEYE)
{
- gemvalue[i]=250000-((gtime*7)/100)*100;
+ gemvalue[i]=250000-((gltime*7)/100)*100;
if (gemvalue[i]<50000) gemvalue[i]=50000;
}
else gemvalue[i] = (255&ivenarg[i])*100;
@@ -568,7 +568,7 @@ appraise(gemstone)
lprcat("yes.\n Just one moment please \n"); nap(1000);
if (gemstone==OLARNEYE)
{
- amt = 250000-((gtime*7)/100)*100;
+ amt = 250000-((gltime*7)/100)*100;
if (amt<50000) amt=50000;
}
else amt = (255 & ivenarg[j]) * 100;