home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 377a.lha / libraries / graphics / sprite_bob_anim / animtools / animtools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1980-02-04  |  4.0 KB  |  107 lines

  1. /* Copyright (c) 1990 Commodore-Amiga, Inc.
  2.  *
  3.  * This example is provided in electronic form by Commodore-Amiga, Inc. for
  4.  * use with the 1.3 revisions of the Addison-Wesley Amiga reference manuals. 
  5.  * The 1.3 Addison-Wesley Amiga Reference Manual series contains additional
  6.  * information on the correct usage of the techniques and operating system
  7.  * functions presented in this example.  The source and executable code of
  8.  * this example may only be distributed in free electronic form, via bulletin
  9.  * board or as part of a fully non-commercial and freely redistributable
  10.  * diskette.  Both the source and executable code (including comments) must
  11.  * be included, without modification, in any copy.  This example may not be
  12.  * published in printed form or distributed with any commercial product.
  13.  * However, the programming techniques and support routines set forth in
  14.  * this example may be used in the development of original executable
  15.  * software products for Commodore Amiga computers.
  16.  * All other rights reserved.
  17.  * This example is provided "as-is" and is subject to change; no warranties
  18.  * are made.  All use is at your own risk.  No liability or responsibility
  19.  * is assumed.
  20.  */
  21.  
  22. #ifndef GELTOOLS_H
  23. #define GELTOOLS_H
  24.  
  25. /* these data structures are used by the functions in animtools.c to
  26. ** allow for an easier interface to the animation system.
  27. */
  28.  
  29. /* data structure to hold information for a new vsprite.
  30. ** note that:
  31. **     NEWVSPRITE myNVS;
  32. ** is equivalent to:
  33. **     struct newVSprite myNVS;
  34. */
  35. typedef struct newVSprite
  36.     {
  37.     WORD           *nvs_Image;        /* image data for the vsprite    */
  38.     WORD           *nvs_ColorSet;    /* color array for the vsprite    */
  39.     SHORT            nvs_WordWidth;    /* width in words                */
  40.     SHORT            nvs_LineHeight;    /* height in lines                */
  41.     SHORT            nvs_ImageDepth;    /* depth of the image            */
  42.     SHORT            nvs_X;            /* initial x position            */
  43.     SHORT            nvs_Y;            /* initial y position            */
  44.     SHORT            nvs_Flags;        /* vsprite flags                */
  45.     USHORT            nvs_HitMask;    /* Hit mask.                    */
  46.     USHORT            nvs_MeMask;        /* Me mask.                        */
  47.     } NEWVSPRITE;
  48.  
  49. /* data structure to hold information for a new bob.
  50. ** note that:
  51. **     NEWBOB myNBob;
  52. ** is equivalent to:
  53. **     struct newBob myNBob;
  54. */
  55. typedef struct newBob
  56.     {
  57.     WORD       *nb_Image;        /* image data for the bob        */
  58.     SHORT        nb_WordWidth;    /* width in words                */
  59.     SHORT        nb_LineHeight;    /* height in lines                */
  60.     SHORT        nb_ImageDepth;    /* depth of the image            */
  61.     SHORT        nb_PlanePick;    /* planes that get image data    */
  62.     SHORT        nb_PlaneOnOff;    /* unused planes to turn on        */
  63.     SHORT        nb_BFlags;        /* bob flags                    */
  64.     SHORT        nb_DBuf;        /* 1=double buf, 0=not            */
  65.     SHORT        nb_RasDepth;    /* depth of the raster            */
  66.     SHORT        nb_X;            /* initial x position            */
  67.     SHORT        nb_Y;            /* initial y position            */
  68.     USHORT        nb_HitMask;        /* Hit mask.                    */
  69.     USHORT        nb_MeMask;        /* Me mask.                        */
  70.     } NEWBOB ;
  71.  
  72. /* data structure to hold information for a new animation component.
  73. ** note that:
  74. **     NEWANIMCOMP myNAC;
  75. ** is equivalent to:
  76. **     struct newAnimComp myNAC;
  77. */
  78. typedef struct newAnimComp
  79.     {
  80.     WORD  (*nac_Routine)();    /* routine called when Comp is displayed.    */
  81.     SHORT    nac_Xt;            /* initial delta offset position.            */
  82.     SHORT    nac_Yt;            /* initial delta offset position.            */
  83.     SHORT    nac_Time;        /* Initial Timer value.                        */
  84.     SHORT    nac_CFlags;        /* Flags for the Component.                    */
  85.     } NEWANIMCOMP;
  86.  
  87. /* data structure to hold information for a new animation sequence.
  88. ** note that:
  89. **     NEWANIMSEQ myNAS;
  90. ** is equivalent to:
  91. **     struct newAnimSeq myNAS;
  92. */
  93. typedef struct newAnimSeq
  94.     {
  95.     struct AnimOb  *nas_HeadOb;    /* common Head of Object.                */
  96.     WORD   *nas_Images;            /* array of Comp image data                */
  97.     SHORT  *nas_Xt;                /* arrays of initial offsets.            */
  98.     SHORT  *nas_Yt;                /* arrays of initial offsets.            */
  99.     SHORT  *nas_Times;            /* array of Initial Timer value.        */
  100.     WORD (**nas_Routines)();    /* Array of fns called when comp drawn    */
  101.     SHORT    nas_CFlags;            /* Flags for the Component.                */
  102.     SHORT    nas_Count;            /* Num Comps in seq (= arrays size)     */
  103.     SHORT    nas_SingleImage;    /* one (or count) images.                */
  104.     } NEWANIMSEQ;
  105.  
  106. #endif
  107.