-- 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 2.2 ** 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. -- ***************** 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. 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 "undocumented" 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. Variables 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 undocumented 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 #0 through #99 can be referenced with @0 through @99, while custom strings #0 through #99 can be referenced with $0 through $99. 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. String constants are always surrounded by double quotes, single quotes, curly braces, or parentheses. Anything that's not a string is considered a variable or function to be queried or evaluated. Function: A type of parameter, that evaluates to a number. Functions in turn take 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". 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 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 ******** All commands which display a 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 "c" is a prefix for control, "a" means alt, and "s" means shift. 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 / Survivor Squares Game 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 / Glacier Maze Script18 a* File / Run Script / Stocker Farms Maze Script19 a( File / Run Script / Safari Maze Script21 ac1 File / Run Script / Mandelbrot Set Fractal Script22 ac2 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 / Print... Print File / Print Setup... PrintSetup File / File Settings... DlgFile af File / 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 / 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 Edit / Copy Text CopyText Edit / Paste Paste 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 / 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 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 Targa File / Open... DlgOpenTarga Color / Color Targa File / Save... 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 / 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 / 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 / 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 / Clarify 3D Clarify3D Maze / Clarify 4D Clarify4D Maze / Clarify Weave ClarifyWeave 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 / 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 / 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 / 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) / 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) / Zeta (8 Way) Zeta Z Create / Labyrinth / Create Labyrinth Labyrinth C 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 / 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 / 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, "\t" becomes a tab, "\n" becomes a line break, and "\r" becomes a carriage return. The sequence "@x" where "x" is a letter from a-z or a number from 0-99 expands to the number contained in that custom variable. The sequence "$#" where "#" is a number from 0-99 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 : Opens the file in the string , regardless of its type. This accesses the functionality of the "Open..." command without bringing up a dialog. OpenBitmap : Opens the Windows bitmap file in the string . This accesses the functionality of the "Open Bitmap..." command without bringing up a dialog. OpenText : Opens the text file in the string into the main monochrome bitmap. This accesses the functionality of the "Open Text..." command without bringing up a dialog. OpenX11 : Opens the X11 bitmap in the string into the main monochrome bitmap. This accesses the functionality of the "X11 Bitmap / Open..." command without bringing up a dialog. Open3D : Opens the Daedalus 3D bitmap in the string into the main monochrome bitmap. This accesses the functionality of the "3D Bitmap / Open..." command without bringing up a dialog. OpenDB : Opens the Daedalus bitmap in the string . Daedalus bitmaps are created with the SaveDB operation. OpenScript : Opens and runs the Daedalus script in the string . This accesses the functionality of the "Open Script..." command without bringing up a dialog. OpenTarga : Opens the Targa bitmap in the string into the color bitmap. This accesses the functionality of the "Color Targa File / Open..." command without bringing up a dialog. OpenPaint : Opens the Paint bitmap file in the string into the color bitmap. This accesses the functionality of the DlgOpenPaint operation command without bringing up a dialog. OpenWire : Opens the Daedalus wireframe file in the string . This accesses the functionality of the "Open Wireframe..." command without bringing up a dialog. OpenPatch : Opens the Daedalus patch file in the string . This accesses the functionality of the "Open Patches..." command without bringing up a dialog. 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 DlgX11 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 : Saves the active bitmap to a Windows bitmap file in the string . This accesses the functionality of the "Save Bitmap..." command without bringing up a dialog. SaveText : Saves the main monochrome bitmap to a text file in the string . This accesses the functionality of the "Save Text..." command without bringing up a dialog. SaveDOSBlock : Saves the main monochrome bitmap to a DOS block character text file in the string . This accesses the functionality of the "DOS Text / Save Blocks..." command without bringing up a dialog. SaveDOSLine : Saves the main monochrome bitmap to a DOS line character text file in the string . This accesses the functionality of the "DOS Text / Save Lines..." command without bringing up a dialog. SaveDOSLine2 : Saves the main monochrome bitmap to a DOS double line character text file in the string . This accesses the functionality of the "DOS Text / Save Double Lines..." command without bringing up a dialog. SaveX11 : Saves the main monochrome bitmap to an X11 bitmap in the string . This accesses the functionality of the "X11 Bitmap / Save Normal..." command without bringing up a dialog. SaveX11Comp : Saves the main monochrome bitmap to a compressed X11 bitmap in the string . This accesses the functionality of the "X11 Bitmap / Save Compressed..." command without bringing up a dialog. SaveX11Super : Saves the main monochrome bitmap to a supercompressed X11 bitmap in the string . This accesses the functionality of the "X11 Bitmap / Save Supercompressed..." command without bringing up a dialog. Save3D : Saves the 3D bitmap in the main bitmap to a Daedalus 3D bitmap in the string . This accesses the functionality of the "3D Bitmap / Save Normal..." command without bringing up a dialog. Save3DComp : Saves the 3D bitmap in the main bitmap to a compressed Daedalus 3D bitmap in the string , where each character in the file covers four pixels. Save3DSuper : Saves the 3D bitmap in the main bitmap to a supercompressed Daedalus 3D bitmap in the string . This accesses the functionality of the "3D Bitmap / Save Supercompressed..." command without bringing up a dialog. SaveDB : Saves the active bitmap to a Daedalus bitmap in the string . Daedalus bitmaps are a custom format which stores bitmaps using only ASCII characters, and have some compression too. SaveTarga : Saves the color bitmap to a Targa bitmap in the string . This accesses the functionality of the "Color Targa File / Save..." command without bringing up a dialog. SaveWire : Saves the wireframe data in memory to a Daedalus wireframe file in the string . This accesses the functionality of the "Save Wireframe..." command without bringing up a dialog. SavePatch : Saves the patch data in memory to a Daedalus patch file in the string . This accesses the functionality of the "Save Patches..." command without bringing up a dialog. Size : 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 is false, this does "Set Lower Right Bound", if true this does "Shift Down And Right By". If is true, the bitmap is cleared after being resized. SizeC : 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 is false this does "Set Lower Right Bound", and if true this does "Shift Down And Right By". If is true, the bitmap is set to black after being resized. Zoom : Zooms the active bitmap. This accesses the functionality of the "Zoom..." command without bringing up the dialog. If is false, this does "Zoom By Factor", if true this does "Zoom To Size". If 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 : 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 is 0 this affects the X axis, if 1 this affects the Y axis, if 2 this affects the Z axis. If 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 : Resizes the Maze in the main monochrome bitmap. This accesses the functionality of the "Maze Size..." command without bringing up the dialog. If is true, the Maze bitmap is cleared after being resized. MazeSizeC : 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 is true, the Maze bitmap is cleared after being resized. Bias : 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 : Replaces all instances of with in the color bitmap. This accesses the functionality of the "Replace Color..." command without bringing up the dialog. The colors in and may be 24 bit color numbers or strings, where may be a pattern string. If is true, the colors are swapped instead of one replaced with the other. Brightness : Changes the brightness of the pixels in the color bitmap. This accesses the functionality of the "Brightness..." command without bringing up the dialog. The brightness number is in . If 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". ******************** Control flow operations ******************** If : If is true, gets executed as a command line. Like the "if" statement in C. IfElse : If is true, gets executed as a command line, otherwise gets executed as a command line. Like the "if / else" statement in C. SwitchSgn : If is negative, gets executed as a command line. If is 0, gets executed as a command line. If is positive, gets executed as a command line. DoCount : Executes as a command line times. While : Evaluates as an expression. If true, executes as a command line, then repeats. Keeps reevaluating and executing until the expression is no longer true. Like the "while" statement in C. DoWhile : Executes as a command line, then evaluates 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 : Sets the custom variable indicated by to . While the variable less than or equal to , execute as a command line, then increment the variable. If is a number it indicates the index of the custom variable, else if 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 : Like the For operation except the variable gets added to it each iteration, instead of just being incremented. The loop exits when the variable is no longer between and . //: 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 completely stops executing the surrounding command line. If the surrounding command line is part of a loop, the loop operation will immediately terminate. This is most often used to break out of one of the above looping operations. Like the "break" statement in C. Halt: Stops executing the current command line, and also completely stops executing any number of surrounding command lines or loops. 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 : Simply executes as a command line once. Useful if a command line is stored in a custom string instead of a macro. ******************** Daedalus specific operations ******************** DefineMacro : Sets macro number to be . If is between 1 and 48, the appropriate command on the Run Macro submenu will have its menu text set to . This accesses the functionality of the Define Macro button in the "Enter Command Line..." command without bringing up the dialog. Macro : Runs macro number . Note the first 48 macros, since they exist on menus, also have commands which can run them directly. ClearEvents: Resets all macro events to 0. This means all fields in the Macro Events dialog and includes all undocumented macro events. SetVar : Sets custom variable to value . If is a number it indicates the index of the custom variable, else if is a string (e.g. "a") it indicates the custom variable directly. SetVars : Sets a range of custom variables to a set of constants. This sets variables starting with custom variable . There should be values contained in , separated with spaces. SwapVar : Swaps custom variables and . SetString : Sets custom string to formatted string . If is a number it indicates the index of the custom string, else if is a string (e.g. "a") it corresponds to a custom string directly. SetStrings : Sets a range of custom strings to a set of constant strings. The first character in indicates a separator character, where there should be strings contained in , separated by this character. SwapString : Swaps custom strings and . SetChar : Sets character number in custom string to value . Strings start at character 0. This does nothing if the custom string is empty or is beyond the end of the string. If is a number it indicates the ASCII value of the new character, else if is a string (e.g. "!") it indicates the character directly. SetStringNum : Sets custom string to a string containing the number . If contains fewer than 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 is a number it indicates the index of the custom string, else if is a string (e.g. "a") it corresponds to a custom string directly. SetStringReal : Sets custom string to a string containing a floating point number represented by . There will be digits to the right of the decimal point, or in other words this outputs with a decimal point places from the right end. If is a number it indicates the index of the custom string, else if is a string (e.g. "a") it corresponds to a custom string directly. CopyMask : Copies monochrome bitmap to bitmap . 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 : Swaps monochrome bitmaps and . Note the main bitmap always exists, so it's not allowed to be swapped with a bitmap that's empty. CopyTexture : Copies color bitmap to bitmap . 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 what was most recently displayed in the perspective inside view. SwapTexture : Swaps color bitmaps and . Message : Displays a message box containing formatted string , and pauses until the user clicks OK. MessageAsk : Displays a message box of type containing formatted sting , and pauses until the user clicks a button in it. Parameter 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 : Displays formatted string 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 . 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 supress normal output. This operation should only be run during the After Redraw Inside macro event, where this does nothing outside that context. GetString : Brings up a dialog which prompts the user to enter a string. The formatted string 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 . Afterward @z will contain 1 if the dialog was cancelled, 0 otherwise. GetString2 : Like GetString except prompts the user to enter two strings. The formatted strings and 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 and . 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. Disable : Disables the command indicated by . If is a number it indicates the index of the command as returned by the Command function, else if 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 : Enables the command indicated by . OnCommandAll : Defines a trigger for all commands, such that when any command is selected from a menu or keyboard shortcut, macro 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 : Defines a trigger for the command indicated by , such that when that command is selected from a menu or keyboard shortcut, macro will run first. DoCommand : Run the command indicated by . 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, and finally turns off fAutorepeatLastCommand, fCreateMazesPolished, fShowDot2, fSky3D, fNoCompass, fNoLocation, fFogGround, and fMarkColor. It also deactivates nStepHeight, nMessageTitle, kSky2, kGround2, kMountain2, kCloud2, nSkyMark, and nWallVariable. 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. WindowTitle : Sets the formatted string to be the title of the Daedalus window. If is true, the window title will have the default title "Daedalus 2.2" prepended to it. Beep: Sounds a beep using the computer's internal speaker. Delay : Pauses or sleeps the program for at least milliseconds. Useful to ensure animation happens at a certain minimum speed on fast computers. Set : Set pixel. Turns the pixel at the given coordinates in the main monochrome bitmap on or off. SetT : Set temporary pixel. Turns the pixel at the given coordinates in the temporary monochrome bitmap on or off. SetE : Set extra pixel. Turns the pixel at the given coordinates in the extra monochrome bitmap on or off. SetA : Set custom pixel. Turns the pixel at the given coordinates in custom monochrome bitmap on or off. SetC : Set color pixel. Sets the color value of the pixel at the given coordinates on the color bitmap to . SetCT : Set temporary color pixel. Sets the color value of the pixel at the given coordinates on the temporary color bitmap to . SetCE : Set extra color pixel. Sets the color value of the pixel at the given coordinates on the extra color bitmap to . SetCA : Set custom color pixel. Sets the color value of the pixel at the given coordinates in custom color bitmap to . SetX : 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 0 to . If is -1, all four sides are set to the texture number. Set3 : Set 3D pixel. Turns the pixel at the given coordinates in the 3D bitmap within the main bitmap on or off. Set3T : Set temporary 3D pixel. Turns the pixel at the given coordinates in the temporary 3D bitmap on or off. Set3E : Set extra 3D pixel. Turns the pixel at the given coordinates in the extra 3D bitmap on or off. Set3A : Set custom 3D pixel. Turns the pixel at the given coordinates in the 3D bitmap within custom monochrome bitmap on or off. Set3C : Set 3D color pixel. Sets the color value of the pixel at the given coordinates of the 3D bitmap within the color bitmap to . Set3CT : Set temporary 3D color pixel. Sets the color value of the pixel at the given coordinates on the temporary 3D color bitmap to . Set3CE : Set extra 3D color pixel. Sets the color value of the pixel at the given coordinates on the extra 3D color bitmap to . Set3CA : Set custom 3D color pixel. Sets the color value of the pixel at the given coordinates of the 3D bitmap within custom color bitmap to . Set3X : 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 0 to . ZapTexture : 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 . 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 : Draws a sequence of lines in the main bitmap. The 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, D, L, R: Draws from the current position up, down, left, or right that many pixels. E, F, G, H: Draws from the current position northeast, southeast, southwest, and northwest that many pixels. M,: 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: Blank. Causes the next action to just update the pen position, and not do any drawing. N: No update. Causes the next action to not update the pen position. C: Color. Sets the color of the lines to draw. "C1" means to draw white, and "C0" means black. S: 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: 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, O: Arc. Draws an arc or 1/4 of a circle of radius . The 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, T: Text. Draws text, where the text to print is bracketed between two instances of the character . For example "T_HI_" prints "HI". If is "T", there is no end , where text drawing will continue to end of the entire macro string (useful if 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, and "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). `: Fill. Runs the Fill At Dot command at the pen position. ~: Flood. Runs the Flood At Dot command at the pen position. 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, pixels connected only by corners will be considered the same shape, where counting will include both. AllMoire: Creates a moire pattern in the main bitmap, composed of lines radiating from the center of the bitmap to the edges. 2ndPutStretch : 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 , , and lower left by , . 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 : Draws a line of on pixels connecting two detached islands of on pixels with each other. This starts with the island under , , 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 : 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 , portals forward along the 4th dimension will have color , and places where there are portals both back and forward at the same spot will have color . 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 : Draws an N-Dimensional Maze on the main bitmap. The Maze is drawn centered around coordinates , , where indicates whether drawn using on or off pixels. A set of N custom variables starting with slot indicate one's current location within the Maze to later highlight. N pairs of custom variables starting with slot indicate the horizontal and vertical offsets to give to each dimension's axis. Afterward the dot will be set to the coordinates in the main 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. MoveND : Moves an N-Dimensional point to an adjacent cell in a ND Maze. A set of N custom variables starting with slot indicate one's current location within the Maze, and N pairs of custom variables starting with slot indicate the horizontal and vertical screen offsets each dimension's axis has. The ND point at will be moved down an available passage to the cell that maps nearest to screen coordinates , (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 : 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 , at depth , with the fractal Maze itself defined by random number seed . 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. DrawLevel : Treats level in the 3D bitmap in the temporary bitmap as an orthogonal Maze and draws it at coordinates , 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 and (normally zero), and the offset for each vertical cell is in (normally zero) and . This is used by the "Demos" script to display Mazes on the surface of a cube. Dungeon : 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. : 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 is 1 the whole bitmap will be filled with one big room, while if is 0 the whole bitmap will be filled with a Maze. : The number of connecting passages between rooms (beyond the minimum number required to ensure all the rooms are connected with each other). : The maximum horizontal and vertical pixel size of each room, where a 3x3 room is the minimum. : The percentage of places where passages connect with rooms, that should contain closed doors (as opposed to doorless openings). : 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 : This highlights pixels on the color bitmap that are visible from the dot. Pixels within a distance of 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 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. 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. 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 : 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 , 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 , where numbers higher are capped to this height. If the scale factor is negative, then the scale used will be such that the tallest block drawn will be exactly pixels high. Stereogram : Creates a random dot stereogram in the active bitmap, where the patterns in the stereogram will horizontally repeat after 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 when compared to off pixels. Typical values for and 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. Evolution : Creates a type of cellular automata in the color bitmap. The pattern will have different colors, where the colors fade through the blend range defined in the Replace Color dialog. If 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. Note the temporary color bitmap is used to store the color indexes of each pixel. This is used by the "Demos" script. Mandelbrot : 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 . Colors for depths come from the blend defined in the Replace Color dialog. 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. System : Runs system menu commands. If is negative, minimizes the window. If positive, maximizes the window. If 0, restores the window from being minimized or maximized. FileClose : Closes the file handle in . The file should have been opened with the FileOpen function. FileWrite : Writes variable to the file in handle . If is a number it's written as decimal text, if a string the string is written as a formatted string. FileWriteByte : Writes byte to the file in handle . FileReadStr : Reads the next string from the file in handle and stores it in custom string indicated by . -- ********* 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 "undocumented" 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 ******************** Macro Events dialog ******************** nOnMoveOffBitmap nOnMoveIntoWall nOnMoveToNewCell nAfterMoveToNewCell nOnFollowToNewCell nAfterRedrawInside nOnLeftClick nOnRightClick nOnRunCommand 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 fSkipMessageDisplay fPauseTimer ******************** 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 fStars nStarCount rMeteor fNarrowWalls nCellSize nNarrowCellSize nWallHeight nViewHeight nStepHeight fAllowTextureMapping rLightFactor nFogDistance nClippingPlane rViewingSpan nSemitransparentWalls nMotionFrames nRotationFrames nUpDownFrames nMotionVelocity nRotationVelocity nUpDownVelocity nHorizontalOffset nVerticalOffset nUpDownOffset nDirectionOffset fUpDownSmoothNotFree ******************** Bitmap Size dialog ******************** Size3W Size3X Size3Y Size3Z ******************** Replace Color dialog ******************** fStraightColorBlend nRainbowStart nRainbowDistance kBlend1 kBlend2 ******************** Maze Settings dialog ******************** fCreateMazesPolished fApplyCommandsToRectangleSection fTeleportToEntranceOnMazeCreation fConnectPolesNeverAddsDeadEnds fSolveFillersCheckEveryPixel fSolveFillersConsiderDotsAsExits fFindAPathFindsRandomPath fShowCountOfShortestSolutions nTweakPassagesChances nTotalMazesCreated nEntrancePositioning ******************** Create Settings dialog ******************** fCreateWithRiver fHaveRiverAtEdges fNoRiverFlowback nOmegaDimensions nOmegaInnerDimensions nOmegaEntranceLocation nOmegaExitLocation sPlanair sSegment fCreateWithWallAdding fTreeValueIsRandomChance nTreeRiverValue nMaxSpirals nMaxSpiralWalls nRandomAddition nFractalX nFractalY nNestingLevel fCrackLinesMayHeadOff nCrackLineLength nCrackPassLimit fLabyrinthRoundedEdges nLabyrinthType fWeaveCrossingsMayCorner fTiltLinesMakeNoDiamonds fAllowIsolationInFractal ******************** 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 ******************** Undocumented variables ******************** nOnRedrawInside: This macro event happens whenever a screen redraw happens in the perspective inside view. It happens after the bitmap is created in color bitmap -4, but before the After Redraw Inside macro is fired allowing one to add text on top of the bitmap. This allows one to modify color bitmap -4, before it gets displayed. nOnMiddleClick: This is a macro event like those in the Macro Events dialog. If set to zero, no macro will run for the event, otherwise the specified macro will run. This event happens whenever the middle mouse button is clicked inside the drawable or client area of the window. For most newer Microsoft mice, this means pressing down the mouse wheel. nOnPrevClick: This macro event happens whenever the "previous" mouse button is clicked. For some newer mice, this is the small button on the left hand side of the mouse closest to you. nOnNextClick: This macro event happens whenever the "next" mouse button is clicked. For some newer mice, this is the small button on the left hand side of the mouse farthest away from you. nOnMouseMove: This macro event happens whenever the mouse is moved within the Daedalus window. It covers both when a mouse button is held down while dragging and with simple motion. As with the On Left Mouse Click macro event, if @z is set when the macro returns, the default behavior will be skipped. 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 newer versions of Windows such as XP, pressing Control+c will copy the text of any message box to the clipboard. nXTurtle & nYTurtle: The pixel coordinates of the current position 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. 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. 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. 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). fSkyAll: Makes the Maze in perspective inside view seem to be suspended in air, instead of on a flat plain. The Lower command in 2D Mazes can move you below the Maze, instead of stopping at ground level as normal. 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. 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. 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. 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 avoid 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. 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. 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. The color bitmap indicates 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. 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. 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 texture, 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 texture, 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. 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. 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 Add With Color and Subtract With Color and Blend With Color dot color commands, and also the Mandelbrot operation. 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. 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. nAllocations: Contains the total number of memory allocation buffers currently held by the program, incrementing each time a new buffer is allocated. If this variable isn't zero when the program exits, a memory leak error message will be displayed. -- ********* 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 : Addition. Returns the sum of and . Sub : Subtraction. Returns subtracted from . Mul : Multiplication. Returns times . Div : Division. Returns divided by . If is 0, returns 0. Mod : Modulus. Returns the remainder when is divided by . If is 0, returns 0. Neg : Negation. Returns the negative of . Inc : Increment. Returns plus 1. Dec : Decrement. Returns minus 1. Pow : Power. Returns raised to the power. If is negative, returns 1. If the result overflows, returns 0. ******************** Boolean functions ******************** Equ : Equality. Returns whether equals . Neq : Inequality. Returns whether does not equal . Lt : Less than. Returns whether is less than . Gt : Greater than. Returns whether is greater than . Lte : Less than or equal. Returns whether is less than or equal to . Gte : Greater than or equal. Returns whether is greater than or equal to . Not : Logical not. Returns whether is zero. Like the "!" operator in C. And : Logical and. Returns the bits of anded with . Like the "&" operator in C. Or : Logical or. Returns the bits of ored with . Like the "|" operator in C. Xor : Logical exclusive or. Returns the bits of exclusive ored with . Like the "^" operator in C. Inv : Logical inverse. Returns with all its bits flipped. Like the "~" operator in C. << : Shift left. Returns with all its bits shifted left times. Like the "<<" operator in C. >> : Shift right. Returns with all its bits shifted right times. Like the ">>" operator in C. ******************** Mathematical functions ******************** Odd : Odd. Returns whether is an odd number. Abs : Absolute value. Returns the absolute value of . Sgn : Sign. Returns the sign of . Returns -1 if it's negative, 0 if zero, and 1 if positive. Min : Minimum. Returns the minimum of and . Max : Maximum. Returns the maximum of and . Rnd : Random. Returns a random number between and . ?: : If/else. If is true, returns , otherwise returns . Like the "?:" operator in C. Sqr : Square root. Return the square root of , rounded down. For negative numbers this returns the same value as if the number were positive. Dist : Distance. Returns the distance between coordinates , and , . Sin : Sine. Returns times the sine of degrees. Useful for plotting the vertical coordinates along a circle of radius . Cos : Cosine. Returns times the cosine of degrees. Useful for plotting the horizontal coordinates along a circle of radius . Tan : Tangent. Returns times the tangent of degrees. Asin : ArcSine. Returns the arcsine of divided by , in degrees. Acos : ArcCosine. Returns the arccosine of divided by , in degrees. Atan : ArcTangent. Returns the arctangent of divided by , in degrees. Sin2 : Sine. Like Sin but assumes a circle is divided into equal slices instead of 360 degrees. Useful for when precision to a fraction of a degree or an odd ratio is needed. Cos2 : Cosine. Like Cos but assumes a circle is divided into equal slices instead of 360 degrees. Tan2 : Tangent. Like Tan but assumes a circle is divided into equal slices instead of 360 degrees. Asin2 : ArcSine. Like Asin but assumes a circle is divided into slices instead of 360 degrees. Useful for when precision to a fraction of a degree or an odd ratio is needed. Acos2 : ArcCosine. Like Acos but assumes a circle is divided into equal slices instead of 360 degrees. Atan2 : AtcTangent. Like Atan but assumes a circle is divided into equal slices instead of 360 degrees. ******************** String functions ******************** EquStr : String equality. Returns whether equals . NeqStr : String inequality. Returns whether does not equal . LtStr : String less than. Returns whether is less than in ASCII sorting order. GtStr : String greater than. Returns whether is greater than in ASCII sorting order. LteStr : String less than or equal. Returns whether is less than or equal to . GteStr : String greater than or equal. Returns whether is greater than or equal to . EquStrI : String equality. Like EquStr but does a case insensitive string compare. NeqStrI : String inequality. Like NeqStr but does a case insensitive string compare. LtStrI : String less than. Like LtStr but does a case insensitive string compare. GtStrI : String greater than. Like GtStr but does a case insensitive string compare. LteStrI : String less than or equal. Like LteStr but does a case insensitive string compare. GteStrI : String greater than or equal. Like GteStr but does a case insensitive string compare. Len : Length. Returns the number of characters in . If is invalid, returns 0. Char : Character. Returns the ASCII value of the th character in . If is invalid or references a character beyond the limits of the string, returns -1. Num : Number. Returns converted to a number. Useful for getting a number from the result of the GetString operation. ******************** 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 : 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 : Get temporary pixel. Returns the state of the pixel at the given coordinates on the temporary bitmap. GetE : Get extra pixel. Returns the state of the pixel at the given coordinates on the extra bitmap. GetA : Get custom pixel. Returns the state of the pixel at the given coordinates on custom monochrome bitmap . GetC : 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 : Get temporary color pixel. Returns the color of the pixel at the given coordinates on the temporary color bitmap. GetCE : Get extra color pixel. Returns the color of the pixel at the given coordinates on the extra color bitmap. GetCA : Get custom color pixel. Returns the color value of the pixel at the given coordinates on custom color bitmap . GetX : 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 0. If is -1, returns the color value of the whole pixel. GetH : 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. Get3 : Get 3D pixel. Returns the state of the pixel at the given coordinates of the 3D bitmap within the main bitmap. Get3T : Get temporary 3D pixel. Returns the state of the pixel at the given coordinates on the temporary 3D bitmap. Get3E : Get extra 3D pixel. Returns the state of the pixel at the given coordinates on the extra 3D bitmap. Get3A : Get custom 3D pixel. Returns the state of the pixel at the given coordinates of the 3D bitmap within custom monochrome bitmap . Get3C : Get 3D color pixel. Returns the color of the pixel at the given coordinates of the 3D bitmap within the color bitmap. Get3CT : Get temporary 3D color pixel. Returns the color of the pixel at the given coordinates on the temporary 3D color bitmap. Get3CE : Get extra 3D color pixel. Returns the color of the pixel at the given coordinates on the extra 3D color bitmap. Get3CA : Get custom 3D color pixel. Returns the color of the pixel at the given coordinates of the 3D bitmap within custom color bitmap . Get3X : 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 0. Get3H : Get 3D Height. Returns the top elevation of the variable height wall at the given coordinates in a 3D bitmap. 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 : Make color. Returns a 24 bit color value given red, green, and blue parts, each ranging from 0 to 255. RGBR : Red part. Returns the red part of the given color value, a number ranging from 0 to 255. RGBG : Green part. Returns the green part of the given color value, a number ranging from 0 to 255. RGBB : Blue part. Returns the blue part of the given color value, a number ranging from 0 to 255. GrayN : Grayscale color. Returns a 24 bit color value given the intensity to use, ranging from 0 to 255. Light : Lighten color. Returns a color twice as light, half way between it and white. Dark : Darken color. Returns a color twice as dark, half way between it and black. Shade : 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 : Blend colors. Returns a color half way between and . Hue : 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 : 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 : 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 : 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. Timer: Returns the number of seconds that have passed. 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 : Returns the number in custom variable . Command : Returns the index for the command action in , the same index as used by the Enable and Disable operations, the On Run Command event, and the Autorepeat variable. Returns -1 if doesn't correspond to any command. Eval : Returns evaluated as a numeric parameter. A stronger version of the Num function, since this will parse and evaluate functions within the string. 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. 2200 for version 2.2. FileOpen : Opens the string . If 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 : Returns the next number, stored as text in decimal form, from the open file in handle . FileReadByte : Returns the next byte from the open file in handle . FileEnd : Returns whether the file opened for reading in handle is at the end of file, with nothing left to read. -- ****** EVENTS ****** Parameters and return values: When certain event macros are called, custom variables @x, @y, and @z are automatically set. For some events, certain custom variables are looked at after the event returns, which change 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 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. Mouse events: For On Left Mouse Click, On Right Mouse Click, and the undocumented mouse clicks, @x and @y contain the coordinates clicked on. 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. After Move To New Cell: When this event macro is run, @x, @y, and @z contain the coordinates of the dot, which it just moved to. 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. On Program Exit: After this event macro returns, if @z is non-zero, the program won't terminate. -- *************** TEXTURE MAPPING *************** Texture mapping in 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 them appropriately. Custom bitmaps don't have to be used for textures, where they also define ceiling markings and variable height walls, and can even just 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, and SwapTexture operations. Texture 0 (or the texture indicated by nTextureWall) is special, and determines which texture bitmaps are displayed where. For each block in 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 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 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, that means the maximum number of different wall textures that can be displayed at a time is 63. 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 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, same as the result produced by the Overlay Walls command. If both bitmaps exist, the wall will have the color texture overlaying it, same as the results produced by the Color Overlay Walls command. If neither bitmap exists, the wall will have no texture. Mask 0 is special again, and 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. -- IMPORTANT NOTICE: Daedalus and all Maze generation and general graphics routines used in this program are Copyright (C) 1998-2007 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.TXT 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