#ifndef SYSTEM_MISC_H
#define SYSTEM_MISC_H TRUE

/*
**  $VER: misc.h V1.0
**
**  (C) Copyright 1996-1998 DreamWorld Productions.
**      All Rights Reserved.
**
*/

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

#ifndef FILES_FILES_H
#include <files/files.h>
#endif

/****************************************************************************
** Object Referencing structure.
*/

#define VER_REFERENCE  1
#define TAGS_REFERENCE ((ID_SPCTAGS<<16)|ID_REFERENCE)

struct Reference {
  struct Head Head;       /* [00] Standard header */
  struct Reference *Next; /* [12] Next reference */
  struct Reference *Prev; /* [16] Previous reference */
  WORD   ClassID;         /* [20] ID of the class */
  WORD   Pad;             /* [22] Reserved */
  BYTE   *ClassName;      /* [24] Name of the class */
  BYTE   *ModName;        /* [28] Name of the module containing the object */

  #ifdef _DCC
    LONG (*CheckFile)(__A0 struct File *, __A1 APTR Buffer);
  #else
   #ifdef __SASC
    __asm  LONG (*CheckFile)(register __a0 struct File *, register __a1 APTR Buffer);
   #else
    LONG (*CheckFile)(struct File *, APTR Buffer);
   #endif
  #endif

  WORD   ModNumber;   /* [36] Module ID number */

  /* Private fields below */

  struct Segment *prvSegment;
  struct Module  *prvModule;
};

#define REFA_ClassID   (TWORD|20)
#define REFA_ClassName (TAPTR|24)
#define REFA_ModName   (TAPTR|28)
#define REFA_CheckFile (TAPTR|32)
#define REFA_ModNumber (TWORD|36)

/****************************************************************************
** Universal Structure, used in the CopyStructure() routine.
*/

#define VER_UNIVERSE  1
#define TAGS_UNIVERSE ((ID_SPCTAGS<<16)|ID_UNIVERSE)

struct Universe {
  struct Head Head;
  LONG   *Palette;
  WORD   Planes;
  WORD   Width;
  WORD   Height;
  WORD   InsideWidth;
  WORD   InsideByteWidth;
  WORD   InsideHeight;
  struct DPKTask *Task;
  LONG   Frequency;
  LONG   AmtColours;
  WORD   ScrMode;
  WORD   BmpType;
  APTR   Source;
  struct JoyData *JoyData;
  struct Raster  *Raster;
  WORD   XOffset;
  WORD   YOffset;
  WORD   InsideYOffset;
  WORD   InsideXOffset;
  WORD   Channel;
  WORD   Priority;
  LONG   Length;
  WORD   Octave;
  WORD   Volume;
};

#endif /* SYSTEM_MISC_H */
