DDDDD AAAAA EEEEEEE DDDDD AAAAA L U U SSSSS

D D A A E D D A A L U U S S

D D A A E D D A A L U U S

D D AAAAAAA EEEEEE D D AAAAAAA L U U SSSSS

D D A A E D D A A L U U S

D D A A E D D A A L U U S S

DDDDD A A EEEEEEE DDDDD A A LLLLLLL UUUUU SSSSS

** VERSION 3.5 **

This describes the Daedalus scripting language. Daedalus contains its own programming language, which can be used to automate actions, and even design whole games or other programs using Daedalus as a platform. The Macros submenu on the Edit menu allows access to these features. The file is divided into seven sections:

· 1) Glossary of Terms: Definitions of the main terms used in Daedalus scripting.

· 2) Commands: A list of each command and its shortcut, that runs a menu option.

· 3) Operations: A list of each operation, and documentation for it.

· 4) Variables: A list of each variable, and documentation for it.

· 5) Functions: A list of each function, and documentation for it.

· 6) Events: A list of each event, and how it behaves.

· 7) Texture mapping: Documentation of how texture bitmaps display in the perspective inside view.

GLOSSARY OF TERMS

Command Line: A string of text containing a sequence of actions. Command lines can be stored in macros and script files, and are automatically executed when the macro or script is run. They can also be manually executed by entering one in the Enter Command Line dialog, or specified on the operating system command line when initially launching the program.

Action: An individual instruction that tells Daedalus to run a menu command, set a dialog variable, or even access an extra feature which isn’t available through the standard user interface. An action is one of three things: A command, an operation, or a variable assignment.

Macro: A command line stored in a special place which can be executed at any time. Macros can be manually defined in the Enter Command Line dialog, or automatically defined by command lines. Macros can be manually run by selecting commands on the Run Macro submenus, or automatically run by command lines. Macros can call other macros and run script files. Macros can go 100 nested levels deep before the program will halt them with an error message.

Script: A file containing a sequence of command lines. Running the script executes each command line in sequence. Often a script will define a bunch of macros to act as functions or subroutines in a program. The first line of any script file needs to be the two characters “DS” for Daedalus to consider it as such.

Event: An occurrence in the program which can be made to automatically trigger a macro execution. Events can be manually defined in the Events dialog on the Macro submenu, or automatically defined by command lines.

Command: An action that runs a menu command, and is equivalent to selecting that menu option in the program. Every menu command in the program has a corresponding command action. Commands never take any parameters.

Operation: An action that does some other operation. Operations either duplicate the functionality behind dialogs, or access special “hidden” features only accessible through the scripting language. Operations take zero or more parameters. Note most every dialog has an operation that allows access to its functionality without bringing up the dialog itself. For example, the DlgSize command just brings up the Bitmap Size dialog and does nothing else. The Size operation however takes parameters to specify the new size of the bitmap, and automatically resizes the bitmap without bringing up the dialog.

Variable: A number or string stored somewhere. Each variable may have its value changed by an action. Variable assignments always take one parameter, which is the new value for the variable to have. Variables come in three types: Dialog settings, custom variables, and hidden scripting only variables. Most every dialog setting in the program has a corresponding variable.

Custom Variable: One of a set of generic numeric or string variables, which don’t correspond to any specific program setting, but can be used by scripts and such to store whatever they want. An example is storing your score in a game. Some of the numeric variables are automatically set by the program when it fires an event, and can be considered as parameters to that event macro. Some are automatically queried by the program after an event macro returns, and can be considered as return values from that event. The custom number and string slots start at index #0. Custom numeric variables can be referenced with the @ prefix (e.g. @0 or @999), while custom strings can be referenced with the $ prefix (e.g. $0 or $999). Custom numeric variables #1 through #26 can also be referenced with @a through @z. The strings $a through $z refer to the custom string variables indexed by the corresponding numeric variable, e.g. if @b contains 5, then $b refers to custom string #5.

Parameter: A piece of data passed to an operation or variable assignment. Parameters are one of the following three things: Constants, variables, or functions. Numeric constants are simply numbers, or may have a “#” prefix to indicate hexadecimal format, or a “##” prefix to indicate binary format. String constants are always surrounded by double quotes, single quotes, curly braces, or parentheses. Anything that’s not a constant is considered a variable or function to be queried or evaluated.

Function: A type of parameter, which evaluates to a number. Functions in turn are followed by zero or more parameters. An example is “Add”, which takes two numeric parameters and returns their sum. A function that takes zero parameters and always evaluates to the same thing can be considered a named constant, such as “True” or a specific color like “Red”. Because functions always precede their parameters, expressions in Daedalus are in prefix format, e.g. “Mul Add 1 2 Sub 4 3” expresses “Multiply(Add(1, 2), Subtract(4, 3))” or “(1 + 2) x (4 - 3)”.

Type: The type of data contained in a parameter or variable. All parameters or variables contain either numbers or strings. Numbers are signed 32 bit integers. Boolean values are no different from numbers, where False is represented by 0, and True is represented by 1 or any non-zero number. Colors are simply 24 bit numbers that represent the RGB parts of the color, where the high 8 bits contain the red part, the middle 8 bits contain the green part, and the low 8 bits contain the blue part. File handles are stored in numbers as well. There are no floating point numbers, where dialog variables that take floating point numbers are covered by integers with an assumed decimal point, where the low digits represent the fractional part, e.g. “1.25” in the dialog translates to 125, “2.5” in the dialog translates to 250, and so on.

COMMANDS

Most commands which display a single numeric result will set custom variable @z to the value displayed. For example Fill Dead Ends sets @z to the number of dead ends filled. Count Pixels sets @z to the number of on pixels when the main bitmap is active, and to the number of white pixels when the color bitmap is active. Although it doesn’t display anything, Recursive Fractal sets @z to the minimum possible maximum depth for a solution path to the end at any depth.

In the table below, each command has a standard name, which may be referenced case insensitively. Some commands also have a shortcut, which must be referenced case sensitively. A command shortcut name is the only place where case matters in scripting. A command has a shortcut only if it has a keyboard shortcut on the menu. The command shortcut is basically the key you press, where “s” is a prefix for shift, “c” means control, and “a” means alt.

Menu command Command name Shortcut

******************** File Menu ********************

File / Open... DlgOpen o

File / Run Script / Demos Script1 a1

File / Run Script / Word Mazes Script2 a2

File / Run Script / World's Largest Maze Script3 a3

File / Run Script / 4D Mazes Script4 a4

File / Run Script / 5D Mazes Script5 a5

File / Run Script / Dragonslayer Game Script6 a6

File / Run Script / Pac-Man Game Script7 a7

File / Run Script / Sokoban Game Script8 a8

File / Run Script / The Hunger Games Script9 a9

File / Run Script / Survivor Maze #1 Script11 a!

File / Run Script / Survivor Maze #2 Script12 a@

File / Run Script / Survivor Maze #3 Script13 a#

File / Run Script / Survivor Maze #4 Script14 a$

File / Run Script / Survivor Maze #5 Script15 a%

File / Run Script / Survivor Maze #6 Script16 a^

File / Run Script / Survivor Maze #7 Script17 a&

File / Run Script / Survivor Maze #8 Script18 a*

File / Run Script / Survivor Maze #9 Script19 a(

File / Run Script / Survivor Maze #10 Script10 a)

File / Run Script / Carleton Farm Maze #1 Script21 ac1

File / Run Script / Carleton Farm Maze #2 Script22 ac2

File / Run Script / Stocker Farms Maze Script23 ac3

File / Run Script / Glacier Maze Script24 ac4

File / Run Script / Safari Maze Script25 ac5

File / Run Script / Mouse Maze Script26 ac6

File / Run Script / Survivor Squares Game Script27 ac7

File / Run Script / Mandelbrot Set Fractal Script28 ac8

File / Run Script / Pentris Script29 ac9

File / Run Script / Grippy Socks Script30 ac0

File / Run Script / Jareth's Labyrinth Script31 ac!

File / Open Bitmap... DlgOpenBitmap ao

File / Save Bitmap... DlgSaveBitmap w

File / Open Text... DlgOpenText

File / Save Text... DlgSaveText

File / DOS Text / Save Blocks... DlgSaveDOSBlock

File / DOS Text / Save Lines... DlgSaveDOSLine

File / DOS Text / Save Double Lines... DlgSaveDOSLine2

File / X11 Bitmap / Open... DlgOpenX11

File / X11 Bitmap / Save Normal... DlgSaveX11

File / X11 Bitmap / Save Compressed... DlgSaveX11Comp

File / X11 Bitmap / Save Supercompressed... DlgSaveX11Super

File / 3D Bitmap / Open... DlgOpen3D

File / 3D Bitmap / Save Normal... DlgSave3D

File / 3D Bitmap / Save Supercompressed... DlgSave3DSuper

File / Save As Wallpaper / Center Bitmap SaveWallCenter

File / Save As Wallpaper / Tile Bitmap SaveWallTile

File / Save As Wallpaper / Stretch Bitmap SaveWallStretch

File / Save As Wallpaper / Fit Bitmap SaveWallFit

File / Save As Wallpaper / Fill Bitmap SaveWallFill

File / Print... Print

File / Print Setup... PrintSetup

File / File Settings... DlgFile af

File / Open Documentation Documentation )

File / More Help / Open Documentation Documentation )

File / More Help / Open Scripting HelpScript

File / More Help / Open Changes HelpChange

File / More Help / Open License HelpLicense

File / More Help / Open Website Web

File / More Help / Open Website Mirror Web2

File / Setup / Create Program Group (User) SetupUser

File / Setup / Create Program Group (All) SetupAll

File / Setup / Create Desktop Icon SetupDesktop

File / Setup / Install File Extensions SetupExtension

File / Setup / Uninstall File Extensions UnsetupExtension

File / About Daedalus... About a0

File / Exit Exit Esc

******************** Edit Menu ********************

Edit / Repeat Command Repeat ;

Edit / Autorepeat Autorepeat N

Edit / Macros / Enter Command Line... DlgCommand Ent

Edit / Macros / Open Script... DlgOpenScript co

Edit / Macros / Run Macro / Macro 1 Macro1 F1

Edit / Macros / Run Macro / Macro 2 Macro2 F2

Edit / Macros / Run Macro / Macro 3 Macro3 F3

Edit / Macros / Run Macro / Macro 4 Macro4 F4

Edit / Macros / Run Macro / Macro 5 Macro5 F5

Edit / Macros / Run Macro / Macro 6 Macro6 F6

Edit / Macros / Run Macro / Macro 7 Macro7 F7

Edit / Macros / Run Macro / Macro 8 Macro8 F8

Edit / Macros / Run Macro / Macro 9 Macro9 F9

Edit / Macros / Run Macro / Macro 10 Macro10 F10

Edit / Macros / Run Macro / Macro 11 Macro11 F11

Edit / Macros / Run Macro / Macro 12 Macro12 F12

Edit / Macros / Run Macro / Macro 13 Macro13 sF1

Edit / Macros / Run Macro / Macro 14 Macro14 sF2

Edit / Macros / Run Macro / Macro 15 Macro15 sF3

Edit / Macros / Run Macro / Macro 16 Macro16 sF4

Edit / Macros / Run Macro / Macro 17 Macro17 sF5

Edit / Macros / Run Macro / Macro 18 Macro18 sF6

Edit / Macros / Run Macro / Macro 19 Macro19 sF7

Edit / Macros / Run Macro / Macro 20 Macro20 sF8

Edit / Macros / Run Macro / Macro 21 Macro21 sF9

Edit / Macros / Run Macro / Macro 22 Macro22 sF10

Edit / Macros / Run Macro / Macro 23 Macro23 sF11

Edit / Macros / Run Macro / Macro 24 Macro24 sF12

Edit / Macros / Run Macro / Macro 25 Macro25 cF1

Edit / Macros / Run Macro / Macro 26 Macro26 cF2

Edit / Macros / Run Macro / Macro 27 Macro27 cF3

Edit / Macros / Run Macro / Macro 28 Macro28 cF4

Edit / Macros / Run Macro / Macro 29 Macro29 cF5

Edit / Macros / Run Macro / Macro 30 Macro30 cF6

Edit / Macros / Run Macro / Macro 31 Macro31 cF7

Edit / Macros / Run Macro / Macro 32 Macro32 cF8

Edit / Macros / Run Macro / Macro 33 Macro33 cF9

Edit / Macros / Run Macro / Macro 34 Macro34 cF10

Edit / Macros / Run Macro / Macro 35 Macro35 cF11

Edit / Macros / Run Macro / Macro 36 Macro36 cF12

Edit / Macros / Run Macro / Macro 37 Macro37 aF1

Edit / Macros / Run Macro / Macro 38 Macro38 aF2

Edit / Macros / Run Macro / Macro 39 Macro39 aF3

Edit / Macros / Run Macro / Macro 40 Macro40 aF4

Edit / Macros / Run Macro / Macro 41 Macro41 aF5

Edit / Macros / Run Macro / Macro 42 Macro42 aF6

Edit / Macros / Run Macro / Macro 43 Macro43 aF7

Edit / Macros / Run Macro / Macro 44 Macro44 aF8

Edit / Macros / Run Macro / Macro 45 Macro45 aF9

Edit / Macros / Run Macro / Macro 46 Macro46 aF10

Edit / Macros / Run Macro / Macro 47 Macro47 aF11

Edit / Macros / Run Macro / Macro 48 Macro48 aF12

Edit / Macros / Macro Events... DlgEvent

Edit / Copy Bitmap CopyBitmap cc

Edit / Copy Text CopyText

Edit / Paste Paste cv

Edit / Display Settings... DlgDisplay Tab

Edit / Cell Viewport Span / Decrease By 1 Viewport-1 {

Edit / Cell Viewport Span / Increase By 1 Viewport+1 }

Edit / Cell Viewport Span / Decrease By 10 Viewport-10 [

Edit / Cell Viewport Span / Increase By 10 Viewport+10 ]

Edit / Window / Size Window Full Screen WindowFull sTab

Edit / Window / Size Window To Bitmap WindowBitmap

Edit / Window / Size Bitmap To Window SizeWindow

Edit / Window / Update Window Update n

Edit / Window / Redraw Window Redraw Spc

Edit / Window / Scroll Page Up ScrollUp aPgUp

Edit / Window / Scroll Page Down ScrollDown aPgDn

Edit / Window / Scroll To Beginning ScrollHome aHome

Edit / Window / Scroll To End ScrollEnd aEnd

Edit / Set Colors... DlgColors ck

Edit / Ignore Messages IgnoreMessage ?

Edit / Query Timer TimerQuery t

Edit / Reset Timer TimerReset ct

Edit / Pause Timer TimerPause p

Edit / Random Settings... DlgRandom ar

Edit / Randomize Seed Randomize cr

******************** Dot Menu ********************

Dot / Dot Settings... DlgDot v

Dot / Move Dot / Down Left MoveDL 1

Dot / Move Dot / Down MoveD 2

Dot / Move Dot / Down Right MoveDR 3

Dot / Move Dot / Left MoveL 4

Dot / Move Dot / Right MoveR 6

Dot / Move Dot / Up Left MoveUL 7

Dot / Move Dot / Up MoveU 8

Dot / Move Dot / Up Right MoveUR 9

Dot / Move Dot / Raise MoveRaise u

Dot / Move Dot / Lower MoveLower d

Dot / Move Relative / Forward MoveForward cf

Dot / Move Relative / Back MoveBack cb

Dot / Move Relative / Turn Around Around ca

Dot / Move Relative / Left Left l

Dot / Move Relative / Right Right r

Dot / Move Relative / Random MoveRandom 0

Dot / Move Relative / North MoveNorth cn

Dot / Move Relative / South MoveSouth cs

Dot / Move Relative / West MoveWest cw

Dot / Move Relative / East MoveEast ce

Dot / Jump Dot / Down Left JumpDL !

Dot / Jump Dot / Down JumpD @

Dot / Jump Dot / Down Right JumpDR #

Dot / Jump Dot / Left JumpL $

Dot / Jump Dot / Right JumpR ^

Dot / Jump Dot / Up Left JumpUL &

Dot / Jump Dot / Up JumpU *

Dot / Jump Dot / Up Right JumpUR (

Dot / Teleport Dot / UL Corner GoUL c7

Dot / Teleport Dot / UR Corner GoUR c9

Dot / Teleport Dot / LL Corner GoLL c1

Dot / Teleport Dot / LR Corner GoLR c3

Dot / Teleport Dot / Entrance GoEntrance c8

Dot / Teleport Dot / Exit GoExit c2

Dot / Teleport Dot / Left Entrance GoEntrance2 c4

Dot / Teleport Dot / Right Exit GoExit2 c6

Dot / Teleport Dot / Middle GoMiddle c5

Dot / Teleport Dot / Random GoRandom c0

Dot / Teleport Dot / 2nd Dot Go2nd cg

Dot / Show Dot DotShow .

Dot / Walls Impassable DotWall ,

Dot / Move By Two DotTwo e

Dot / Drag Move Dot DotDrag a

Dot / Drag Is Erase DotErase c

Dot / Drag Big Dot DotBig b

Dot / Drag By Two DotDragTwo f

Dot / Set At Dot DotSet h

Dot / Zap Dot / Destroy Wall ZapWall cz

Dot / Zap Dot / Make Wall Semitransparent ZapTrans cx

Dot / Zap Dot / Make Unsemitransparent ZapUntrans cy

Dot / 2nd Dot / Set To Dot 2ndSet g

Dot / 2nd Dot / Draw Line 2ndLine

Dot / 2nd Dot / Draw Block 2ndBlock

Dot / 2nd Dot / Draw Box 2ndBox

Dot / 2nd Dot / Draw Disk 2ndDisk

Dot / 2nd Dot / Draw Circle 2ndCircle

Dot / 2nd Dot / Get Section 2ndGet ag

Dot / 2nd Dot / Put At Dot 2ndPut aG

Dot / 2nd Dot / Put With Or 2ndOr

Dot / 2nd Dot / Put With And 2ndAnd

Dot / 2nd Dot / Put With Xor 2ndXor

Dot / View Inside Inside i

Dot / Map Inside InsideMap :

Dot / Mark 'X' At Dot MarkX x

Dot / Erase 'X' At Dot EraseX y

Dot / Inside Settings... DlgInside q

******************** Bitmap Menu ********************

Bitmap / Size... DlgSize s

Bitmap / Common Sizes / 32 x 16 SizeA cA

Bitmap / Common Sizes / 32 x 32 SizeB cB

Bitmap / Common Sizes / 64 x 32 SizeD cD

Bitmap / Common Sizes / 64 x 48 SizeE cE

Bitmap / Common Sizes / 64 x 64 SizeF cF

Bitmap / Common Sizes / 128 x 64 SizeH cH

Bitmap / Common Sizes / 128 x 96 SizeI cI

Bitmap / Common Sizes / 128 x 128 SizeJ cJ

Bitmap / Common Sizes / 128 x 192 SizeS cS

Bitmap / Common Sizes / 192 x 192 SizeT cT

Bitmap / Common Sizes / 256 x 192 SizeX cX

Bitmap / Common Sizes / 256 x 384 SizeY cY

Bitmap / Common Sizes / 512 x 384 SizeZ cZ

Bitmap / Common Sizes / 512 x 768 Size\ c\

Bitmap / Common Sizes / 1024 x 384 Size] c]

