home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / datatypes / anim_datatype / anim.datatype.doc next >
Encoding:
Text File  |  1997-11-13  |  39.0 KB  |  996 lines

  1. TABLE OF CONTENTS
  2.  
  3. anim.datatype/--datasheed--
  4. anim.datatype/--input_format--
  5. anim.datatype/ADTM_LOADFRAME
  6. anim.datatype/ADTM_PAUSE
  7. anim.datatype/ADTM_START
  8. anim.datatype/ADTM_STOP
  9. anim.datatype/ADTM_UNLOADFRAME
  10. anim.datatype/DTM_WRITE
  11. anim.datatype/MAIN
  12. anim.datatype/OM_DISPOSE
  13. anim.datatype/OM_NEW
  14. anim.datatype/preferences
  15. anim.datatype/--datasheed--                       anim.datatype/--datasheed--
  16.  
  17.    NAME
  18.        anim.datatype -- data type for IFF ANIM animations
  19.  
  20.    SUPERCLASS
  21.        animation.datatype
  22.  
  23.    DESCRIPTION
  24.        The anim datatype, a sub-class of the animation.datatype, is used to
  25.        load and play IFF anim animations.
  26.        It supports all currently defined IFF anim compressions
  27.        (0/1/2/3/4/5/6/7/8/J) and any "interleave count".
  28.        ILBM BODY Interleaved bitmaps can be uncompressed or compressed using
  29.        cmpByteRun1.
  30.        Using the prefs-file, any sound can be attached to the animation.
  31.  
  32.    METHODS
  33.        OM_NEW -- Create a new animation object from a description file. The
  34.            source may be a file or a clipboard unit, both given as an
  35.            IFFHandle, or you may create an empty object (DTST_RAM).
  36.  
  37.        OM_DISPOSE -- Dispose instance and contents (frames, colormaps, sounds
  38.            etc.), then pass msg to superclass.
  39.  
  40.        OM_UPDATE -- Perform an ICM_CHECKLOOP check, and if succesfull, the
  41.            method will be executed like OM_SET downstairs.
  42.  
  43.        OM_SET -- Pass msg to superclass and call GM_RENDER if retval from
  44.            superclass was != 0UL.
  45.  
  46.        DTM_WRITE -- Save object's contents in local (IFF ANIM-3) or
  47.            superclass (IFF ILBM) format.
  48.  
  49.        ADTM_START -- Start playback.
  50.  
  51.        ADTM_PAUSE -- Pause playback.
  52.  
  53.        ADTM_STOP -- Stop playback.
  54.  
  55.        ADTM_LOADFRAME -- Fill in struct adtFrame with requested information
  56.            from internal FrameNode list like bitmap, colormap and sample. If
  57.            the bitmap information is not loaded yet, it will be loaded from
  58.            disk.
  59.  
  60.        ADTM_UNLOADFRAME -- Free resources obtained by ADTM_UNLOADFRAME.
  61.  
  62.        All other methods are passed unchanged to superclass.
  63.  
  64.    ATTRIBUTES
  65.        Following attributes are set by the object and are READ-ONLY for
  66.        applications:
  67.        DTA_ObjName             -- set by anim file (IFF generic NAME chunk)
  68.        DTA_ObjAuthor           -- set by anim file (IFF generic AUTH chunk)
  69.        DTA_ObjAnnotation       -- set by anim file (IFF generic ANNO chunk)
  70.        DTA_ObjCopyright        -- set by anim file (IFF generic (C)  chunk)
  71.        DTA_ObjVersion          -- set by anim file (IFF generic FVER chunk)
  72.        DTA_TotalVert           -- set by BitMapHeader (ILBM BMHD chunk)
  73.        DTA_TotalHoriz          -- set by BitMapHeader (ILBM BMHD chunk)
  74.        ADTA_Width              -- set by BitMapHeader (ILBM BMHD chunk)
  75.        ADTA_Height             -- set by BitMapHeader (ILBM BMHD chunk)
  76.        ADTA_Depth              -- set by BitMapHeader (ILBM BMHD chunk)
  77.        ADTA_Frames             -- number of frames in animation
  78.        ADTA_FramesPerSecond    -- FPS rate (possibly set by DPAN chunk)
  79.        ADTA_KeyFrame           -- Key frame of animation
  80.  
  81.    BUGS
  82.        - In large videos, the frames at the end will be played slower than
  83.          those at the beginning of the file. This is the result of the
  84.          sequential search internally used (only serious with more than 25000
  85.          frames (mc6030/50mhz)).
  86.          May or may not be fixed.
  87.  
  88.        - Animations with more than 8 planes will crash the system
  89.          (anim.datatype handels 12 bit animations, but animation.datatype 
  90.          V40 handles only anims with a depth of 8).
  91.  
  92.        - ANIM-1-Code has been disabled because it draws the blocks to X and H
  93.          dimensions which are divisible by 8 (can't be fixed: no test files).
  94.  
  95.        - The ANHD (AnimHeader) ah_Mask-field will be ignored for ANIM-0,
  96.          2,3,4,5,6,7,8,J. ANIM-1 (acmpXORILBM) respects this.
  97.  
  98.        - The BMHD (BitMapHeader) bmh_Masking-field will be ignored.
  99.  
  100.        - ANIM-4 isn' tested yet (no test files).
  101.  
  102.        - ANIM-4 has been disabled for the reason above.
  103.  
  104.        - ANIM-J is twice as slow as it should be because ANIM-J operates on
  105.          interleaved bitmaps, but (currently) anim.datatype uses
  106.          non-interleaved bitmaps internally. Therefore the current
  107.          implementation interleaves the bitmap, then unpacks, then
  108.          de-interleaves the bitmap. Not very efficient.
  109.  
  110.        - Any flags in the ANHD (AnimHeader) ah_Flags field except ahfLongData
  111.          (bit 0; used by Anim-7/8) and ahfXOR (bit 1; used for all
  112.          compression types except ANIM-J (not required, ANIM-J has an
  113.          internal XOR mode) and anim-0) are ignored. ANIM-4 suffers under
  114.          these problems (cannot be fixed without example files).
  115.  
  116.        - ANIM-6 left/right channels are viewed interleaved. Upon request,
  117.          I can add options to view the left or right channel only.
  118.  
  119.        - The internal "rollback" machanism used for creating full images from
  120.          given DLTAs is slow. This is caused by implementation details,
  121.          not the idea itself.
  122.  
  123.        - If an animations contains colormaps-per-frame and the given CMAP
  124.          contains less colors than (1UL << anim_depth), the remaining colors
  125.          are filled with black. I don't know where to take the remaining
  126.          colors (from last frame/previous (e.g. interleaved) frame)...
  127.          Comments __VERY__ welcome.
  128.  
  129.        - The ANIM-3 encoder has a slight problem in run-length compression;
  130.          therefore this part has been disabled.
  131.  
  132.        - The encoder does not support dynamic timing properly. Instead,
  133.          all frames are saved.
  134.  
  135.        - The encoded initial ANIM-3 IFF ILBM BODY is uncompressed.
  136.  
  137.        - The encoder rejects any attempt to work with non-planar or
  138.          interleaved planar bitmaps.
  139.  
  140.    TODO
  141.        - Fixing the bugs above.
  142.  
  143.        - Internal cache for packed DLTA chunks. This may speed up the
  144.          internal rollback mechanism used for random frame access.
  145.  
  146.        - Other compression formats when saving, including the popular
  147.          ANIM-5.
  148.  
  149.        - PERIOD options to modify the given sound.
  150.  
  151.        - Add support for animation.datatype V41 ADTA_TicksPerFrame timing.
  152.  
  153.        - Write the "--input_format--"-Autodoc section.
  154.  
  155.    HISTORY
  156.        V1.1
  157.          Released to the Waldspecht-BBS for testing.
  158.  
  159.        V1.2
  160.          Released to the Waldspecht-BBS for testing.
  161.  
  162.        V1.3
  163.          Released to the Waldspecht-BBS for testing.
  164.  
  165.        V1.4
  166.          First Aminet release.
  167.  
  168.          - Partial code cleanup
  169.  
  170.          - Recompiled with SAS/C 6.57.
  171.  
  172.          - Redirected serial "verbose" output to a CON:-window, including
  173.            the matching VERBOSE prefs option.
  174.  
  175.          - Changed the VERBOSE output a little bit.
  176.  
  177.        V1.5
  178.          - Implemented palette per frame (ILBM CMAPs per frame).
  179.            (animation.datatype 40.7 does not support these colormap changes
  180.            per frame (it's output may look like a color trash). Custom
  181.            animation players which uses animation.datatype subclasses for
  182.            loading (like my DBufDTAnim) don't have this problem.
  183.            animation.datatype will support these colormaps-per-frame in one
  184.            of the next updates.)
  185.  
  186.          - Internal changes to be able to support up to 12 planes in an anim.
  187.            The animation.datatype 40.7 supports only anims up to 8 planes,
  188.            otherwise the machine will crash. My animation.datatype V41 will
  189.            support this.
  190.  
  191.          - The generic IFF ANNO, AUTH, FVER, NAME and "(C) " chunks are now
  192.            moved to the corresponsing DataTypes attributes if they appear in
  193.            a FORM ILBM.
  194.            The data will be moved like this:
  195.            ANNO -> DTA_ObjAnnotation
  196.            AUTH -> DTA_ObjAuthor
  197.            FVER -> DTA_ObjVersion
  198.            NAME -> DTA_ObjName
  199.            (C)  -> DTA_ObjCopyright
  200.  
  201.          - DTA_Title equals now to DTA_ObjName (e.g. a given NAME chunk). If
  202.            this is NULL, DTA_Name is used instead.
  203.  
  204.          - If a DPAN (DPaint Anim) chunk occurs, the FPS rate is taken from
  205.            the "flags" field.
  206.            Thanks to Brian Jones (bjones@cadvision.com) for reporting this.
  207.            If the value taken is 0, the old, fixed rate (5 fps) is used
  208.            again.
  209.  
  210.          - Fixed a hole in the state machine which causes problems when an
  211.            animation contains no frames. Should work now.
  212.            Fixed.
  213.  
  214.          - An error in the prefs-file will now force the VERBOSE option.
  215.  
  216.          - Implemented sound. A sample can now be attached to the animation
  217.            using the SAMPLE/VERBOSE options.
  218.            Note that anim.datatype is still a GID_ANIMATION (anim WITHOUT
  219.            sound) type datatype.
  220.            The GID_#? idetifiers belongs to the source data, not the
  221.            modifications done by a datatype code (a IFF ANIM does not contain
  222.            any sound data, the sound is attached later).
  223.  
  224.        V1.6
  225.          - Disabled the optimizer. This fixes a mysterious System-Crash
  226.            when resizing the parent application window. Don't know why this
  227.            works now :-((
  228.  
  229.        V1.7
  230.          - Reorganisation of source (includes small cleanup).
  231.  
  232.          - Fixed a silly hole in the state machine which causes the
  233.            datatype to return errors on colormap changes (e.g. ILBM CMAPs).
  234.            Error codes were returned like this:
  235.            (Number_of_colors_in_CMAP * 3).
  236.  
  237.          - Enabled the optimizer (see V1.6) again. Since reorganisation of
  238.            the src, the problem never occured again. Any hint ?
  239.  
  240.          - Fixed a bug in LibExpunge (didn't check lib_OpenCnt), which is
  241.            also present in all my other external BOOSI classes (and
  242.            datatypes).
  243.            Thanks to Guenter Niki (gniki@informatik.uni-rostok.de) for
  244.            reporting this bug.
  245.  
  246.        V1.8
  247.          * Shareware
  248.            Starting with V1.8, anim.datatype is Shareware.
  249.  
  250.          - Added experimental stack swapping code. The "Need more stack"-
  251.            requester has been removed for this reason.
  252.            This also fixes a possible deadlock of "input.device" because
  253.            the GM_LAYOUT method was running with low stack.
  254.  
  255.          - Uses OpenFromLock when obtaining a fh for random frame access.
  256.            This allows the usage of "virtual filesystems" (datatypes.library
  257.            V45 allows such things).
  258.  
  259.          - Now supports saving in the local format (e.g. IFF ANIM,
  260.            currently only ANIM-3).
  261.            Note that saveing begins with the __current__ frame and can be
  262.            controlled with the ADTA_Frame, ADTA_Frames and
  263.            ADTA_FrameIncrement attributes.
  264.  
  265.          - Now support DTST_RAM (creates an empty anim.datatype object).
  266.  
  267.          - Now supports subclasses of anim.datatype, mainly to fill in
  268.            the ADTM_LOADFRAME/ADTM_UNLOADFRAME methods when using an empty
  269.            (e.g. created with DTST_RAM) anim.datatype object.
  270.  
  271.          - Now the high order bits of each color gun are replicated through
  272.            the whole INT32 in the colormap.
  273.  
  274.        V1.9
  275.          - Fixed a bug which prevents saving in local (IFF ANIM-3) format
  276.            using an (created using DTST_RAM) empty object (like "DTConvert"
  277.            does).
  278.            Fixed.
  279.  
  280.        V1.10
  281.          - Moved IFF ANIM defines etc. to classdata.h include file.
  282.  
  283.          - Reworked file scan. This fixes problems with many animations
  284.            where the second frame was treated as an ILBM instead of an DLTA.
  285.            Fixed.
  286.  
  287.          - Implemented ADTM_START, ADTM_STOP and ADTM_PAUSE to get a more
  288.            smoothly start and stop, see method autodocs for details.
  289.  
  290.          - Implemented Martin Tailefer's AsyncIO code (currenty broken,
  291.            has been disabled for now).
  292.  
  293.          - Removed unnecessary GM_LAYOUT code; DTA_Total(Vert|Horiz) are now
  294.            set in OM_NEW.
  295.  
  296.          - Fixed ADTM_LOADFRAME that if a frame can't be loaded (seek error,
  297.            or timestamp not found) now a matching error code will be
  298.            returned in Result2.
  299.  
  300.          - Removed NOREMAP feature and matching DTM_FRAMEBOX code because
  301.            this was an ugly hack...
  302.  
  303.          - XORBitMap has been rewritten, XOR mode for
  304.            ANIM-2/-3/-4/-5/-6/-7-/8 should now be a little bit faster;
  305.            this also fixes two bugs:
  306.            - The bitmaps were incorrectly merged together when the bitmap
  307.              size grows over 64k per plane (for example 1280 * 512)
  308.              Fixed.
  309.            - Due rounding errors the last 8 pixels were not processed
  310.              Fixed.
  311.  
  312.          - Plane pointers are now on a quad-long boundary to get more speed
  313.            on a mc68040.
  314.  
  315.          - Internal CopyBitMap has been optimized to use CopyMemQuick if
  316.            possible.
  317.  
  318.          - Added compatibility code for DPaint ANIM Brushes, compressed with
  319.            ANIM-5 and XOR mode, but which don't have the XOR bit set.
  320.            Added NODPAINTBRUSHPATCH to disable this function.
  321.            This fixes the problems with the animations I found in the CanDo
  322.            distribution.
  323.  
  324.          - Added support for GRAB chunk (grabbing point of animation).
  325.            Does only work with animation.datatype V41 (which implements
  326.            PDTA_Grab attribute).
  327.  
  328.          - Stack swapping code has been improved; the stack is now only
  329.            swapped if stacksize falls below 16384 / 2 bytes; this saves
  330.            the stack allocation for ADTM_LOADFRAME / ADTM_UNLOADFRAME
  331.            in animation.datatype V41.
  332.  
  333.          - Added WaitBlit in OM_DISPOSE to wait for blitter which may
  334.            use our bitmaps.
  335.  
  336.          - Added seperate memory pool for frame bitmaps, which is
  337.            set up to have the correct size for this job.
  338.            This should speed up bitmap memory allocations.
  339.            The pool's size is reduced if there is not enougth memory.
  340.            The other "misc usage" pool is increased to 32k get the
  341.            correct size for DLTA temp mem usage.
  342.            The datatype now uses AllocVecPooled instead of AllocVec
  343.            for delta buffers.
  344.  
  345.          - Cut some chars from the AnimHeader dump output. Now it fits
  346.            on a single-line in a 640 pixel CON: window (topaz 8 font).
  347.  
  348.          - Added NOLOADALL and CMAPS switch for multi-line prefs using
  349.            the MATCHPROJECT option.
  350.  
  351.          - Added additional checking code for CAMG chunk data. Invalid
  352.            flags are now removed.
  353.  
  354.          - Added support for dynamic timing, e.g. anim.datatype now uses
  355.            AnimHeader's ah_AbsTime and ah_RelTime fields. Does only work
  356.            properly with animation.datatype V41 (for animation.datatype
  357.            V40 this option is turned off per default and turned on if
  358.            superclass is animation.datatype V41); matching NODYNAMICTIMING
  359.            and DYNAMICTIMING options have been added; modifications
  360.            have been made in AttachSamples and ADTM_LOADFRAME, too.
  361.  
  362.          - Fixed the bug that the last sample's length wasn't calculated
  363.            correctly, which may have caused Enforcer read-hits (never
  364.            seen, but...).
  365.  
  366.          - Added SAMPLESPERFRAME option to override own calculations.
  367.            This allows to get rid of rounding errors in such cases.
  368.  
  369.          - Added "wanted" message for IFF ANIM-4 animations. If you have
  370.            such an animation, and if you are the FIRST who send's me a VALID
  371.            IFF ANIM-4 compressed animation, you'll get $10. No joke.
  372.  
  373.          - ANIM-3 encoder has been cut down in functionality to get
  374.            (temporary) rid of a bug in run-length encoding (DPaint IV AGA
  375.            does not like this !?).
  376.  
  377.          - The encoder does not not fail if a subclass returns
  378.            ERROR_OBJECT_NOT_FOUND for ADTM_LOADFRAME. It simply tries
  379.            to load the next frame. This fixes some problems with dynamic
  380.            timing.
  381.  
  382.          - The encoder now checks explicitly for non-planar or interleaved
  383.            planar input bitmaps, which are NOT supported yet (e.g.
  384.            such an attempt results in ERROR_NOT_IMPLEMENTED).
  385.  
  386.          - A fps value greater than 60 fps found in a DPAN chunk is now
  387.            treated as invalid.
  388.  
  389.        V1.11
  390.          - Recompiled with SAS/C 6.58. May fix some mc68060 related
  391.            problems.
  392.  
  393.          - Found the longstanding bug that animation.datatype V40.7
  394.            didn't free some frames. Reason is that ADTM_LOADFRAME
  395.            may be used like "realloc". Now alf_UserData is checked;
  396.            any given frame will be freed (ADTM_UNLOADFRAME).
  397.            Fixed.
  398.  
  399.          - ADTM_UNLOADFRAME now clears alf_UserData to indicate that the
  400.            frame has been freed.
  401.  
  402.          - Now supports anims deeper than 8 planes, but a colormap
  403.            (e.g. a CMAP chunk) is still expected.
  404.  
  405.          - Fixed the bug that a free of the current frame caused an frame
  406.            to be not freed. (The idea was to hold the current frame for
  407.            following delta accesses; this has been replaced by the idea
  408.            of the "posted free").
  409.  
  410.          - Implemented the idea of a "posted free". For delta accesses,
  411.            it's not very usefull to free the frame when the next frame
  412.            needs it for it's delta access. Therefore, the anim.datatype
  413.            now manages a "free list", where the free of the previous
  414.            and the previous-previous frame will be posted until
  415.            it is really not longer in use.
  416.  
  417.          - Fixed a bug in the LOADALL mode that the wrong previous
  418.            frame was used (due a change in V1.10).
  419.  
  420.          - The single framenodes now caches a pointer to their previous
  421.            frame. This should speed up loading a little bit.
  422.  
  423.          - If an animation has dynamic timing and the superclass
  424.            (animation.datatype) has the ADTA_AdaptiveFPS flag set,
  425.            the playback speed now defaults to 60 fps.
  426.  
  427.          - Saved an AllocVecPooled in ADTM_LOADFRAME by merging multiple
  428.            delta buffer allocations to one allocation (which can hold the
  429.            largest delta).
  430.  
  431.          - The stack swapping code now allocates it's memory without
  432.            the MEMF_CLEAR flags, which should speed up things.
  433.  
  434.          - Removed BestModeIDA code, because animation.datatype does
  435.            the same.
  436.  
  437.          - The options setting for DPaint brush compatibility patch
  438.            worked wrong (the order was wrong). Now the options
  439.            work as described.
  440.            Fixed.
  441.  
  442.          - Fixed a bug in the encoder that the last color of a dynamic
  443.            pallete as not copied (GetRGB32 got numcolors - 1 instead
  444.            of numcolors).
  445.            Fixed.
  446.  
  447.        V1.12
  448.          - Replaced the custom stack swapping code by my "standard" module.
  449.  
  450.          - Now the default FPS rate is 10 if animation.datatype is
  451.            < V41. If V41 is running with ADTA_AdaptiveFPS, the
  452.            fps is set to 60.
  453.  
  454.          - Fixed ModeID handling. The previous behaviour was that
  455.            a 0 mode id causes the datatype to select it's own mode id.
  456.            But 0 means LORES. Now the default is -1 (which means
  457.            INVALID_ID), which causes the datatype to do it's own
  458.            calculations.
  459.            Fixed.
  460.  
  461.          - OM_DISPOSE now preserves Result2 (IoErr()) to avoid that an 
  462.            error code may get lost.
  463.  
  464.    NOTES
  465.        This datatype first scans the whole animation to get index
  466.        information (if the LOADALL switch was set in the prefs-file,
  467.        the entire animation will be loaded), colormaps will be loaded
  468.        immediately.
  469.  
  470.    SEE ALSO
  471.        animation.datatype,
  472.        mpegsystem.datatype, mpegvideo.datatype,
  473.        picmovie.datatype,
  474.        cdxl.datatype. avi.datatype, quicktime.datatype,
  475.        moviesetter.datatype,
  476.        film.datatype,
  477.        directory.datatype,
  478.        markabletextdtclass
  479.  
  480. anim.datatype/--input_format--                 anim.datatype/--input_format--
  481.  
  482.     NAME
  483.         IFF ANIM -- IFF animation format
  484.  
  485.     DESCRIPTION
  486.         <Not written yet, sorry>
  487.  
  488.         acmpILBM             -- ILBM BODY
  489.         acmpXORILBM          -- XOR
  490.         acmpLongDelta        -- Long Delta
  491.         acmpShortDelta       -- Short Delta
  492.         acmpDelta            -- General Delta
  493.         acmpByteDelta        -- Byte Vertical
  494.         acmpStereoByteDelta  -- Stereo Byte Vertical (left/right channel)
  495.         acmpAnim7            -- Anim7 (nonstandard format)
  496.         acmpAnim8            -- Anim5 compression using LONG/WORD data
  497.         acmpAnimJ            -- Eric Grahams compression format
  498.  
  499.  
  500.     SEE ALSO
  501.         - "ANIM.DOC" IFF Animspecs,
  502.           "ANIM.BRUSH.DOC" Anim specs,
  503.           "ANIM.OP6" Anim specs,
  504.           "ANIM7.DOC" Anim specs
  505.           "ANIM.OP8" Anim specs
  506.  
  507.         - ARKM Devices (Addison Wesley): IFF part
  508.  
  509.         - iffparse.library autodocs
  510.  
  511.         - AAP/AAC docs (for a complete description of the Anim7 format)
  512.  
  513.         - Viewtek (VT) distribution for Anim 7 info
  514.  
  515. anim.datatype/ADTM_LOADFRAME                     anim.datatype/ADTM_LOADFRAME
  516.  
  517.     NAME
  518.         ADTM_LOADFRAME -- Load frame
  519.  
  520.     FUNCTION
  521.         The ADTM_LOADFRAME method is used to obtain the bitmap and timing
  522.         data of the animation.
  523.         The given timestamp will be used to find a matching timestamp
  524.         in the internal FrameNode list. If it was found, the corresponding
  525.         timing, bitmap and colormap data are stored into the struct
  526.         adtFrame. If the bitmap wasn't loaded at this time, this method 
  527.         attempts to load it from disk.
  528.  
  529.     RESULT
  530.         Returns the bitmap ptr if a bitmap was found, 0UL otherwise;
  531.         in case of failure Result2 contains the cause:
  532.         ERROR_OBJECT_NOT_FOUND: Given timestamp does not exist
  533.         ERROR_NO_FREE_STORE:    No memory
  534.         and so on...
  535.  
  536.     NOTE
  537.         It is expected that a 0 return code (error) causes an
  538.         ADTM_UNLOADFRAME that the invalid bitmap etc. will be freed.
  539.  
  540. anim.datatype/ADTM_PAUSE                             anim.datatype/ADTM_PAUSE
  541.  
  542.     NAME
  543.         ADTM_PAUSE -- Pause playback
  544.  
  545.     FUNCTION
  546.         ADTM_PAUSE tells the subclass (use) to pause playback.
  547.  
  548.         The method is passed to animation.datatype first, which pauses the
  549.         playback clock.
  550.  
  551.     RESULT
  552.         Returns result from superclass (animation.datatype)
  553.  
  554.     NOTE
  555.  
  556. anim.datatype/ADTM_START                             anim.datatype/ADTM_START
  557.  
  558.     NAME
  559.         ADTM_START -- Prepare for playback
  560.  
  561.     FUNCTION
  562.         ADTM_START tells the subclass (us) to prepare for continous
  563.         playback. To avoid a long "search" for a full frame during the
  564.         playback clock is running, we load here the given timestamp
  565.         (asa_Frame) manually (and preseves it using a small trick, see
  566.         source).
  567.  
  568.         After all, the method is passed to superclass, which starts the
  569.         playback (and the master clock).
  570.  
  571.     RESULT
  572.         Returns result from superclass (animation.datatype)
  573.  
  574.     NOTE
  575.  
  576. anim.datatype/ADTM_STOP                               anim.datatype/ADTM_STOP
  577.  
  578.     NAME
  579.         ADTM_STOP -- Stop playback
  580.  
  581.     FUNCTION
  582.         ADTM_STOP tells the subclass (use) to stop playback.
  583.  
  584.         The method is passed to animation.datatype first, which stops the
  585.         playback clock.
  586.  
  587.         After clock has been stopped, we search for frames which have a
  588.         0 UseCount and have not been unloaded yet (a small cleaup to get
  589.         rid of frames which are loaded using the "trick" in ADTM_START
  590.         code).
  591.  
  592.     RESULT
  593.         Returns result from superclass (animation.datatype)
  594.  
  595.     NOTE
  596.  
  597. anim.datatype/ADTM_UNLOADFRAME                 anim.datatype/ADTM_UNLOADFRAME
  598.  
  599.     NAME
  600.         ADTM_UNLOADFRAME -- Load frame contents
  601.  
  602.     FUNCTION
  603.         The ADTM_UNLOADFRAME method is used to release the contents of a
  604.         animation frame.
  605.  
  606.         This method frees the bitmap data found in adtFrame.
  607.  
  608.     RESULT
  609.         Returns always 0UL.
  610.  
  611. anim.datatype/DTM_WRITE                               anim.datatype/DTM_WRITE
  612.  
  613.     NAME
  614.         DTM_WRITE -- Save data
  615.  
  616.     FUNCTION
  617.         This method saves the object's contents to disk.
  618.  
  619.         If dtw_Mode is DTWM_IFF, the method is passed unchanged to the
  620.         superclass, animation.datatype, which writes a single IFF ILBM
  621.         picture.
  622.  
  623.         If dtw_mode is DTWM_RAW, the object saved an IFF ANIM stream to
  624.         the filehandle given, starting with the current frame until
  625.         the end is reached.
  626.         The sequence saved can be controlled by the ADTA_Frame, ADTA_Frames
  627.         and ADTA_FrameIncrement attributes (see TAGS section below).
  628.  
  629.     TAGS
  630.         When writing the local ("raw") format, IFF ANIM, the following
  631.         attributes are recognized:
  632.  
  633.         ADTA_Frame (ULONG) - start frame, saving starts here.
  634.             Defaults to the current frame displayed.
  635.  
  636.         ADTA_Frames (ULONG) - the number of frames to be saved,
  637.             Defaults to (max_num_of_frames - curr_frame).
  638.  
  639.         ADTA_FrameIncrement (ULONG) - frame increment when saving.
  640.             Defaults to 1, which means: "jump to next frame".
  641.  
  642.     NOTE
  643.         - Any sound attached to the animation will NOT be saved.
  644.  
  645.         - A CTRL-D signal to the writing process aborts the save.
  646.  
  647.     RESULT
  648.         Returns 0 for failure (IoErr() returns result2), non-zero
  649.         for success.
  650.  
  651. anim.datatype/MAIN                                         anim.datatype/MAIN
  652.  
  653.     INTRODUCTION
  654.         Datatypes class for IFF ANIM animations. Based on the CBM datatypes
  655.         example source/ documents written by David Junod and the public
  656.         domain Anim5 code by Jim Kent.
  657.  
  658.     SHAREWARE
  659.         Starting with V1.8, anim.datatype is Shareware.
  660.  
  661.         "anim.datatype" is this version and it's contributed files
  662.         are Copyright 1995/96/97 by Roland Mainz except otherwise noted.
  663.         All rights reserved.
  664.  
  665.         You are allowed to use anim.datatype for 30 days. If you
  666.         want to use it after this time, please register.
  667.         The registration fee is 15 DM, 10 US-$ or equivalent.
  668.         There is no different registered version, this version of
  669.         anim.datatype is fully functional.
  670.  
  671.         Payment my be done using bank transfer (prefereed; see AUTHOR
  672.         section below for my bank account), euro-scheques (on my name)
  673.         or cash money in an envelope (ON YOUR OWN RISK !).
  674.  
  675.         New versions are released through the Aminet.
  676.  
  677.         As a service for registered users I will notify you about
  678.         new versions if I get your email address.
  679.         To be able to do this, you should fill in the following form
  680.         and send this to my email/snail-mail address:
  681.  
  682.         -- snip --
  683.  
  684.         Product/Version: anim.datatype 1.10 (4.8.97)_______________________
  685.  
  686.         Name:     _________________________________________________________
  687.  
  688.         Street:   _________________________________________________________
  689.  
  690.         City/ID:  _________________________________________________________
  691.  
  692.         Country:  _________________________________________________________
  693.  
  694.         Phone:    _________________________________________________________
  695.  
  696.         EMail:    _________________________________________________________
  697.  
  698.         Shareware fee: _ 10 US-$
  699.                        _ 15 DM
  700.                        _ other (in a amount which equals to the US-$ fee)
  701.  
  702.         Payed by  _ cash money in envelope (on your own risk !)
  703.                   _ euro-scheque (on my name)
  704.                   _ bank transfer
  705.  
  706.         Comments: _________________________________________________________
  707.  
  708.                   _________________________________________________________
  709.  
  710.                   _________________________________________________________
  711.  
  712.         -- snip --
  713.  
  714.     REQUIREMENTS
  715.         - You need at least Kick/WB 3.0.
  716.           | Many people wrote me that they cannot find an
  717.           | "animation.datatype" class.
  718.           | Only the 3.1 release contains it. (Subclasses of)
  719.           | animation.datatype can run under 3.0.
  720.  
  721.         - "datatypes/animation.datatype", >= V39.
  722.           "animation.datatype 40.7 (28.09.93)" requires itself some
  723.           libraries/boopsi classes:
  724.         - "realtime.library", >= V39              - for timing
  725.         - "gadgets/tapedeck.gadget" (any version) - for the controls
  726.  
  727.            If you want to attach samples, you need "sound.datatype" >= V39
  728.            and your prefereed subclass (8svx.datatype for IFF 8SVX samples
  729.            etc.).
  730.  
  731.     USAGE
  732.         If the datatypes descriptor file was activated, any attempt to load
  733.         an IFF anim stream using GMultiView, MultiView, AmigaGuide or
  734.         SwitchWindow will load and play the animation. If the source was a
  735.         file, anim.datatype loads frames dynamically from disk, if the
  736.         source was the clipboard, anim.datatype caches the whole anim.
  737.  
  738.         anim.datatype supports also the clipboard as input, e.g.
  739.         "MultiView CLIPBOARD", ClipView or SwitchWindow are able to show
  740.         IFF ANIMs from clipboard.
  741.  
  742.         If you want to save the current animation in anim.datatype's local
  743.         format, use MultiView's "Project/Save As..." menu (or GMultiView's
  744.         "Project/Save As Raw...").
  745.         anim.datatype saves the current animation, stating with the current
  746.         frame as IFF ANIM-3.
  747.         Other compression formats such as ANIM-0/1/2/4/5/7/8/J will
  748.         be implemeted later.
  749.  
  750.         If you want to attach samples to the animation, you must edit the
  751.         prefs file (ENV:Classes/DataTypes/anim.prefs) and add the following
  752.         line:
  753.         VERBOSE SAMPLE="ram:have_a_nice_day.8svx"
  754.         Which loads and attaches the sample "ram:have_a_nice_day.8svx" to the
  755.         animation. See anim.datatype.doc/preferences for a complete
  756.         description of the prefs file.
  757.  
  758.     INSTALLATION
  759.         After unpacking this archive:
  760.         Because this version does not include an Installer script, you have
  761.         to do the installation manually through the shell:
  762.  
  763.           - Unpack this archive and copy the "anim.datatype" to
  764.             SYS:Classes/DataTypes:
  765.  
  766.      Copy CLONE FROM "anim.datatype" TO "SYS:Classes/DataTypes/anim.datatype"
  767.  
  768.           - Then copy the datatypes descriptor into the DEVS:DataTypes
  769.             directory.
  770.             If the descriptor already exists, you should not replace it,
  771.             otherwise you may loose "toolnodes" and other settings stored in
  772.             the existing descriptor.
  773.  
  774.      Copy CLONE FROM "ANIM(%|.info)" TO DEVS:Datatypes/
  775.  
  776.     SOURCE
  777.         Partial source is included as an example how to write an
  778.         animation.datatype subclass which deals with things like
  779.         "delta-compression" techniques.
  780.  
  781.     AUTHOR
  782.         If you want to blame me, report any bugs, or wants a new version
  783.         send your letter to:
  784.                         Roland Mainz
  785.                         Hohenstaufenstraße 8
  786.                         52388 Nörvenich
  787.                         GERMANY
  788.  
  789.         Phone: (+49)(0)2426/901568
  790.         Fax:   (+49)(0)2426/901569
  791.  
  792.         Bank account: Kto. 4866 02-508
  793.         At:           Postbank Köln,
  794.                       BLZ 37010050
  795.  
  796.         EMAIL is also available (if you want to send me attachments
  797.         larger than 1MB (up to 5MB, more with my permission):
  798.  
  799.         GISBURN@w-specht.rhein-ruhr.de
  800.  
  801.         Up to December 1997 I'm reachable using this email address, too:
  802.         Reinhold.A.Mainz@KBV.DE
  803.  
  804.         | Please put your name and address in your mails !
  805.         | German mailers should add their phone numbers.
  806.         | See BUGS section above when submitting bug reports.
  807.  
  808.         Sorry, but I can only look once a week for mails.
  809.         If you don't hear something from me within three weeks, please
  810.         send your mail again (but watch about new releases) (problems with
  811.         this email port are caused by reconfigurations, hackers, network
  812.         problems etc.).
  813.  
  814.         The  entire  "anim.datatype"  package  may  be  noncommercially
  815.         redistributed, provided  that  the package  is always  distributed
  816.         in it's complete  form (including it's documentation). A small
  817.         copy fee  for media costs is okay but any kind of commercial
  818.         distribution is strictly forbidden without my permission !
  819.         Comments and suggestions how to improve this program are
  820.         generally appreciated!
  821.  
  822.         Thanks to David Junod, who wrote the animation.datatype and lots of
  823.         the datatypes example code, Jim Kent, Eric Graham and other people
  824.         for their compression formats, Matt Dillon for his DICE, Olaf
  825.         'Olsen' Barthel for his help, ideas and some text clips from his
  826.         documentations.
  827.  
  828. anim.datatype/OM_DISPOSE                             anim.datatype/OM_DISPOSE
  829.  
  830.     NAME
  831.         OM_DISPOSE -- Delete a anim.datatype object.
  832.  
  833.     FUNCTION
  834.         The OM_DISPOSE method is used to delete an instance of the
  835.         anim.datatype class. This method is passed to the superclass when
  836.         it has completed.
  837.         This method frees all frame nodes and their contents (bitmaps,
  838.         colormaps, samples etc.)
  839.  
  840.     RESULT
  841.         The object is deleted. 0UL is returned.
  842.  
  843. anim.datatype/OM_NEW                                     anim.datatype/OM_NEW
  844.  
  845.     NAME
  846.         OM_NEW -- Create a anim.datatype object.
  847.  
  848.     FUNCTION
  849.         The OM_NEW method is used to create an instance of the anim.datatype
  850.         class.  This method is passed to the superclass first. After this,
  851.         anim.datatype parses the prefs file and makes a scan through
  852.         the data to get index information. Frame bitmaps are loaded if the
  853.         input stream isn't seekable (e.g. IFF handle/clipboard),
  854.         colormaps and the first frame are loaded immediately.
  855.         If a sample was set in the prefs, it will be loaded and attached
  856.         to the animation.
  857.  
  858.     ATTRIBUTES
  859.         The following attributes can be specified at creation time.
  860.  
  861.         DTA_SourceType (ULONG) -- Determinates the type of DTA_Handle
  862.             attribute. DTST_FILE, DTST_CLIPBOARD and DTST_RAM are supported.
  863.             If any other type was set in a given DTA_SourceType,
  864.             OM_NEW will be rejected.
  865.             A sourcetype of DTST_CLIPBOARD forces the LOADALL prefs
  866.             switch (can't seek on clipboard).
  867.             Defaults to DTST_FILE.
  868.  
  869.         DTA_Handle -- For both DTST_FILE and DTST_CLIPBOARD, a
  870.             (struct IFFHandle *) is expected. This handle will be
  871.             created by datatypesclass depeding on the DTF_#? flag, which
  872.             is DTF_IFF here.  DTST_FILE, datatypesclass creates
  873.             a IFF handle from the given DTA_Name and DTA_Handle (a
  874.             BPTR returned by Lock), if DTST_CLIPBOARD, datatypesclass
  875.             passes the given (IFF) handle through.
  876.             A DTST_RAM (create empty object) source type requires a NULL
  877.             handle.
  878.  
  879.     RESULT
  880.         If the object was created a pointer to the object is returned,
  881.         otherwise NULL is returned.
  882.  
  883. anim.datatype/preferences                           anim.datatype/preferences
  884.  
  885.    NAME
  886.        preferences
  887.  
  888.    DESCRIPTION
  889.        The "ENV:Classes/DataTypes/anim.prefs" file contains global
  890.        settings for the datatype.
  891.        The preferences file is an ASCII file containing one line where the
  892.        preferences can be set.
  893.        It can be superset by a local variable with the same name.
  894.  
  895.        Each line can contain settings, special settings for some projects
  896.        can be set using the MATCHPROJECT option.
  897.        Lines beginning with a '#' or ';' chars are treated as comments.
  898.        Lines are limitted to 256 chars.
  899.  
  900.    TEMPLATE
  901.        MATCHPROJECT/K,VERBOSE/S,MODEID/K/N,CMAPS/S,NOCMAPS/S,
  902.        DPAINTBRUSHPATCH/S,NODPAINTBRUSHPATCH/S,FPS/K/N,DYNAMICTIMING/S,
  903.        NODYNAMICTIMING/S,SAMPLE/K,SAMPLESPERFRAME=SPF/K/N,VOLUME/K/N,
  904.        LOADALL/S,NOLOADALL/S
  905.  
  906.        MATCHPROJECT -- The settings in this line belongs only to this
  907.            project(s), e.g. if the case-insensitive pattern does not match,
  908.            this line is ignored.
  909.            The maximum length of the pattern is 128 chars.
  910.            Defaults to #?, which matches any project.
  911.  
  912.        VERBOSE -- Print information about the animation. Currently
  913.           the frame numbers and the used compression are printed, after all
  914.           number of scanned/loaded frames, set FPS rate, dimensions (width/
  915.           height/depth), sample information etc.
  916.  
  917.        MODEID -- Select screen mode id of datatype (will be stored in
  918.            ADTA_ModeID). Note that the DOS ReadArgs function used for parsing
  919.            fetches a SIGNED long. The bit 31 will be represented by minus
  920.            '-'. (example: "MODEID=266240" sets the mode to the A2024 screen
  921.            mode id)
  922.            Defaults to 0, which means: Use the screen mode from CAMG chunk,
  923.            if missing use the best screenmode available for the given width,
  924.            height and depth.
  925.  
  926.        CMAPS -- Use colormaps per frame. This switch is set per default,
  927.            and can be turned off by the NOCMAPS option, later it can be
  928.            turned on again by this option.
  929.  
  930.        NOCMAPS -- Don't load/use colormaps per frame. Only the initial
  931.            colormap will be used.
  932.            The current version of animation.datatype (V40.7 (28.09.93)) does
  933.            not implement per frame colormaps, it's output may look trashed.
  934.            Custom players like "DBufDTAnim" does support
  935.            "per frame colormaps",
  936.            animation.datatype V41 will implement "per frame colormaps".
  937.  
  938.        DPAINTBRUSHPATCH -- If frames of ANIM-5 with an interleave of 1
  939.            occurs, the XOR mode is forced, even if the XOR bit is not set.
  940.            This fixes problems with some DPaint brush animations.
  941.            This option is ON per default and can be turned off by the 
  942.            NODPAINTBRUSHPATCH option.
  943.  
  944.        NODPAINTBRUSHPATCH -- Turns off the DPaint brush patch. See 
  945.            DPAINTBRUSHPATCH option for details.
  946.  
  947.        FPS -- Frames Per Second
  948.            Defaults to FPS set by DPAN chunk. If the DPAN chunk is missing
  949.            a fixed 5 fps rate is used.
  950.            A value of 0 here means: Use default FPS.
  951.  
  952.        DYNAMICTIMING -- Turns dynamic timing on. Default if superclass
  953.            is animation.datatype V41, otherwise this option must
  954.            be explicitly set.
  955.  
  956.        NODYNAMICTIMING -- Turn dynamic timing off. Default if superclass
  957.            is animation.datatype < V41 (e.g. V40.6).
  958.  
  959.        SAMPLE -- Attach the given sample to the animation. The sample will
  960.            be loaded using datatypes (GID_SOUND).
  961.            Only one sample can be attached to one animationstream, any
  962.            following attempt to attach a sample will be ignored.
  963.  
  964.        SAMPLESPERFRAME -- Set samples per frame rate for sound. This
  965.            overrides the own internal calculations to get rid of rounding
  966.            errors.
  967.  
  968.        VOLUME -- Volume of the sound when playing.
  969.            Defaults to 64, which is the maximum. A value greater than 64 will
  970.            be set to 64.
  971.  
  972.        LOADALL -- Load all frames into memory. If the source input is a
  973.            clipboard, this option is always set.
  974.  
  975.        NOLOADALL -- Turns off the LOADALL flag, which may be set in a prefs-
  976.            line before. This switch is set per default, and can be turned off
  977.            by the LOADALL option, later it can be turned on again by this
  978.            option.
  979.  
  980.        REGISTERED -- Turns off the shareware notice requester.
  981.  
  982.    NOTE
  983.        An invalid prefs file line will be ignored and forces the VERBOSE
  984.        output.
  985.  
  986.    BUGS
  987.        - Low memory may cause that the prefs file won't be parsed.
  988.  
  989.        - Lines are limitted to 256 chars
  990.  
  991.        - An invalid prefs file line will be ignored.
  992.  
  993.        - The sample path length is limitted to 200 chars. A larger
  994.          value may crash the machine if an error occurs.
  995.  
  996.