home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilst / texturgdn / !TexturGdn / Docs / Language < prev    next >
Encoding:
Text File  |  1996-09-29  |  54.0 KB  |  1,575 lines

  1.  
  2.          Texture Garden texture generation language specification
  3.          ========================================================
  4.            
  5.     This file documents version 0.44 of the texture generation language
  6.           This is distributed with Texture Garden version 0.44.
  7.  
  8. 1.00 Introduction
  9. 1.10 The format of this file
  10. 2.00 Writing textures
  11. 2.10 Syntactic considerations
  12. 3.00 Command summary (commands grouped by class)
  13. 4.00 Command details (commands grouped by class)
  14.  
  15. 1.00 Introduction
  16. ~~~~~~~~~~~~~~~~~
  17. The Language:
  18.  
  19. When editing texture generation programs, some syntactical rules need to be
  20. beone in mind.  The language is a compromise between three design criteria:
  21.  
  22. 1: That it should be readable by a human
  23. 2: That it should be editable by the computer.
  24. 3: That it should go like the clappers.
  25.  
  26. Compactness was not considered to be particularly important. 
  27. Characteristically commands are verbose.  It is recommended that typing in
  28. commands using longhand is to be avoided and that cut and paste facilities
  29. are employed wherever possible.
  30.  
  31. When loaded, commands are translated into an internal format and the original
  32. textfile is discarded.  Loaded files may contain command names in any case,
  33. truncated names, commands optionally abbreviated with the "." character,
  34. confused and confusing punctuation and mismatched brackets.  When the file is
  35. saved, it is cleaned up, reformatted and expanded into a standard format. 
  36. Unless you know what you are doing, keeping copies of the original files is
  37. recommended, as What The Computer Thinks You Are Talking About may initially
  38. differ from What You Are Trying To Say.
  39.  
  40. Error checking is currently implemented mainly at the parsing stage.  If the
  41. program you feed the computer contains errors, the message will tell you
  42. which line they are found on.  These messages should be helpful in the
  43. process of tracking down mistakes.  Runtime error messages are supported, but
  44. should occur very rarely in practise.
  45.  
  46. If your version of this program is unregistered, then you will probably
  47. experience difficulties in changing existing textures or getting your own
  48. textures to be displayed.  Please refer to the "Register" document for
  49. details of why this occurs.
  50.  
  51. Resources:
  52.  
  53. There are currently several main resources available for use in generating
  54. textures.  The texture generation program "sees" a virtual machine with a
  55. variety of storage media and one primary output channel.
  56.  
  57. There are three one dimensional buffers of &400 16-bit values which may be
  58. manipulated.   One two dimensional buffer is provided, with dimensions
  59. controlled by the size of the sprite to be generated.  A buffer for storing
  60. colourmaps exists and there is space reserved for the manipulation of &400
  61. variables.  These contain unspecified values on entry to the routine.
  62.  
  63. Texture generation programs are entered when a texture is required.  Their
  64. execution begins at their first line.
  65.  
  66. 1.10 The format of this file
  67. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. In the command summary which follows, each command is named and then it is
  69. followed by a string in brackets indicating what kind of parameters it takes.
  70. If there are no brackets then the command takes no parameters.  In the second
  71. part of the document, descriptions of the operation of each of the commands
  72. are also given.
  73.  
  74. Comments are considered to be anything after a "|" character.  Comments in
  75. If...Then...Else lines are treated using the same conventions as in Obey
  76. files, i.e. "If 1 = 2 THEN |ECHO Equal! ELSE ECHO Not_Equal!" would print
  77. "Not_Equal!" in an Obey file, despite the earlier "|".
  78.  
  79. 2.00 Writing textures
  80. ~~~~~~~~~~~~~~~~~~~~~
  81. Conventions:
  82.  
  83. All textures should begin with a definition of their primary palette enclosed
  84. by the commands "StartColourDefinition" and "EndColourDefinition".
  85.  
  86. Textures terminate when they reach the "End" command.  It is conventional to
  87. place subroutine definitions after the "End" so they are seperate from the
  88. main program.  The mutator may rely on this in the future.
  89.  
  90. 2.00 Syntactic considerations
  91. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92. Essentially, the syntax of the language is simple.  
  93.  
  94. Everything falls into one of four categories.  
  95.  
  96. These four categories are: Comments, Commands, Functions and Parameters.
  97.  
  98. Comments are simple: they are considered to be anything after a "|"
  99. character.
  100.  
  101. Commands come in three types: Conditional, Ordinary and Branch commands.
  102.  
  103. Conditionals have the form: "If <Condition> Then <Command> Else <Command>". 
  104. The "Until <Condition>" command also comes into this category.
  105.  
  106. Ordinary commands normally appear at the start of each line.  They may have
  107. zero or more parameters.  If they have parameters then these are enclosed in
  108. brackets.
  109.  
  110. Branch related commands come in several types.  "Define <DefinitionMarker>"
  111. sets a named mark at a point in the file, "Call <DefinitionMarker>" calls the
  112. relevant "Define" and continues until a "Return" is encountered. 
  113. "Goto <DefinitionMarker>" simply continues execution from the relevant
  114. "Define".
  115.  
  116. Functions may be given instead of parameters.  They should never appear at
  117. the start of a line.  Functions are defined over the domain (&0000-&FFFF). 
  118. They generally range over (&0000-&FFFF).  That they have the same range as
  119. their domains means that it is convenient to feed the results of functions
  120. to other functions as parameters.
  121.  
  122. Parameters may cover the range from &0000 to &FFFF.  They may be given as
  123. signed or unsigned, decimal or hexadecimal (with a preceeding "&") integers. 
  124. Where a paramter is required, this may be given as a constant numerical value
  125. or as a function.  Variables may be used and are implemented as simple
  126. functions.
  127.  
  128. Textures are not especially sensitive to punctuation mistakes, spaces, or
  129. other idiosyncrasies.  If brackets are mismatched, the program guesses where
  130. they should be and inserts them.  This is useful when editing textures in a
  131. text editor.
  132.  
  133. 3.00 Command summary (commands grouped by class)
  134. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135. 01 Functions
  136. ~~~~~~~~~~~~
  137. Combine(Type,A,B)
  138. ScaledSignedMultiply(A,B)
  139. SignedMultiply(A,B)
  140. PartlyScaledSignedMultiply(A,B)
  141. PartlyScaledMultiply(A,B)
  142. Divide(Numerator,Denominator)
  143. Eor(A,B)
  144. And(A,B)
  145. Or(A,B)
  146. Absolute(A)
  147. LogicalShiftLeft(A,Exponent)
  148. LogicalShiftRight(A,Exponent)
  149. ArithmeticShiftLeft(A,Exponent)
  150. ArithmeticShiftRight(A,Exponent)
  151. Variable(Variable_Number)
  152. Random(And_value,Eor_value)
  153.  
  154. 02 Types
  155. ~~~~~~~~
  156. SimpleAddition
  157. UnboundedAddition
  158. CeilingAddition
  159. HalvingAddition
  160. SimpleSubtraction
  161. UnboundedSubtraction
  162. FloorSubtraction
  163. HalvingSubtraction
  164. Maximise
  165. Minimise
  166. Overwrite
  167. PositiveOverwrite
  168. Preserve
  169. Multiplication
  170. ScaledMultiplication
  171. Zeroise
  172.  
  173. 03 Constants
  174. ~~~~~~~~~~~~
  175. True
  176. False
  177. Zero
  178. Ninety
  179. OneHundredAndEighty
  180. TwoHundredandSeventy
  181. FloydSteinberg
  182.  
  183. 04 Variables
  184. ~~~~~~~~~~~~
  185. X
  186. Y
  187. Z
  188. Size
  189. LogSize
  190. LogBitsPerPixel
  191. AnimationFrameNumber
  192. AnimationType(Frequency)
  193.  
  194. Sin(Theta)
  195. Cos(Theta)
  196. SignedSin(Theta)
  197. SignedCos(Theta)
  198. SquareRoot(Value)
  199.  
  200. 05 Section of Functions of X and Y
  201. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  202. Noise(Intensity,MaximumFrequency)
  203. PinkNoise(Intensity,MaximumFrequency)
  204. QuickNoise(Intensity,MaximumFrequency)
  205. BandpassNoise(Intensity,MinimumFrequency,MaximumFrequency)
  206. BandpassQuickNoise(Intensity,MinimumFrequency,MaximumFrequency)
  207. FractalNoise(MaximumIntensity,FractalDimension)
  208. ShiftedSymmetricNoise(Intensity,MaximumFrequency,X,Y)
  209. ShiftedSymmetricPinkNoise(Intensity,MaximumFrequency,X,Y)
  210. ShiftedNoise(Intensity,MaximumFrequency,X,Y)
  211. ShiftedPinkNoise(Intensity,MaximumFrequency,X,Y)
  212. ShiftedSymmetricQuickNoise(Intensity,MaximumFrequency,X,Y)
  213. ShiftedQuickNoise(Intensity,MaximumFrequency,X,Y)
  214. ShiftedSymmetricFractalNoise(MaximumIntensity,FractalDimension,X,Y)
  215. ShiftedFractalNoise(Intensity,MaximumFrequency,X,Y)
  216.  
  217. TwoDimensionalPoint(X,Y)
  218. OneDimensionalPoint(X)
  219. OneDimensionalPointOne(X)
  220. OneDimensionalPointTwo(X)
  221. QuickTwoDimensionalPoint(X,Y)
  222. QuickOneDimensionalPoint(X)
  223. QuickOneDimensionalPointOne(X)
  224. QuickOneDimensionalPointTwo(X)
  225.  
  226. 06 Miscellaneous
  227. ~~~~~~~~~~~~~~~~
  228. Beep
  229. Bell
  230. End
  231. Checksum(Value)
  232. UnknownCommand
  233.  
  234. 07 Conditional
  235. ~~~~~~~~~~~~~~
  236. If <Condition> Then <Command> Else <Command>...
  237.  
  238. IsLessThan(A,B)
  239. IsGreaterThan(A,B)
  240. IsLessThanOrEqualTo(A,B)
  241. IsGreaterThanOrEqualTo(A,B)
  242. SignedIsLessThan(A,B)
  243. SignedIsGreaterThan(A,B)
  244. SignedIsLessThanOrEqualTo(A,B)
  245. SignedIsGreaterThanOrEqualTo(A,B)
  246. IsEqualTo(A,B)
  247. IsNotEqualTo(A,B)
  248.  
  249. 08 Mutation
  250. ~~~~~~~~~~~
  251. StopMutating
  252. StartMutating
  253.  
  254. 09 Animation
  255. ~~~~~~~~~~~~
  256. StartAnimating
  257. StopAnimating
  258.  
  259. 10 Graphical output
  260. ~~~~~~~~~~~~~~~~~~~
  261. MakeSprite
  262. AddToSprite
  263. TruncateSpriteVertically(Bottom,Top)
  264. TruncateSpriteHorizontally(Left,Right)
  265. ResizeSprite(XFactor,YFactor)
  266.  
  267. 11 Fourier Transform related
  268. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  269. CreateTwoDimensionalFilter(Filter_Description)
  270. TwoDimensionalTransform
  271. SmoothTwoDimensionalTransform
  272. CreateOneDimensionalFilter(Filter_Description)
  273. OneDimensionalTransform
  274. SmoothOneDimensionalTransform
  275.  
  276. 12 Variable Setting
  277. ~~~~~~~~~~~~~~~~~~~
  278. SetVariable(Variable_Number,Value)
  279. SetAnimationFrameNumber(Value)
  280.  
  281. Seed(Value)
  282. RestoreArtefactsFlags
  283. Phase(Value)
  284. NoiseToBeFiltered(Value)
  285. CreateCosineSymmetry
  286. CreateSineSymmetry
  287. CreateCosineArtefacts(Value)
  288. CreateSineArtefacts(Value)
  289. AbandonCosinePhase
  290. AbandonSinePhase
  291.  
  292. 13 Dithering
  293. ~~~~~~~~~~~~
  294. Dithering(Value)
  295. DitheringOne(Value)
  296. DitheringTwo(Value)
  297.  
  298. 14 Processing
  299. ~~~~~~~~~~~~~
  300. OneDimensionalProcess(X1,X2,Function,Type)
  301. TwoDimensionalProcess(X1,X2,Y1,Y2,Function,Type)
  302. OneDimensionalFilter(Left,Centre,Right,Type)
  303. TwoDimensionalFilter(Top_Left,Top_Centre,Top_Right,Middle_Left,Middle_Centre,
  304.   Middle_Right,Bottom_Left,Bottom_Centre,Bottom_Right,Type)
  305. TwoDimensionalContrast(Value)
  306. OneDimensionalContrast(Value)
  307. OneDimensionalFlood(Threshold,Multiplier,Value,Type)
  308. TwoDimensionalFlood(Threshold,Multiplier,Value,Type)
  309. OneDimensionalEqualization
  310. TwoDimensionalEqualization
  311. TwoDimensionalInversion
  312. OneDimensionalInversion
  313. GenerateOneDimensionalDust(Threshold,NewValue,Type)
  314. GenerateTwoDimensionalDust(Threshold,NewValue,Type)
  315. TwoDimensionalClear
  316. OneDimensionalClear
  317. DefineSolidBlock(Block_Description)
  318. Sculpture(Path_of_X,Path_of_Y,Path_of_Z)
  319. Resize(XFactor,YFactor)
  320.  
  321. 15 Linear segments
  322. ~~~~~~~~~~~~~~~~~~
  323. LinearField(Y1,Y2)
  324. LinearFieldSegment(X1,X2,Y1,Y2,Type)
  325. Rectangle(I,X1,X2,Y1,Y2,Type)?
  326.  
  327. 16 Shifting
  328. ~~~~~~~~~~~
  329. OneDimensionalShift(Delta_X,Type)
  330. TwoDimensionalShift(Delta_X,Delta_Y,Type)
  331.  
  332. 17 Rotation
  333. ~~~~~~~~~~~
  334. QuickRotate(Theta,Type)
  335. Rotate(Theta,Type)
  336. SlowRotate(Theta,Type)
  337. RotateAbout(Theta,X,Y,Type)
  338. SlowRotateAbout(Theta,X,Y,Type)
  339.  
  340. 18 Loops
  341. ~~~~~~~~
  342. Repeat
  343. Until(Condition)
  344. For(Number_of_times_to_loop)
  345. Next
  346.  
  347. 19 Buffer manipulation
  348. ~~~~~~~~~~~~~~~~~~~~~~
  349. OneDimensionalStoreBufferOne
  350. OneDimensionalStoreBufferTwo
  351. OneDimensionalSwapBufferOne
  352. OneDimensionalSwapBufferTwo
  353. OneDimensionalMaskBufferOne(Type)
  354. TwoDimensionalStore
  355. TwoDimensionalSwap
  356. TwoDimensionalMask(Type)
  357.  
  358. 20 Waves and Distortions
  359. ~~~~~~~~~~~~~~~~~~~~~~~~
  360. VerticalDistortion(Type)
  361. HorizontalDistortion(Type)
  362. HorizontalWaveWarp(Type)
  363. VerticalWaveWarp(Type)
  364. HorizontalWaves(Type)
  365. VerticalWaves(Type)
  366.  
  367. 21 Colour related
  368. ~~~~~~~~~~~~~~~~~
  369. StartColourDefinition
  370. EndColourDefinition
  371. CreateColoursUsingRGBData
  372. CreateColoursUsingHSVData
  373.  
  374. 22 Mirroring, Flipping and Shearing
  375. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  376. HorizontalMirror(Type)
  377. VerticalMirror(Type)
  378. LeadingDiagonalMirror(Type)
  379. TrailingDiagonalMirror(Type)
  380. HorizontalShear(Size,Type)
  381. VerticalShear(Size,Type)
  382.  
  383. 23 Blobbing
  384. ~~~~~~~~~~~
  385. Ripples(Intensity,Radius,X,Y,Type)
  386. Radials(Intensity,Radius,X,Y,Type,TypeTwo)
  387.  
  388. 24 Branching
  389. ~~~~~~~~~~~~
  390. Define <DefinitionMarker>
  391. Goto <DefinitionMarker>
  392. Call <DefinitionMarker>
  393. Return
  394.  
  395. 4.00 Command details (commands grouped by class)
  396. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  397.                        01 Section of Functions
  398.                        =======================
  399.  
  400. Combine(Type,A,B)
  401. ~~~~~~~~~~~~~~~~~
  402. This function combines the values of A and B according to the rule described
  403. by the "Type" given.  This type may be expressed as one of the following:
  404.  
  405. SimpleAddition, UnboundedAddition, CeilingAddition, HalvingAddition,
  406. SimpleSubtraction, UnboundedSubtraction, FloorSubtraction,
  407. HalvingSubtraction, Maximise,Minimise, Overwrite, PositiveOverwrite,
  408. Preserve, Multiplication or ScaledMultiplication.
  409.  
  410. These are described in the section on types below.  Alternatively, A number
  411. or expression may be given.  Please refer to the types section which contains
  412. technical details on this.
  413.  
  414. ScaledSignedMultiply(A,B)
  415. ~~~~~~~~~~~~~~~~~~~~~~~~~
  416. Function returning the value of (A * B) << 16, treating A and B as signed
  417. integers.
  418.  
  419. SignedMultiply(A,B)
  420. ~~~~~~~~~~~~~~~~~~~
  421. Function returning the value of A * B, treating A and B as signed integers.
  422.  
  423. PartlyScaledSignedMultiply(A,B)
  424. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  425. Function returning the value of (A * B) << 8, treating A and B as signed
  426. integers.
  427.  
  428. PartlyScaledMultiply(A,B)
  429. ~~~~~~~~~~~~~~~~~~~~~~~~~
  430. Function returning the value of (A * B) << 8.
  431.  
  432. Divide(Numerator,Denominator)
  433. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  434. Function returning the value of Integer(Numerator / Denominator)
  435.  
  436. Eor(A,B)
  437. ~~~~~~~~
  438. Function returning the value of A Exclusive_Or B.
  439.  
  440. And(A,B)
  441. ~~~~~~~~
  442. Function returning the value of A And B (bitwise AND).
  443.  
  444. Or(A,B)
  445. ~~~~~~~
  446. Function returning the value of A Or B (bitwise OR).
  447.  
  448. Absolute(A)
  449. ~~~~~~~~~~~
  450. IF A < &8000 THEN returns A ELSE returns A Exclusive_Or &FFFF.
  451.  
  452. LogicalShiftLeft(A,Exponent)
  453. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  454. Function returning the value of A * 2^Exponent (A << Exponent).
  455.  
  456. LogicalShiftRight(A,Exponent)
  457. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  458. Function returning the value of Integer(A / 2^Exponent) (A >> Exponent).
  459.  
  460. ArithmeticShiftLeft(A,Exponent)
  461. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  462. Function returning the value of A * 2^Exponent (A << Exponent).
  463.  
  464. ArithmeticShiftRight(A,Exponent)
  465. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  466. Function returning the value of A / 2^Exponent treating A as a signed
  467. integer.
  468.  
  469. Variable(Variable_Number)
  470. ~~~~~~~~~~~~~~~~~~~~~~~~~
  471. Returns the value of the <Variable_Number>th system variable.
  472.  
  473. Random(And_value,Eor_value)
  474. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  475. Function returning the value of a 16-bit system random number generator ANDed
  476. with <And_value> and then EORed with <Eor_value>.
  477.  
  478. Sin(Theta)
  479. ~~~~~~~~~~
  480. Returns ((Sin of <Theta>) + 0.5) * &8000.
  481.  
  482. Cos(Theta)
  483. ~~~~~~~~~~
  484. Returns ((Sin of <Theta>) + 0.5) * &8000.
  485.  
  486. SignedSin(Theta)
  487. ~~~~~~~~~~~~~~~~
  488. Returns (Sin of <Theta>) * &8000.
  489.  
  490. SignedCos(Theta)
  491. ~~~~~~~~~~~~~~~~
  492. Returns (Sin of <Theta>) * &8000.
  493.  
  494. SquareRoot(Value)
  495. ~~~~~~~~~~~~~
  496. Returns the square root of Value.
  497.  
  498.                       02 Section of Types
  499.                       ===================
  500.  
  501. Types govern how two parameters are combined with one another.  Precicely
  502. which two parameters it refers to depends on the function using it.  Often, a
  503. process will perform some caculation on the value of a function at a point
  504. and then recombine this with the original vaule at that point before using
  505. its result.
  506.  
  507. In the following description of the common Types, A and B are used to
  508. describe the two values to be combined.
  509.  
  510. SimpleAddition
  511. ~~~~~~~~~~~~~~
  512. IF A + B < &10000 THEN returns (A + B) ELSE returns &20000 - (A + B).
  513.  
  514. This produces an effect like a ball bouncing off a ceiling (ahem).
  515.  
  516. UnboundedAddition
  517. ~~~~~~~~~~~~~~~~~
  518. Returns (A + B) And &FFFF.
  519.  
  520. CeilingAddition
  521. ~~~~~~~~~~~~~~~
  522. IF A + B < &10000 THEN returns (A + B) ELSE returns &FFFF.
  523.  
  524. HalvingAddition
  525. ~~~~~~~~~~~~~~~
  526. Returns (A + B) DIV 2 (A and B are considered unsigned).
  527.  
  528. SimpleSubtraction
  529. ~~~~~~~~~~~~~~~~~
  530. IF A - B > 0 THEN returns (A - B) ELSE returns (B - A).
  531.  
  532. This produces an effect like a ball bouncing off a floor.
  533.  
  534. UnboundedSubtraction
  535. ~~~~~~~~~~~~~~~~~~~~
  536. Returns (A - B) And &FFFF.
  537.  
  538. FloorSubtraction
  539. ~~~~~~~~~~~~~~~~
  540. IF A - B > 0 THEN returns (A - B) ELSE returns 0.
  541.  
  542. HalvingSubtraction
  543. ~~~~~~~~~~~~~~~~~~
  544. Returns (A - B) DIV 2 (A and B are considered unsigned).
  545.  
  546. Maximise
  547. ~~~~~~~~
  548. Returns the greater of A and B (A and B are considered unsigned).
  549.  
  550. Minimise
  551. ~~~~~~~~
  552. Returns the lesser of A and B (A and B are considered unsigned).
  553.  
  554. Overwrite
  555. ~~~~~~~~~
  556. Returns B.
  557.  
  558. PositiveOverwrite
  559. ~~~~~~~~~~~~~~~~~
  560. Returns (B EOR &8000).
  561.  
  562. Preserve
  563. ~~~~~~~~
  564. Returns A.
  565.  
  566. Multiplication
  567. ~~~~~~~~~~~~~~
  568. Returns A * B And &FFFF.
  569.  
  570. ScaledMultiplication
  571. ~~~~~~~~~~~~~~~~~~~~
  572. Returns ((A * B) DIV &10000) And &FFFF.
  573.  
  574. Zeroise
  575. ~~~~~~~
  576. Returns 0.
  577.                          03 Section of Constants
  578.                          =======================
  579.  
  580. True
  581. ~~~~
  582. Returns &FFFF.
  583.  
  584. False
  585. ~~~~~
  586. Returns 0.
  587.  
  588. Zero
  589. ~~~~
  590. Returns 0.
  591.  
  592. Ninety
  593. ~~~~~~
  594. Returns &4000.
  595.  
  596. OneHundredAndEighty
  597. ~~~~~~~~~~~~~~~~~~~
  598. Returns &8000.
  599.  
  600. TwoHundredandSeventy
  601. ~~~~~~~~~~~~~~~~~~~~
  602. Returns &C000.  These commands are useful in connection with "Rotate".  They
  603. are not affected by the mutation engine.
  604.  
  605. FloydSteinberg
  606. ~~~~~~~~~~~~~~
  607. Returns &FEBE (from "FloydstEinBErg").  Not currently used.
  608.  
  609.                           04 Section of Variables
  610.                           =======================
  611.  
  612. X
  613. ~
  614. Y
  615. ~
  616. Z
  617. ~
  618. Return X, Y, and Z in appropriate situations.  In OneDimensional commands, Y
  619. is always 0.  Z should not be used, except in "DefineSolidBlock" commands.
  620.  
  621. Size
  622. ~~~~
  623. Returns the size at which the texture is being generated.  This should not
  624. normally be referred to.
  625.  
  626. LogSize
  627. ~~~~~~~
  628. Returns the size at which the texture is being generated.  This should not
  629. normally be referred to.
  630.  
  631. LogBitsPerPixel
  632. ~~~~~~~~~~~~~~~
  633. Returns the log in base 2 of the number of bits-per-pixel in the screen mode
  634. in which the texture is being generated.  This may be usefully referred to
  635. when choosing dithering patterns for the texture: e.g.
  636.  
  637. AnimationFrameNumber
  638. ~~~~~~~~~~~~~~~~~~~~
  639. Returns the number of the animation frame currently being generated.
  640. This is only of interest if the texture is to be animated.
  641.  
  642. AnimationType(Frequency)
  643. ~~~~~~~~~~~~~~~~~~~~~~~~
  644. Returns the value of the corresponding value to Frequency in the buffer
  645. controlling the type of animation to be used.  This buffer can be thought of
  646. as containing 1024 signed 4-bit values, controlling the way in which various
  647. frequencires in the texture are animated.  This should only normally be
  648. referred to if the texture is to be animated.  If the texture is not being
  649. animated and the "Use animation type" option is not on then it returns 0.
  650.  
  651.                   05 Section of Functions of X and Y
  652.                   ==================================
  653.  
  654. These functions are functions of X and Y as well as their parameters.  They
  655. are mainly used for creating filters.  Using a command like
  656. "CreateTwoDimensionalFilter".  Filters are usually used to filter random
  657. noise with the result then being inverse-fourier-transform'd.  The
  658. descriptions of the functions describe what they look like when viewed in the
  659. frequency domain.  Descriptions in three dimensions use the convention of
  660. describing the value of the function at a point as its "height" at that
  661. point.
  662.  
  663. Noise(Intensity,MaximumFrequency)
  664. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  665. The plan view of this function looks like a circle about the origin.  In
  666. three dimensions it looks like a cylindrical tin can of height H = Intensity.
  667.  
  668. PinkNoise(Intensity,MaximumFrequency)
  669. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  670. The plan view of this function looks like a circle about the origin.  It
  671. fades towards the edges and may be visualised in three dimensions as a cone
  672. or "witches hat" of height H = Intensity.
  673.  
  674. QuickNoise(Intensity,MaximumFrequency)
  675. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  676. The plan view of this function looks like a square about the origin.  In
  677. three dimensions it looks like  a square office block of height
  678. H = Intensity.
  679.  
  680. BandpassNoise(Intensity,MinimumFrequency,MaximumFrequency)
  681. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  682. The plan view of this function looks like a circle about the origin with its
  683. centre hollowed out.  In three dimensions it looks like a doughnut of height
  684. H = Intensity with sharp corners.
  685.  
  686. BandpassQuickNoise(Intensity,MinimumFrequency,MaximumFrequency)
  687. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  688. The plan view of this function looks like a square about the origin with its
  689. centre hollowed out.  In three dimensions it looks like a square office block
  690. with a square central courtyard.
  691.  
  692. FractalNoise(MaximumIntensity,FractalDimension)
  693. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  694. This function looks like a mountain whose sides follow the function
  695. H = FractalDimension/(RxR) where R is the distance from the origin.  The
  696. mountain is truncated at H = MaximumIntensity.
  697.  
  698. ShiftedNoise(Intensity,MaximumFrequency,X,Y)
  699. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  700. The plan view of this function looks like a circle centred at (X,Y).  In
  701. three dimensions it looks like a cylindrical tin can of height H = Intensity.
  702.  
  703. ShiftedPinkNoise(Intensity,MaximumFrequency,X,Y)
  704. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  705. The plan view of this function looks like a circle centred at (X,Y).  It
  706. fades towards the edges and may be visualised in three dimensions as a cone
  707. or "witches hat" of height H = Intensity.
  708.  
  709. ShiftedQuickNoise(Intensity,MaximumFrequency,X,Y)
  710. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  711. The plan view of this function looks like a square centred at (X,Y).  In
  712. three dimensions it looks like  a square office block of height
  713. H = Intensity.
  714.  
  715. ShiftedFractalNoise(Intensity,MaximumFrequency,X,Y)
  716. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  717. This function looks like a mountain whose sides follow the function
  718. H = FractalDimension/(RxR) where R is the distance from the point (X,Y).  The
  719. mountain is truncated at H = MaximumIntensity.
  720.  
  721. ShiftedSymmetricNoise(Intensity,MaximumFrequency,X,Y)
  722. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  723. The plan view of this function looks like four circles centred at (X,Y),
  724. (-X,Y), (X,-Y) and (-X,-Y).  In three dimensions it looks like four
  725. cylindrical tin cans of height H = Intensity.
  726.  
  727. ShiftedSymmetricPinkNoise(Intensity,MaximumFrequency,X,Y)
  728. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  729. The plan view of this function looks like four circles centred at (X,Y),
  730. (-X,Y), (X,-Y) and (-X,-Y).  They fade towards their edges and may be
  731. visualised in three dimensions as four cones or "witches hats" of height
  732. H = Intensity.
  733.  
  734. ShiftedSymmetricQuickNoise(Intensity,MaximumFrequency,X,Y)
  735. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  736. The plan view of this function looks like four squares centred at (X,Y),
  737. (-X,Y), (X,-Y) and (-X,-Y).  In three dimensions they look like four square
  738. office blocks of height H = Intensity.
  739.  
  740. ShiftedSymmetricFractalNoise(MaximumIntensity,FractalDimension,X,Y)
  741. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  742. This function looks like four mountains whose sides follow the function
  743. H = FractalDimension/(RxR) where R is the distance from the point (X,Y).  The
  744. mountains are symmetrical about the lines X = 0 and Y = 0.  The mountains are
  745. truncated at H = MaximumIntensity.
  746.  
  747. TwoDimensionalPoint(X,Y)
  748. ~~~~~~~~~~~~~~~~~~~~~~~~
  749. Returns the value or "height" at the point (X,Y).  This command and the three
  750. that follow it employ an anti-aliising technique to smooth sharp edges.
  751.  
  752. OneDimensionalPoint(X)
  753. ~~~~~~~~~~~~~~~~~~~~~~ Returns the value or "height" at the point (X) in the
  754. main one-dimensional buffer.
  755.  
  756. OneDimensionalPointOne(X)
  757. ~~~~~~~~~~~~~~~~~~~~~~~~~
  758. Returns the value or "height" at the point (X) in the first one-dimensional
  759. buffer.
  760.  
  761. OneDimensionalPointTwo(X)
  762. ~~~~~~~~~~~~~~~~~~~~~~~~~
  763. Returns the value or "height" at the point (X) in the second one-dimensional
  764. buffer.
  765.  
  766. QuickTwoDimensionalPoint(X,Y)
  767. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  768. QuickOneDimensionalPoint(X)
  769. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  770. QuickOneDimensionalPointOne(X)
  771. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  772. QuickOneDimensionalPointTwo(X)
  773. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  774. These four commands are identical to the four above them, except for the fact
  775. that they do not employ any anti-aliasing techniques.
  776.  
  777.                           06 Miscellaneous commands
  778.                           =========================
  779.  
  780. Beep
  781. ~~~~
  782. Bell
  783. ~~~~
  784. These produce a short beep using an equivalent to VDU 7.
  785.  
  786. UnknownCommand
  787. ~~~~~~~~~~~~~~
  788. This is not a command that should ever appear in a file, bit is inserted
  789. whenever a command is not recognised.  If a texture does not form, and saving
  790. the texture as a textfile contains this command, then probably some mistake
  791. has been make in the typing of new commands.
  792.  
  793. End
  794. ~~~
  795. This command should always be included at the end of the texture file and
  796. before any subroutines are declared.  It should always be present, by
  797. convention.
  798.  
  799. Checksum(Value)
  800. ~~~~~~~~~~~~~~~
  801. This command is included as a marketing device for the program.  It enables
  802. distribution of a version of the program that can read and display textures,
  803. and allow their saving as bitmaps, while not allowing unregistered users to
  804. edit the programs that generate these textures.
  805.  
  806. In unregistered versions of the program, textures which do not contain the
  807. correct value in their checksum or contain no checksum at all are rejected by
  808. the program and not displayed.  This limits the extent to which unregistered
  809. users may manipulate their textures.
  810.  
  811. In registered versions, an additional module is supplied which will enable
  812. the program (and all future upgrades of it) to read textures independantly of
  813. the checksum.
  814.  
  815. A site license or Super-user version will also display whether the checksum
  816. is correct, and will write texture files with correct checksums, enabling
  817. people other than the author to distribute textures readable by the freeware
  818. distributed version of the program.
  819.  
  820.                        07 Conditional commands
  821.                        =======================
  822.  
  823. If <Condition> Then <Command> Else <Command>...
  824. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  825. This command is unusual in that it does not requare brackets for its
  826. parameters.  The syntax is identical to the way if statements are used in
  827. Obey files. The commands may optionally contain further If statements. 
  828. Comments are treated as they would be in Obey files, i.e. "If 1 = 2 THEN
  829. |ECHO Equal! ELSE ECHO Not_Equal!" would print "Not_Equal!" in an Obey file,
  830. despite the earlier "|".
  831.  
  832. Digression beginning...
  833.  
  834. "If ... Then ... If ... Then ... Else" constructs currently treat the Else as
  835. belonging to BOTH "If"s.  One can't help thinking that "If ... Then ... If
  836. ... Then ... Else ... Else" should make sense - i.e. the "Else" should belong
  837. to the nearest "If".  Unless the "Ifs" are nested in this manner one of them
  838. cannot have an "Else" without the other one getting it too.  However, BASIC
  839. does not agree (and that's BBC BASIC, the official Englishman's dialect).  No
  840. doubt the Germans would have implemented it as they are used to recursively
  841. peeling verbs from their sentences and correlating them with earlier nouns. 
  842. Still, the sentence "The boy, the girl, the man, kissed, hit, ran" is reputed
  843. to be good English, though no-one seems quite to be able to get their head
  844. 'round it.  I suppose it is possible to invert the first condition so that
  845. the "If" comes after the "Else" instead of after the Then (unless the command
  846. required there is another "If" statement).
  847.  
  848. Obey files don't seem to like their "If"s nested either (programmers must
  849. find it easier to just look for the next "Else" than to count the
  850. intermediate "If"s), and so neither does Texture Garden (which tries to
  851. follow the Obey file syntax, so its files can be displayed in Obey file
  852. syntax-colouring modes in text editors).
  853.  
  854. ...digression end.
  855.  
  856. As <Condition>s you cannot use "<", "=", ">=" "!=" etc.  A list of conditions
  857. that are acceptable follows:
  858.  
  859. IsLessThan(A,B)
  860. ~~~~~~~~~~~~~~~
  861. IsGreaterThan(A,B)
  862. ~~~~~~~~~~~~~~~~~~
  863. IsLessThanOrEqualTo(A,B)
  864. ~~~~~~~~~~~~~~~~~~~~~~~~
  865. IsGreaterThanOrEqualTo(A,B)
  866. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  867. SignedIsLessThan(A,B)
  868. ~~~~~~~~~~~~~~~~~~~~~
  869. SignedIsGreaterThan(A,B)
  870. ~~~~~~~~~~~~~~~~~~~~~~~~
  871. SignedIsLessThanOrEqualTo(A,B)
  872. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  873. SignedIsGreaterThanOrEqualTo(A,B)
  874. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  875. IsEqualTo(A,B)
  876. ~~~~~~~~~~~~~~
  877. IsNotEqualTo(A,B)
  878. ~~~~~~~~~~~~~~~~~
  879. These functions are fairly self explanatory, and I hope a single example will
  880. suffice:
  881.  
  882. IsLessThan(A,B) returns TRUE (&FFFF or -1) if A is less than B, otherwise it
  883. returns FALSE (0).
  884.  
  885.                         08 Mutation Commands
  886.                         ====================
  887.  
  888. StopMutating
  889. ~~~~~~~~~~~~
  890. This command effectively stops the system from mutating until the next
  891. StartMutating command.  This has the effect of stopping any intervening
  892. commands from being affected by any mutations or sexual recombination that
  893. may occur.  This may be of use when stopping mutations affecting parts of the
  894. texture whose structural integrity is important.
  895.  
  896. StartMutating
  897. ~~~~~~~~~~~~~
  898. Reverses the effect of the last "StopMutating" command.
  899.  
  900.                       09 Animation Commands
  901.                       =====================
  902.  
  903. StopAnimating
  904. ~~~~~~~~~~~~~
  905. This command effectively stops the system variable "AnimationFrameNumber"
  906. from affecting the texture until the next StartAnimating command.  This has
  907. the effect of stopping any intervening commands from being affected by any
  908. animation that is occuring.  This may be of use when stopping palettes which
  909. are declared using Fourier transformss from being "animated" causing the
  910. palette to change then this is considered undesireable.
  911.  
  912. StartAnimating
  913. ~~~~~~~~~~~~~~
  914. Reverses the effect of the last "StopAnimating" command.
  915.  
  916. See also:
  917. SetAnimationFrameNumber, AnimationFrameNumber and AnimationType(Frequency).
  918.  
  919.                    10 Graphical output commands
  920.                    ============================
  921.  
  922. MakeSprite
  923. ~~~~~~~~~~
  924. Creates a sprite in the current mode using the current colourmap.
  925.  
  926. AddToSprite
  927. ~~~~~~~~~~~
  928. Adds to an existing sprite using the current colourmap.  The existing sprite
  929. is written to only at the points where the value at (X,Y) is non-zero.
  930.  
  931. TruncateSpriteVertically(Bottom,Top)
  932. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  933. Truncates the top and bottom edges from the sprite. * #
  934.  
  935. TruncateSpriteHorizontally(Left,Right)
  936. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  937. Truncates the left- and right-hand edges from the sprite. * #
  938.  
  939. ResizeSprite(XFactor,YFactor)
  940. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  941. Performs "TruncateSpriteHorizontally(0,XFactor)" and
  942. "TruncateSpriteVertically(0,YFactor)".  This is the method used by
  943. Texture Garden's front-end to resize textures.
  944.  
  945. * Note that with these commands, the sprite may not subsequently be added
  946.   to.  These operations may stop the resulting sprite from tessellating.
  947.  
  948. # These commands should only be used when resizing the texture using the
  949.   front-end is not necessary, as they will stop textures from being resized.
  950.  
  951.                     11 Fourier Transform related commands
  952.                     =====================================
  953.  
  954. CreateTwoDimensionalFilter(Filter_Description)
  955. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  956. This function is a function of X and Y as well as of its parameter
  957. "Filter_Description".  It generates a field of values in the main two
  958. dimensional working buffer.  These form a "Filter" which is usually used to
  959. filter random noise with the result then being inverse-fourier-transform'd. 
  960. The functions commonly used are described in adifferent section.  Filters may
  961. be defined in other ways, if so desired, but this is the main recommended
  962. method.
  963.  
  964. TwoDimensionalTransform
  965. ~~~~~~~~~~~~~~~~~~~~~~~
  966. This and the command that follow it perform a series of operations on the
  967. main two dimensional working buffer.  First, the contents of the buffer are
  968. used as a filter to filter a spectrum of random white noise.
  969.  
  970. What noise is used and how the filtering is performed is affected by the
  971. following commands: Seed(Value), Phase(Value), NoiseToBeFiltered(Value),
  972. CreateCosineSymmetry, CreateSineSymmetry, CreateCosineArtefacts(Value),
  973. CreateSineArtefacts(Value), AbandonCosinePhase, and AbandonSinePhase.
  974.  
  975. Exactly how these commands affect the filtering of the noise is partially
  976. described elsewhere.
  977.  
  978. Next the resulting spectrum is exposed to an two-dimensional inverse fast
  979. fourier transform.  This is an elaborate function that is capable of
  980. converting a signal from the frequency domain into the space/time domain.  I
  981. refer you to signal processing textbooks for further details.  Finally the
  982. resultant vectors are converted to a series of amplitudes by squaring, adding
  983. and then square-rooting their components.
  984.  
  985. SmoothTwoDimensionalTransform
  986. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  987. This is identical to the above command, except the resulting values are
  988. centred about &8000, eliminating the "spiky artefacts" that occur near H = 0
  989. when the plain "TwoDimensionalTransform" is used.
  990.  
  991. CreateOneDimensionalFilter(Filter_Description)
  992. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  993. See above description of this function in two dimensions.  The main one
  994. dimensional buffer is used.  The filter is calculated only over the range
  995. where Y = 0.
  996.  
  997. OneDimensionalTransform
  998. ~~~~~~~~~~~~~~~~~~~~~~~
  999. See above description of this function in two dimensions.The main one
  1000. dimensional buffer is used.
  1001.  
  1002. SmoothOneDimensionalTransform
  1003. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1004. See above description of this function in two dimensions.
  1005. The main one dimensional buffer is used.
  1006.  
  1007.                        12 Variable Setting commands
  1008.                        ============================
  1009.  
  1010. SetVariable(Variable_Number,Value)
  1011. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1012. This sets variable number (Variable_Number MOD &400) to be equal to <Value>.
  1013.  
  1014. SetAnimationFrameNumber(Value)
  1015. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1016. This sets the system variable "AnimationFrameNumber" to be equal to <Value>.
  1017. This not normally be referred to.  If the texture is to be animated manually
  1018. using batch files, then it may be used in conjunction with the "Use Animation
  1019. type" option.
  1020.  
  1021. Seed(Value)
  1022. ~~~~~~~~~~~
  1023. Sets the seed to be used in the random number generators.
  1024.  
  1025. RestoreArtefactsFlags
  1026. ~~~~~~~~~~~~~~~~~~~~~
  1027. Resets the "AbandonCosinePhase", "AbandonSinePhase", "CreateCosineSymmetry"
  1028. and "CreateSineSymmetry" flags to off.
  1029.  
  1030. Sets the values of "AbandonCosinePhase", "AbandonSinePhase",
  1031. "CreateCosineArtefacts" and "CreateSineArtefacts" to zero.
  1032.  
  1033. Phase(Value)
  1034. ~~~~~~~~~~~~
  1035. Sets the phase to be used in the filtering of the random white noise to
  1036. <Value>.  This phase affects all frequencys equally.  Changing it smoothly
  1037. produces similar effects to animating the texture using the "Positive.Boring"
  1038. animation pattern.
  1039.  
  1040. NoiseToBeFiltered(Value)
  1041. ~~~~~~~~~~~~~~~~~~~~~~~~
  1042. Sets the amplitude of the random white noise used in the filtering to
  1043. <Value>.
  1044.  
  1045. CreateCosineSymmetry
  1046. ~~~~~~~~~~~~~~~~~~~~
  1047. When filtering white noise, eliminate all sin components.  This produces a
  1048. pattern guaranteed to at its maximum at its centre, with a rotational
  1049. symmetry of two.
  1050.  
  1051. CreateSineSymmetry
  1052. ~~~~~~~~~~~~~~~~~~
  1053. When filtering white noise, eliminate all cosine components.  This produces a
  1054. pattern guaranteed to be zero at its centre, with a rotational symmetry of
  1055. two.
  1056.  
  1057. CreateCosineArtefacts(Value)
  1058. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1059. When filtering white noise, this eliminates all cosine components with an
  1060. amplitude less than a certain value.  Its effect is like "CreateSineSymmetry"
  1061. but not as extreme.
  1062.  
  1063. CreateSineArtefacts(Value)
  1064. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1065. When filtering white noise, this eliminates all sine components with an
  1066. amplitude less than a certain value.  Its effect is like
  1067. "CreateCosineSymmetry" but not as extreme.
  1068.  
  1069. AbandonCosinePhase
  1070. ~~~~~~~~~~~~~~~~~~
  1071. When filtering white noise, this eliminates the effect of the noise on the
  1072. cosine components of the result.  Instead of white noise, "bright white
  1073. light" may be thought of as being used.
  1074.  
  1075. AbandonSinePhase
  1076. ~~~~~~~~~~~~~~~~
  1077. See "AbandonCosinePhase" substituting "Sine" for "Cosine".
  1078.  
  1079.                       13 Dithering commands
  1080.                       =====================
  1081.  
  1082. The next three commands affect the way dithering is used in the generation of
  1083. palettes and sprites.
  1084.  
  1085. Dithering0 affects the red component of palettes defined using RGB data, the
  1086. "hue" component of palettes defined using HSV data and general
  1087. (within-palette) dithering when making Sprites.
  1088.  
  1089. Dithering1  affects the green component of palettes defined using RGB data
  1090. and the "saturation" component of palettes defined using HSV data.
  1091.  
  1092. Dithering2  affects the blue component of palettes defined using RGB data and
  1093. the "value" component of palettes defined using HSV data.
  1094.  
  1095. The dithering used in sprite generation is random dithering.  Floyd-Steinberg
  1096. dithering is available if required, but cannot be controlled by the texture
  1097. generation language.
  1098.  
  1099. Dithering(Value)
  1100. ~~~~~~~~~~~~~~~~
  1101. Sets Dithering0, Dithering1 and Dithering2 to be equal to <Value>.
  1102.  
  1103. DitheringOne(Value)
  1104. ~~~~~~~~~~~~~~~~~~~
  1105. Sets Dithering1 to be equal to <Value>.
  1106.  
  1107. DitheringTwo(Value)
  1108. ~~~~~~~~~~~~~~~~~~~
  1109. Sets Dithering2 to be equal to <Value>.
  1110.  
  1111.                     14 Processing commands
  1112.                     ======================
  1113.  
  1114. OneDimensionalProcess(X1,X2,Function,Type)
  1115. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1116. The section of the main one dimensional buffer defined by (X1,X2) is
  1117. processed according to "Function" and combined with its original self using
  1118. combination-type "Type".  "Function" may usefully contain commands such as
  1119. "OneDimensionalPoint(X)".
  1120.  
  1121.  
  1122. TwoDimensionalProcess(X1,Y1,X2,Y2,Function,Type)
  1123. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1124. The rectangle in the main two dimensional buffer defined by opposing corners
  1125. at (X1,Y1) and (X2,Y2) is processed according to "Function" and combined with
  1126. its original self using combination-type "Type".  "Function" may usefully
  1127. contain commands such as "TwoDimensionalPoint(X,Y)".
  1128.  
  1129. OneDimensionalFilter(Left,Centre,Right,Type)
  1130. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1131. Each point in the one dimensional buffer is processed by adding the values of
  1132. its two neighbours and itself (multiplied by one of three multipliers) and
  1133. dividing by &100 before combining it with its original self using
  1134. combination-type "Type".  The following diagram describes the position of the
  1135. relevant multipliers.
  1136.  
  1137.                 -------------
  1138.                 | L | C | R |
  1139.                 -------------
  1140.  
  1141. TwoDimensionalFilter(Top_Left,Top_Centre,Top_Right,
  1142.                      Middle_Left,Middle_Centre,Middle_Right,
  1143.                      Bottom_Left,Bottom_Centre,Bottom_Right,Type)
  1144. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1145. Each point in the two dimensional buffer is processed by adding the values of
  1146. its eight neighbours and itself (multiplied by a series of multipliers) and
  1147. dividing by &100 before combining it with its original self using
  1148. combination-type "Type".  The following diagram describes the position of the
  1149. relevant multipliers.
  1150.  
  1151.                   ----------------
  1152.                   | TL | TC | TR |
  1153.                   ----------------
  1154.                   | ML | MC | MR |
  1155.                   ----------------
  1156.                   | BL | BC | BR |
  1157.                   ----------------
  1158.  
  1159. OneDimensionalContrast(Value)
  1160. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1161. Multiplies the entire contents of the main one dimensional buffer by <Value>,
  1162. divides by &100 and then truncates any high bit "spillage".
  1163.  
  1164. TwoDimensionalContrast(Value)
  1165. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1166. Multiplies the entire contents of the main two dimensional buffer by <Value>,
  1167. divides by &100 and then truncates any high bit "spillage".
  1168.  
  1169. OneDimensionalFlood(Threshold,Multiplier,Value,Type)
  1170. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1171. If the contents of the main one dimensional buffer at any point is less than
  1172. <Threshold>, this command multiplies it by <Multiplier>, divides by &100 and
  1173. then combines it with <Value> using combination-type "Type".
  1174.  
  1175. TwoDimensionalFlood(Threshold,Multiplier,Value,Type)
  1176. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1177. If the contents of the main one dimensional buffer at any point is less than
  1178. <Threshold>, this command multiplies it by <Multiplier>, divides by &100 and
  1179. then combines it with <Value> using combination-type "Type".
  1180.  
  1181. OneDimensionalEqualization
  1182. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1183. This expands the range of the contents of the main one dimensional buffer
  1184. until it covers the range &0000-&FFFF by using linear scaling.
  1185.  
  1186. TwoDimensionalEqualization
  1187. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1188. This expands the range of the contents of the main two dimensional buffer
  1189. until it covers the range &0000-&FFFF by using linear scaling.
  1190.  
  1191. One of the problems with this command (and the one above) emerges when
  1192. textures using it are animated.  Because the height of the highest mountain
  1193. and the floor of the deepest valley (so to speak) determine the scaling
  1194. factor to be used, this will be a different factor for different animation
  1195. fromes.  An especially high mountain will produce a "freak" low gain value. 
  1196. This will have the effect of making the rest of the texture appear lower than
  1197. it would normally be.  Depending on the colouring scheme used, this can
  1198. result in an unsightly flashing effect in the resultant animation.  There is
  1199. no simple fix for this, but truncating high mountains, and using a fixed gain
  1200. contrast command are both possible.
  1201.  
  1202. GenerateOneDimensionalDust(Threshold,Function,Type)
  1203. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1204. Processes the contents of the main one dimensional buffer by comparing it to
  1205. a bank of white noise and combining those values exceeded by some threshold
  1206. (<Threshold>) by the function (of X) "Function" using combination-type
  1207. "Type".
  1208.  
  1209. GenerateTwoDimensionalDust(Threshold,Function,Type)
  1210. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1211. Similar to above using the main two dimensional buffer.
  1212.  
  1213. TwoDimensionalInversion
  1214. ~~~~~~~~~~~~~~~~~~~~~~~
  1215. Inverts (EORs with &FFFF) the main two dimensional buffer.
  1216.  
  1217. OneDimensionalInversion
  1218. ~~~~~~~~~~~~~~~~~~~~~~~
  1219. Inverts (EORs with &FFFF) the main one dimensional buffer.
  1220.  
  1221. TwoDimensionalClear
  1222. ~~~~~~~~~~~~~~~~~~~
  1223. Clears the main two dimensional buffer with zeros.
  1224.  
  1225. OneDimensionalClear
  1226. ~~~~~~~~~~~~~~~~~~~
  1227. Clears the main one dimensional buffer with zeros.
  1228.  
  1229. DefineSolidBlock(Block_Description)
  1230. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1231. This command defines a solid block of texture in three dimensions.  Its
  1232. single parameter, "Block_Description" is a function of X,Y, and Z.  This
  1233. function usually refers to the various buffers using the
  1234. "TwoDimensionalPoint" commands.
  1235.  
  1236. Sculpture(Path_of_X,Path_of_Y,Path_of_Z)
  1237. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1238. This command sculpts a solid shape from the solid block of texture described
  1239. in the last "DefineSolidBlock" command.  The paramaters, "Path_of_X",
  1240. "Path_of_Y", "Path_of_Z", define a mapping between X and Y and the three
  1241. dimensional space.  They are all functions of X and Y.  The resulting shape
  1242. is stored in the main two dimensional buffer.
  1243.  
  1244. Resize(XFactor,YFactor)
  1245. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1246. Resizes the texture by XFactor and YFactor.
  1247. Actually performs something similar to:
  1248. "TwoDimensionalShift(&8000,&8000,Overwrite)"
  1249. "TwoDimensionalProcess(0,0,XFactor,YFactor,TwoDimensionalPoint(
  1250.    Combine(Multiplication,&40000 DIV XFactor,LogicalShiftRight(X,&6)),
  1251.    Combine(Multiplication,&40000 DIV YFactor,LogicalShiftRight(Y,&6))),
  1252.    Overwrite)".
  1253. "TwoDimensionalShift(&8000,&8000,Overwrite)"
  1254.  
  1255.                      15 Linear segment commands
  1256.                      ==========================
  1257.  
  1258. LinearField(H1,H2)
  1259. ~~~~~~~~~~~~~~~~~~
  1260. Creates a linear field over the entire domain of the main one dimensional
  1261. buffer.  It ranges from H1 ay X = 0 to H2 at X = &FFFF. *
  1262.  
  1263. LinearFieldSegment(X1,X2,H1,H2,Type)
  1264. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1265. Creates a linear field over the domain (X = X1 to X = X2) of the main one
  1266. dimensional buffer.  It ranges from Y = H1 at X = X1 to Y = H2 at X = X2. *
  1267.  
  1268. * Note that by virtue of its nature, this command and the previous one may
  1269.   destroy the ability of textures using it to tesselate.
  1270.  
  1271. Rectangle(I,X1,Y1,X2,Y2,Type)
  1272. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1273. Simply creates a rectangle in the main two dimensional buffer.  Of "height"
  1274. <I> and opposing corners at (X1,Y1) and (X2,Y2), the rectangle is combined
  1275. withe the existing pattern using combination-type "Type".
  1276.  
  1277.                         16 Shifting commands
  1278.                         ====================
  1279.  
  1280. OneDimensionalShift(Delta_X,Type)
  1281. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1282. The main one dimensional buffer is shifted by <Delta_X> and combined with its
  1283. original self using combination-type "Type".
  1284.  
  1285. TwoDimensionalShift(Delta_X,Delta_Y,Type)
  1286. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1287. The main two dimensional buffer is shifted by (<Delta_X>,<Delta_Y>) and
  1288. combined with its original self using combination-type "Type".
  1289.  
  1290.                          17 Rotation commands
  1291.                          ====================
  1292.  
  1293. QuickRotate(Theta,Type)
  1294. ~~~~~~~~~~~~~~~~~~
  1295. The main two dimensional buffer is rotated by <Theta> rounded to the nearest
  1296. multiple of 90 degrees and combined with its original self using
  1297. combination-type "Type".  Usually <Theta> is one of "Zero", "Ninety",
  1298. "OneHundredAndEighty" and "TwoHundredAndSeventy".
  1299.  
  1300. Rotate(Theta,Type)
  1301. ~~~~~~~~~~~~~~~~~~
  1302. The main two dimensional buffer is rotated by <Theta> rounded to the nearest
  1303. multiple of 1/3 of a degree and combined with its original self using
  1304. combination-type "Type". *
  1305.  
  1306. SlowRotate(Theta,Type)
  1307. ~~~~~~~~~~~~~~~~~~~~~~
  1308. Same as Rotate but with sub-pixel anti-aliasing. *
  1309.  
  1310. RotateAbout(Theta,X,Y,Type)
  1311. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1312. Similar to Rotate, but the rotation is about an arbitrary point.  This is not
  1313. equivalent to a Shift, Rotate and Shift because of the location of the
  1314. introduced discontinuities. * #
  1315.  
  1316. SlowRotateAbout(Theta,X,Y,Type)
  1317. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1318. Same as RotateAbout but with sub-pixel anti-aliasing. *
  1319.  
  1320. * Note that by virtue of the nature of its action, this command may destroy
  1321.   the ability of the texture to tesselate unless <Theta> is one of "Zero",
  1322.   "Ninety", "OneHundredAndEighty" and "TwoHundredAndSeventy" (in which case
  1323.   "QuickRotate" should be used).  The discontinuities are introduced at what
  1324.   would normally turn into the edges of the sprite.  However, further
  1325.   processing may alter their location.  The command is also a bit quick and
  1326.   dirty in that no anti-aliasing techniques are used to smooth the rotation. 
  1327.   If multiple rotations are used then this might become a problem, though it
  1328.   may also produce some interesting effects as the number of iterations
  1329.   reaches 100.
  1330.  
  1331. # Note that there is no QuickRotateAbout as this can be accomplished with a
  1332.   QuickRotate and a TwoDimensionalShift.
  1333.  
  1334.                       18 Loops
  1335.                       ========
  1336. Repeat
  1337. ~~~~~~
  1338. Sets up a "Repeat"-type loop.
  1339.  
  1340. Until(Condition)
  1341. ~~~~~~~~~~~~~~~~
  1342. Loops to the matchng "Repeat" until <Condition> is non-zero.
  1343.  
  1344. For(Number_of_times_to_loop)
  1345. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1346. Sets up a "For"-type loop to be executed <Number_of_times_to_loop> times.
  1347.  
  1348. Next
  1349. ~~~~
  1350. Loops to the matchng "For" for the specified number of times.
  1351.  
  1352.                   19 Buffer manipulation commands
  1353.                   ===============================
  1354.  
  1355. OneDimensionalStoreBufferOne
  1356. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1357. Stores the contents of the main one dimensional buffer in the first one
  1358. dimensional buffer, overwriting its contents.
  1359.  
  1360. OneDimensionalStoreBufferTwo
  1361. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1362. Stores the contents of the main one dimensional buffer in the second one
  1363. dimensional buffer, overwriting its contents.
  1364.  
  1365. OneDimensionalSwapBufferOne
  1366. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1367. Swaps the contents of the main one dimensional buffer with the contents of
  1368. the first one dimensional buffer.
  1369.  
  1370. OneDimensionalSwapBufferTwo
  1371. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1372. Swaps the contents of the main one dimensional buffer with the contents of
  1373. the second one dimensional buffer.
  1374.  
  1375. OneDimensionalMaskBufferOne(Type)
  1376. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1377. Combines the contents of the main one dimensional buffer with the contents of
  1378. the first one dimensional buffer using combination-type "Type".
  1379.  
  1380. TwoDimensionalStore
  1381. ~~~~~~~~~~~~~~~~~~~
  1382. Stores the contents of the main two dimensional buffer in the first two
  1383. dimensional buffer, overwriting its contents. *
  1384.  
  1385. TwoDimensionalSwap
  1386. ~~~~~~~~~~~~~~~~~~
  1387. Swaps the contents of the main two dimensional buffer with the contents of
  1388. the first two dimensional buffer. *
  1389.  
  1390. TwoDimensionalMask(Type)
  1391. ~~~~~~~~~~~~~~~~~~~~~~~~
  1392. Combines the contents of the main two dimensional buffer with the contents of
  1393. the first two dimensional buffer using combination-type "Type". *
  1394.  
  1395. * Note that the memory used in manipulating the first two dimensional buffer
  1396.   is not allocated by default, and this will cause the process of texture
  1397.   generation to use more memory than normal.  This is only important in
  1398.   if textures are to be generated in low-memory environments.
  1399.   
  1400.                      20 Wavey and Distorting commands
  1401.                      ================================
  1402.  
  1403. VerticalDistortion(Type)
  1404. ~~~~~~~~~~~~~~~~~~~~~~~~
  1405. Applies a series of vertical displacements to the contents of the main two
  1406. dimensional buffer according to the contents of the main one dimensional
  1407. buffer.  The maximum displacement is twice the dimensions of the main two
  1408. dimensional buffer.  Combination-type "Type" is used.
  1409.  
  1410. HorizontalDistortion(Type)
  1411. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1412. See "VerticalDistortion" which is similar.
  1413.  
  1414. HorizontalWaveWarp(Type)
  1415. ~~~~~~~~~~~~~~~~~~~~~~~~
  1416. Applies a "shaped smear" of waves to the contents of the main two dimensional
  1417. buffer whose horizontal displacements vary according to the contents of the
  1418. main one dimensional buffer.  The exact form of the smear is controlled by
  1419. the first one dimensional buffer.  The maximum amplitude of the waves is
  1420. twice the dimensions of the main two dimensional buffer.  Combination-type
  1421. "Type" is used.
  1422.  
  1423. VerticalWaveWarp(Type)
  1424. ~~~~~~~~~~~~~~~~~~~~~
  1425. See "HorizontalWaveWarp" which is similar.
  1426.  
  1427. HorizontalWaves(Type)
  1428. ~~~~~~~~~~~~~~~~~~~~~
  1429. Applies a "smear" of waves to the contents of the main two dimensional
  1430. buffer.  The exact form of the smear is controlled by the main one
  1431. dimensional buffer.  The maximum amplitude of the waves is twice the
  1432. dimensions of the main two dimensional buffer.  Combination-type "Type" is
  1433. used.
  1434.  
  1435. VerticalWaves(Type)
  1436. ~~~~~~~~~~~~~~~~~~~
  1437. See "HorizontalWaves" which is similar.
  1438.  
  1439. GenerateOneDimensionalDust(Threshold,Function,Type)
  1440. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1441. Processes the contents of the main one dimensional buffer by comparing it to
  1442. a bank of white noise and combining those values exceeded by some threshold
  1443. (<Threshold>) by the function (of X) "Function" using combination-type
  1444. "Type".
  1445.  
  1446. GenerateTwoDimensionalDust(Threshold,Function,Type)
  1447. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1448. Similar to above using the main two dimensional buffer.
  1449.  
  1450. TwoDimensionalInversion
  1451. ~~~~~~~~~~~~~~~~~~~~~~~
  1452. Inverts (EORs with &FFFF) the main two dimensional buffer.
  1453.  
  1454. OneDimensionalInversion
  1455. ~~~~~~~~~~~~~~~~~~~~~~~
  1456. Inverts (EORs with &FFFF) the main one dimensional buffer.
  1457.  
  1458.                   21 Colour related commands
  1459.                   ==========================
  1460.  
  1461. StartColourDefinition
  1462. ~~~~~~~~~~~~~~~~~~~~~
  1463. This should occur at the start of every palette definition.  It is a marker
  1464. used by the front end to manipulate texture texts.
  1465.  
  1466. EndColourDefinition
  1467. ~~~~~~~~~~~~~~~~~~~
  1468. This should occur at the end of every palette definition.  It is a marker
  1469. used by the front end to manipulate texture texts.
  1470.  
  1471. CreateColoursUsingRGBData
  1472. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1473. This command and the one that follows it sets up a field of 24 bit RGB values
  1474. describing the palette which will be used in any "MakeSprite" or
  1475. "AddToSprite" commands.
  1476.  
  1477. The three one-dimensional buffers are used to supply the colour components,
  1478. with buffer two containing the red components, buffer two containing the
  1479. green components, and the main buffer containing the blue components.
  1480.  
  1481. CreateColoursUsingHSVData
  1482. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1483. The three one-dimensional buffers are used to supply the colour components,
  1484. with buffer two containing the "hue" components, buffer two containing the
  1485. "saturation" components, and the main buffer containing the "value"
  1486. components.
  1487.  
  1488.              22 Mirroring, Flipping and Shearing commands
  1489.              ============================================
  1490.         
  1491. Caution should be exercised when using the leading-diagonal and
  1492. trailing-diagonal versions of the mirror and flip commands as they may
  1493. prevent the resulting texture from tessellating correctly.  The shear
  1494. commands may also appear to produce different effects at different
  1495. resolutions unless the absolute size of their parameter is kept quite small.
  1496.  
  1497. The following commands all combine the main two dimensional buffer with its
  1498. mirror image in the specified axis before combining it with its original self
  1499. using combination-type "Type".
  1500.  
  1501. HorizontalMirror(Type)
  1502. ~~~~~~~~~~~~~~~~~~~~~~
  1503. VerticalMirror(Type)
  1504. ~~~~~~~~~~~~~~~~~~~~
  1505. LeadingDiagonalMirror(Type)
  1506. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1507. TrailingDiagonalMirror(Type)
  1508. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1509. The following "Flip" commands are similar to the "Mirror" commands.  However,
  1510. the result is no longer guaranteed to be symmetrical.  They take fractionally
  1511. longer to perform.
  1512.  
  1513. HorizontalFlip(Type)
  1514. ~~~~~~~~~~~~~~~~~~~~
  1515. VerticalFlip(Type)
  1516. ~~~~~~~~~~~~~~~~~~
  1517. LeadingDiagonalFlip(Type)
  1518. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1519. TrailingDiagonalFlip(Type)
  1520. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1521. Shears combine a sheared image of the main two dimensional buffer with its
  1522. original self using combination-type "Type".  A shear of Size 1 produces a 45
  1523. degree shear; higher numbers may be thought of as representing  the effect of
  1524. repeated shears.
  1525.  
  1526. HorizontalShear(Size,Type)
  1527. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1528. VerticalShear(Size,Type)
  1529. ~~~~~~~~~~~~~~~~~~~~~~~~
  1530.                   23 Blobbing commands
  1531.                   ====================
  1532.  
  1533. Ripples(Intensity,Radius,X,Y,Type)
  1534. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1535. This produces a circular effect in the main two dimensional buffer.  The
  1536. effect is centred at (X,Y) and is of radius <Radius> and height <Intensity>. 
  1537. The effect is composed of concentric ripples modulated by the contents of the
  1538. main one dimensional buffer.
  1539.  
  1540. Radials(Intensity,Radius,X,Y,Type,TypeTwo)
  1541. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1542. This produces a near-circular effect in the main two dimensional buffer.  The
  1543. effect is centred at (X,Y) and is of radius <Radius> and height <Intensity>. 
  1544. The effect is composed of distorted ripples combined with radial lines
  1545. modulated by the contents of the one dimensional buffers.  The main one
  1546. dimensional buffer affects the distortion, the first buffer affects the
  1547. ripples and the second affects the radial lines and their distribution.
  1548. "Type" affects the way the radial lines are combined with the background and
  1549. "TypeTwo" affects the way the ripples are combined with the resultant.
  1550.  
  1551.                      24 Branching
  1552.                      ============
  1553.  
  1554. Define <DefinitionMarker>
  1555. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1556. Places a marker in the program and gives it a name.  This name may contain
  1557. any characters, but top-bit-set (> &7F), low values (< &20), ")", and ","
  1558. should not be used for future compatability.
  1559.  
  1560. Goto <DefinitionMarker>
  1561. ~~~~~~~~~~~~~~~~~~~~~~~
  1562. Jumps directly to the named marker.
  1563.  
  1564. Call <DefinitionMarker>
  1565. ~~~~~~~~~~~~~~~~~~~~~~~
  1566. Calls a routine at the named marker, setting up a return address.
  1567. Calls and Jumps may not currently be used as functions or as parameters to
  1568. functions.  They may be used as commands in conditional statements.
  1569.  
  1570. Return
  1571. ~~~~~~
  1572. Returns from the most recent call.
  1573.  
  1574.  
  1575.