#ifndef GMS_TASKS_H
#define GMS_TASKS_H TRUE

/*
**	$VER: tasks.h V0.7B
**
**      (C) Copyright 1996-1997 DreamWorld Productions.
**          All Rights Reserved
*/

/****************************************************************************
** This task structure is lodged into tc_UserData (see exec/tasks.i), so
** do not change that field when using GMS.  A UserData field exists
** here so that you may use it if necessary.  Other than this, DO NOT USE
** ANY GMSTASK FIELDS FOR ANYTHING OTHER THAN DEBUGGING PURPOSES.
*/

struct  GMSTask {
  ULONG VERSION;          /* GT */
  ULONG Stats;            /* Private */
  APTR  UserData;         /* Pointer to user data, no restrictions */
  BYTE  *TaskName;        /* Name of the task, if specified */

  /* Private from here on */
 
  struct MasterPrefs *MasterPrefs;  /* Library preferences */
  struct ScreenPrefs *ScreenPrefs;  /* Screen preferences */
  struct SoundPrefs *SoundPrefs;    /* Sound preferences */
  struct BlitterPrefs;              /* Blitter preferences */
  APTR   ResourceChain;             /* The resource chain, private */
  LONG   ReqStatus;                 /* Private, used internally */
  LONG   BlitKey;                   /* Resource key */
  LONG   AudioKey;                  /* Resource key */
  LONG   ExecNode;                  /* Task's exec node */
  APTR   DestructStack;             /* Stack to use for DestructCode */
  APTR   DestructCode;              /* Pointer to self destruct code routine */
  BYTE   AlertState;                /* Private */
  BYTE   Switched;                  /* Set if task is in Switch() */
  WORD   DebugStep;                 /* Debug tree stepping position */
  BYTE   AwakeSig;                  /* Signal for waking this task */
  BYTE   Pad;                       /* Reserved */
  LONG   TotalData;                 /* Total data memory in use */
  LONG   TotalVideo;                /* Total video memory in use */
  LONG   TotalSound;                /* Total sound memory in use */
  LONG   TotalBlit;                 /* Total blitter memory in use */
};

#endif /* GMS_TASKS_H */