Bitmap / Common Sizes / 1024 x 768 Size! c!

Bitmap / Common Sizes / 1024 x 1024 Size^ c^

Bitmap / Common Sizes / 1024 x 2048 Size# c#

Bitmap / Common Sizes / 2048 x 4096 Size% c%

Bitmap / All / Clear All AllClear Del

Bitmap / All / Set All AllSet sDel

Bitmap / All / Invert All AllInvert cDel

Bitmap / All / Random All AllRandom

Bitmap / Zoom... DlgZoom z

Bitmap / Flip And Rotate / Flip Horizontal FlipHorizontal

Bitmap / Flip And Rotate / Flip Vertical FlipVertical

Bitmap / Flip And Rotate / Transpose Transpose

Bitmap / Flip And Rotate / Rotate Left RotateLeft

Bitmap / Flip And Rotate / Rotate Right RotateRight

Bitmap / Flip And Rotate / Rotate Across RotateAcross

Bitmap / Flip And Rotate / 3D Bitmap... DlgFlip3D

Bitmap / Temp Bitmap / Get TempGet =

Bitmap / Temp Bitmap / Put TempPut +

Bitmap / Temp Bitmap / Swap TempSwap _

Bitmap / Temp Bitmap / Or TempOr

Bitmap / Temp Bitmap / And TempAnd

Bitmap / Temp Bitmap / Xor TempXor

Bitmap / Temp Bitmap / Blend Blend

Bitmap / Temp Bitmap / Tessellate Tessellate

Bitmap / Temp Bitmap / Delete TempDelete

Bitmap / Extra Bitmap / Get ExtraGet \

Bitmap / Extra Bitmap / Put ExtraPut |

Bitmap / Extra Bitmap / Swap ExtraSwap -

Bitmap / Extra Bitmap / Delete ExtraDelete

Bitmap / Collapse To Set CollapseToSet

Bitmap / Smooth Zoomed SmoothZoom

Bitmap / Smooth Corners SmoothCorner

Bitmap / Thicken Thicken

Bitmap / Make Thinner Thinner

Bitmap / Accent Boundaries Accent

