[comp.sys.mac.programmer] Need info on "acur" resource

lee@eplrx7.uucp (Leland Berkwits) (03/14/90)

Recently I have learned of a resource called the "acur" resource.  Apparently this allows
one to define a series of cursor icons that are scanned through to animate a cursor.
I have been through MacDTS and MacTechNotes but cannot find any information on using
this.  Also no info in Inside Mac.

Are there any Mac experts out there who know how to use the acur resource for animating
cursors?  

Thanks much in advance,
Lee Berkwits

--
The UUCP Mailer

ira@Apple.COM (Ira Ruben) (03/15/90)

In article <1990Mar14.155454.29031@eplrx7.uucp> lee@eplrx7.uucp (Leland Berkwits) writes:
>Recently I have learned of a resource called the "acur" resource.  Apparently
>this allows one to define a series of cursor icons that are scanned through
>to animate a cursor.  I have been through MacDTS and MacTechNotes but cannot
>find any information on using this.  Also no info in Inside Mac.
>
>Are there any Mac experts out there who know how to use the acur resource for
>animating cursors?  
>--

The MPW Rez type definition for the 'acur' resource is defined as follows:

type 'acur' {
      integer = $$CoundOf(CursIdArray);   /* Nbr of cusors              */
      fill word;                          /* Next frame to show         */
      array CursIdArray {
           integer;                       /* 'CURS' rsrc id for a frame */
           fill word;                     /* Pad word to make longint   */
      };
};

Basically, it is a word with a count followed by that many longints, each
of whose upper word contains a resource id for a CURS resource.  Think of
it as a film strip (actually a loop) of N frames (the count) with each
frame corresponding to a CURS pointed to by the 'acur' list.  The cursor
sequence makes up the animation.  The reason each CURS id in the acur
resources is a longint is that when this resource is loaded into memory
each CURS id is replaced with the corresponding handle to that loaded
cursor.  At least that's the way it's used by the CursorCtl unit in MPW.

Ira Ruben
Apple Computer, Inc.
MPW Development - Tools/Languages