summaryrefslogtreecommitdiffstats
path: root/games/hack/hack.track.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-10-21 07:40:27 +0000
committermarkm <markm@FreeBSD.org>2002-10-21 07:40:27 +0000
commite41bd31debce476e2f6ae864651c7380bea2cdbb (patch)
treeb90261e8ce260fee190d0f359aa2884ddf2510de /games/hack/hack.track.c
parent1cdc4d3dd3997f7f78a4a0ff9c52006837b0b5c4 (diff)
downloadFreeBSD-src-e41bd31debce476e2f6ae864651c7380bea2cdbb.zip
FreeBSD-src-e41bd31debce476e2f6ae864651c7380bea2cdbb.tar.gz
Deorbit complete. We dont build these anymore, so into the attic they go.
Diffstat (limited to 'games/hack/hack.track.c')
-rw-r--r--games/hack/hack.track.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/games/hack/hack.track.c b/games/hack/hack.track.c
deleted file mode 100644
index 0062ae9..0000000
--- a/games/hack/hack.track.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
-/* hack.track.c - version 1.0.2 */
-/* $FreeBSD$ */
-
-#include "hack.h"
-
-#define UTSZ 50
-
-coord utrack[UTSZ];
-int utcnt = 0;
-int utpnt = 0;
-
-initrack(){
- utcnt = utpnt = 0;
-}
-
-/* add to track */
-settrack(){
- if(utcnt < UTSZ) utcnt++;
- if(utpnt == UTSZ) utpnt = 0;
- utrack[utpnt].x = u.ux;
- utrack[utpnt].y = u.uy;
- utpnt++;
-}
-
-coord *
-gettrack(x,y) int x,y; {
-int i,cnt,dist;
-coord tc;
- cnt = utcnt;
- for(i = utpnt-1; cnt--; i--){
- if(i == -1) i = UTSZ-1;
- tc = utrack[i];
- dist = (x-tc.x)*(x-tc.x) + (y-tc.y)*(y-tc.y);
- if(dist < 3)
- return(dist ? &(utrack[i]) : 0);
- }
- return(0);
-}
OpenPOWER on IntegriCloud