Bitmap / Fill At Dot Fill `

Bitmap / Flood At Dot Flood ~

Bitmap / Slide To Dot Slide

Bitmap / Row Column Edits / Insert Column At Dot InsCol

Bitmap / Row Column Edits / Delete Column At Dot DelCol

Bitmap / Row Column Edits / Insert Row At Dot InsRow

Bitmap / Row Column Edits / Delete Row At Dot DelRow

Bitmap / Row Column Edits / Insert Columns At Dots InsCols

Bitmap / Row Column Edits / Delete Columns At Dots DelCols

Bitmap / Row Column Edits / Insert Rows At Dots InsRows

Bitmap / Row Column Edits / Delete Rows At Dots DelRows

Bitmap / Bitmap Is 3D 3DBitmap j

Bitmap / Count Pixels CountPixels ac

******************** Color Menu ********************

Color / Show Color Bitmap ShowColor k

Color / Color Bitmap File / Open Targa... DlgOpenTarga

Color / Color Bitmap File / Save Targa... DlgSaveTarga

Color / Bitmap / Get From Bitmap ColorGet Quo

Color / Bitmap / Put To Bitmap ColorPut

Color / Bitmap / Put To Bitmap (Nearest) ColorNearest

Color / Bitmap / Put To Bitmap (Dither) ColorDither

Color / Bitmap / Or From Bitmap ColorOr

Color / Bitmap / And From Bitmap ColorAnd

Color / Bitmap / Xor From Bitmap ColorXor

Color / Blend From 2 Bitmaps Blend2

Color / Blend From 3 Bitmaps Blend3

Color / Graph Distance GraphDistance

Color / Graph Walls GraphWalls

Color / Antialias From Bitmap / 2x2 Antialias2

Color / Antialias From Bitmap / 3x3 Antialias3

Color / Antialias From Bitmap / 4x4 Antialias4

Color / Antialias From Bitmap / 5x5 Antialias5

Color / Antialias From Bitmap / 6x6 Antialias6

Color / Antialias From Bitmap / 7x7 Antialias7

Color / Antialias From Bitmap / 8x8 Antialias8

Color / Dot Color / Set To Color ColorDotSet

Color / Dot Color / Or With Color ColorDotOr

Color / Dot Color / And With Color ColorDotAnd

Color / Dot Color / Xor With Color ColorDotXor

Color / Dot Color / Add With Color ColorDotAdd

Color / Dot Color / Subtract With Color ColorDotSub

Color / Dot Color / Multiply With Color ColorDotMul

Color / Dot Color / Min With Color ColorDotMin

Color / Dot Color / Max With Color ColorDotMax

Color / Dot Color / Blend With Color ColorDotBlend

Color / Color Bitmap / Add With Temp ColorTempAdd

Color / Color Bitmap / Subtract With Temp ColorTempSub

Color / Color Bitmap / Alpha With Temp ColorTempAlpha

Color / Color Bitmap / Delete ColorDelete

Color / Make Grayscale ColorGrayscale

Color / Apply Texture / Background TextureBack

Color / Apply Texture / Color Walls TextureColor

Color / Apply Texture / Overlay Walls TextureOverlay

Color / Apply Texture / Color Overlay Walls TextureWall

Color / Apply Texture / Color Ground TextureColorG

Color / Apply Texture / Overlay Ground TextureOverlayG

Color / Apply Texture / Color Overlay Ground TextureGround

Color / Apply Texture / Color Blocks TextureColorB

Color / Apply Texture / Overlay Blocks TextureOverlayB

Color / Apply Texture / Color Overlay Blocks TextureBlock

Color / Apply Texture / Ceiling TextureCeiling

Color / Apply Texture / Variable Height Wall WallVariable

Color / Apply Texture / Ground Elevation GroundVariable

Color / Apply Texture / Delete TextureDelete

Color / Brightness... DlgBrightness aK

Color / Replace Color... DlgReplace ak

******************** Maze Menu ********************

Maze / Maze Size... DlgMazeSize m

Maze / Zoom Bias... DlgBias az

Maze / Add / Add Entrance AddEntrance

Maze / Add / Add Exit AddExit

Maze / Add / Add Passage AddPassage <

Maze / Add / Add Wall AddWall >

Maze / Remove / Crack Isolations NoIsolation

Maze / Remove / Connect Detachments NoDetachment

Maze / Remove / Crack Dead Ends NoDeadEnd

Maze / Remove / Seal Entrances NoEntrance

Maze / Remove / Connect Poles ConnectPole

Maze / Remove / Remove Poles NoPole

Maze / Remove / Crack Cells NoCell

Maze / Remove / Crack Blind Alley Cells NoBlindAlley

Maze / Remove / Fill Passages NoPassage

Maze / Remove / Fill Open Cells NoRoom

Maze / Remove / Remove Boundary NoBoundary

Maze / Remove / Remove Tubes NoTube

Maze / Normalize / Add Passages NormalizePassage

Maze / Normalize / Add Walls NormalizeWall

Maze / Normalize / Erase Bottom Right NoBottomRight '

Maze / Make Symmetric Symmetric

Maze / Expand Set ExpandSet

Maze / Room Thinned RoomThinned

Maze / Tweak Endpoints TweakEndpoint E

Maze / Tweak Passages TweakPassage H

Maze / Weave To 3D Weave3D

Maze / Weave To Inside WeaveInside

Maze / Clarify Weave ClarifyWeave

Maze / Clarify 3D Clarify3D

Maze / Clarify 4D Clarify4D

Maze / Count Possible CountPossible

Maze / Analyze Passages AnalyzePassage ap

Maze / Analyze Walls AnalyzeWall aP

Maze / Maze Settings... DlgMaze cm

******************** Create Menu ********************

Create / Perfect Perfect P

Create / Braid Braid B

Create / Unicursal Unicursal U

Create / More Perfect / Recursive Backtrack Recursive ab

Create / More Perfect / Prim's Algorithm Prim am

Create / More Perfect / True Prim's Prim2 aM

Create / More Perfect / Kruskal's Algorithm Kruskal al

Create / More Perfect / Aldous-Broder AldousBroder aa

Create / More Perfect / Wilson's Algorithm Wilson aw

Create / More Perfect / Eller's Algorithm Eller ae

Create / More Perfect / Growing Tree Tree T

Create / More Perfect / Growing Forest Forest aT

Create / More Perfect / Recursive Division Division aj

Create / More Perfect / Binary Tree Binary ay

Create / More Perfect / Sidewinder Sidewinder as

Create / More Perfect / Hunt And Kill Perfect P

Create / More Perfect / Random Perfect Random an

Create / Pattern / Spiral Spiral S

Create / Pattern / Diagonal Diagonal D

Create / Pattern / Segment Segment L

Create / Pattern / Nested Fractal Fractal O

Create / Pattern / Hilbert Curve Hilbert aH

Create / 3D / Weave Weave V

Create / 3D / 3D 3D Q

Create / 3D / 4D 4D R

Create / 3D / Planair Planair J

Create / 3D / Hyper Hyper ah

Create / Crack Crack K

Create / Cavern Cavern av

Create / Arrow Arrow A

Create / Tilt Tilt at

Create / Recursive Fractal Fractal2 ax

Create / Infinite / Start InfiniteStart ai

Create / Infinite / Continue Infinite I

Create / Infinite / End InfiniteEnd aI

Create / Infinite / Restart InfiniteRestart

Create / Omega (Shapes) / Gamma (Square) Gamma aq

Create / Omega (Shapes) / Theta (Circle) Theta W

Create / Omega (Shapes) / Delta (Triangle) Delta Y

Create / Omega (Shapes) / Sigma (Hexagon) Sigma X

Create / Omega (Shapes) / Upsilon (Octagon) Upsilon au

Create / Omega (Shapes) / Omicron (Sphere) Omicron

Create / Omega (Shapes) / Zeta (8 Way) Zeta Z

Create / Labyrinth / Current Labyrinth Labyrinth C

Create / Labyrinth / Labyrinth Settings... DlgLabyrinth cl

Create / Labyrinth / Classical Classical

Create / Labyrinth / Chartres Chartres

Create / Labyrinth / Cretan Cretan

Create / Labyrinth / Man In The Maze ManInTheMaze

Create / Labyrinth / Flat Classical FlatClassical

Create / Labyrinth / Flat Chartres FlatChartres

Create / Labyrinth / Chartres Replica ChartresReplica

Create / Labyrinth / Custom Custom

Create / Partial Create / Perfect At Dot PartialPerfect cP

Create / Partial Create / Braid Add Walls PartialBraid aB

Create / Partial Create / Unicursal Thinned PartialUnicursal cU

Create / Partial Create / Recursive At Dot PartialRecursive

Create / Partial Create / Prim's At Dot PartialPrim

Create / Partial Create / Kruskal Passages PartialKruskal

Create / Partial Create / Tree At Dot PartialTree

Create / Partial Create / Weave At Dot PartialWeave cV

Create / Partial Create / Crack Add Walls PartialCrack cK

Create / Partial Create / Cavern At Dot PartialCavern

Create / Partial Create / Zeta At Dot PartialZeta

Create / Polished Mazes Polish /

Create / Create Settings... DlgCreate M

******************** Solve Menu ********************

Solve / Fill Dead Ends DeadEnd F

Solve / Fill Cul-De-Sacs CulDeSac

Solve / Fill Blind Alleys BlindAlley

Solve / Fill Collisions Collision

Solve / Find A Path SolveRecursive

Solve / Find Shortest Path Shortest

Solve / Find Shortest Paths Shortests

Solve / Wall Follow / Follow Wall Left FollowLeft

Solve / Wall Follow / Follow Wall Right FollowRight

Solve / Wall Follow / Pledge Algorithm Left PledgeLeft

Solve / Wall Follow / Pledge Algorithm Right PledgeRight

Solve / Wall Follow / Chain Algorithm Chain

Solve / 3D / Fill Weave Dead Ends DeadEndWeave

Solve / 3D / Fill 4D Dead Ends DeadEnd4D

Solve / 3D / Fill Hyper Dead Ends SolveHyper

Solve / 3D / Find Recursive Fractal SolveFractal2

Solve / Tremaux's Algorithm Tremaux

Solve / Mark Dead Ends MarkDeadEnd G

Solve / Mark Cul-De-Sacs MarkCulDeSac

Solve / Mark Blind Alleys MarkBlindAlley

Solve / Mark Collisions MarkCollision

Solve / Fill Single Dead Ends FillDeadEnd

Solve / Show Bottlenecks Bottleneck

Solve / Flood Passages FloodPassage

Solve / Flood Walls Left FloodWallLeft

Solve / Flood Walls Right FloodWallRight

******************** Draw Menu ********************

Draw / Draw Settings... DlgDraw ad

Draw / Obscure Draw Settings... DlgDraw2 aD

Draw / Render Bitmap Overview Overview

Draw / Render Pyramid Pyramid

Draw / Life Generate Life aL

Draw / Open Wireframe... DlgOpenWire

Draw / Save Wireframe... DlgSaveWire

Draw / Wireframe File / Save Picture... DlgSavePicture

Draw / Wireframe File / Copy Picture CopyPicture

Draw / Wireframe File / Save Vector... DlgSaveVector

Draw / Make Wireframe Bitmap Overview MakeWire

Draw / Render Wireframe Perspective WirePerspective

Draw / Render Wireframe Aerial Aerial

Draw / Open Patches... DlgOpenPatch

Draw / Save Patches... DlgSavePatch

Draw / Make Patch Bitmap Overview MakePatch

Draw / Render Patch Perspective PatchPerspective

Draw / Convert Patches To Wireframe PatchToWire

OPERATIONS

Some operations take string parameters that are considered formatted strings. A formatted string is first evaluated before being used, where certain character sequences in it get translated to other things. When a string is formatted, “\n” becomes a line break, “\r” becomes a carriage return, “\t” becomes a tab, and “\s” becomes a space. The sequence “@x” where “x” is a letter from a-z or a number expands to the number contained in that custom variable. The sequence “$#” where “#” is a number expands to the string contained in that custom variable, while the sequence “$x” where “x” is a letter from a-z expands to the custom string indexed by custom variable @x. Finally, “\\” reduces to a single “\”, “@@” reduces to a single “@”, and “$$” reduces to a single “$”.

******************** Dialog and file operations ********************

Open <file>: Opens the file in the string <file>, regardless of its type. This accesses the functionality of the “Open...” command without bringing up a dialog.

OpenBitmap <file>: Opens the Windows bitmap file in the string <file>. This accesses the functionality of the “Open Bitmap...” command without bringing up a dialog.

OpenText <file>: Opens the text file in the string <file> into the main monochrome bitmap. This accesses the functionality of the “Open Text...” command without bringing up a dialog.

OpenX11 <file>: Opens the X11 bitmap in the string <file> into the main monochrome bitmap. This accesses the functionality of the “X11 Bitmap / Open...” command without bringing up a dialog.

Open3D <file>: Opens the Daedalus 3D bitmap in the string <file> into the main monochrome bitmap. This accesses the functionality of the “3D Bitmap / Open...” command without bringing up a dialog.

OpenDB <file>: Opens the Daedalus bitmap in the string <file>. Daedalus bitmaps are created with the SaveDB operation.

OpenScript <file>: Opens and runs the Daedalus script in the string <file>. This accesses the functionality of the “Open Script...” command without bringing up a dialog.

OpenScript2 <file>: Opens and runs the Daedalus script in the string <file>, and stops executing any command lines in progress. This accesses the functionality of the “Open Script...” command without bringing up a dialog, but allows opening a new script that may replace macros within an existing script, in a way that prevents the state of the old script interfering.

OpenTarga <file>: Opens the Targa bitmap in the string <file> into the color bitmap. This accesses the functionality of the “Color Targa File / Open...” command without bringing up a dialog.

OpenPaint <file>: Opens the Paint bitmap file in the string <file> into the color bitmap. This accesses the functionality of the DlgOpenPaint operation command without bringing up a dialog.

OpenWire <file>: Opens the Daedalus wireframe file in the string <file>. This accesses the functionality of the “Open Wireframe...” command without bringing up a dialog.

OpenPatch <file>: Opens the Daedalus patch file in the string <file>. This accesses the functionality of the “Open Patches...” command without bringing up a dialog.

DlgOpenDB: Brings up a dialog allowing one to select a file, and then loads that file as a Daedalus bitmap.

DlgOpenPaint: Brings up a dialog allowing one to select a file, and then loads that file as a 256 color Paint bitmap file (.PCX extension) into the color bitmap. This can be used to import the PCX format screenshots generated by certain games into the program.

EmbedX11: This is like OpenX11 except the X11 bitmap is embedded in the current Daedalus script file instead of in a separate file. This allows loading a monochrome bitmap within a script without having to have it in a separate file. Starting with the next line following this operation in the script file, should be the text of an X11 bitmap, which will be loaded as if it were in a separate file. Afterward the script file will continue executing at the line following the bitmap text. This should only be run inside a script. If this is run outside a script, it will behave like the DlgOpenX11 command and the user will be prompted for a file.

Embed3D: This is like EmbedX11 except a Daedalus 3D file embedded in the current script will be loaded.

EmbedDW: This is like EmbedX11 except a Daedalus wireframe file embedded in the current script will be loaded.

EmbedDP: This is like EmbedX11 except a Daedalus patch file embedded in the current script will be loaded.

EmbedDB: This is like EmbedX11 except a Daedalus bitmap file embedded in the current script will be loaded.

SaveBitmap <file>: Saves the active bitmap to a Windows bitmap file in the string <file>. This accesses the functionality of the “Save Bitmap...” command without bringing up a dialog.

SaveText <file>: Saves the main monochrome bitmap to a text file in the string <file>. This accesses the functionality of the “Save Text...” command without bringing up a dialog.

SaveDOSBlock <file>: Saves the main monochrome bitmap to a DOS block character text file in the string <file>. This accesses the functionality of the “DOS Text / Save Blocks...” command without bringing up a dialog.

SaveDOSLine <file>: Saves the main monochrome bitmap to a DOS line character text file in the string <file>. This accesses the functionality of the “DOS Text / Save Lines...” command without bringing up a dialog.

SaveDOSLine2 <file>: Saves the main monochrome bitmap to a DOS double line character text file in the string <file>. This accesses the functionality of the “DOS Text / Save Double Lines...” command without bringing up a dialog.

SaveX11 <file>: Saves the main monochrome bitmap to an X11 bitmap in the string <file>. This accesses the functionality of the “X11 Bitmap / Save Normal...” command without bringing up a dialog.

SaveX11Comp <file>: Saves the main monochrome bitmap to a compressed X11 bitmap in the string <file>. This accesses the functionality of the “X11 Bitmap / Save Compressed...” command without bringing up a dialog.

SaveX11Super <file>: Saves the main monochrome bitmap to a supercompressed X11 bitmap in the string <file>. This accesses the functionality of the “X11 Bitmap / Save Supercompressed...” command without bringing up a dialog.

Save3D <file>: Saves the 3D bitmap in the main bitmap to a Daedalus 3D bitmap in the string <file>. This accesses the functionality of the “3D Bitmap / Save Normal...” command without bringing up a dialog.

Save3DComp <file>: Saves the 3D bitmap in the main bitmap to a compressed Daedalus 3D bitmap in the string <file>, where each character in the file covers four pixels.

Save3DSuper <file>: Saves the 3D bitmap in the main bitmap to a supercompressed Daedalus 3D bitmap in the string <file>. This accesses the functionality of the “3D Bitmap / Save Supercompressed...” command without bringing up a dialog.

SaveDB <file>: Saves the active bitmap to a Daedalus bitmap in the string <file>. Daedalus bitmaps are a custom format which stores bitmaps using only ASCII characters, and have some compression too.

SaveTarga <file>: Saves the color bitmap to a Targa bitmap in the string <file>. This accesses the functionality of the “Color Targa File / Save...” command without bringing up a dialog.

SaveWire <file>: Saves the wireframe data in memory to a Daedalus wireframe file in the string <file>. This accesses the functionality of the “Save Wireframe...” command without bringing up a dialog.

SavePatch <file>: Saves the patch data in memory to a Daedalus patch file in the string <file>. This accesses the functionality of the “Save Patches...” command without bringing up a dialog.

SavePicture <file>: Saves the wireframe image in memory to a Windows metafile in the string <file>. This accesses the functionality of the “Draw / Wireframe File / Save Metafile...” command without bringing up a dialog.

SaveVector <file>: Saves the wireframe data in memory to a Scalable Vector Graphics (SVG) format file in the string <file>. This accesses the functionality of the “Draw / Wireframe File / Save Vector...” command without bringing up a dialog.

SaveSolids <file>: Generates the “solids.dp” file that’s part of the Daedalus distribution, and saves it to a file. This doesn’t ever need to be run in a standard install, because that file has already been generated.

Size <x> <y> <flag1> <flag2>: Resizes the main monochrome bitmap. This accesses the functionality of the “Size...” command when operating on a monochrome bitmap without bringing up the dialog. If <flag1> is false, this does “Set Lower Right Bound”, if true this does “Shift Down And Right By”. If <flag2> is true, the bitmap is cleared after being resized.

SizeC <x> <y> <flag1> <flag2>: Like the Size operation but resizes the main color bitmap. This accesses the functionality of the “Size...” command when operating on a color bitmap without bringing up the dialog. If <flag1> is false this does “Set Lower Right Bound”, and if true this does “Shift Down And Right By”. If <flag2> is true, the bitmap is set to black after being resized.

Zoom <x> <y> <flag> <num>: Zooms the active bitmap. This accesses the functionality of the “Zoom...” command without bringing up the dialog. If <flag> is false, this does “Zoom By Factor”, if true this does “Zoom To Size”. If <num> is 0 this does “Drop Lines When Shrinking”, if 1 this does “Preserve On When Shrinking”, if 2 this does “Tessellate Instead Of Zoom”.

Flip3D <num1> <num2>: Flips or rotates the 3D bitmap in the active bitmap. This accesses the functionality of the “Flip And Rotate / 3D Bitmap...” command without bringing up the dialog. If <num1> is 0 this affects the X axis, if 1 this affects the Y axis, if 2 this affects the Z axis. If <num2> is 0 this does “Flip”, if 1 this does “Rotate Left Or Forward”, if 2 this does “Rotate Right Or Forward”, if 3 this does “Rotate Across”.

MazeSize <x> <y> <flags>: Resizes the Maze in the main monochrome bitmap. This accesses the functionality of the “Maze Size...” command without bringing up the dialog. If <flags> is 2 or more, the bitmap will have odd dimensions and not have a blank row and column of pixels at the right and bottom edges. If <flags> is odd, the Maze bitmap is cleared after being resized.

MazeSizeC <x> <y> <flags>: Like the MazeSize operation but resizes the Maze in the main color bitmap. This accesses the functionality of the “Maze Size...” command when operating on a color bitmap without bringing up the dialog. If <flags> is 2 or more, the bitmap will have odd dimensions and not have a blank row and column of pixels at the right and bottom edges. If <flags> is odd, the Maze bitmap is cleared after being resized.

Bias <x0> <x1> <y0> <y1>: Zooms the main monochrome or color bitmap with different magnifications applied to even and odd coordinate pixels. This accesses the functionality of the “Zoom Bias...” command without bringing up the dialog.

Replace <color1> <color2> <flag>: Replaces all instances of <color1> with <color2> in the color bitmap. This accesses the functionality of the “Replace Color...” command without bringing up the dialog. The colors in <color1> and <color2> may be 24 bit color numbers or strings, where <color2> may be a pattern string. If <flag> is true, the colors are swapped instead of one replaced with the other.

Brightness <num1> <num2>: Changes the brightness of the pixels in the color bitmap, or does some other bitmap transformation. This accesses the functionality of the “Brightness...” command without bringing up the dialog. The brightness number is in <num1>. If <num2> is 0 this does “Brighten All By Factor”, if 1 this does “Brighten All By Offset”, if 2 this does “Brighten All By Multiplier”, if 3 this does “Limit Brightness To Value”, if 4 this does “Rotate All By Degree”, and if 5 this does “Twist Middle By Degree”.

******************** Control flow operations ********************

If <flag> <string>: If <flag> is true, <string> gets executed as a command line. Like the “if” statement in C.

IfElse <flag> <string1> <string2>: If <flag> is true, <string1> gets executed as a command line, otherwise <string2> gets executed as a command line. Like the “if / else” statement in C.

SwitchSgn <num> <string1> <string2> <string3>: If <num> is negative, <string1> gets executed as a command line. If <num> is 0, <string2> gets executed as a command line. If <num> is positive, <string3> gets executed as a command line.

DoCount <num> <string>: Executes <string> as a command line <num> times.

While <string1> <string2>: Evaluates <string1> as an expression. If true, executes <string2> as a command line, then repeats. Keeps reevaluating and executing until the expression is no longer true. Warning: Operations like “While True {}” will run forever and hang the program! Like the “while” statement in C.

DoWhile <string1> <string2>: Executes <string2> as a command line, then evaluates <string1> as an expression. If true, then executes and evaluates again, where this repeats until the expression is no longer true. Like the “do / while” statement in C.

For <var> <num1> <num2> <string>: Sets the custom variable indicated by <var> to <num1>. While the variable less than or equal to <num2>, execute <string> as a command line, then increment the variable. If <var> is a number it indicates the index of the custom variable, else if <var> is a string (e.g. “a”) it indicates the custom variable directly. In most cases one wants to specify the variable as a string like “a” instead of a number like @a. The former makes @a itself loop, while the latter makes the custom variable pointed to by the value of @a loop. Similar to the “for” loop in various languages.

ForStep <var> <num1> <num2> <num3> <string>: Like the For operation except the variable gets <num3> added to it each iteration, instead of just being incremented. The loop exits when the variable is no longer between <num1> and <num2>.

//: Comment. Stops executing the current command line. Since the rest of the command line always gets skipped, this causes the rest of the command line to act as a comment. Like the “//” comment token in C.

Continue: Stops executing the current command line, and also stops executing the surrounding command line. If the surrounding command line is part of a loop, the loop’s next iteration will begin. Like the “continue” statement in C.

Break: Stops executing the current command line, and also stops executing the surrounding command line. If the surrounding command line is part of a loop, the loop operation will immediately terminate. If this operation appears at the top level in a script file, the remaining lines in the script will be skipped. This is most often used to break out of one of the above looping operations. Like the “break” statement in C.

Return: Stops executing the current command line, and also stops executing any number of surrounding command lines within the current macro, returning control to the macro’s caller. Behaves like Halt if not within a macro. Like the “return” statement in C.

Halt: Stops executing the current command line, and also completely stops executing any number of surrounding command lines or loops, including remaining lines in a script file. Like the “end” command in BASIC.

Restart: Stops executing the current command line, then starts executing it from the beginning again. This will cause an infinite loop unless some other operation breaks out of the command line.

Do <string>: Simply executes <string> as a command line once. Useful if a command line is stored in a custom string instead of a macro.

DoWait <string>: Like the Do operation except the mouse pointer will be set to the wait or hourglass icon until the command line finishes. Useful for indicating slow operations within a script.

******************** Daedalus specific operations ********************

DefineMacro <num> <string1> <string2>: Sets macro number <num> to be <string1>. If <num> is between 1 and 48, the appropriate command on the Run Macro submenu will have its menu text set to <string2>. This accesses the functionality of the Define Macro button in the “Enter Command Line...” command without bringing up the dialog.

Macro <num>: Runs macro number <num>. Note the first 48 macros, since they exist on menus, also have commands which can run them directly.

EmbedMacro <num> <string>: Similar to DefineMacro, this sets macro number <num>. If <num> is between 1 and 48, the appropriate command on the Run Macro submenu will have its menu text set to <string>. The actual macro text will be embedded in the current Daedalus script file in the following lines, up until the next blank line. That allows a long macro to be spread across multiple lines, which is more readable. Within each line, leading spaces will be removed, so indenting can be applied without making the macro itself any longer. You can also embed comments, in which lines whose first non-whitespace is “//” will be ignored. This should only be run inside a script, and will do nothing outside that context.

Embed: Similar to EmbedMacro, this allows a command line to be spread over multiple lines. The actual command line will be embedded in the current Daedalus script file in the following lines, up until the next blank line. That allows a long command line be spread across multiple lines, which is more readable. Within each line, leading spaces will be removed, so indenting can be applied without making the macro itself any longer. This should only be run inside a script, and will do nothing outside that context.

DefineConst <string>: Defines a sequence of named numeric constants. Parameter <string> is a space separated list of names. Each name will be assigned to the next number in sequence, starting with 0. For example, “DefineConst ‘Cat Dog Horse’” will set Cat to 0, Dog to 1, and Horse to 2. If a token is a number, it will instead set the constant to assign to the next name. If a number is prefixed with “+” or “-”, the number instead of being incremented by one will be adjusted by the specified offset. For example, “DefineConst ‘Cat 10 Dog +5 Horse’” will set Cat to 0, Dog to 10, and Horse to 15.

Afterward macros can reference these constants by name with the “%” prefix. For example, after the above the parameter “%Dog” will be the constant value 10. Similarly, “@Dog” will contain the value within custom variable number 10, and “$Dog” will contain the value within custom string 10, which allows named numeric and string variables. Finally “*Dog” as an action will call macro 10, which allows named functions. Having “*Dog” in a parameter context will call the function and return whatever’s in @z. After DefineConst is invoked, @z will contain whether the operation failed for any reason, such as having duplicate names anywhere in the list. A script can call DefineConst at the beginning to name macros and variables, and then halt if there were any errors.

ClearEvents: Resets all macro events to 0. This means all fields in the Macro Events dialog and includes all hidden scripting only macro events.

SetVar <var> <num>: Sets custom variable <var> to value <num>. If <var> is a number it indicates the index of the custom variable, else if <var> is a string (e.g. “a”) it indicates the custom variable directly.

SetVars <var> <num> <string>: Sets a range of custom variables to a set of constants. This sets <num> variables starting with custom variable <var>. There should be <num> values contained in <string>, separated with spaces. Each value may be a numeric or color constant, or a custom variable reference like “@a”.

SwapVar <var1> <var2>: Swaps custom variables <var1> and <var2>.

Local <string>: Stores a copy of the custom numeric variables listed in <string>. The characters in <string> should range from a-z. When the current command line is finished, the saved values will be restored to the variables in question. This operation works properly when nested, and allows complicated scripts to have what amounts to local variables which can be changed within a context but don’t affect the values of those variables used in outer contexts.

SetString <var> <format>: Sets custom string <var> to formatted string <format>. If <var> is a number it indicates the index of the custom string, else if <var> is a string (e.g. “a”) it corresponds to a custom string directly.

SetStrings <var> <num> <string>: Sets a range of custom strings to a set of constant strings. The first character in <string> indicates a separator character, where there should be <num> strings contained in <string>, separated by this character.

SwapString <var1> <var2>: Swaps custom strings <var1> and <var2>.

AppendString <var> <string>: Appends <string> to custom string <var>. If <var> is a number it indicates the index of the custom string, else if <var> is a string (e.g. “a”) it indicates the custom string directly.

SetChar <var> <num> <char>: Sets character number <num> in custom string <var> to value <char>. Strings start at character 0. This does nothing if the custom string is empty or <num> is beyond the end of the string. If <char> is a number it indicates the ASCII value of the new character, else if <char> is a string (e.g. “!”) it indicates the character directly.

SetStringNum <var> <num> <digits>: Sets custom string <var> to a string containing the number <num>. If <num> contains fewer than <digits> digits, it will be prefixed with “0” characters. If you don’t want leading zeros, it’s easier to use SetString and let it expand custom numeric variables in the formatted string. If <var> is a number it indicates the index of the custom string, else if <var> is a string (e.g. “a”) it corresponds to a custom string directly.

SetStringReal <var> <num> <digits>: Sets custom string <var> to a string containing a floating point number represented by <num>. There will be <digits> digits to the right of the decimal point, or in other words this outputs <num> with a decimal point <digits> places from the right end. If <var> is a number it indicates the index of the custom string, else if <var> is a string (e.g. “a”) it corresponds to a custom string directly.

CopyMask <num1> <num2>: Copies monochrome bitmap <num1> to bitmap <num2>. Bitmaps 0 and beyond indicate custom texture mask bitmaps. Also bitmap -1 is the main bitmap, bitmap -2 is the temporary bitmap, and bitmap -3 is the extra bitmap.

SwapMask <num1> <num2>: Swaps monochrome bitmaps <num1> and <num2>. Note the main bitmap always exists, so it’s not allowed to be swapped with a bitmap that’s empty.

DeleteMask <num>: Deletes monochrome bitmap <num>. Note the main bitmap always exists, so it’s not allowed to be deleted.

CopyTexture <num1> <num2>: Copies color bitmap <num1> to bitmap <num2>. Bitmaps 0 and beyond indicate custom texture bitmaps. Also bitmap -1 is the main color bitmap, bitmap -2 is the temporary color bitmap, and bitmap -3 is the extra color bitmap. Bitmap -4 contains the scene most recently displayed as the perspective inside view, and bitmap -5 contains the rainbow sprite most recently displayed over the perspective inside view.

SwapTexture <num1> <num2>: Swaps color bitmaps <num1> and <num2>.

DeleteTexture <num>: Deletes color bitmap <num>.

MoveCloud <cloud> <distance>: Moves one or more clouds horizontally in the perspective inside view. The <cloud> parameter is the index of the cloud to move, where if invalid (e.g. negative) all clouds will be moved. The <distance> parameter is the offset to move the cloud(s) to the right. Clouds can have 16384 different positions, where the offset may range from -16383 to 16383. If the distance is invalid (i.e. a large positive or negative number) then the cloud(s) will be moved proportionally based on their index, with farther or lower index clouds moving slower.

Message <format>: Displays a message box containing formatted string <format>, and pauses until the user clicks OK.

MessageAsk <format> <num>: Displays a message box of type <num> containing formatted sting <format>, and pauses until the user clicks a button in it. Parameter <num> should contain a number from 0-5, where message box type 0 contains the button OK, type 1 contains OK and Cancel buttons, type 2 contains Retry and Cancel, type 3 contains Yes and No, type 4 contains Yes and No and Cancel, and type 5 contains Abort and Retry and Ignore. Afterward @z contains the button clicked, where 1 means OK or Yes or Retry was clicked, 0 means No or Ignore, and -1 means Cancel or Abort.

MessageInside <format> <num>: Displays formatted string <format> as a line of text in the perspective inside view, in the same font used for the Compass and Cell Location. The text is horizontally centered at row <num>. Row 0 is considered the top of the window, where negative rows start from the bottom of the window. Note cell location is displayed at row -2, and the compass at -3, so if you display at these rows your text can get overlapped, in which case you may want to turn on fNoLocation and fNoCompass to suppress normal output. This operation should only be run during the After Redraw Inside macro event, where this does nothing outside that context.

GetString <format> <var>: Brings up a dialog which prompts the user to enter a string. The formatted string <format> gets displayed as a caption in the dialog. If the user clicks OK instead of canceling the dialog, the string entered will be stored in custom string <var>. Afterward @z will contain 1 if the dialog was cancelled, 0 otherwise.

GetString2 <format1> <format2> <var>: Like GetString except prompts the user to enter two strings. The formatted strings <format1> and <format2> get displayed as captions in the dialog. If the user clicks OK instead of canceling the dialog, the strings entered will be stored in custom string slots <var> and <var+1>.

GetString3 <format1> <format2> <format3> <var>: Like GetString except prompts the user to enter three strings. The formatted strings <format1>, <format2>, and <format3> get displayed as captions in the dialog. If the user clicks OK instead of canceling the dialog, then the strings entered will be stored in custom string slots <var>, <var+1>, and <var+2>.

DisableAll: Disables all commands. Trying to run a disabled command by selecting it from a menu or keyboard shortcut will display a warning. Disabled commands may still be run through scripting.

EnableAll: Enables all commands disabled through the DisableAll or Disable operations. This only enables disabled commands, and won’t affect triggers set through OnCommandAll or OnCommand operations.

Disable <command>: Disables the command indicated by <command>. If <command> is a number it indicates the index of the command as returned by the Command function, else if <command> is a string (e.g. “DlgOpen” or “o”) it corresponds to the command directly. Note the About Daedalus command can never be disabled, where attempting to disable it does nothing.

Enable <command>: Enables the command indicated by <command>.

OnCommandAll <num>: Defines a trigger for all commands, such that when any command is selected from a menu or keyboard shortcut, macro <num> will run first. When this macro is run, @x contains the ASCII value of the key pressed to invoke the command, if any, otherwise @x is zero. @y contains the index of the command about to be run, where this index is the same as returned by the Command function. After the macro returns, if @z is non-zero, the command won’t run. Note a disabled command is considered a special type of trigger, where a command can’t be both disabled and have a macro trigger at the same time. Note the About Daedalus command can never have a trigger, where attempting to define one for it does nothing.

OnCommand <command> <num>: Defines a trigger for the command indicated by <command>, such that when that command is selected from a menu or keyboard shortcut, macro <num> will run first.

DoCommand <command>: Run the command indicated by <command>.

ResetProgram: Resets or deletes various custom data in the program. This does the following things: Resets all macro event variables to 0 (making this a superset of the ClearEvents operation), enables all commands and removes all triggers, deletes all custom texture bitmaps, initializes internal variables used by the Turtle operation, and finally turns off fAutorepeatLastCommand, fCreateMazesPolished, fShowDot2, fSky3D, fNoCompass, fNoLocation, fNoSubmerge, fFogGround, fMarkColor, fMarkAll, fTextureDual, fTextureDual2, and fTextureBlend. It also deactivates nStepHeight, nMessageTitle, kWall2, kSky2, kGround2, k3DCeiling2, kMountain2, kCloud2, nSkyMark, nWallVariable, nFogLit, and restores the Passage and Wall colors to black and white. This is useful to run at the start of a script, to ensure program state that might have been set by previously run scripts doesn’t interfere.

ResetInside: Randomly regenerates the positions of stars, mountains, and clouds in the perspective inside view.

WindowTitle <format> <flag>: Sets the formatted string <format> to be the title of the Daedalus window. If <flag> is true, the window title will have the default title “Daedalus 3.5” prepended to it.

Beep: Sounds a simple system beep.

Beep2 <num1> <num2>: Like Beep except sounds a tone of frequency <num1> for <num2> milliseconds. The parameter <num1> can range from 37 to 32767. Note this operation uses the PC speaker, and therefore will do nothing on certain operating systems, such as 64 bit Windows XP and Vista.

Sound <file>: Plays a Windows wave format sound file (which usually has a .wav extension). The nSoundDelay variable controls how sounds are played.

Delay <num>: Pauses or sleeps the program for at least <num> milliseconds. Does nothing if <num> is negative. Useful to ensure animation happens at a certain minimum speed on fast computers.

Set <x> <y> <flag>: Set pixel. Turns the pixel at the given coordinates in the main monochrome bitmap on or off.

SetT <x> <y> <flag>: Set temporary pixel. Turns the pixel at the given coordinates in the temporary monochrome bitmap on or off.

SetE <x> <y> <flag>: Set extra pixel. Turns the pixel at the given coordinates in the extra monochrome bitmap on or off.

SetA <num> <x> <y> <flag>: Set custom pixel. Turns the pixel at the given coordinates in custom monochrome bitmap <num> on or off.

SetC <x> <y> <num>: Set color pixel. Sets the color value of the pixel at the given coordinates on the color bitmap to <num>.

SetCT <x> <y> <num>: Set temporary color pixel. Sets the color value of the pixel at the given coordinates on the temporary color bitmap to <num>.

SetCE <x> <y> <num>: Set extra color pixel. Sets the color value of the pixel at the given coordinates on the extra color bitmap to <num>.

SetCA <num1> <x> <y> <num2>: Set custom color pixel. Sets the color value of the pixel at the given coordinates in custom color bitmap <num1> to <num2>.

SetX <x> <y> <dir> <num>: Set texture. Sets the texture on the block at the given coordinates facing the given direction. This means setting the appropriate bits of a pixel on custom color bitmap indicated by nTextureWall to <num>. If <dir> is -1, all four sides are set to the texture number. If <dir> is -2, both side pairs are set to the texture number, in a manner that assumes fTextureDual is set.

SetY <x> <y> <dir> <num>: Set texture. Sets the texture on the block at the given coordinates facing the given direction, in a manner that assumes fTextureDual is set. This means setting the appropriate bits of a pixel on the custom color bitmap indicated by nTextureWall to <num>. If <dir> is -1, both texture pairs (i.e. all four sides) are set to the texture number. If <dir> is -2, all four sides are set to the texture number, in a manner that assumes fTextureDual is off.

Set3 <x> <y> <z> <flag>: Set 3D pixel. Turns the pixel at the given coordinates in the 3D bitmap within the main bitmap on or off.

Set3T <x> <y> <z> <flag>: Set temporary 3D pixel. Turns the pixel at the given coordinates in the temporary 3D bitmap on or off.

Set3E <x> <y> <z> <flag>: Set extra 3D pixel. Turns the pixel at the given coordinates in the extra 3D bitmap on or off.

Set3A <num> <x> <y> <z> <flag>: Set custom 3D pixel. Turns the pixel at the given coordinates in the 3D bitmap within custom monochrome bitmap <num> on or off.

Set3C <x> <y> <z> <num>: Set 3D color pixel. Sets the color value of the pixel at the given coordinates of the 3D bitmap within the color bitmap to <num>.

Set3CT <x> <y> <z> <num>: Set temporary 3D color pixel. Sets the color value of the pixel at the given coordinates on the temporary 3D color bitmap to <num>.

Set3CE <x> <y> <z> <num>: Set extra 3D color pixel. Sets the color value of the pixel at the given coordinates on the extra 3D color bitmap to <num>.

Set3CA <num1> <x> <y> <z> <num2>: Set custom 3D color pixel. Sets the color value of the pixel at the given coordinates of the 3D bitmap within custom color bitmap <num1> to <num2>.

Set3X <x> <y> <z> <dir> <num>: Set 3D texture. Sets the texture on the block at the given coordinates facing the given direction. This means setting the appropriate bits of a pixel on the 3D bitmap custom color bitmap indicated by nTextureWall to <num>.

Set3Y <x> <y> <z> <dir> <num>: Set 3D texture. Like SetY but for 3D bitmaps. Sets the texture on the block at the given coordinates facing the given direction. This means setting the appropriate bits of a pixel on the 3D custom color bitmap indicated by nTextureWall to <num>.

ZapTexture <num>: This will find the first set pixel along the direction the dot is facing, and set the texture on the side of the block facing the dot to <num>. This is similar to the commands on the Zap Dot submenu, and is like shooting a paintball at a wall to change its texture.

MarkX2: Like the Mark 'X' At Dot command but affects ceiling markings instead of floor markings. This will set nSkyMark to a new custom bitmap if not already set.

EraseX2: Like the Erase 'X' At Dot command but affects ceiling markings instead of floor markings.

Turtle <string>: Draws a sequence of lines in the main bitmap. The <string> contains a sequence of subactions indicating what to draw next. Most actions consist of a letter followed by a number (no whitespace between or within actions) and draw a line starting from the current pen position, as stored in the nXTurtle and nYTurtle variables, and automatically update the pen position variables to the new end position. Like the “draw” command in BASIC.

U<num>, D<num>, L<num>, R<num>: Draws from the current position up, down, left, or right that many pixels.

E<num>, F<num>, G<num>, H<num>: Draws from the current position northeast, southeast, southwest, and northwest that many pixels.

M<num>,<num>: Move. Draws to the specified coordinates, regardless of the current position. If either of these numbers has a “+” or “-” sign, that coordinate will be relative to the current position. For example “M10,20” draws to pixel coordinate (10, 20) while “M-10,+20” draws down and to the left that many pixels from the current position.

B<action>: Blank. Causes the next action to just update the pen position, and not do any drawing.

N<action>: No update. Causes the next action to not update the pen position.

C<flag>: Color. Sets the color of the lines to draw. “C1” means to draw white, and “C0” means black.

S<num>: Scale. Sets the scale for all relative motion, i.e. how many pixels each unit should cover. For example “S2” means a future action like “R10” will draw right 20 instead of just 10 pixels.

A<num>: Angle. Sets a rotation to apply to all relative motion. “A0” is normal, “A1” rotates everything to the right 90 degrees, “A2” rotates 180 degrees, and “A3” rotates everything left 90 degrees. For example “A1” means a future action like “R10” will draw down 10 units instead of right.

O<char><num>, O<flag>: Arc. Draws an arc or 1/4 of a circle of radius <num>. The <char> ranges from “A” to “H” and indicates the direction the arc is drawn from the current position. “OA” arcs up then to the right, “OB” arcs right then up (both end up in the same place as the “E” action). “OC” arcs right then down, “OD” arcs down then right (both end in same place as “F”). “OE” arcs down then left, “OF” arcs left then down (both end in same place as “G”). “OG” arcs left then up, “OH” arcs up then left (both end in same place as “H”). If “O” is immediately followed by a number it sets the type of arc to draw. “O1” means to draw a curve, and “O0” means to draw a right angle.

T<char><string><char>, T<flag>: Text. Draws text, where the text to print is bracketed between two instances of the character <char>. For example “T_HI_” prints “HI”. If <char> is “T”, there is no end <char>, where text drawing will continue to end of the entire macro string (useful if <string> may contain any characters). If “T” is immediately followed by a number it sets the font to use when printing. “T0” means to use a simple font where characters are 5 pixels high and variable width, “T1” means a fixed width font where all characters fit within a 5x9 pixel box, “T2” means a fixed width 8x13 pixel font where the characters are formed by a single unicursal line that never overlaps itself (used by the “Word Mazes” script to create Mazes with the solution path spelling a word), and “T3” means a fixed width font where all characters fit within a 8x14 pixel box. The “T1” font supports characters in the high-Ascii 128-255 range. Its glyphs cover the common Windows-1252 codepage, which is a superset of ISO 8859-1 (Latin 1) but with extra characters defined for the 128-159 range.

`: Fill. Runs the Fill At Dot command at the pen position.

