//---------------------------------------------------------------------------
// Manage all the links between characters
//---------------------------------------------------------------------------

#define  MAXLINKS  50
#define  MAXATTACH 90

#ifndef CHARACLINK
   #define CHARACLINK
   typedef struct
   {
      Character *Caller;
      Character *Receiver;
      short CallerAction;
      short ReceiverAction;
      char When;
      char Inverse;
      short CoorX;
      short CoorY;
   } LINK;
#endif

extern LINK       LinkList[MAXLINKS];
extern short      NbrLinks;
extern short      NbrAttaches;
extern Character  *Attach[MAXATTACH];
extern Character  *AttachTo[MAXATTACH];
extern int        AttachDX[MAXATTACH];
extern int        AttachDY[MAXATTACH];

void Init_Links (void);
void AddLink (Character *caller, Character *receiver, int caction,
              int raction, int when, int inv, int coorx, int coory);
void LinksDumpData (void);
void Init_Attaches (void);
void AddAttach (Character *attach, Character *attachto, int deltax, int deltay);
void Dettach (Character *chara);
