-/* $NetBSD: display.c,v 1.7 2008/01/28 05:38:53 dholland Exp $ */
+/* $NetBSD: display.c,v 1.10 2012/06/19 05:30:43 dholland Exp $ */
/* display.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: display.c,v 1.7 2008/01/28 05:38:53 dholland Exp $");
+__RCSID("$NetBSD: display.c,v 1.10 2012/06/19 05:30:43 dholland Exp $");
#endif /* not lint */
#include "header.h"
#include "extern.h"
+
#define makecode(_a,_b,_c) (((_a)<<16) + ((_b)<<8) + (_c))
+static void bot_hpx(void);
+static void bot_spellx(void);
+static void botside(void);
static void botsub(int, const char *);
+static void seepage(void);
static int minx, maxx, miny, maxy, k, m;
static char bot1f = 0, bot2f = 0, bot3f = 0;
-char always = 0;
+static char always = 0;
/*
bottomline()
now for the bottom line of the display
*/
void
-bottomline()
+bottomline(void)
{
recalc();
bot1f = 1;
}
void
-bottomhp()
+bottomhp(void)
{
bot2f = 1;
}
void
-bottomspell()
+bottomspell(void)
{
bot3f = 1;
}
void
-bottomdo()
+bottomdo(void)
{
if (bot1f) {
bot3f = bot1f = bot2f = 0;
}
void
-bot_linex()
+bot_linex(void)
{
int i;
if (cbak[SPELLS] <= -50 || (always)) {
called from ogold()
*/
void
-bottomgold()
+bottomgold(void)
{
botsub(makecode(GOLD, 69, 19), "%-6ld");
/* botsub(GOLD,"%-6ld",69,19); */
special routine to update hp and level fields on bottom lines
called in monster.c hitplayer() and spattack()
*/
-void
-bot_hpx()
+static void
+bot_hpx(void)
{
if (c[EXPERIENCE] != cbak[EXPERIENCE]) {
recalc();
/*
special routine to update number of spells called from regen()
*/
-void
-bot_spellx()
+static void
+bot_spellx(void)
{
botsub(makecode(SPELLS, 9, 18), "%2ld");
}
{ WTW, "Wall-Walk" }
};
-void
-botside()
+static void
+botside(void)
{
int i, idx;
for (i = 0; i < 17; i++) {
* If entire lines are being drawn, then they will be cleared first.
*/
/* for limited screen drawing */
-int d_xmin = 0, d_xmax = MAXX, d_ymin = 0, d_ymax = MAXY;
+static int d_xmin = 0, d_xmax = MAXX, d_ymin = 0, d_ymax = MAXY;
void
-draws(xmin, xmax, ymin, ymax)
- int xmin, xmax, ymin, ymax;
+draws(int xmin, int xmax, int ymin, int ymax)
{
int i, idx;
if (xmin == 0 && xmax == MAXX) { /* clear section of screen as
subroutine to redraw the whole screen as the player knows it
*/
-u_char screen[MAXX][MAXY], d_flag; /* template for the screen */
+u_char screen[MAXX][MAXY]; /* template for the screen */
+static u_char d_flag;
void
-drawscreen()
+drawscreen(void)
{
int i, j, kk;
int lastx, lasty; /* variables used to optimize the
subroutine to display a cell location on the screen
*/
void
-showcell(x, y)
- int x, y;
+showcell(int x, int y)
{
int i, j, kk, mm;
if (c[BLINDCOUNT])
used in godirect() in monster.c for missile weapons display
*/
void
-show1cell(x, y)
- int x, y;
+show1cell(int x, int y)
{
if (c[BLINDCOUNT])
return; /* see nothing if blind */
cursor values start from 1 up
*/
void
-showplayer()
+showplayer(void)
{
cursor(playerx + 1, playery + 1);
oldx = playerx;
short diroffx[] = {0, 0, 1, 0, -1, 1, -1, 1, -1};
short diroffy[] = {0, 1, 0, -1, 0, -1, -1, 1, 1};
int
-moveplayer(dir)
- int dir; /* from = present room # direction =
+moveplayer(int dir)
+ /* from = present room # direction =
* [1-north] [2-east] [3-south] [4-west]
* [5-northeast] [6-northwest] [7-southeast]
* [8-southwest] if direction=0, don't
*/
static int lincount, count;
void
-seemagic(arg)
- int arg;
+seemagic(int arg)
{
int i, number = 0;
count = lincount = 0;
/*
* subroutine to paginate the seemagic function
*/
-void
-seepage()
+static void
+seepage(void)
{
if (++count == 3) {
lincount++;