#ifndef SYSTEM_TASKS_H
#define SYSTEM_TASKS_H TRUE

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

#ifndef DPKERNEL_H
#include <games/dpkernel.h>
#endif

/****************************************************************************
** A UserData field exists here which you may use if necessary.  Other than
** this, DO NOT USE ANY TASK FIELDS FOR ANYTHING OTHER THAN DEBUGGING
** PURPOSES.
*/

#define TASKVERSION 1
#define TAGS_TASK   ((ID_SPCTAGS<<16)|ID_TASK)

struct  DPKTask {
  struct Head Head;                 /* Standard header */
  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 */
  APTR   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 */
};

#define CS_OCS 0
#define CS_ECS 1
#define CS_AGA 2

#endif /* SYSTEM_TASKS_H */
