home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 274.lha / SimGen_Src / CBMREADPICT.h < prev    next >
C/C++ Source or Header  |  1989-07-26  |  2KB  |  81 lines

  1. /* myreadpict.h */
  2.  
  3. #ifndef MYREADPICT_H
  4. #define MYREADPICT_H
  5.  
  6. #ifndef ILBM_H
  7. #include <iff/ilbm.h>
  8. #endif
  9.  
  10. #ifndef GRAPHICS_GFX_H
  11. #include <graphics/gfx.h>
  12. #endif
  13.  
  14. #ifndef PICTURE_H
  15. #include "picture.h"
  16. #endif
  17.  
  18. #define EXDepth 6        /* Maximum depth (6=HAM) */
  19. #define maxColorReg 32
  20. #define maxCycles   8
  21. #define RNG_NORATE  36   /* Dpaint uses this rate to mean non-active */
  22.  
  23. typedef struct {
  24.    ULONG ViewModes;
  25.    } CamgChunk;
  26.  
  27. typedef struct {
  28.    WORD  pad1;   /* future exp - store 0 here */
  29.    WORD  rate;   /* 60/sec=16384, 30/sec=8192, 1/sec=16384/60=273 */
  30.    WORD  active; /* lo bit 0=no cycle, 1=yes; next bit 1=rvs */
  31.    UBYTE low;    /* range lower */
  32.    UBYTE high;   /* range upper */
  33.    } CrngChunk;
  34.  
  35. typedef struct {
  36.    WORD  direction;  /* 0=don't cycle, 1=forward, -1=backwards */
  37.    UBYTE start;      /* range lower */
  38.    UBYTE end;        /* range upper */
  39.    LONG  seconds;    /* seconds between cycling */
  40.    LONG  microseconds; /* msecs between cycling */
  41.    WORD  pad;        /* future exp - store 0 here */
  42.    } CcrtChunk;
  43.  
  44.  
  45. #define GetCAMG(context, camg)  \
  46.     IFFReadBytes(context, (BYTE *)camg, sizeof(CamgChunk))
  47.  
  48. #define ID_CRNG  MakeID('C','R','N','G')
  49. #define GetCRNG(context, crng)  \
  50.     IFFReadBytes(context, (BYTE *)crng, sizeof(CrngChunk))
  51.  
  52. #define ID_CCRT  MakeID('C','C','R','T')
  53. #define GetCCRT(context, ccrt)  \
  54.     IFFReadBytes(context, (BYTE *)ccrt, sizeof(CcrtChunk))
  55.  
  56.  
  57. typedef struct {
  58.     ClientFrame    clientFrame;
  59.     UBYTE        foundBMHD;
  60.     BitMapHeader    bmHdr;
  61.     /*
  62.     ** If you want to read any other property chunks, e.g. GRAB or CAMG, add
  63.     ** fields to this record to store them.
  64.     */
  65.     Picture        *pic;
  66.     NewImage    *ni;
  67.    } ILBMFrame;
  68.  
  69. typedef UBYTE *UBytePtr;
  70.  
  71. #ifdef FDwAT
  72. extern IFFP myReadPicture(LONG, ILBMFrame *);
  73. extern struct BitMap *getBitMap(ILBMFrame *);
  74. #else 
  75. extern IFFP myReadPicture();
  76. extern struct BitMap *getBitMap();
  77. #endif
  78.  
  79. #endif MYREADPICT_H
  80.  
  81.