/* v0.9 2/24/93 Just Starting, but the program is pretty much */
/* done, in my head. */
/* v0.95 2/25/93 The script is done and (semi-)functional, but */
/* it's bumping into bugs. Needs a little */
/* polishing. */
/* v1.0 2/25/93 Finally done and fairly stable. Consult */
/* documentation for more info. */
/* v1.0a 2/25/93 Fixed version number in startup requestor. */
/* Fixed Method number in one of these goofy */
/* REMARK thingies. Nothing that matters. */
/* v1.0b 2/26/93 Corrected some spelling errors in the */
/* documentation. */
/* v1.1 2/26/93 Vastly icreased speed. By optimizing the */
/* diffusion and smoothing process. Now uses Blur */
/* DrawMode instead of Smooth to avoid the cross- */
/* hatch look. Then Uses Smooth DrawMode for top */
/* scanline to repair Blur's sloppiness. Only one */
/* or two Smooth passes are really all you'll ever */
/* need now. */
/* Also, the flames seem to look better now. */
/* v1.1b 2/26/93 Now only performs diffuse and blur operations */
/* from upper-left corner to brush-size + 25 */
/* pixels. */
/* v1.1c 2/27/93 Now only performs diffuse and blur operations */
/* from upper-left of brush to lower-left of brush */
/* MUCH faster. */
/* v1.1d 2/27/93 Speeded it up a bit more. I don't think I can */
/* squeeze much more speed out of this thing! */
/* v1.1e 2/28/93 Do you want to go FASTER??! :) I did it again. */
/* It's turbo-charged, especially for Hi-Res work. */
/* I also changed the sample images. I think it */
/* makes a bit of a better animation now. */
/* v1.1f 3/2/93 Fixed some bad syntax. Thanks for the */
/* correction Martin! */
/* v1.2 3/6/93 By request, I added another 'method.' Be */
/* sure to browse the documentation for a full */
/* explanation of how this works. */
/* v1.2b 4/11/93 Fixed AskString requestors to be friendly with */
/* OpalPaint v2.3 and higher */
/* v1.5 9/3/94 Upgraded requestors to take full advantage of */
/* OpalPaint v2.3's new Customizable requestors. */
/* Added Savable Default file feature */
/* Added Custom Flame colour-set feature. */
/* Added ability to visually preview your flame */
/* colour-set. */
/* Added ability to disable blur passes. Why? */
/* HeckifIKnow! */
/* v1.5b Added lables for hottest to coolest colours in */
/* the "Custom" flame colour settings area. */
/* See documentation for more information */
/* Initialization of variables. Don't touch unless you know what
you are doing. */
ROOT = 'pic.'
ZERO = '0'
Options Results
Address 'OpalPaint_Rexx'
Call Panic()
Call VersionCheck()
Call ConfirmFlaminator()
Call AskMethod()
Call AskColour()
Call AskFlamePrefs()
/* Get BackgroundSource pathname */
If Method < 2 Then Do
Call GetDefaults()
PathNameDef = BkgndSrcPathDef
ReqTitle = 'Enter the pathname of your BACKGROUND source image(s)'
ReqHail = 'Get BACKGROUND animation PATH'
Call PathNameGetter()
BkgndSrcPathDef = PathNameDef
BackGroundSource = PathName
Call SaveDefaults()
End
If Method = 0 Then Call CheckDirForFiles()
/* Get FlameSource pathname */
Call GetDefaults()
PathNameDef = FlameSrcPathDef
ReqTitle = 'Enter the pathname of your FLAME source image(s)'
ReqHail = 'Get FLAME animation PATH'
Call PathNameGetter()
FlameSrcPathDef = PathNameDef
FlameSource = PathName
Call SaveDefaults()
If FlameSource = BackgroundSource Then Do
Okay 'FATAL ERROR! The FLAME source images can NOT be in\nthe same drawer as the BACKGROUND source images.\nPlease make sure you are REALLY ready to launch this script.\nRead the documentation for more info. Exiting...'
Exit
End
Call GetFlameNumbers()
/* Get Destination pathname for Method 0 or 2 */
If Method ~= 1 Then Do
Call GetDefaults()
PathNameDef = DestPathDef
ReqTitle = 'Enter pathname for FLAMED DESTINATION images.'
ReqHail = 'Get DESTINATION animation PATH'
Call PathNameGetter()
DestPathDef = PathNameDef
FlameDest = PathName
Call SaveDefaults()
If FlameDest = BackgroundSource Then Do
Okay 'FATAL ERROR! The FLAMED destination images can NOT be in\nthe same drawer as the BACKGROUND source images.\nPlease make sure you are REALLY ready to launch this script.\nRead the documentation for more info. Exiting...'
Exit
End
End
If Method = 1 Then Do
Call AskOverwrite()
If Overwrite = 0 Then Do
Call GetDefaults()
PathNameDef = DestPathDef
ReqTitle = 'Enter pathname for FLAMED DESTINATION images.'
ReqHail = 'Get DESTINATION animation PATH'
Call PathNameGetter()
DestPathDef = PathNameDef
FlameDest = PathName
Call SaveDefaults()
If FlameDest = BackgroundSource Then Do
Okay 'FATAL ERROR! The FLAMED destination images can NOT be in\nthe same drawer as the BACKGROUND source images.\nPlease make sure you are REALLY ready to launch this script.\nRead the documentation for more info. Exiting...'
Exit
End
End
End
If Method = 2 Then Do
Finder = Exists('Ram:Method2/')
If Finder = 0 Then Do
Address COMMAND
'Makedir ram:Method2'
End
BackgroundSource = 'Ram:Method2'
Address 'OpalPaint_Rexx'
Save BackgroundSource || '/pic.0001'
Method = 0
End
/* Here we go!! I'll take it from here. */
Address 'OpalPaint_Rexx'
Okay 'Here we go.'
Call Panic()
Do A = StartFrame to EndFrame
/* Get IFF Variables */
Iff = Root || Zero || Zero || Zero || A
If A < 10000 & A > 999 Then Iff = Root || A
If A < 1000 & A > 99 Then Iff = Root || Zero || A
If A < 100 & A > 9 Then Iff = Root || Zero || Zero || A