|
|
researchv10 Norman
# include "trek.h"
/**
** visual scan
**/
XY Visdelta[11]
{
-1, -1,
-1, 0,
-1, 1,
0, 1,
1, 1,
1, 0,
1, -1,
0, -1,
-1, -1,
-1, 0,
-1, 1
};
visual()
{
register int ix, iy;
int co;
register XY *v;
if(getintpar("Direction", &co)==0) return;
fixco(&co);
co = (co + 22) / 45;
v = &Visdelta[co];
ix = Sectx + v->x;
iy = Secty + v->y;
if (ix < 0 || ix >= NSECTS || iy < 0 || iy >= NSECTS)
co = '?';
else
co = Sect[ix][iy];
printf("%d,%d %c ", ix, iy, co);
v++;
ix = Sectx + v->x;
iy = Secty + v->y;
if (ix < 0 || ix >= NSECTS || iy < 0 || iy >= NSECTS)
co = '?';
else
co = Sect[ix][iy];
printf("%c ", co);
v++;
ix = Sectx + v->x;
iy = Secty + v->y;
if (ix < 0 || ix >= NSECTS || iy < 0 || iy >= NSECTS)
co = '?';
else
co = Sect[ix][iy];
printf("%c %d,%d\n", co, ix, iy);
Move.delta = 0.05;
Move.free = 0;
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.