-
Notifications
You must be signed in to change notification settings - Fork 0
/
AILEADER.HXX
76 lines (63 loc) · 1.8 KB
/
AILEADER.HXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* ========================================================================
Copyright (c) 1990,1996 Synergistic Software
All Rights Reserved
========================================================================
Filename: aileader.hxx
Author: Greg Hightower
======================================================================== */
#if !defined(_AILEADER_H)
#define _AILEADER_H
#include <stdio.h>
#if !defined(_SYSTEM_H)
#include "system.h"
#endif
/* -----------------------------------------------------------------
typedefs
----------------------------------------------------------------- */
class CAvatar;
/* -----------------------------------------------------------------
class definition
----------------------------------------------------------------- */
class LEADER_DATA
{
public:
// Write to Scene File
void mfWriteData(FILE *fp);
// Read from Scene File
LONG mfReadData(FILE * fp);
void mfDelete();
void mfInit(CAvatar *pAvatar);
void mfRecordTrail(CAvatar *pAvatar);
void mfMoveFollowers(CAvatar *pAvatar);
// called before scene file is read
void mfInitVals()
{
sMaxFollowers = 0; // Max followers allowed
hdlSlotList = fERROR; // handle to the slot data
hdlPathDeltas = fERROR; // handle to path point data
sHead = 0; // next avaliable path point
sCount = 0; // current step count
}
SHORT sMaxFollowers;
SHORT hdlSlotList;
SHORT hdlPathDeltas;
SHORT sHead;
SHORT sCount;
LONG DeltaX;
LONG DeltaY;
};
// Cleanup
inline void LEADER_DATA::mfDelete()
{
if (hdlSlotList != fERROR && (SHORT)hdlSlotList != (SHORT)0xDCDC)
{
DisposBlock(hdlSlotList);
hdlSlotList = fERROR;
}
if (hdlPathDeltas != fERROR && (SHORT)hdlPathDeltas != (SHORT)0xDCDC)
{
DisposBlock(hdlPathDeltas);
hdlPathDeltas = fERROR;
}
}
#endif