Hollywood 7.1 the Cross-Platform Multimedia Application Layer
Total Page:16
File Type:pdf, Size:1020Kb
Hollywood 7.1 The Cross-Platform Multimedia Application Layer Andreas Falkenhahn i Table of Contents 1 General information::::::::::::::::::::::::::::: 1 1.1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Philosophy ::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 1.3 Terms and conditions ::::::::::::::::::::::::::::::::::::::::::: 4 1.4 Requirements::::::::::::::::::::::::::::::::::::::::::::::::::: 6 1.5 Credits ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 1.6 Forum and mailing list:::::::::::::::::::::::::::::::::::::::::: 8 1.7 Contact :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 2 Getting started :::::::::::::::::::::::::::::::::: 9 2.1 Overview ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 2.2 The GUI :::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 2.3 Windows IDE ::::::::::::::::::::::::::::::::::::::::::::::::: 15 2.4 Mobile platforms :::::::::::::::::::::::::::::::::::::::::::::: 22 3 Console usage :::::::::::::::::::::::::::::::::: 29 3.1 Console mode ::::::::::::::::::::::::::::::::::::::::::::::::: 29 3.2 Console arguments :::::::::::::::::::::::::::::::::::::::::::: 29 3.3 Console emulation ::::::::::::::::::::::::::::::::::::::::::::: 46 4 Compiler and linker:::::::::::::::::::::::::::: 49 4.1 Compiling executables ::::::::::::::::::::::::::::::::::::::::: 49 4.2 Compiling applets ::::::::::::::::::::::::::::::::::::::::::::: 50 4.3 Linking data files :::::::::::::::::::::::::::::::::::::::::::::: 50 4.4 Linking fonts :::::::::::::::::::::::::::::::::::::::::::::::::: 51 4.5 Linking plugins :::::::::::::::::::::::::::::::::::::::::::::::: 52 4.6 Saving scripts as videos :::::::::::::::::::::::::::::::::::::::: 53 5 Plugins :::::::::::::::::::::::::::::::::::::::::: 57 5.1 Plugins:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 57 5.2 Installation :::::::::::::::::::::::::::::::::::::::::::::::::::: 57 5.3 Usage ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 57 5.4 Obtaining plugins ::::::::::::::::::::::::::::::::::::::::::::: 58 5.5 Writing your own plugins :::::::::::::::::::::::::::::::::::::: 60 6 History and compatibility ::::::::::::::::::::: 61 6.1 History:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 61 6.2 Compatibility notes ::::::::::::::::::::::::::::::::::::::::::: 61 6.3 Future :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 71 ii Hollywood manual 7 Language overview ::::::::::::::::::::::::::::: 73 7.1 Your first Hollywood program ::::::::::::::::::::::::::::::::: 73 7.2 Reserved identifiers :::::::::::::::::::::::::::::::::::::::::::: 74 7.3 Preprocessor commands ::::::::::::::::::::::::::::::::::::::: 75 7.4 String and number conversion ::::::::::::::::::::::::::::::::: 77 7.5 Comments::::::::::::::::::::::::::::::::::::::::::::::::::::: 78 7.6 Includes ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 78 7.7 Error handling :::::::::::::::::::::::::::::::::::::::::::::::: 80 7.8 Automatic ID selection :::::::::::::::::::::::::::::::::::::::: 81 7.9 Loaders and adapters :::::::::::::::::::::::::::::::::::::::::: 82 7.10 Styleguide suggestions :::::::::::::::::::::::::::::::::::::::: 84 8 Data types :::::::::::::::::::::::::::::::::::::: 85 8.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 85 8.2 Numbers :::::::::::::::::::::::::::::::::::::::::::::::::::::: 85 8.3 Strings :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 86 8.4 Tables::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 88 8.5 Functions ::::::::::::::::::::::::::::::::::::::::::::::::::::: 91 8.6 Nil :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 91 9 Expressions and operators::::::::::::::::::::: 93 9.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 93 9.2 Arithmetic operators :::::::::::::::::::::::::::::::::::::::::: 93 9.3 Relational operators ::::::::::::::::::::::::::::::::::::::::::: 94 9.4 Logical operators :::::::::::::::::::::::::::::::::::::::::::::: 95 9.5 Bitwise operators :::::::::::::::::::::::::::::::::::::::::::::: 96 9.6 String concatenation::::::::::::::::::::::::::::::::::::::::::: 97 9.7 Operator priorities :::::::::::::::::::::::::::::::::::::::::::: 98 9.8 Metamethods:::::::::::::::::::::::::::::::::::::::::::::::::: 98 9.8.1 Differing metatables with binary operators ::::::::::::::: 101 9.8.2 Limitations of the relational metamethods ::::::::::::::: 101 9.8.3 Advanced metamethods ::::::::::::::::::::::::::::::::: 101 10 Variables and constants ::::::::::::::::::::: 105 10.1 Variables and constants ::::::::::::::::::::::::::::::::::::: 105 10.2 Global variables ::::::::::::::::::::::::::::::::::::::::::::: 105 10.3 Global statement :::::::::::::::::::::::::::::::::::::::::::: 106 10.4 Local variables :::::::::::::::::::::::::::::::::::::::::::::: 106 10.5 Local statement ::::::::::::::::::::::::::::::::::::::::::::: 108 10.6 Garbage Collector ::::::::::::::::::::::::::::::::::::::::::: 109 10.7 Constants ::::::::::::::::::::::::::::::::::::::::::::::::::: 110 10.8 Const statement :::::::::::::::::::::::::::::::::::::::::::: 110 10.9 Inbuilt constants :::::::::::::::::::::::::::::::::::::::::::: 111 10.10 Character constants :::::::::::::::::::::::::::::::::::::::: 112 iii 11 Program flow :::::::::::::::::::::::::::::::: 113 11.1 Statements controlling the program flow ::::::::::::::::::::: 113 11.2 If-EndIf statement :::::::::::::::::::::::::::::::::::::::::: 113 11.3 While-Wend statement :::::::::::::::::::::::::::::::::::::: 114 11.4 For-Next statement ::::::::::::::::::::::::::::::::::::::::: 115 11.5 Repeat-Until statement:::::::::::::::::::::::::::::::::::::: 118 11.6 Switch-Case statement :::::::::::::::::::::::::::::::::::::: 118 11.7 Break statement :::::::::::::::::::::::::::::::::::::::::::: 120 11.8 Continue statement ::::::::::::::::::::::::::::::::::::::::: 120 11.9 Return statement ::::::::::::::::::::::::::::::::::::::::::: 121 11.10 Block-EndBlock statement ::::::::::::::::::::::::::::::::: 121 11.11 Dim and DimStr statements:::::::::::::::::::::::::::::::: 122 12 Functions ::::::::::::::::::::::::::::::::::::: 125 12.1 Overview:::::::::::::::::::::::::::::::::::::::::::::::::::: 125 12.2 Functions are variables :::::::::::::::::::::::::::::::::::::: 126 12.3 Callback functions::::::::::::::::::::::::::::::::::::::::::: 127 12.4 Return values ::::::::::::::::::::::::::::::::::::::::::::::: 129 12.5 Recursive functions:::::::::::::::::::::::::::::::::::::::::: 130 12.6 Variable number of arguments ::::::::::::::::::::::::::::::: 130 12.7 Functions as table members ::::::::::::::::::::::::::::::::: 132 12.8 Local functions:::::::::::::::::::::::::::::::::::::::::::::: 133 12.9 Methods :::::::::::::::::::::::::::::::::::::::::::::::::::: 133 13 Unicode support ::::::::::::::::::::::::::::: 137 13.1 Overview:::::::::::::::::::::::::::::::::::::::::::::::::::: 137 13.2 Character encodings::::::::::::::::::::::::::::::::::::::::: 137 14 Troubleshooting ::::::::::::::::::::::::::::: 139 14.1 Troubleshooting ::::::::::::::::::::::::::::::::::::::::::::: 139 14.2 Frequently asked questions :::::::::::::::::::::::::::::::::: 140 15 Tutorials:::::::::::::::::::::::::::::::::::::: 145 15.1 Tutorial ::::::::::::::::::::::::::::::::::::::::::::::::::::: 145 15.2 Animation techniques ::::::::::::::::::::::::::::::::::::::: 148 15.3 Script timing:::::::::::::::::::::::::::::::::::::::::::::::: 149 16 Amiga support library :::::::::::::::::::::: 153 16.1 AmiDock information ::::::::::::::::::::::::::::::::::::::: 153 16.2 ChangeApplicationIcon:::::::::::::::::::::::::::::::::::::: 153 16.3 CloseAmigaGuide ::::::::::::::::::::::::::::::::::::::::::: 154 16.4 CreateRexxPort ::::::::::::::::::::::::::::::::::::::::::::: 154 16.5 GetApplicationList :::::::::::::::::::::::::::::::::::::::::: 156 16.6 GetIconProperties ::::::::::::::::::::::::::::::::::::::::::: 157 16.7 GetPubScreens :::::::::::::::::::::::::::::::::::::::::::::: 157 16.8 HideScreen :::::::::::::::::::::::::::::::::::::::::::::::::: 158 iv Hollywood manual 16.9 OpenAmigaGuide ::::::::::::::::::::::::::::::::::::::::::: 159 16.10 RunRexxScript::::::::::::::::::::::::::::::::::::::::::::: 159 16.11 SendApplicationMessage ::::::::::::::::::::::::::::::::::: 160 16.12 SendRexxCommand:::::::::::::::::::::::::::::::::::::::: 161 16.13 SetIconProperties :::::::::::::::::::::::::::::::::::::::::: 162 16.14 SetScreenTitle ::::::::::::::::::::::::::::::::::::::::::::: 163 16.15 SetWBIcon :::::::::::::::::::::::::::::::::::::::::::::::: 164 16.16 ShowRinghioMessage::::::::::::::::::::::::::::::::::::::: 165 16.17 ShowScreen :::::::::::::::::::::::::::::::::::::::::::::::: 166 17 Anim library ::::::::::::::::::::::::::::::::: 167 17.1 Overview:::::::::::::::::::::::::::::::::::::::::::::::::::: 167 17.2 ANIM :::::::::::::::::::::::::::::::::::::::::::::::::::::: 167 17.3 BeginAnimStream::::::::::::::::::::::::::::::::::::::::::: 170 17.4 CopyAnim :::::::::::::::::::::::::::::::::::::::::::::::::: 171 17.5 CreateAnim ::::::::::::::::::::::::::::::::::::::::::::::::: 172 17.6 DisplayAnimFrame :::::::::::::::::::::::::::::::::::::::::: 173 17.7 FinishAnimStream :::::::::::::::::::::::::::::::::::::::::: 173 17.8 FreeAnim ::::::::::::::::::::::::::::::::::::::::::::::::::: 174 17.9 GetAnimFrame ::::::::::::::::::::::::::::::::::::::::::::: 174 17.10 IsAnim :::::::::::::::::::::::::::::::::::::::::::::::::::: 175 17.11 IsAnimPlaying ::::::::::::::::::::::::::::::::::::::::::::: 175 17.12 LoadAnim ::::::::::::::::::::::::::::::::::::::::::::::::: 176 17.13 LoadAnimFrame :::::::::::::::::::::::::::::::::::::::::::