~: Flood. Runs the Flood At Dot command at the pen position.

_: Reset. Changes all internal turtle variables to their defaults, specifically the current coordinates, color, scale, angle, arc type, and font. Useful for initializing to a consistent state and avoiding side effects of previous usages of the operation.

TextDraw <string> <x> <y>: Draws a string of text on the main monochrome bitmap. The coordinates specify the upper left corner of the text’s bounding box. The font used is specified by the TextFont operation.

TextFont <font> <size> <weight>: Specifies the font to use in the TextDraw operation, along with its size and weight. The size indicates the height in pixels, and the weight is the boldness, in which 0 is default, 400 is normal, and higher numbers like 700 are bold. Unlike the text abilities in the Turtle operation, this allows access to installed system fonts.

Perimeter: Counts the perimeter of an area of on pixels in the monochrome bitmap, displaying the total length in pixels, the number of sides, and the average side length. The total length will also be returned in @z. The shape measured will be that under the dot, or the first shape from the top of the bitmap if the dot isn’t over an on pixel. If No Corner Hopping is off, then pixels connected only by corners will be considered the same shape, in which the counting will include both.

Thicken2 <pixels>: Like the Thicken command except thickens each on pixel in the main monochrome bitmap by the specified number of pixels. If No Corner Hopping in Dot Settings is off, then each pixel will become a <pixels> by <pixels> square instead of a circle of <pixels> diameter.

BlendN: Sets the color bitmap to an equal blending together of N other color bitmaps. The other bitmaps are assumed to be stacked vertically within the temporary color bitmap, in which N is determined by the bitmap’s overall height. Black pixels in any bitmap are skipped, and make that subbitmap not contribute to the result.

Convex: Looks at the on pixels within the main bitmap, and fills in all concave inlets, holes, and areas between disconnected sections within it. In other words, this does the same as wrapping a rubber band around the set of on pixels, and filling in everything inside the band, leaving a convex shape.

AllMoire: Creates a moire pattern in the main bitmap, composed of lines radiating from the center of the bitmap to the edges.

2ndLineUntil <flag>: Draws a line on the main monochrome bitmap from the dot to the 2nd dot, in the Drag Is Erase color from Dot Settings. If the line bumps into an existing pixel of the color of the line, drawing stops. Afterward @x and @y will contain the coordinates of the pixel that was hit (if <flag> is True), or the coordinates of the pixel immediately before the location hit (if <flag> is False). Either way, @z will contain whether the line drawing hit an on pixel and stopped prematurely. This is used by the “Mouse Maze” script to draw lines that stop if you run into a wall.

2ndPutStretch <x1> <y1> <x2> <y2>: Fills the color bitmap with the contents of an arbitrary shaped quadrilateral within the temporary color bitmap, stretched to the bounds of the color bitmap. The upper left corner is defined by the dot, the lower right by the 2nd dot, upper right by <x1>, <y1>, and lower left by <x2>, <y2>. This can be used to help create a straight down aerial view of a life size Maze from a photo taken at an oblique angle.

NoIsland <x> <y>: Draws a line of on pixels connecting two detached islands of on pixels with each other. This starts with the island under <x>, <y>, where if there’s no island there, starts with the first island from the top of the bitmap. Once the start island is determined, the shortest line possible is drawn to the next nearest island. Normally this always connects islands with the same shortest path, however if Find A Path Finds Random Path is set, this will randomly pick among the set of shortest paths. Afterward @z is the length of the line, or 0 if there were no separate islands to connect.

NoIslands: Like NoIsland except it runs multiple times until all islands are connected. Afterward @z is the number of times islands were connected, i.e. one less than the total number of islands on the original bitmap. This is used by the “Word Mazes” script when making Mazes in the shape of words, to connect all the letters.

4D3D <color1> <color2> <color3>: Converts a 4D Maze to a 3D Maze. A list of 3D Mazes will be placed along the X-axis in the main and color bitmaps, where the 4th dimension will be represented by colored portals between these 3D Mazes. The portals will appear as semitransparent sections in the perspective inside view, where the semitransparent pixels get defined in the extra monochrome bitmap. In the color bitmap, walls will be in the inside 3D Wall color, and passages will be in the inside Wall color. Portals back along the 4th dimension will have color <color1>, portals forward along the 4th dimension will have color <color2>, and places where there are portals both back and forward at the same spot will have color <color3>. This is used by the “4D Mazes” script to convert the 4D Maze into a form that can be navigated in perspective inside view.

ND: Creates a perfect N-Dimensional Maze in the main bitmap, represented as a multidimensional grid of 2D levels. The size of the Maze to create is specified in the Size or Maze Size dialogs, where the 3D X and Y fields are the number of pixels along the 1st and 2nd dimensions, Z is the pixels along the 3rd and higher dimensions, and W is the number of dimensions. The various ND Maze operations are used by the “5D Mazes” script.

DeadEndND: Solves an N-Dimensional Maze, by filling in all dead ends. The dimensions of the Maze are defined by the Size dialogs.

DrawND <x> <y> <num1> <num2> <color>: Draws an N-Dimensional Maze in the active bitmap. The Maze is drawn centered around coordinates <x>, <y>. A set of N custom variables starting with slot <num1> indicate one’s current location within the Maze to later highlight. N pairs of custom variables starting with slot <num2> indicate the horizontal and vertical offsets to give to each dimension’s axis. Afterward the dot will be set to the coordinates in the bitmap where the current location in the ND Maze mapped to, and the 2nd dot will be set to the coordinates of the far corner i.e. the exit.

When an N-Dimensional Maze is drawn on the main monochrome bitmap, if <color> is non-black, the Maze will be drawn in the Wall color, otherwise it will be in the passage color. When drawn on the color bitmap, each axis has passage edges drawn in a different color of the rainbow as defined in the Replace Color dialog, which makes it easier to distinguish the different dimensions. If the Drag Move Dot setting is on, coloring will instead highlight edges based on their distance from one’s location within the Maze, with nearer locations in earlier colors of the rainbow. If the Drag Bit Dot setting is on, vertexes will be highlighted by 3x3 pixel spots in <color>, which makes them easier to see.

