home *** CD-ROM | disk | FTP | other *** search
- {-----------------------------------------------------------------------------}
- { TEGL Windows ToolKit II }
- { Copyright (C) 1990, 1991 TEGL Systems Corporation }
- { All Rights Reserved. }
- {-----------------------------------------------------------------------------}
- {$I switches.inc}
-
- Unit Animate;
-
- INTERFACE
-
- USES Crt, {sound, nosound}
- TGraph,
- teglmain, {beepstatus}
- virtmem,
- FastGrph, {flip pages}
- ipstacks,
- TEGLUnit; {windows stacked images}
-
-
- TYPE
- coordinates = OBJECT
- x,y : Integer;
- Procedure init(initx,inity : Integer);
- Procedure getcoordinates(VAR lastx,lasty : Integer);
- Procedure addcoordinates(newcoordinates : coordinates);
- END;
-
- AFramePtr = ^AnimateFrame;
- AnimateFrame = OBJECT
- nextframe : AFramePtr; {next pointer, can be circular buffer}
- imagepic : Pointer; {image for display}
- tonehz : Word; {0 turns off tone}
- tonedelay : Word;
- movement : coordinates; {next increment}
- imgdelay : Word; {delay before next image is placed}
- imagesz : Word; {size of image}
- height,width: Word; {length and width of image}
- Color : Word; {color for putpict}
- constructor Init(pp:Pointer; mx,my: Integer; ht,wd,dy,hz,hzdy,co:Word);
- Function AdvanceFrame(VAR cc:coordinates) : AFramePtr;
- Function PlayFrame(VAR cc:coordinates) : AFramePtr; virtual;
- END;
-
- sequenceptr = ^sequenceset;
- sequenceset = OBJECT
- nextsequence : sequenceptr;
- sequencenum : Word;
- sequenceframe : AFramePtr;
- END;
-
- AnimateObject = OBJECT(coordinates)
- currentframe : AFramePtr; {pointer to current picture frame}
- firstframe : AFramePtr; {first image pointer}
- sequenceframe : sequenceptr;
- FrameNumber : Word;
- constructor init;
- Procedure Origin(ox,oy:Word);
- Procedure GetOrigin(VAR lastox,lastoy:Integer);
- Procedure ResetFrame(startframe : Word);
- Function CurrentFrameNumber : Word;
- Function Destination(dx,dy: Word) : Word;
- Procedure AddFrame(pp:Pointer; mx,my: Integer; ht,wd,dy,hz,hzdy,co:Word);
- Procedure Sequence(seqnum:Word);
- Procedure ResetSequence;
- Procedure AnimateInit;
- Procedure Animate(numframe : Word);
- Procedure Complete;
- END;
-
-
-
- IMPLEMENTATION
-