/* Ripple1.adpro
**
** $VER: Ripple1.adpro 1.0.0 (1.10.92)
**
** This script uses the Ripple operator to create a 16 frame animation.
**
** Copyright © 1992 ASDG Incorporated  All Rights Reserved
*/

ADDRESS "ADPro"
OPTIONS RESULTS

/******************************************************************	
The initial phase of this wave 
******************************************************************/

PHASE = 0

/******************************************************************	
How much to increase the phase for each frame. Since we are making a
16 frame animation, and there are 360 degrees of phase, we simply
divide (360/16) = 22.5. Changing the phase is the key to this entire
animtion, as no other parameters change.
******************************************************************/

PHASE_INCREMENT = 22.5

/******************************************************************	
Loop 16 times
******************************************************************/

do loop = 1 to 16

/******************************************************************	
Change the two lines below for your machine. You must load in 320x200
image for this animation. At the very least you will have to change
the path in the "LOAD ..." command
******************************************************************/

	LFORMAT "IFF"
	LOAD "ram:test.iff"

/******************************************************************	
The ripple operator. This will place the Ripple at the center of the
Image. Note that all the paramters except the Phase are fixed. Also
note that we do not change the value of the frame parameter. With a
Speed of 20 and a Frame of 20, the radius of this wave is 400 pixels --
well off the edge of the screen.
******************************************************************/

	OPERATOR "RIPPLE",
	"CENTER" 160 100 "PROPSPEED" 20 "PERIOD" 20 "AMPLITUDE" 15 "PHASE" PHASE,
	"RAMP" 0 "LEVELOFF" 0 "WAVETYPE" 0 "FRAME" 20 "NEWWAVE"
	
/******************************************************************	
Increase the phase, make sure it wraps around correctly. Cannot be
over 360.
******************************************************************/

	PHASE = PHASE + PHASE_INCREMENT
	IF PHASE > 360 THEN PHASE = PHASE - 360
	
/******************************************************************	
Set the dither type to floyd, graphics type to HAM, and render the
rippled image data
******************************************************************/

	DITHER 1
	RENDER_TYPE HAM
	EXECUTE

/******************************************************************	
You will have to change the path of the save command on your machine.
Remember, you will need one to one megabytes of free space
on whatever device you end up saving the animation to!
******************************************************************/

	SFORMAT "ANIM"
	SAVE "ram:testAnim" IMAGE APPEND
end

/******************************************************************	
Tell the ANIM saver that we are done with this animation
******************************************************************/

SFORMAT "ANIM"
SAVE "ram:TestAnim" IMAGE WRAPUP
