From: lidl@sura.net (Kurt J. Lidl)
Subject: Re: tagman
Organization: SURAnet -- 8400 Baltimore Blvd, College Park, MD 20740
Date: Fri, 10 Apr 1992 14:17:04 GMT

In article <1992Apr10.044501.4301@ringer.cs.utsa.edu> afriedma@ringer.cs.utsa.edu (Ariel Friedman) writes:
>Does anyone have a copy of tagman.c that compiles?  Mine gets
>a type mis-match error detected for IsApproaching, 
>IsClosing, and DeltaLoc.  I'm running on Sun 4.1.1, OpenWindows 2.

Well, we never had problems on a sun before, but here are the diffs from
what I think the last released version of tagman was and what are currently
in the source tree.  You will need to throw a -DHAS_SINCOS into your
compile flags also...

Matt may have other suggestions as to what should be done.

								-Kurt

diff -r1.9 tagman.c
23a24,31
> #ifndef FLOAT
> #define FLOAT float
> #endif
>
> #ifndef DOUBLE
> #define DOUBLE double
> #endif
>
356c364
< static float frand PROTO((double maxr));
---
> static FLOAT frand PROTO((FLOAT maxr));
359,361c367,369
< static int NeedFuel PROTO((double fraction));
< static int NeedArmor PROTO((double fraction));
< static int NeedAmmo PROTO((double fraction));
---
> static int NeedFuel PROTO((DOUBLE fraction));
> static int NeedArmor PROTO((DOUBLE fraction));
> static int NeedAmmo PROTO((DOUBLE fraction));
366c374
< static int VectorsCross PROTO((Coor x1, Coor y1, double xs1, double ys1, Coor x2
, Coor y2, double xs2, double ys2));
---
> static int VectorsCross PROTO((Coor x1, Coor y1, DOUBLE xs1, DOUBLE ys1, Coor x2
, Coor y2, DOUBLE xs2, DOUBLE ys2));
387c395
< static float GetDodgeSpeed PROTO((Environment *pEnv, float fDefault));
---
> static FLOAT GetDodgeSpeed PROTO((Environment *pEnv, FLOAT fDefault));
861c869
< #ifndef NO_SINCOS
---
> #ifdef HAS_SINCOS
1704c1712
<     memcpy(pEnv->prevTarget, pEnv->target, sizeof(Vehicle_info));
---
>     memcpy(&pEnv->prevTarget, &pEnv->target, sizeof(Vehicle_info));
2333,2334c2341,2342
< static float frand(maxr)
< float maxr;                                           /* maximum value */
---
> static FLOAT frand(maxr)
> FLOAT maxr;                                           /* maximum value */
2367c2375
< double fraction;                              /* I need it if below this */
---
> DOUBLE fraction;                              /* I need it if below this */
2374c2382
< double fraction;                              /* I need it if below this */
---
> DOUBLE fraction;                              /* I need it if below this */
2390c2398
< double fraction;                              /* I need it if below this */
---
> DOUBLE fraction;                              /* I need it if below this */
2685c2693
< double xs1, ys1;                                      /* speeds of first vector
*/
---
> DOUBLE xs1, ys1;                                      /* speeds of first vector
*/
2687c2695
< double xs2, ys2;                                      /* speeds of second vector
 */
---
> DOUBLE xs2, ys2;                                      /* speeds of second vector
 */
3734c3742
< static float GetDodgeSpeed(pEnv, fDefault)
---
> static FLOAT GetDodgeSpeed(pEnv, fDefault)
3736c3744
< float fDefault;
---
> FLOAT fDefault;
-- 
/* Kurt J. Lidl (lidl@sura.net)       | Unix is the answer, but only if you */
/* X.500: Power Tools for Power Fools | phrase the question very carefully. */
Newsgroups: rec.games.xtank.programmer