MoveND <num1> <num2> <x> <y>: Moves an N-Dimensional point to an adjacent cell in a ND Maze. A set of N custom variables starting with slot <num1> indicate one’s current location within the Maze, and N pairs of custom variables starting with slot <num2> indicate the horizontal and vertical screen offsets each dimension’s axis has. The ND point at <num1> will be moved down an available passage to the cell that maps nearest to screen coordinates <x>, <y> (doing nothing if the closest ND cell is the current point). Afterward the dot is updated to the coordinates where the current (possibly changed) location in the ND Maze mapped to, and @z is set to whether the ND dot has moved to the far corner i.e. the exit.

FractalPart <x> <y> <w> <num>: Like the Fractal Maze creation command, however this creates just a subsection of the fractal Maze instead of the whole thing, allowing viewing of Mazes too large to fit in a bitmap. This creates the section at coordinates <x>, <y> at depth <w>, with the fractal Maze itself defined by random number seed <num>. This actually creates a 4x4 grid of sections surrounding the coordinates. Afterward @x will be set to the horizontal cell location of the entrance, and @y the horizontal location of the exit. This is used by the “World’s Largest Maze” script to create the section of the giant virtual Maze nearest your location.

FractalPart3 <x> <y> <z> <w> <num>: Like the Fractal Maze creation command for 3D Mazes, however this creates just a subsection of the 3D fractal Maze instead of the whole thing, allowing viewing of Mazes too large to fit in a bitmap. This creates the section at coordinates <x>, <y>, <z> at depth <w>, with the fractal Maze itself defined by random number seed <num>. This actually creates a 2x2x2 grid of sections surrounding the coordinates. Afterward @x will be set to the horizontal cell location of the entrance, and @y the horizontal location of the exit. This is used by the “World’s Largest Maze” script to create the section of the giant 3D virtual Maze nearest your location.

VirtualPerfect <edges>: Creates or adds on to part of a Maze in memory using the hunt and kill algorithm, in which only part of the Maze is stored in the main bitmap. The dot indicates the current coordinates, and will be updated upon return. The <edges> parameter is a group of flags indicating which edges the current section being worked upon is adjacent to, in which 1 means top, 2 means left, 3 bottom, and 4 right. This operation will create the Maze until one of the edges is reached. Afterward @z will contain how many cells were created. This operation can be used to compose a Maze larger than will fit in memory at once, by creating one section at a time, although it’s the responsibility of the caller to save created sections to disk and load other sections appropriately for the next phase of creation.

VirtualAldous <edges>: Like VirtualPerfect except creates or adds on to part of a Maze using the Aldous Broder algorithm.

VirtualRecurs <edges> <stack>: Like VirtualPerfect except creates or adds on to part of a Maze using the recursive backtracking algorithm. The stack used by this algorithm is stored in the temporary bitmap, which should be n by 1 pixels, where n is two times the number of entries in the stack. (Because the stack stores directions, two bits are needed to represent four possible numbers.) The <stack> parameter indicates the initial stack offset in the temporary bitmap. This operation will create the Maze until one of the edges is reached, or one of the ends of the stack is reached. Afterward @y will contain the new stack offset. The “Virtual Mazes” script that comes with the program uses this operation to create large recursive backtracking Mazes in a grid of bitmaps (along with using other bitmaps temporarily for the stack). This script doesn’t have its own menu option, but it is available in the sources subdirectory of the installation.

DrawLevel <z> <x> <y> <xx> <xy> <yx> <yy>: Treats level <z> in the 3D bitmap in the temporary bitmap as an orthogonal Maze and draws it at coordinates <x>, <y> on the main bitmap. Walls are always one pixel thick, however passages can be of greater sizes and displayed in different orientations. The offset for each horizontal cell is in <xx> and <xy> (normally zero), and the offset for each vertical cell is in <yx> (normally zero) and <yy>. This is used by the “Demos” script to display Mazes on the surface of a cube.

CustomIterate: Changes the Custom Paths field in the Labyrinth Settings dialog to the next valid Labyrinth. This does the same as creating a Custom Labyrinth with the Custom Autoiterate flag set, except this doesn’t draw the new Labyrinth. Afterward @z will contain whether incrementing failed because Don’t Autostart Infinite was on and there were no more Labyrinths to create of the current size.

Dungeon <num1> <num2> <num3> <num4> <num5>: Draws a dungeon style Maze in the main bitmap formed of random rooms and connecting passages, similar to dungeon levels seen in the computer games Rogue and Nethack.

<num1>: The number of rooms to create. Note there may be fewer rooms actually created if a place for the last rooms can’t be found. If <num1> is 1 the whole bitmap will be filled with one big room, while if <num1> is 0 the whole bitmap will be filled with a Maze.

<num2>: The number of connecting passages between rooms (beyond the minimum number required to ensure all the rooms are connected with each other).

<num3>: The maximum horizontal and vertical pixel size of each room, where a 3x3 room is the minimum.

<num4>: The percentage of places where passages connect with rooms, that should contain closed doors (as opposed to doorless openings).

<num5>: Whether the dungeon should be marked with an entrance and exit. If the 10’s place is non-zero, there will be a passage from the top edge of the bitmap to a room, otherwise the entrance will be a hole in the ceiling somewhere in a random room. The position of the dot will be moved to this entrance. If the 1’s place is non-zero, there will not be an exit to the dungeon, otherwise there will be an exit hole in the floor somewhere in the middle of a random room.

If Bitmap Is 3D is on, the dungeon will be made within a level, otherwise pits in the floor and ceiling won’t be created since it’s a 2D bitmap. If the color bitmap exists, it will be made into a copy of the dungeon with the following coloring: Walls = light gray, Passages = dark gray, Rooms = gray, Walls of rooms = red, Doors = green, Ceiling and floor pits = black. If the temporary bitmap exists, it will have on pixels where doors are. This is used by the “Dragonslayer Game” script to create its dungeon levels.

ZoomSprite: This replaces the active bitmap with a zoomed version of itself. Each pixel is replaced with a square section from the temporary bitmap. The status of a pixel in the monochrome bitmap and its four neighbors determines which section of the temporary bitmap is used for the zoomed pixel at that coordinate. The width of the temporary bitmap divided by four determines the zoom factor and the size of each section. On pixels use the first four rows of the temporary bitmap, where the 16 combinations of the status of their four neighbors as shown below determines which section gets used. If there’s not enough rows in the temporary bitmap, combinations out of bounds are solid on or white pixels. Off pixels are replaced with solid off or black pixels, unless rows 5 through 8 in the temporary bitmap are present, in which case those rows are used instead.

# . . .

.#. ##. .#. .##

. . # .

# . . #

##. ##. .## .##

. # # .

# # . #

### ##. ### .##

. # # #

# . # .

.#. ### ### .#.

# . # .

DrawSeen <num>: This highlights pixels on the color bitmap that are visible from the dot. Pixels within a distance of <num> pixels along a line of sight from the dot, that aren’t blocked by on pixels in the monochrome bitmap, will be set to the corresponding pixel in the temporary color bitmap. If <num> is negative, pixels within a circular region will be uncovered, otherwise pixels within a square region will be. If No Corner Hopping is off, this allows one to “see” between on pixels connected diagonally.

If the monochrome bitmap is active, this will instead do a simple visibility check from the coordinates of the dot. Off pixels in the monochrome bitmap that are definitely behind on pixels will also be turned on. This will be done within a distance of <num> pixels from the dot.

Palette: Replaces colors in the main bitmap based on the temporary bitmap. For each color in the main bitmap, treat it as a 24 bit number index into the temporary bitmap. If a color index is too large to fit within the bounds of the temporary bitmap, or that temporary bitmap pixel is 0, then do nothing, otherwise replace the original color with the color at that index.

SymmetricX: Like the Make Symmetric command except modifies the current Maze to be horizontally symmetric, reflected across the up down axis. Note reflected Mazes are hard to have perfect, where either the entire reflection axis will be one long passage, there will be at least one asymmetry, or a combination of both.

SymmetricY: Like the Make Symmetric command except modifies the current Maze to be vertically symmetric, reflected across the left right axis.

SymmetricZ: Like the Make Symmetric command except modifies the current Maze to be symmetric around the center, with one quadrant duplicated and rotated four times. Note this Maze can only be symmetric when it has an odd number of passages, in which case the solution path must pass through the center cell. Mazes with an even number of passages will have a single asymmetry in them.

ZoomBiasPic: Zooms the monochrome bitmap, such that each 2x2 pixel area becomes a 3x3 pixel area. The middle column areas of each cell will be set based on the brightness of the color bitmap’s corresponding pixels. This is used to zoom a Maze such that its passage and wall thicknesses look similar to a background picture.

Overview2: This is like the Overview command, except it draws an orthographic overview such that each block is seen edge on (instead of face on). The top of each block will be diamond shaped, with the scene being not unlike the layout in real time strategy games such as StarCraft or Age of Empires. As with Overview, the Depth Size draw setting indicates the height of each block. The Vertical Size here indicates the pixel height of each edge of the diamond, and Horizontal Size indicates how many pixels wide each step along those edges are. With Depth Size set to 10, good values for Horizontal and Vertical Height are 2 and 3.

Altitude <num1> <num2>: Creates a display similar to the Render Bitmap Overview command when applied to a 2D bitmap, however here each block has its own height, forming a 3D bar graph or a bar graph over a 2D array. The height values come from the color bitmap. If the color bitmap is active, the display will be drawn in the color bitmap (replacing the height values input source) and the color of each block will be taken from the temporary color bitmap. Each height is scaled by <num1>, where 1000 means one unit in the color bitmap maps to one pixel in the display. The max value allowed for a color bitmap pixel is in <num2>, where numbers higher are capped to this height. If the scale factor <num1> is negative, then the scale used will be such that the tallest block drawn will be exactly <num2> pixels high. This is used by the “Mandelbrot Set Fractal” script to draw 3D overviews of the fractal.

GetWireframe <num> <var>: Fetches line number <num> from the wireframe scene in memory and stores it in 7 custom variables starting with index <var>. For example, “GetWireframe 0 10” will store the X, Y, and Z coordinates of the two endpoints of the first line in custom variables #10 through #15, and its color in variable #16.

SetWireframe <num> <var>: Defines line number <num> in the wireframe scene in memory with the 7 custom variables starting with index <var>. For example, “SetWireframe 0 10” will set the X, Y, and Z coordinates of the two endpoints of the first line with custom variables #10 through #15, and set color from variable #16. This does nothing if <num> is outside the limit of the number of lines in the wireframe, so set nWireframeSize if you want to change the number of lines in memory.

GetPatch <num> <var>: Fetches patch number <num> from the patch scene in memory and stores it in 19 custom variables starting with index <var>. The first 16 variables store the four vertexes of the patch, in X, Y, and Z coordinates, and then whether the edge connected with the point is highlighted. The 17th variable stores the number of vertexes used in the patch (which is always either 3 or 4), the 18th stores the color, and the 19th the patch’s transparency.

SetPatch <num> <var>: Defines patch number <num> in the patch scene in memory with the 19 custom variables starting with index <var>. The 19 custom variables define the three or four vertexes, the number of vertexes in use, the color, and transparency, in the same layout as GetPatch. This does nothing if <num> is outside the limit of the number of patches in the scene, so set nPatchSize if you want to change the number of patches in memory.

GetStar <num1> <num2> <num3>: Fetches the horizontal and vertical coordinates, along with the RGB color, of star number <num2> displayed in the perspective view. If <num1> is 0, gets the star from the perspective inside view, otherwise gets the star from the wireframe or patch view. The three values are stored in custom variables starting with index <num3>.

SetStar <num1> <num2> <numx> <numy> <string>: Sets the horizontal and vertical coordinates, along with the color, of star number <num2> displayed in the perspective view. If <num1> is 0, sets the star in the perspective inside view, otherwise sets the star in the wireframe or patch view.

Stereogram <num1> <num2>: Creates a random dot stereogram in the active bitmap, where the patterns in the stereogram will horizontally repeat after <num1> pixels. The stereogram is made from the contents of the main bitmap, where on pixels in it will appear to have a depth or farness of <num2> when compared to off pixels. Typical values for <num1> and <num2> are 50 and 10. Normally the dots placed are random, where stereograms on the color bitmap take their colors from the blend range defined in the Replace Color dialog. If the temporary bitmap is set and the same size as the main bitmap, then the pattern will be taken from the corresponding pixels on the temporary bitmap.

SetLife <string>: Defines the behavior of the Life Generate command. The <string> must be two strings of digits ranging from 0-8 separated by a slash. The first sequence indicates neighbor counts which keep a cell alive, and the second neighbor counts which cause a new cell to be born. The default for Conway’s Life is “23/3” which indicates cells live if they have 2 or 3 neighbors, and cells are born if they have 3 neighbors. Interesting values for <string> related to Mazes are “12345/3” (called “Maze”) and “1234/3” (called “Mazectric”), which produce Mazelike patterns filled with one pixel wide passages and walls, and the occasional room.

Evolution <num> <flag>: Creates a type of cyclic cellular automaton in the color bitmap. The pattern will have <num> different colors, where the colors fade through the blend range defined in the Replace Color dialog. If <flag> is false, a new pattern will be initialized with all colors set randomly, else the existing pattern will evolve a step. Each color flows into its orthogonal neighbor, if those neighbors are one color less than it. If Edge Behavior is set to Torus Wrapping, the colors can flow around the edges of the bitmap. If No Corner Hopping is off, flowing will happen in all eight directions instead of just the four compass directions. Note the temporary color bitmap is used to store the color indexes of each pixel. This is used by the “Demos” script.

Mandelbrot <x1> <y1> <x2> <y2> <num>: Draws a Mandelbrot set fractal in the color bitmap. The coordinate pairs define the rectangle of the Mandelbrot set to map to the bounds of the color bitmap, where the numbers are divided by a billion, e.g. 1500000000 means 1.5. The depth or number of iterations to do before considering a pixel infinite depth and making it black is <num>. Colors for depths come from the blend defined in the Replace Color dialog. This forms the basis of the “Mandelbrot Set Fractal” script.

MandelbrotGet: This operation sets @x and @y to the coordinates of a random color pixel in the color bitmap that’s adjacent to a black pixel. Returns the center if there are no such pixels. Priority will be given to color pixels adjacent to a low number of black pixels. This is used by the “Mandelbrot Set Fractal” script to find an interesting spot when zooming in randomly.

Contrast: Sets the active bitmap to highlight contrast or differences between pixels. Each pixel is set to the maximum difference between it and all neighboring pixels. If No Corner Hopping is set, this considers the four orthogonal neighboring pixels, otherwise this considers all eight neighboring pixels including diagonals. The edge of the bitmap is considered to be next to off or black pixels. For the monochrome bitmap this sets a pixel if any of its neighbors have a different value than it, while for the color bitmap this compares the three RGB channels separately. This operation can be used to detect and highlight sharp edges in a picture, which can convert an imported Maze image into something that Daedalus can solve.

GroundVar2: Like the Ground Variable command, but also allows for areas to be based on a particular height, and areas to be forced to be a particular height. If the main color bitmap exists, then pixels in it are base heights to add random values to. If the temporary color bitmap exists, then non-zero pixels in it are heights that will be guaranteed within the result (and nearby pixels will gradually fade to those heights). This is used by the “Jareth’s Labyrinth” script, to make the overall Labyrinth have higher heights in the middle areas, and also to make certain areas like the floor of the castle be a particular height.

Hunger <num>: Implements the computer AI in the “Hunger Games” script, and isn’t useful outside of it. The low 12 bits of <num> indicates the tribute to determine the best move for, normally ranging from 0-23. If the high 12 bits of <num> are set, they indicate the light radius in squares normal tributes should be able to see at that time of day. Afterward custom variable @z will indicate the action to take, @y will indicate the inventory slot item to operate upon (if applicable), and @x will indicate the direction to move or throw an item in (if applicable). The values for @z are as follows. 0: Do nothing and wait, 1: Use item, 2: Pick up whatever standing over, 3: Move or melee attack in direction, 4: Throw item in direction, 5: Drop item, 6: Climb down, 7: Climb up, 8: Give item, 9: Dig down, 10: Fire launcher, 11: Free tribute from Net, 12: Propose alliance, 13: Claim leadership.

System <num>: Runs system menu commands. If <num> is negative, minimizes the window. If positive, maximizes the window. If 0, restores the window from being minimized or maximized.

Setup: Sets up the program in the Windows environment. This is a shortcut for a combination of the Program Group (User), Desktop Icon, and File Extensions commands.

FileClose <num>: Closes the file handle in <num>. The file should have been opened with the FileOpen function.

FileWrite <num> <var>: Writes variable <var> to the file in handle <num>. If <var> is a number it’s written as decimal text, else if <var> is a string it’s written as a formatted string.

FileWriteByte <num1> <num2>: Writes byte <num2> to the file in handle <num1>.

FileReadStr <num> <var>: Reads the next string from the file in handle <num> and stores it in custom string indicated by <var>.

VARIABLES

All dialog fields that are persistent, meaning if they’re changed they’ll still contain the entered value next time the dialog is brought up, have a corresponding scripting variable. There are also some “hidden” variables that are only accessible using scripting. Variable names are basically the name of the field in the dialog (with spaces and other special characters removed). There are a few exceptions, where common variables like the location of the dot have shorter names for convenience, while some names need text added to make them unique. Radio button groups are given the name of their group box, and are implemented by a numeric variable, where 0 is the first choice, 1 the second, etc. Each variable has a prefix character indicating its type. “n” means a standard number, “f” means a number storing a boolean flag, “r” means a number storing a floating point real number, “k” means a number storing a color, and “s” means a string.

******************** File Settings dialog ********************

nCurrentGeneration

nGenerationCutoff

nNewFileCutoff

fUseEllersAlgorithm

fSaveInfiniteToFile

fSaveInfiniteAsDOSText

fDontAutostartInfinite

n2DBitmapXCutoff

n2DBitmapYCutoff

n3DBitmapXCutoff

fSaveTextBitmapsClipped

fLineCharsInTextBitmaps

fSaveTextBitmapsTabbed

******************** Macro Events dialog ********************

nOnMoveOffBitmap

nOnMoveIntoWall

nOnMoveToNewCell

nAfterMoveToNewCell

nOnFollowToNewCell

nAfterRedrawInside

nOnRedrawInside

nOnRunCommand

nOnLeftClick

nOnRightClick

nOnMiddleClick

nOnPrevClick

nOnNextClick

nOnMouseMove

nOnProgramExit

******************** Display Settings dialog ********************

nWhatToDraw

nHowToDrawIt

nHorizontalPixelValue

nVerticalPixelValue

fShowColorBitmap

nWindowHorizontalSize

nWindowVerticalSize

nWindowHorizontalOffset

nWindowVerticalOffset

nHorizontalScroll

nVerticalScroll

fSizeIsDrawableArea

fWindowAlwaysOnTop

fHideMenu

fHideScrollBars

fRedrawWhenBitmapEdited

nDisplayDelay

fAllowPartialScreenUpdates

fShowIndividualPixelEdits

fErrorCheckPixelOperations

fHourglassCursorOnRedraw

fAutorepeatLastCommand

nRepeatDelayInMsec

fPauseTimer

fSkipMessageDisplay

fAllowSoundPlaying

******************** Set Colors dialog ********************

kBorder

kPassage

kWall

kDot

kInsideWall

kSky

kGround

kLine

k3DWall

k3DCeiling

kMountain

kCloud

kFog

fAutorepeatRandomizesWallColor

******************** Random Settings dialog ********************

nRandomSeed

nRandomBias

nRandomRun

******************** Dot Settings dialog ********************

nX

nY

nZ

nDir

nX2

nY2

nZ2

nDir2

f3D

fShowDot

fDotIsCircle

fDotShowsArrow

nDotSize

fWallsImpassable

fNoCornerHopping

fGlancingBlows

fChaseMousePoint

fNoMouseDiagonal

fFollowPassages

nRadarLength

nMoveCount

fMoveByTwo

fDragMoveDot

fDragIsErase

fDragBigDot

fDragByTwo

fDoDragOnTemp

nEdgeBehavior

******************** Inside Settings dialog ********************

nInside

fCompass

fCompassIsExact

fCellLocation

fMapOverlay

fSealedEntrances

fMountains

nPeakHeight

nCloudCount

fSunAndMoon

fRainbow

fStars

nStarCount

rMeteor

fNarrowWalls

nCellSize

nNarrowCellSize

nWallHeight

nViewHeight

nStepHeight

fAllowTextureMapping

rLightFactor

nFogDistance

nClippingPlane

rViewingSpan

nStereoWidth

nSemitransparentWalls

nMotionFrames

nRotationFrames

nUpDownFrames

nMotionVelocity

nRotationVelocity

nUpDownVelocity

nHorizontalOffset

nVerticalOffset

nUpDownOffset

nDirectionOffset

fUpDownSmoothNotFree

******************** Bitmap Size dialog ********************

Size3W

Size3X

Size3Y

Size3Z

******************** Replace Color dialog ********************

fRainbowBlend

fStraightColorBlend

nRainbowStart

nRainbowDistance

kBlend1

kBlend2

******************** Maze Settings dialog ********************

fCreateMazesPolished

fApplyCommandsToRectangleSection

fTeleportToEntranceOnMazeCreation

fConnectPolesNeverAddsDeadEnds

fSolveFillersCheckEveryPixel

fSolveFillersConsiderDotsAsExits

fFindAPathFindsRandomPath

fShowCountOfShortestSolutions

nTweakPassagesChances

nTotalMazesCreated

nClarifyWeaveWallBias

nClarifyWeavePassageBias

nClarifyWeaveRailingBias

nEntrancePositioning

******************** Labyrinth Settings dialog ********************

nLabyrinthType

nCircuitShape

nClassicalSize

fClassicalSizeIsCircuits

sCustomPaths

fCustomAutoiterate

nFanfoldsAllowed

nAsymmetryAllowed

nCircuitPartitioning

nRadiusPartitioning

nCustomAlign

nCustomCenterSize

fLabyrinthRoundedEdges

******************** Create Settings dialog ********************

fCreateWithRiver

fHaveRiverAtEdges

fNoRiverFlowback

nOmegaDimensions

nOmegaInnerDimensions

nOmegaEntranceLocation

nOmegaExitLocation

nOmegaDraw

sPlanair

sSegment

fCreateWithWallAdding

fTreeValueIsRandomChance

nTreeRiverValue

nForestInitial

nForestAddition

nMaxSpirals

nMaxSpiralWalls

nRandomAddition

nFractalX

nFractalY

nNestingLevel

fAllowIsolationInFractal

fCrackLinesMayHeadOff

nCrackLineLength

nCrackPassLimit

nCrackSector

nCavernSparseness

fKruskalBasedOnPicture

fWeaveCrossingsMayCorner

fTiltLinesMakeNoDiamonds

nTiltCellSize

******************** Draw Settings dialog ********************

nHorizontalSize

nVerticalSize

nDepthSize

nHorizontalSizeBias

nVerticalSizeBias

nXStartingLocation

nYStartingLocation

nZStartingLocation

fMoveWithArrowKeys

nXVanishingPoint

nYVanishingPoint

nViewingAngleTheta

nVerticalPitchPhi

nDrawMotionVelocity

nDrawRotationVelocity

fViewFromRight

fMergeBlocksTogether

******************** Obscure Draw Settings dialog ********************

fReflectCoordinates

fShadeSky

fShadeGround

fDrawEdges

fShadeObjects

fDoTouchUps

nBorderWidth

nHorizonWidth

nDistanceScale

nXScale

nYScale

nZScale

kEdge

kSkyHigh

kSkyLow

kGroundHigh

kGroundLow

kObject

nXLightVector

nYLightVector

nZLightVector

******************** Scripting only variables ********************

fScreenSaver: This indicates whether Daedalus is running in screensaver mode. When active, any keyboard or mouse activity will attempt to exit the program.

nMessageTitle: The index of a custom string variable to use for the title of message boxes displayed by the program. If the index is invalid or the string zero length, the default string “Daedalus” is used.

fMessageCopy: If this is set, then whenever Daedalus shows a message box, the text of it will be automatically copied to the Windows clipboard, where it may then be pasted into another program. This is designed for older versions of Windows such as 9x, since on later versions of Windows such as XP, pressing Control+c will copy the text of any message box to the clipboard.

nSkipMessage: Determines the types of message boxes that are suppressed when the Skip Message Display setting is on. Setting this to -1 ignores nothing, and is the same as if Skip Message Display is off. Setting this to 0 ignores standard messages. Setting this to 1 ignores notice category messages too, such as the result of commands. Setting this to 2 ignores warnings as well, such as bad user input. Setting this to 3 ignores serious error conditions, such as out of memory.

nXTurtle & nYTurtle: The pixel coordinates of the current position used by the Turtle operation.

nTurtleS: The current drawing scale used by the Turtle operation.

fShowDot2: Like the Show Dot setting in Dot Settings. When set, the location of the 2nd dot will be visible. The bitmap pixel corresponding to the 2nd dot will be covered with the color in kDot2.

fNoMouseDrag: When set, dragging the mouse in the window won’t update the coordinates of the dot. Left clicking the mouse still teleports the dot as normal. This can be useful when Drag Is Erase is on, where a slight nudge of the mouse when left clicking can make unwanted edits to the bitmap.

nAutorepeat: This indicates the command currently or most recently autorepeated. The values used here are the same as those returned by the Command function.

fFogGround: Normally the Fog Distance inside setting only affects walls, and does not affect wall texture overlays. When this is set, floor and ceiling markings, and the tops and bottoms of walls, along with all wall texture overlays, will also be shaded appropriately based on their distance.

kDot2: When the 2nd dot is visible over one of the pixels as when fShowDot2 is on, this is the color of the 2nd dot.

kSun: The color of the Sun in perspective inside view.

kMoon: The color of the Moon in perspective inside view.

kWall2: The color of the bottoms of walls in perspective inside view. This only affects default height walls when viewed from zero Viewing Height. If this is different from the standard Wall or 3D Wall color, the ceiling will fade between the two colors. If this value is negative, it has no effect on the display.

kSky2: The color of the sky or ceiling at the horizon in perspective inside view. If this is different from the standard Inside Sky color, the sky will be a gradient or gradually fade between the two colors. If this value is negative, it has no effect on the display.

kGround2: The color of the ground or floor at the horizon in perspective inside view. If this is different from the standard Inside Ground color, the ground will fade between the two colors. If this value is negative, it has no effect on the display.

k3DCeiling2: The color of the sky or ceiling at the horizon for 3D Mazes (when below the top level) in perspective inside view. If this is different from the standard 3D Ceiling color, the ceiling will fade between the two colors. If this value is negative, it has no effect on the display.

kMountain2: The color of the top of mountains in perspective inside view. If this is different from the standard Inside Mountain color, mountains will be a gradient or gradually fade between the two colors. If this value is negative, it has no effect on the display.

kCloud2: The color of the bottom of clouds in perspective inside view. If this is different from the standard Inside Cloud color, clouds will be a gradient or gradually fade between the two colors. If this value is negative, it has no effect on the display.

fRainbow: Sets whether a rainbow is drawn in the perspective inside view, which will be positioned opposite the sun. The rainbow will be generated once and placed in custom bitmap -5, and regenerated whenever the window is resized.

nRainbow: Defines how the rainbow is drawn in the perspective inside view. The 1000000’s place and above indicate the height of the rainbow or its diameter in proportion to the window height, ranging from 0 (miniscule) to 99 (touching the top of the screen) and beyond. The 100000’s and 10000’s place indicate the vertical offset of the rainbow, ranging from 0 (as high as possible) to 99 (completely submerged below the horizon). The 1000’s and 100’s place indicate the width of the rainbow arc as a proportion of its radius, ranging from 0 (hairline) to 99 (a solid semicircle). The 10’s and 1’s place indicate the transparency of the rainbow, ranging from 0 (completely opaque) to 99 (completely invisible). If nRainbow is negative, the digit placements will be interpreted the same, however a rainbow won’t be drawn, but rather the existing contents of custom bitmap -5 will be stretched across the appropriate area of the screen.

nGround: Sets the bottom limit for Viewing Height that one can descend to via the Lower command in the perspective inside view. Usually this is 0, but may be lower if one wants to allow worm’s eye views barely above the ground plane, or even a large negative number to allow descending underground.

nHorizon: Indicates the offset of the horizon line in the perspective inside view, as a proportion of the vertical size of the window. The value 0 is the default of the horizon centered in the middle of the window, 1000 has the horizon at the bottom of the window, and -1000 has the horizon at the top of the window.

nSunMoon: This affects the Sun or the Moon in the perspective inside view. When the Sun is being displayed, this indicates the length of the Sun’s rays, as a percentage of the diameter of the Sun’s disk. When the Moon is being displayed, this indicates the phase or percent fullness of the Moon. Positive numbers show a waxing Moon or the left hand side shaded, while negative numbers show a waning Moon.

nSunMoonY: This sets the height of the Sun and Moon in the sky in the perspective inside view. When 0 the middle of the Sun or Moon will intersect the top of the screen, and when 1000 the middle will intersect the horizon. Changing this can simulate the Sun/Moon rising/setting.

nStarColor: This number indicates how stars and meteors in the perspective inside view should be colored. Stars are usually grayscale. The millions place in the number indicates the percentage chance that a star should have some part of its color adjusted, e.g. 20XXXXXX where X is any digit means a 20% chance a star will not just be a shade of gray. The next two digits (100000’s and 10000’s place) indicate how to affect the red component of the color, the next two digits (1000’s and 100’s place) indicate how to affect the green component, and the low two digits (10’s and 1’s place) indicate how to affect the blue component. For each two digit pair, the high digit means how much to allow that component to be decreased, and the low digit means how much to allow the component to be increased. Each digit ranges from 0-9, where 0 means don’t add or subtract at all, 9 means add or subtract 255, and other digits proportion appropriately. For example, 300006 means that for those stars that are colored, up to 85 may be subtracted from its red component, or up to 170 may be added to its blue component. That will make stars have either a cyan (subtracting red) or blue (adding blue) tinge to them. The default value for this number is 10990099 which means a 10% chance a star may have its red or blue components arbitrarily increased or decreased, which allows stars to be red (adding red), cyan (subtracting red), blue (adding blue), or yellow (subtracting blue), but never green (adding green) or magenta (subtracting green).

nStarSize: Determines the maximum brightness of stars in the background of the perspective views, before they’re displayed larger than one pixel. Standard values can range between 0 and 765 (the latter of which is 255x3, or the maximum RGB brightness). If less than 0, then every other star is large (regardless of its brightness).

fSkyAll: Makes the Maze in perspective inside view seem to be suspended in air, instead of on a flat plain. Stars, meteors, and clouds will display over the entire background instead of just the top half, and mountains will display at the bottom instead of the middle. It’s recommended to set the Inside Sky and Ground colors the same with this, to avoid the appearance of a horizon in the middle. This setting also affects the wireframe and patch renderings.

fSky3D: When this flag is set, the ceiling area in 3D Mazes in the perspective inside view will show all the scenery as seen in 2D Mazes and the top level of 3D Mazes. Normally 3D Mazes are rendered as if lower levels are underground, where this can be used to make all floors seem above ground. It’s recommended to set the 3D Ceiling color the same as the Sky color with this, so the sky looks the same on all levels. This is used by the “Survivor Maze #5” script to allow windows that can be looked out on each floor of the vertical Maze.

fFrameDelay: When set, the perspective inside view will show an indicator of the frame delay on the fourth row from the bottom, or how long in milliseconds it took Daedalus to render the scene in question. Note on most systems this value is rounded to units of approximately 15 or 16 milliseconds, so not all numbers are possible.

nFrameDelay: Contains the most recent frame delay number as displayed when fFrameDelay is set. If the value is -1, no perspective inside view has been rendered yet with fFrameDelay on.

fNoCompass: When this flag is set, the compass in perspective inside view will never be shown, even when the Compass inside setting is active. This is used when overriding the default compass display with a macro, to avoid having the standard display of the compass overlap with the customized compass.

fNoLocation: When this flag is set, the location in perspective inside view will never be shown, even when the Cell Location inside setting is active. This is used when overriding the default location display with a macro, such as in the 4D Mazes or Giga Mazes scripts, to avoid having the standard display of the location overlap with the customized location.

fNoSubmerge: When this flag is set, then in the perspective inside view, having the viewing location being inside of a solid or semitransparent block will treat that block as completely invisible.

nStepDown: This is like nStepHeight, and only has an effect when the Step Height mode is active. This controls the maximum amount one is allowed to step down when moving between variable height cells. It can be used to prevent one from stepping off cliffs, but still be able to go down gentle stairs. If this value is negative, one is allowed to fall down any distance.

fRedrawAfter: If this flag is set, and the inside display mode is set to Smooth Movement, and the After Move To New Cell event is set, then animation during movement will not redraw the screen at its final position. Rather it’s assumed that the After Move To New Cell event will redraw the screen. This is used by scripts that involve some edit happening after each time the user moves, such as the monsters updating in the Pac-Man and Dragonslayer scripts. This avoids an extra screen update and hence results in smoother movement, since the screen will be made to update anyway after the monsters move.

This setting also affects the Autorepeat Last Command flag, and will cause it to not automatically update the screen after repeating the command if another update is being done at the same time. For example, if one is moving in the perspective inside view, this will cause a single screen update to cover both the repeated command and the movement, instead of two separate updates, which looks smoother. This is used by scripts such as Safari Maze to have smooth movement combined with background animation.

fMarkColor: Makes the color of floor and ceiling markings in perspective inside view be taken from the temporary color bitmap instead of the main color bitmap as normal. Semitransparent or variable height walls allow both a wall and floor marking to be visible at the same spot, in which case one may want them to have separate colors.

fMarkAll: Makes every cell in the perspective inside view have a ground marking. This is a quick way to have ground markings everywhere without having to maintain the temporary monochrome bitmap with solid on pixels.

fMarkBlock: If this flag is set, then in the perspective inside view, the west and east sides of raised ground elevation markings will be the original color for that cell. The top surface of the ground marking along with the north and south faces will be that color darkened or lightened appropriately. Normally the top of the ground marking is the original cell color, and the four side faces are that color shaded appropriately. This setting allows ground markings and variable height walls of the same color to look the same.

nSkyMark: Turns on ceiling markings in perspective inside view, i.e. points to which custom bitmap slot defines them. On pixels in the monochrome bitmap in that slot indicate where ceiling markings are. The color bitmap indicates the color of markings, where if that color bitmap doesn’t exist, the colors will be same as the floor markings. By default this is -1, meaning ceiling markings are turned off.

nMarkElev: Turns on variable height floor elevations in perspective inside view, i.e. points to which custom bitmap slot defines them. Pixels in the color bitmap there indicate the elevation of each floor square. By default this is -1, meaning variable height floor elevations are turned off.

nWallVariable: Turns on variable height walls in perspective inside view, i.e. points to which custom bitmap slot defines them. On pixels in the monochrome bitmap there indicate which walls are variable height as opposed to default height. Pixels in the color bitmap there indicate the height of each block, where the low 12 bits indicate the top elevation, and the high 12 bits the bottom. By default this is -1, meaning variable height walls are turned off.

nFogLit: Turns on lit textures for cells in the perspective inside view, i.e. points to which custom bitmap slot defines them. On pixels in the monochrome bitmap at that slot determine cells that ignore fog settings. The color bitmap in that slot is ignored. By default this is -1, meaning all cells have the same dimness when fog is set.

nTexture: This contains the index of the texture bitmap to use for the background area in the perspective inside view, for 2D Mazes and the top level of 3D Mazes. If this doesn’t point to a valid texture, the solid inside sky and ground colors are used instead of a texture. Note this variable gets set by the Background apply texture command.

nTexture3: This contains the index of the texture bitmap to use for the background area in the perspective inside view, for all levels in 3D Mazes except the top level. If this doesn’t point to a valid texture, the solid inside 3D ceiling and ground colors are used instead of a texture. Note this variable gets set by the Background apply texture command.

nTextureWall: Turns on wall textures for the vertical surfaces of walls in perspective inside view, i.e. points to which custom bitmap slot defines them. Pixels in the color bitmap in that slot indicate the texture for each face, where each group of 6 bits indicates the texture for the north, west, south, and east faces. By default this is 0, meaning custom bitmap slot #0 is used for texture mapping.

nTextureGround: Turns on floor and ceiling textures in perspective inside view, i.e. points to which custom bitmap slot defines them. Works similar to wall texture mapping, where pixels in the color bitmap in that slot point to the custom bitmap slot containing the textures. The low 12 bits indicate the floor texture, and the high 12 bits the ceiling, where 0 means no texture. The monochrome bitmap there is used for masks, and indicates whether monochrome overlays are black or white. By default this is -1, meaning floor and ceiling textures are turned off.

nTextureBlock: Turns on texture mapping for the top and bottom surfaces of walls in perspective inside view, i.e. points to which custom bitmap slot defines them. Works similar to ground texture mapping, where pixels in the color bitmap in that slot point to the custom bitmap slot containing the textures. The low 12 bits indicate the top texture, and the high 12 bits the bottom, where 0 means no texture. The monochrome bitmap there is used for masks, and indicates whether monochrome overlays are black or white. By default this is -1, meaning block textures are turned off.

nTextureElev: Turns on texture mapping for the sides of elevated ground markings in the perspective inside view, i.e. points to which custom bitmap slot defines them. Works similar to wall texture mapping, in which pixels in the color bitmap in that slot point to the custom bitmap slots containing the textures. The monochrome bitmap in that slot is unused. By default this is -1, meaning ground elevation textures are turned off.

fTextureDual: Controls whether textures on the sides of blocks and elevated ground are duplicated on north/south and west/east faces. If set, then the low 12 bits of a texture index indicate the texture bitmap for the north and south faces, and the high 12 bits of the texture index indicate the texture for the west and east faces. This setting allows more texture possibilities (12 bits instead of just 6 bits when each face has its own texture) however it does mean that textures on opposite sides of a block have to be the same.

fTextureDual2: This only plays a role when fTextureDual is set. This causes the two textures to be duplicated on the north/west and south/east faces of blocks. Normally the two textures are duplicated on the north/south and west/east faces.

fTextureBlend: When set, solid color textures in the perspective inside view (whether opaque or semitransparent) will be blended with the color of the block behind the texture. This is used in the “Hunger Games” script to for example have trees of many different colorings, without having to have a separate tree texture for each color.

nMarkElevX1, nMarkElevY1, nMarkElevX2, nMarkElevY2: Controls how hills are generated by the Ground Elevation command. The “X” variables indicate the frequency of hills or how often wrinkles happen, and the “Y” variables indicate the amplitude of hills or how high they can reach. Both the “1” and “2” values are generated randomly and added together. Usually the “1” numbers are larger and define a rough general shape, and the “2” numbers are smaller and define detail within it, resulting in a simple fractal.

nMazeCellMax: Sets the number of cells to allow generating in a Maze before stopping the command. If negative, commands will never stop prematurely. Commands will automatically decrement this variable, so subsequent Maze generations won’t halt unless the variable is reset. This allows freezing a command part way through for saving or other purposes. For example, the “Hunger Games” script uses this in combination with Prim’s Algorithm to create random inkblot shapes to use for lakes, mountains, and meadows.

nHuntType: Determines how the hunt and kill Maze generation algorithm command hunts for cells that aren’t yet part of the Maze. Setting this to 0 searches horizontal row by row until a new cell is found, which is simple but can result in a horizontal bias. Setting this to 1 alternates searching in both rows and columns until a new cell is found, which is more balanced. Setting this to 2 searches outward from the last cell in a spiral pattern until a new cell is found, which appears even smoother but can be slower.

nFractalDepth: Indicates the maximum chip depth to search for solutions in the Find Recursive Fractal Maze solving command.

nFractalLength: Indicates the maximum step length to search for solutions in the Find Recursive Fractal command.

nFractalType: The type of fractal Maze created by the FractalPart operation. If 0, the Maze will be nested cells created using the hunt and kill algorithm. If 1, the Maze will be created with the binary tree algorithm. If 2, the Maze will be created with the recursive division algorithm. If 3, the Maze will be a unicursal Labyrinth. If 4, the Maze will be a variation of the classical seven circuit Labyrinth with a number of circuits depending on the Maze’s size. If 5, the Maze will be a Hilbert curve Labyrinth. This setting can be seen in action in the “World’s Largest Maze” script, by pressing F10 to set the algorithm.

nStretch: This affects the Stretch To Window display setting. When set to 0, some rows will simply be skipped. When set to 1, then if any row in the range mapping to the displayed pixel is on the pixel will be on. When set to 2, then if any row is off the pixel will be off. This is basically a wrapper around the SetStretchBltMode Windows API. Note on some machines, values 1 and 2 will display slower. Other machines don’t support this at all, where changing the variable will have no visible effect.

fGraphNumber: This flag affects the Graph Distance and Graph Walls commands, the various “With Color” commands on the Dot Color submenu, the Mandelbrot operation, and how color pixel values are displayed in the Dot Settings dialog. When set, color pixels won’t be set to colors as defined in the Replace Color dialog, but rather pixels will be set to raw distance numbers. This can for example be used by a script to determine the number of moves you are from the entrance or exit of a Maze as you move around.

nGrayscale: This value affects the Make Grayscale command, and indicates the brightness to give to each of the RGB channels. The first three digits indicate the red brightness, the second three the green brightness, and the last three the blue brightness. Each three digit number is a fraction ranging from 0 (minimum) to 999 (maximum), where all three shouldn’t add to over 1000. The default value is 299587114, which indicates brightness factors of 0.299, 0.587, 0.114 for the RGB channels. If this value is negative, each channel will be given an equal 1/3 brightness factor.

fArrowKeysFree: This setting only plays a role when Move With Arrow Keys in Draw Settings is on. It causes movement in the wireframe and patch renderings to feel more fluid, like playing a video game. You don’t have to wait for key repeat to kick in, which means holding down a key immediately continuously moves, and you can also hold down two keys at once (e.g. move forward plus rotate) and have them both take effect. The speed at which continuous movement happens is controlled by the Repeat Delay In Msec field in Display Settings. This is like the Very Free Movement Inside Display Mode, but applied to the wireframe and patch renderings.

rTransparency: Daedalus supports semitransparency in perspective patch renderings. This sets the default transparency to use for patches in patch files loaded into the program that don’t already have a transparency defined for them, and also the transparency to use for patches created with the Make Patch Bitmap Overview command. This value ranges from 0 to 10000, where 0 is no transparency, and 10000 is completely invisible. This setting also affects how transparent semitransparent walls are in the perspective inside view.

nFogDistance2: Daedalus supports fog effects in perspective patch renderings. If this field is non-zero, the color of patches will increasingly fade the farther away they are. The larger the number, the greater the distance before the wall color will completely fade. Specifically it’s equal to the number of draw units before the fade limit is reached. The color things fade to is stored in the Edge Color obscure draw setting.

nWireWidth: Determines the maximum width of lines drawn in the wireframe display. Setting this to 0 always draws hairline thin one pixel wide lines, no matter their distance from the viewer. Setting this to 1 draws close lines one pixel wider horizontally, and the remainder as with setting 0. Setting this to 2 draws closer lines one pixel wider horizontally and vertically, and farther lines as with settings 1 and 0. Setting this to 3 draws the closest lines two pixels wider horizontally and vertically, and farther lines as with lower settings.

fWireSort: Determines whether lines in the wireframe display are sorted by distance before being drawn, to ensure that far away lines aren’t drawn on top of close lines. This generally isn’t necessary when the wireframe line width stored in nWireWidth is low, because intersecting lines will have little if any overlapping area. Sorting may slow down the rendering time, which is why there’s an option to turn it off.

nWireDistance: This setting only plays a role when the wireframe width setting nWireWidth is more than zero. It determines how many coordinate units away from the viewer the midpoint of lines must get before they’re displayed in the next narrower category.

nDrawFaceOrigin: Determines whether the wireframe and patch displays force the rendering to face the origin, pointing at X, Y, Z coordinate 0, 0, 0. Setting this to 0 doesn’t face the origin at all. Setting 1 makes the rendering face the origin, but doesn’t affect the actual direction one is moving in Draw Settings, which allows one to move along one trajectory while continually facing the origin. Setting 2 makes the rendering face the origin, and also updates the actual direction one is facing in Draw Settings, which allows one to sidestep in order to continually circle around the origin.

fStereo3D: This only plays a role when nStereo is non-zero, and stereoscopic graphics are being displayed. When this is set, the stereoscopic image will be made for classic 3D glasses, with red and cyan monochrome images for each eye overlapping. (This is in contrast to the completely separate left eye and right eye images drawn side by side as is normal.)

nWireframeSize: Contains the current number of line segments in the wireframe scene in memory. This variable can be changed to truncate the list or add space for new lines at the end of the list.

nPatchSize: Contains the current number of patches in the patch scene in memory. This variable can be changed to truncate the list or add space for new patches at the end of the list.

fMandelbrotShip: When this is set, the Mandelbrot operation will generate the “Burning Ship” style of fractal instead of the standard Mandelbrot fractal. The Burning Ship has an asymmetric image (unlike Mandelbrot) which looks like a ship with flames on its deck. It is produced by a similar formula as Mandelbrot, except the absolute value is taken of each dimension before squaring. The Burning Ship can be toggled to in the “Mandelbrot Set Fractal” script by pressing F11.

nSoundDelay: Controls the behavior of sounds played with the Sound operation. If negative, sounds are played synchronously, and the program will pause until the sound finishes. Otherwise, sounds are played asynchronously, and the program will continue running while the sound plays. If a sound is already playing when the Sound operation is called again, then the old sound will be interrupted and stopped when the new sound begins. If positive, this variable indicates how long in milliseconds the old sound should be allowed to play before the new sound interrupts it. For example, if set to 3000, and a sound was started one second ago, then the program will pause for two seconds before interrupting the old sound. This ensures a sound can play for a minimum length of time before the next sound starts.

nFileLock: Points to a custom string variable naming a mutex to use when reading files. A mutex is an operating system feature which ensures mutual exclusion, so that two processes aren’t accessing a file at the same time. If the file is locked by another program using the same mutex, then Daedalus won’t just fail right away, but will rather wait up to one second for the other process to release the mutex. This is used in the creation of videos such as https://www.youtube.com/watch?v=UdRaDGXBV-0 in which Daedalus is continually reloading a file and rendering a scene, while another process is continually updating and rewriting the contents of that file.

fRndOld: Controls whether the random number generator generates numbers using the system “rand()” function. The default random number generator in Daedalus is faster and has much better randomness properties, so this should only be set to reproduce behavior from versions of the program before 3.1.

fNoExit: When set, the program won’t exit. Attempting to exit will display a warning message. In the command line only version of the program, after running the initial command line, the program will continually prompt in the console for additional command lines to run.

nAllocations: Contains the total number of memory allocation buffers currently held by the program, incrementing each time a new buffer is allocated, and decrementing each time a buffer is freed. If this variable isn’t zero when the program exits, a memory leak error message will be displayed.

nAllocsTotal: Contains the total number of memory allocation buffers ever held by the program, incrementing each time a new buffer is allocated, and never decrementing. Combined with the nAllocations variable, this can be used to analyze memory usage behaviors of the program.

nAllocsSize: Contains the total size in bytes of all memory allocation buffers ever made by the program, increasing each time a new buffer is allocated, and never decreasing. Combined with the other memory allocation variables, this can be used to analyze memory usage behaviors of the program.

FUNCTIONS

******************** Constants ********************

False: Constant. Always returns 0.

True: Constant. Always returns 1.

Off: Constant. Always returns 0.

On: Constant. Always returns 1.

Color constants: Each solid color that can be entered into color fields in dialogs is also a constant with the same name. The 23 color constants are: Black, Maroon, DkGreen, Maize, DkBlue, Purple, DkCyan, LtGray, Gray, Red, Green, Yellow, Blue, Magenta, Cyan, White, Grey, Violet, Aqua, DkGray, Orange, Pink, Brown.

******************** Arithmetic functions ********************

Add <num1> <num2>: Addition. Returns the sum of <num1> and <num2>.

Sub <num1> <num2>: Subtraction. Returns <num2> subtracted from <num1>.

Mul <num1> <num2>: Multiplication. Returns <num1> times <num2>.

Div <num1> <num2>: Division. Returns <num1> divided by <num2>. If <num2> is 0, returns 0.

Mod <num1> <num2>: Modulus. Returns the remainder when <num1> is divided by <num2>. If <num2> is 0, returns 0.

Neg <num>: Negation. Returns the negative of <num>.

Inc <num>: Increment. Returns <num> plus 1.

Dec <num>: Decrement. Returns <num> minus 1.

Pow <num1> <num2>: Power. Returns <num1> raised to the <num2> power. If <num2> is negative, returns 1. If the result overflows, returns 0.

******************** Boolean functions ********************

Equ <num1> <num2>: Equality. Returns whether <num1> equals <num2>.

Neq <num1> <num2>: Inequality. Returns whether <num1> does not equal <num2>.

Lt <num1> <num2>: Less than. Returns whether <num1> is less than <num2>.

Gt <num1> <num2>: Greater than. Returns whether <num1> is greater than <num2>.

Lte <num1> <num2>: Less than or equal. Returns whether <num1> is less than or equal to <num2>.

Gte <num1> <num2>: Greater than or equal. Returns whether <num1> is greater than or equal to <num2>.

Not <num>: Logical not. Returns whether <num> is zero. Like the “!” operator in C.

And <num1> <num2>: Bitwise and. Returns the bits of <num1> anded with <num2>. This function does not do short circuit evaluation, in that both arguments are always evaluated even if the first is false. Like the “&” operator in C.

Or <num1> <num2>: Bitwise or. Returns the bits of <num1> ored with <num2>. This function does not do short circuit evaluation, in that both arguments are always evaluated even if the first is true. Like the “|” operator in C.

Xor <num1> <num2>: Logical exclusive or. Returns the bits of <num1> exclusive ored with <num2>. Like the “^” operator in C.

Inv <num>: Logical inverse. Returns <num> with all its bits flipped. Like the “~” operator in C.

<< <num1> <num2>: Shift left. Returns <num1> with all its bits shifted left <num2> times. Like the “<<“ operator in C.

>> <num1> <num2>: Shift right. Returns <num1> with all its bits shifted right <num2> times. Like the “>>“ operator in C.

&& <num1> <num2>: Logical and. Returns whether both <num1> and <num2> are non-zero. This function does not do short circuit evaluation, in that both arguments are always evaluated even if the first is false. Like the “&&” operator in C.

|| <num1> <num2>: Logical or. Returns whether either <num1> or <num2> are non-zero. This function does not do short circuit evaluation, in that both arguments are always evaluated even if the first is true. Like the “||” operator in C.

******************** Mathematical functions ********************

Odd <num>: Odd. Returns whether <num> is an odd number.

Abs <num>: Absolute value. Returns the absolute value of <num>.

Sgn <num>: Sign. Returns the sign of <num>. Returns -1 if it’s negative, 0 if zero, and 1 if positive.

Min <num1> <num2>: Minimum. Returns the minimum of <num1> and <num2>.

Max <num1> <num2>: Maximum. Returns the maximum of <num1> and <num2>.

Tween <num> <num1> <num2>: Between. Returns whether Num lies within the range of Num1 to Num2. This is basically a shorthand version of “And Gte <Num> <Num1> Lte <Num> <Num2>”.

Rnd <num1> <num2>: Random. Returns a random number between <num1> and <num2>.

?: <flag> <num1> <num2>: If/else. If <flag> is true, returns <num1>, otherwise returns <num2>. This function does not do short circuit evaluation, in that all arguments are evaluated regardless of the flag. Like the “?:” operator in C.

Sqr <num>: Square root. Return the square root of <num>, rounded down. For negative numbers this returns the same value as if the number were positive.

Dist <num1> <num2> <num3> <num4>: Distance. Returns the distance between coordinates <num1>, <num2> and <num3>, <num4>.

Ln <num1> <num2>: Logarithm. Returns <num1> times the natural or base “e” logarithm of <num2>.

Sin <num1> <num2>: Sine. Returns <num1> times the sine of <num2> degrees. Useful for plotting the vertical coordinates along a circle of radius <num1>.

Cos <num1> <num2>: Cosine. Returns <num1> times the cosine of <num2> degrees. Useful for plotting the horizontal coordinates along a circle of radius <num1>.

Tan <num1> <num2>: Tangent. Returns <num1> times the tangent of <num2> degrees.

Asin <num1> <num2>: ArcSine. Returns the inverse sine of <num1> divided by <num2>, in degrees.

Acos <num1> <num2>: ArcCosine. Returns the inverse cosine of <num1> divided by <num2>, in degrees.

Atan <num1> <num2>: ArcTangent. Returns the inverse tangent of <num1> divided by <num2>, in degrees.

Ang <num1> <num2>: Angle. Returns the angle in degrees (ranging from 0 to 359) of a line going from the origin to coordinates <num1>, <num2>.

Sin2 <num1> <num2> <num3>: Sine. Like Sin but assumes a circle is divided into <num3> equal slices instead of 360 degrees. Useful for when precision to a fraction of a degree or an odd ratio is needed.

Cos2 <num1> <num2> <num3>: Cosine. Like Cos but assumes a circle is divided into <num3> equal slices instead of 360 degrees.

Tan2 <num1> <num2> <num3>: Tangent. Like Tan but assumes a circle is divided into <num3> equal slices instead of 360 degrees.

Asin2 <num1> <num2> <num3>: ArcSine. Like Asin but assumes a circle is divided into <num3> slices instead of 360 degrees. Useful for when precision to a fraction of a degree or an odd ratio is needed.

Acos2 <num1> <num2> <num3>: ArcCosine. Like Acos but assumes a circle is divided into <num3> equal slices instead of 360 degrees.

Atan2 <num1> <num2> <num3>: ArcTangent. Like Atan but assumes a circle is divided into <num3> equal slices instead of 360 degrees.

Ang2 <num1> <num2> <num3>: Angle. Like Ang but assumes a circle is divided into <num3> slices instead of 360 degrees. Useful for when precision to a fraction of a degree or an odd ratio is needed.

******************** String functions ********************

Len <string>: Length. Returns the number of characters in <string>. If <string> is invalid, returns 0.

Char <string> <num>: Character. Returns the ASCII value of the <num>th character in <string>. If <string> is invalid or <num> references a character beyond the limits of the string, returns -1.

Num <string>: Number. Returns <string> converted to a number. Useful for getting a number from the result of the GetString operation.

Real <string> <num>: Real number. Like Num but multiplies the result by 10 to the <num> power, or shifts the decimal point to the left by <num>. Useful to parse a floating point real number into a fixed point integer.

EquStr <string1> <string2>: String equality. Returns whether <string1> equals <string2>.

NeqStr <string1> <string2>: String inequality. Returns whether <string1> does not equal <string2>.

LtStr <string1> <string2>: String less than. Returns whether <string1> is less than <string2> in ASCII sorting order.

GtStr <string1> <string2>: String greater than. Returns whether <string1> is greater than <string2> in ASCII sorting order.

LteStr <string1> <string2>: String less than or equal. Returns whether <string1> is less than or equal to <string2>.

GteStr <string1> <string2>: String greater than or equal. Returns whether <string1> is greater than or equal to <string2>.

EquStrI <string1> <string2>: String equality. Like EquStr but does a case insensitive string compare.

NeqStrI <string1> <string2>: String inequality. Like NeqStr but does a case insensitive string compare.

LtStrI <string1> <string2>: String less than. Like LtStr but does a case insensitive string compare.

GtStrI <string1> <string2>: String greater than. Like GtStr but does a case insensitive string compare.

LteStrI <string1> <string2>: String less than or equal. Like LteStr but does a case insensitive string compare.

GteStrI <string1> <string2>: String greater than or equal. Like GteStr but does a case insensitive string compare.

InChar <string> <num>: Returns the position of the first instance of character <num> within <string>. If <string> is invalid or the character isn’t anywhere in the string, returns -1.

******************** Daedalus specific functions ********************

SizeX: Horizontal size. Returns the horizontal pixel size of the main bitmap.

SizeY: Vertical size. Returns the vertical pixel size of the main bitmap.

SizeCX: Horizontal color size. Returns the horizontal pixel size of the color bitmap.

SizeCY: Vertical color size. Returns the vertical pixel size of the color bitmap.

Get <x> <y>: Get pixel. Returns the state of the pixel at the given coordinates on the main bitmap. Returns off for coordinates not on the bitmap.

GetT <x> <y>: Get temporary pixel. Returns the state of the pixel at the given coordinates on the temporary bitmap.

GetE <x> <y>: Get extra pixel. Returns the state of the pixel at the given coordinates on the extra bitmap.

GetA <num> <x> <y>: Get custom pixel. Returns the state of the pixel at the given coordinates on custom monochrome bitmap <num>.

GetC <x> <y>: Get color pixel. Returns the color value of the pixel at the given coordinates on the color bitmap. Returns black for coordinates not on the bitmap.

GetCT <x> <y>: Get temporary color pixel. Returns the color of the pixel at the given coordinates on the temporary color bitmap.

GetCE <x> <y>: Get extra color pixel. Returns the color of the pixel at the given coordinates on the extra color bitmap.

GetCA <num> <x> <y>: Get custom color pixel. Returns the color value of the pixel at the given coordinates on custom color bitmap <num>.

GetX <x> <y> <dir>: Get texture. Returns the texture of the block at the given coordinates facing the given direction. This means looking at appropriate bits of a pixel in custom color bitmap nTextureWall. If <dir> is -1, returns the color value of the whole pixel.

GetH <x> <y>: Get height. Returns the top elevation of the variable height wall at the given coordinates in a 2D bitmap. If variable height walls aren’t active or there’s no variable height wall at that location, it returns 0.

GetM <x> <y>: Get ground elevation. Returns the value of the pixel at the given coordinates of custom color bitmap nMarkElev.

Get3 <x> <y> <z>: Get 3D pixel. Returns the state of the pixel at the given coordinates of the 3D bitmap within the main bitmap.

Get3T <x> <y> <z>: Get temporary 3D pixel. Returns the state of the pixel at the given coordinates on the temporary 3D bitmap.

Get3E <x> <y> <z>: Get extra 3D pixel. Returns the state of the pixel at the given coordinates on the extra 3D bitmap.

Get3A <num> <x> <y> <z>: Get custom 3D pixel. Returns the state of the pixel at the given coordinates of the 3D bitmap within custom monochrome bitmap <num>.

Get3C <x> <y> <z>: Get 3D color pixel. Returns the color of the pixel at the given coordinates of the 3D bitmap within the color bitmap.

Get3CT <x> <y> <z>: Get temporary 3D color pixel. Returns the color of the pixel at the given coordinates on the temporary 3D color bitmap.

Get3CE <x> <y> <z>: Get extra 3D color pixel. Returns the color of the pixel at the given coordinates on the extra 3D color bitmap.

Get3CA <num> <x> <y> <z>: Get custom 3D color pixel. Returns the color of the pixel at the given coordinates of the 3D bitmap within custom color bitmap <num>.

Get3X <x> <y> <z> <dir>: Get 3D texture. Returns the texture of the block at the given coordinates facing the given direction. This means looking at appropriate bits of a pixel on the 3D bitmap within custom color bitmap nTextureWall.

Get3H <x> <y> <z>: Get 3D height. Returns the top elevation of the variable height wall at the given coordinates in a 3D bitmap.

Get3M <x> <y> <z>: Get 3D ground elevation. Returns the value of the pixel at the given coordinates of the 3D bitmap within custom color bitmap nMarkElev.

Pixels: Count pixels. Returns the number of on pixels in the main bitmap. This is the same value as displayed by the Count Pixels command.

RGB <red> <green> <blue>: Make color. Returns a 24 bit color value given red, green, and blue parts, each ranging from 0 to 255.

RGBR <color>: Red part. Returns the red part of the given color value, a number ranging from 0 to 255.

RGBG <color>: Green part. Returns the green part of the given color value, a number ranging from 0 to 255.

RGBB <color>: Blue part. Returns the blue part of the given color value, a number ranging from 0 to 255.

GrayN <num>: Grayscale color. Returns a 24 bit color value given the intensity to use, ranging from 0 to 255.

Light <color>: Lighten color. Returns a color twice as light, half way between it and white.

Dark <color>: Darken color. Returns a color twice as dark, half way between it and black.

Shade <color> <num>: Shade color. Returns the color darkened (for negative numbers) or lightened (for positive numbers). The shading number should range from -100 to 100, where the farther it is from 0, the darker or lighter the color.

Blend <color1> <color2>: Blend colors. Returns a color half way between <color1> and <color2>.

Hue <num>: Rainbow hue. Returns a color of the rainbow. The hue number should range from 0 to 360, where 0 is red, 120 is green, and so on. The color range here can be modified by the pattern settings in the Replace Color dialog.

HSL <hue> <saturation> <luminosity>: Make color. Returns a 24 bit color value given hue (ranging from 0 to 3600), saturation (ranging from 0 to 1000), and luminosity (ranging from 0 to 1000) parts.

Dlg: Dialog color. Brings up the Windows Color picker dialog, where you can visually select among a palette of colors or specify a color in terms of red/green/blue or hue/saturation/luminosity. When you leave the dialog, its current color will be returned.

NWSE <north> <west> <south> <east>: Make texture. Returns a 24 bit color value for the textures of a pixel, given the north, west, south, and east textures, each ranging from 0 to 63. Used to make colors for the bitmap defined by nTextureWall.

UD <up> <down>: Make wall. Returns a 24 bit color value for the elevations of a variable height wall, given the top and bottom heights, each ranging from 0 to 4095. The default wall height is 256.

UdU <color>: Extract wall up. Returns the high 12 bits of <color>. This can be used to access the elevation or texture of the top face of blocks, given a pixel from the relevant bitmap.

UdD <color>: Extract wall down. Returns the low 12 bits of <color>. This can be used to access the elevation or texture of the bottom face of blocks, given a pixel from the relevant bitmap.

Timer: Returns the number of seconds that have passed since the program was started or the timer was last reset. This is the same value as displayed by the Query Timer command.

Timer2: Returns the number of milliseconds that have passed. This value rounded to the nearest thousands is the same value as returned by the Timer function and as displayed by the Query Timer command.

Var <num>: Returns the number in custom variable <num>.

Command <string>: Returns the index for the command action in <string>, the same index as used by the Enable and Disable operations, the On Run Command event, and the Autorepeat variable. Returns -1 if <string> doesn’t correspond to any command. The number returned for a particular command is very likely to change from version to version of the program.

Eval <string>: Returns <string> evaluated as a numeric parameter. A stronger version of the Num function, since this will parse and evaluate functions within the string.

Event <num>: Returns whether a system event has happened and is waiting to be processed by the system. Event 0 returns whether a key has been pressed, and Event 1 returns whether a mouse button has been clicked.

Version: Constant. Returns the version of Daedalus, with the major version in the 1000’s place and the minor version in the 100’s place, e.g. 3500 for version 3.5.

FileOpen <file> <num>: Opens the string <file>. If <num> is 0 opens the file for reading, if 1 creates a new file for writing, if 2 appends to an existing file for writing. Returns a handle to the file opened, which is 0 if the open failed. The FileClose operation should be used to close the file when done.

FileReadNum <num>: Returns the next number, stored as text in decimal form, from the open file in handle <num>.

FileReadByte <num>: Returns the next byte from the open file in handle <num>.

FileEnd <num>: Returns whether the file opened for reading in handle <num> is at the end of file, with nothing left to read.

EVENTS

An event is an occurrence in the program which can be made to automatically trigger a macro execution. Events can be manually defined in the Macro Events dialog on the Macros submenu, or automatically defined by command lines. The list of events, the macro variables which define them, and their name in the Macro Events dialog, are below:

Variable Name

nOnMoveOffBitmap On Move Off Bitmap

nOnMoveIntoWall On Move Into Wall

nOnMoveToNewCell On Move To New Cell

nAfterMoveToNewCell After Move To New Cell

nOnFollowToNewCell On Follow To New Cell

nAfterRedrawInside After Redraw Inside

nOnRedrawInside On Redraw Inside

nOnRunCommand On Run Command

nOnLeftClick On Left Mouse Click

nOnRightClick On Right Mouse Click

nOnMiddleClick On Middle Mouse Click

nOnPrevClick On Previous Mouse Click

nOnNextClick On Next Mouse Click

nOnMouseMove On Mouse Move

nOnProgramExit On Program Exit

Parameters and return values: When certain event macros are called, custom variables @x, @y, and @z are automatically set beforehand as parameters. Also for some events, custom variables are looked at after the event returns, which change subsequent program behavior.

Motion events: For On Move Off Bitmap, On Move Into Wall, On Move To New Cell, and On Follow To New Cell, @x, @y, and @z contain the new bitmap coordinates the dot is trying to move to, i.e. the coordinate off the bitmap, inside the wall, or another cell. The current location of the dot will be adjacent or nearby these coordinates. After the macro returns, @z determines whether to do the default behavior.

On Move Off Bitmap: If @z is non-zero, the dot won’t move off the bitmap.
On Move Into Wall: If @z is non-zero, the dot will move into the wall as if it were space.
On Move To New Cell: If @z is non-zero, the dot won’t move to the new cell.
On Follow to New Cell: If @z is non-zero, the dot will stop at the current point as if there were a junction there.

After Move To New Cell: When this event macro is run, @x, @y, and @z contain the new coordinates of the dot, which it just moved to.

On Redraw Inside: After the macro returns, if the value of fRedrawWhenBitmapEdited has been changed (toggled from its original value) then the screen won’t be redrawn.

On Run Command: When this event macro is run, @x contains the ASCII value of the key pressed to invoke the command, if any, otherwise @x is zero. @y contains the index of the command about to be run, where this index is the same as returned by the Command function. After the macro returns, if @z is non-zero, the command won’t run. This can be used to disable or override the functionality of commands.

Mouse events: For all mouse events (On Left Mouse Click, On Right Mouse Click, On Middle Mouse Click, On Previous Mouse Click, On Next Mouse Click, and On Mouse Move), @x and @y contain the coordinates clicked on or being passed over. For overhead view this means the bitmap pixel clicked on. For inside view, @x and @y range from (-10000, -10000) for the upper left corner of the window to (10000, 10000) for the lower right. For both views, @z contains the coordinates of the raw pixel within the window clicked on, with the horizontal coordinate in the low 16 bits, and the vertical in the high 16 bits. For all mouse events, after the macro returns, if @z is non-zero, the normal behavior of the click will be skipped, otherwise the normal behavior will be done then.

On Program Exit: After this event macro returns, if @z is non-zero, the program won’t terminate.

TEXTURE MAPPING

Texture mapping in the perspective inside view is determined by a special set of bitmaps. Just as there’s a list of custom variables and strings, there’s a special list of custom monochrome bitmaps and custom color bitmaps, beyond the standard main, temporary, and extra bitmaps. The commands on the Apply Texture submenu work by automatically changing these bitmaps appropriately. Custom bitmaps don’t have to be used for textures, in which they also define ceiling markings and variable height walls, and can even just be used as a place for scripts to store extra bitmaps. For purposes of texture mapping, a custom color bitmap is called a texture, and a custom monochrome bitmap is called a mask. Custom bitmaps are accessed through the CopyMask, CopyTexture, SwapMask, SwapTexture, DeleteMask, and DeleteTexture operations.

Texture 0 (or the texture indicated by nTextureWall) determines which texture bitmaps are displayed where. For each block in the inside view, the corresponding pixel in texture 0 determines the texture for each of the block’s four walls. In the 24 bit color value in each pixel of texture 0, the low 6 bits 0-5 determine the texture of the wall facing direction 0 or North, bits 6-11 the texture of direction 1 or West, bits 12-17 direction 2 or South, and the high 6 bits 18-23 the texture of direction 3 or East. The number contained in each set of bits determines the index of the texture and mask bitmaps to apply to that wall. If this number is zero, or the desired pixel is outside the bounds of texture 0, then the wall has no texture. Note 6 bits can store numbers from 0-63, and since value 0 is special indicating no texture, that means the maximum number of different wall textures that can be displayed at a time is 63.

If variable fTextureDual is set, then texture bits are interpreted differently. When set, the low 12 bits 0-11 of a texture index indicate the texture bitmap for the north and south faces, and the high 12 bits 12-23 of the texture index indicate the texture for the west and east faces. That means walls will have the same north/south and west/east face textures. 12 bits can store numbers from 0-4095, which means this option allows 4095 different wall textures to be displayed at a time, with the limitation of opposite sides of walls having the same texture. If variable fTextureDual2 is set, then the fTextureDual variable will instead cause the two textures to be duplicated on the north/west faces of blocks for bits 0-11, and south/east faces for bits 12-23.

The texture and mask bitmaps at a non-zero index together determine the texture mapping to display on a wall. If the texture bitmap exists, and the mask bitmap doesn’t, then the wall will be solidly covered by the color texture, same as the result produced by the Color Walls apply texture command. If the mask bitmap exists, and the texture bitmap doesn’t, then the wall will have the mask bitmap overlaying it, i.e. a black or white etching on the normal wall color, same as the result produced by the Overlay Walls command. If both bitmaps exist, then the wall will have the color texture overlaying it, same as the results produced by the Color Overlay Walls command. If neither bitmap exists, then the wall will have no texture.

Mask 0 (or the mask indicated by nTextureWall) determines how to use the mask bitmap at a particular index, if present. If a pixel in mask 0 corresponding to a block is off, or the pixel is outside the bounds of the mask bitmap, then the black pixels in the mask at the actual index are given focus. That means either off pixels in the mask will overlay the wall as black pixels, or on pixels in the mask will appear as pixels from the color texture and off pixels will be the wall’s color. If a pixel in mask 0 is on, then white pixels in the actual mask are given focus. That means either on pixels in the mask will overlay the wall as white pixels, or off pixels in the mask will appear as pixels from the color texture and on pixels will be the wall’s color.

Other parts of the perspective inside view can be texture mapped too. Variable nTexture points to the texture bitmap to use for the background area, for 2D Mazes and the top level of 3D Mazes. Variable nTexture3 points to the texture bitmap to use for the background area for all levels in 3D Mazes except the top level. Variable nTextureGround points to the textures to use for floor and ceiling textures, in which the low 12 bits of each pixel indicate the floor texture, and the high 12 bits the ceiling, where 0 means no texture. Variable nTextureBlock points to the textures to use for the top and bottom surfaces of walls, in which the low 12 bits indicate the top texture, and the high 12 bits the bottom, where 0 means no texture. Variable nTextureElev points to the textures to use for the sides of elevated ground markings, in which the bits are divided the same as for block sides.

LICENSE

IMPORTANT NOTICE: Daedalus and all Maze generation and general graphics routines used in this program are Copyright (C) 1998-2024 by Walter D. Pullen. Permission is granted to freely use, modify, and distribute these routines provided these credits and notices remain unmodified with any altered or distributed versions of the program. The user does have all rights to Mazes and other graphic output they make in Daedalus, like a novel created in a word processor.

More formally: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful and inspiring, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details, a copy of which is in the LICENSE.HTM included with Daedalus, and at http://www.gnu.org

O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O

* Walter D. "Cruiser1" Pullen :) ! Astara@msn.com *

O Find your way through life's Maze: http://www.astrolog.org/labyrnth.htm O

* "Who am I, What am I? As I am, I am not. But as we are, I AM. And to *

O you my creation, My Perfect Love is your Perfect Freedom. And I will be O

* with you forever and ever, until the End, and then forever more." - GOD *

O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O*O