(diroff, dirch, routech): Declare with array size. Define without.
This requires moving routech[] declaration from map.h to path.h. Get rid of s_char.
This commit is contained in:
parent
e59f9a43d1
commit
ae251d0a58
3 changed files with 8 additions and 9 deletions
|
@ -39,8 +39,6 @@
|
||||||
|
|
||||||
#define MAPWIDTH(persec) ((WORLD_X/2)*(persec + 1)+1)
|
#define MAPWIDTH(persec) ((WORLD_X/2)*(persec + 1)+1)
|
||||||
|
|
||||||
extern s_char *routech[7][2];
|
|
||||||
|
|
||||||
extern void blankfill(s_char *, register struct range *, int);
|
extern void blankfill(s_char *, register struct range *, int);
|
||||||
/* src/lib/subs/border.c */
|
/* src/lib/subs/border.c */
|
||||||
extern int map_set(natid, coord, coord, s_char, int);
|
extern int map_set(natid, coord, coord, s_char, int);
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
#ifndef _PATH_H_
|
#ifndef _PATH_H_
|
||||||
#define _PATH_H_
|
#define _PATH_H_
|
||||||
|
|
||||||
#include "misc.h" /* s_char coord etc. */
|
#include "misc.h"
|
||||||
#include "sect.h" /* struct sctstr */
|
#include "sect.h"
|
||||||
#include "xy.h"
|
#include "xy.h"
|
||||||
|
|
||||||
/* direction indices */
|
/* direction indices */
|
||||||
|
@ -52,8 +52,9 @@
|
||||||
#define DIR_LAST 6
|
#define DIR_LAST 6
|
||||||
|
|
||||||
extern signed char dirindex['z'-'a'+1];
|
extern signed char dirindex['z'-'a'+1];
|
||||||
extern int diroff[][2];
|
extern int diroff[DIR_MAP+1][2];
|
||||||
extern s_char dirch[];
|
extern char dirch[DIR_MAP+2];
|
||||||
|
extern char *routech[DIR_LAST+1][2];
|
||||||
|
|
||||||
/* src/lib/subs/paths.c */
|
/* src/lib/subs/paths.c */
|
||||||
extern char *getpath(char *, char *, coord, coord, int, int, int);
|
extern char *getpath(char *, char *, coord, coord, int, int, int);
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "misc.h"
|
#include "path.h"
|
||||||
|
|
||||||
/* must agree with DIR_ defines */
|
/* must agree with DIR_ defines */
|
||||||
s_char dirch[] = {
|
char dirch[] = {
|
||||||
'h', /* stop */
|
'h', /* stop */
|
||||||
'u', /* up-right */
|
'u', /* up-right */
|
||||||
'j', /* right */
|
'j', /* right */
|
||||||
|
@ -61,7 +61,7 @@ signed char dirindex[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* must agree with dirch[] and DIR_ defines */
|
/* must agree with dirch[] and DIR_ defines */
|
||||||
s_char *routech[7][2] = {
|
char *routech[][2] = {
|
||||||
{" ", "$ $"},
|
{" ", "$ $"},
|
||||||
{" /", "$ /"},
|
{" /", "$ /"},
|
||||||
{" >", "$ >"},
|
{" >", "$ >"},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue