diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b396f3bda..cfdd114da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Beta on: workflow_dispatch: pull_request: + paths-ignore: + - '.github/workflows/**' branches: - develop @@ -32,7 +34,7 @@ jobs: token: ${{ secrets.GH_TOKEN }} - name: Beta Builds if: github.event.pull_request.base.ref == 'develop' || github.event_name == 'workflow_dispatch' - run: build_robohelp_gh.bat -beta %GITHUB_WORKSPACE%\output + run: build_robohelp_gh.bat %GITHUB_WORKSPACE%\output shell: cmd working-directory: Manual - name: Upload robohelp zip file diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 4b6d5c5e4..8f68c5954 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -17,26 +17,32 @@ jobs: fetch-depth: 0 token: ${{ secrets.GH_TOKEN }} persist-credentials: false - - name: Sync upstream changes - id: sync - uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 - with: - target_sync_branch: develop - # REQUIRED 'target_repo_token' exactly like this! - target_repo_token: ${{ secrets.GH_TOKEN }} - upstream_sync_branch: develop - upstream_sync_repo: YoYoGames/GameMaker-Manual - upstream_repo_access_token: ${{ secrets.GH_TOKEN }} - git_config_user: ksuchitra532 - git_config_email: null - git_config_pull_rebase: true - - name: Sync upstream changes - id: sync-lts - uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 + - name: Merge from upstream + env: + UPSTREAM: YoYoGames/GameMaker-Manual + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@users.noreply.github.com" + + git --version + + # Add upstream remote and fetch + git remote add upstream "https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${UPSTREAM}.git" + git remote -v + git fetch upstream + + # Merge from upstream/develop with merge strategy to keep translation in case of conflicts + git merge -X ours upstream/develop + + # this is dangerous but will essentially remove any files not staged in the merge + # this is useful since the merge strategy `-X ours` will not handle files where + # they have been deleted on only one branch + # Only use this you're sure that the failing merges fall under this category and are acceptable + # git diff --name-only --diff-filter=U | xargs git rm + + git show-ref + - name: Push changes + uses: ad-m/github-push-action@master with: - target_sync_branch: main-lts - # REQUIRED 'target_repo_token' exactly like this! - target_repo_token: ${{ secrets.GH_TOKEN }} - upstream_sync_branch: main-lts - upstream_sync_repo: YoYoGames/GameMaker-Manual - upstream_repo_access_token: ${{ secrets.GH_TOKEN }} + github_token: ${{ secrets.GH_TOKEN }} + branch: ${{ github.ref }} \ No newline at end of file diff --git a/.github/workflows/trigger-all-localisation-builds.yml b/.github/workflows/trigger-all-localisation-builds.yml new file mode 100644 index 000000000..dca8dbbf1 --- /dev/null +++ b/.github/workflows/trigger-all-localisation-builds.yml @@ -0,0 +1,41 @@ +name: Trigger-Localisation-Builds + +on: + workflow_dispatch: + inputs: + Language: + description: "Select All languages to build" + required: false + type: choice + options: + - ALL + BUILD_TYPE: + description: "Select individual language to build" + required: true + type: choice + options: + - main + - lts + - build + + +jobs: + + Trigger-Localisation-Builds: + name: + runs-on: ubuntu-22.04 + strategy: + matrix: + language: [PT-BR, DE, ES, FR, IT, JA, KO, PL, RU, ZH] + steps: + - name: Invoke Localisation Workflows + if: ${{ github.event.inputs.Language }} == 'ALL' + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: ${{ github.event.inputs.BUILD_TYPE }}.yml + repo: YoYoGames/GameMaker-Manual-${{ matrix.language }} + token: ${{ secrets.GH_TOKEN }} + continue-on-error: false + + + \ No newline at end of file diff --git a/Manual/GMS2_Manual.rhpj b/Manual/GMS2_Manual.rhpj index f8bba9996..0ff6233d8 100644 --- a/Manual/GMS2_Manual.rhpj +++ b/Manual/GMS2_Manual.rhpj @@ -1 +1 @@ -GMS2 Manualed49fdaf-a158-4f0a-bdc8-7b5026ece5f2en_UKfalsefalsefalsefalsecontents/assets/css/default.csssettings/import/word/default.wsfsettings/import/fm/default.fsf \ No newline at end of file +GMS2 Manualed49fdaf-a158-4f0a-bdc8-7b5026ece5f2en_UKfalsefalsefalsefalsecontents/assets/css/default.csssettings/import/word/default.wsfsettings/import/fm/default.fsf \ No newline at end of file diff --git a/Manual/GenerateKeyboardShortcutTableFromList.py b/Manual/GenerateKeyboardShortcutTableFromList.py new file mode 100644 index 000000000..fd0f85fac --- /dev/null +++ b/Manual/GenerateKeyboardShortcutTableFromList.py @@ -0,0 +1,77 @@ +import csv +import re + +shortcutList="./ManualShortcuts.csv" +table="./ManualShortcutsTable.htm" + +# Replace the Mac characters using simple regexes +def replaceMacChars(string): + string = re.sub("⌘$", r"CMD", string) + string = re.sub("⌫$", r"Delete", string) + string = re.sub("⎋$", r"Escape", string) + string = re.sub("⌃$", r"CTRL", string) + string = re.sub("⇧$", r"SHIFT", string) + string = re.sub("⌥$", r"ALT", string) + string = re.sub("⇥$", r"Tab,", string) + string = re.sub("⌘([^,])", r"CMD+\1", string) # Command + string = re.sub("⌫([^,])", r"Delete+\1", string) # Delete + string = re.sub("⌃([^,])", r"CTRL+\1", string) # Control + string = re.sub("⇧([^,])", r"SHIFT+\1", string) # Shift + string = re.sub("⌥([^,])", r"ALT+\1", string) # Alt + string = re.sub("⇥([^,])", r"Tab+\1", string) # Tab + return string + + +previousSection = "" + +# Is this the first table we're writing? +first = True + +with open(shortcutList, encoding="utf-8") as csvfile: + with open(table, "w", encoding="utf-8") as tablefile: + shortcutReader = csv.reader(csvfile) + + tablefile.write("\n") + + for row in shortcutReader: + print(row) + name, winKeyCombo, macKeyCombo, section, description = row + + # Insert tag so we can copy-paste directly from the table + # (including table formatting!) + if section != previousSection: + if not first: + tablefile.write("
") + + tablefile.write("

" + section + "

") + tablefile.write("\n") + + tableRow = "\n" + #Ignore row[0] - name field + + # Windows key combination + tableRow += "\t\n" + + # MacOS key combination + macKeyCombo = replaceMacChars(row[2]) + tableRow += "\t\n" + + # Category/Scope/Section + previousSection = section + tableRow += "\t\n" + + # Description + if description: + tableRow += "\t\n" + else: + tableRow += "\t\n" + + tableRow += "\n" + tablefile.write(tableRow) + + first = False + + # Close the last table tag too + tablefile.write("
Windows Key BindingmacOS Key BindingScopeDescription
"+winKeyCombo+""+macKeyCombo+""+section+""+description+""+name+" ***
\n") + tablefile.write("\n") + tablefile.write("\n") diff --git a/Manual/ManualShortcuts.csv b/Manual/ManualShortcuts.csv new file mode 100644 index 000000000..0417d24c9 --- /dev/null +++ b/Manual/ManualShortcuts.csv @@ -0,0 +1,484 @@ +Ac Delete Bksp,BackSpace,⌫,Anim Curve Editor,Delete the selected point +Ac Path Display,CTRL+W,⌃W,Anim Curve Editor,Display path +Ace Cancel,Escape,⎋,Anim Curve Editor,Cancel +Add Curve,CTRL+A,⌘A,Anim Curve Editor,Add a new curve +Set Range,CTRL+R,⌘R,Anim Curve Editor,Set the range on the y axis +Ab Arrange Bottom,CTRL+SHIFT+Left Bracket,⌃⇧Left Bracket,Asset Browser,Move items to the bottom +Ab Arrange Down,CTRL+Left Bracket,⌃Left Bracket,Asset Browser,Move items down +Ab Arrange Top,CTRL+SHIFT+Right Bracket,⌃⇧Right Bracket,Asset Browser,Move items to the top +Ab Arrange Up,CTRL+Right Bracket,⌃Right Bracket,Asset Browser,Move items up +Block,1,1,Context Menu,Insert a code block snippet at the cursor position +Breakpoint Menu Toggle,F9,F9,Context Menu,Toggle breakpoint on the current line +Code Window Menu Help,F1,F1,Context Menu, Open the function/keyword page in the manual +Do-Until Loop,7,7,Context Menu,Insert a do-until loop snippet at the cursor position +Edit Menu Search,CTRL+SHIFT+F,⌘⇧F,Context Menu,Open project-wide Search & Replace +Exit,,⌘Q,Context Menu,Exit (Mac) +File Menu Preferences,,⌘⇧P,Context Menu,File Menu Preferences +For Loop,4,4,Context Menu,Insert a for loop snippet at the cursor position +For Loop (i..n),5,5,Context Menu,Insert a for loop with counter variable snippet at the cursor position +GML Visual Pan To,CTRL+P,⌃P,Context Menu,Pan to selected GML Visual action +If,2,2,Context Menu,Insert an if statement snippet at the cursor position +If-Else,3,3,Context Menu,Insert an if-else statement snippet at the cursor position +Insert,Insert,,Context Menu,Insert +Line Comment,C,C,Context Menu,Insert a single line comment snippet at the cursor position +Multi-line Comment,M,M,Context Menu,Insert a multi-line comment snippet at the cursor position +Region,R,R,Context Menu,Insert a region snippet at the cursor position +Repeat,8,8,Context Menu,Insert a repeat statement snippet at the cursor position +Run Menu Clean,,⌘F7,Context Menu,Clean the compiler cache +Run Menu Create Executable,,⌘F8,Context Menu,Create an executable package using the current target settings +Spline Editor Delete Points,Del,Del,Context Menu,Delete Points +Switch,9,9,Context Menu,Insert a switch statement snippet at the cursor position +Text Editor Comment Selection,CTRL+K,⌘K,Context Menu,Comment the selected text +Text Editor Next Region,CTRL+Alt+Down,⌘⌥Down,Context Menu,Move the cursor to the next region +Text Editor Previous Region,CTRL+Alt+Up,⌘⌥Up,Context Menu,Move the cursor to the previous region +Text Editor Toggle Fold,CTRL+Enter,⌘Enter,Context Menu,Fold/Unfold the current region (works when ) +Text Editor Uncomment Selection,CTRL+Shift+K,⌘⇧K,Context Menu,Uncomment selection +While Loop,6,6,Context Menu,Insert a while loop snippet at the cursor position +With,0,0,Context Menu,Insert a with statement snippet at the cursor position +Compileerror Copy Win,CTRL+Insert,⌃Insert,Errors,Copy the selected compile error message in the Compile Errors window +Compileerror Selectall,CTRL+SHIFT+A,⌃⇧A,Errors,Select all compile errors in the Compile Errors window +Syntaxerror Copy Win,CTRL+Insert,⌃Insert,Errors,Copy the selected syntax errors in the Syntax Errors window +Syntaxerror Selectall,CTRL+SHIFT+A,⌃⇧A,Errors,Select all syntax errors in the Syntax Errors window +Add New Range,CTRL+A,⌘A,Font Editor,Open the Font Range window +Deleted Selected Range,CTRL+D,⌘D,Font Editor,Delete the selected range from the font (select the range on the right first) +Open Options,CTRL+SHIFT+O,⌘⇧O,Font Editor,Open the Font Options window +Regenerate Font Texture,CTRL+R,⌘R,Font Editor,Regenerate the font texture +Add To Selection,CTRL,⌘,Global,Add to selection +Cancel,Escape,⎋,Global,Cancel +Clean,CTRL+F7,⌘F7,Global,Clean the compiler cache +Close Tab,CTRL+W,⌘W,Global,Close the active IDE tab +Confirm Create Asset,CTRL+C,⌘C,Global,Confirm the creation of the asset(s) of the selected type in the Create Asset window +Copy,CTRL+C,⌘C,Global,Copy the selected text from anywhere in the IDE +Create Animation Curve,ALT+J,⌥J,Global,Create a new animation curve asset +Create Asset,CTRL+A,⌘A,Global,Open the Create Asset window +Create Executable,CTRL+F8,⌘F8,Global,Create an executable package using the current target settings +Create Extension,ALT+E,⌥E,Global,Create a new extension asset +Create Font,ALT+F,⌥F,Global,Create a new font asset +Create Note,ALT+N,⌥N,Global,Create a new note asset +Create Object,ALT+O,⌥O,Global,Create a new object asset +Create Path,ALT+P,⌥P,Global,Create a new path asset +Create Resource GMIncluded File,ALT+I,⌥I,Global,Open the included files window +Create Room,ALT+R,⌥R,Global,Create a new room asset +Create Script,ALT+C,⌥C,Global,Create a new script asset +Create Sequence,ALT+G,⌥G,Global,Create a new sequence asset +Create Shader,ALT+A,⌥A,Global,Create a new shader asset +Create Sound,ALT+U,⌥U,Global,Create a new sound asset +Create Sprite,ALT+S,⌥S,Global,Create a new sprite asset +Create Tile Set,ALT+B,⌥B,Global,Create a new tile set asset +Create Timeline,ALT+T,⌥T,Global,Create a new timeline asset +Cut,CTRL+X,⌘X,Global,Cut +Debug,F6,F6,Global,Run the current project using the Debugger +Debugger Continue,F5,F5,Global,Continue code execution in the debugger +Debugger Step Into,F11,⌘⇧I,Global,Step into the current statement or function in the debugger +Debugger Step Out,SHIFT+F11,⌘⇧U,Global,Step out of the current statement or function in the debugger +Debugger Step Over,F10,⌘⇧O,Global,Step over the current statement in the debugger +Decrement Text Size,F7,F7,Global,Decrement the text size in all code editors +Delete,Delete,⌫,Global,Delete +Doc Window Next Tab,CTRL+PageUp,⌘PageUp,Global,Go to next tab +Doc Window Prev Tab,CTRL+PageDown,⌘PageDown,Global,Go to previous tab +Dope Sheet Panel Scroll Command,SHIFT,⇧,Global,Dope Sheet Panel Scroll Command +Duplicate,CTRL+D,⌘D,Global,Duplicate +Edit Image,CTRL+SHIFT+E,⌘⇧E,Global,Open the image editor when having a sprite selected in the workspace +Edit Sprite,CTRL+SHIFT+E,⌘⇧E,Global,Open the image editor when having a sprite selected in the workspace +Enumerate References,F3,F3,Global,Enumerate References +Export Project,CTRL+E,⌘E,Global,Export the current project as a YYZ file +Feather Open Quickfix Menu,CTRL+Q,⌃Q,Global,Open Feather's Quick Fixes menu +Find All References,SHIFT+F3,⇧F3,Global,Find All References to the selected asset +Flip,Y,Y,Global,Flip Vertically +Flow Accept,Enter,Enter,Global,Flow Accept +Force Dock Expansion,SHIFT+F12,⇧F12,Global,Force Dock Expansion +Get Bookmark 0,CTRL+0,⌘0,Global,Go to bookmark 0 +Get Bookmark 1,CTRL+1,⌘1,Global,Go to bookmark 1 +Get Bookmark 2,CTRL+2,⌘2,Global,Go to bookmark 2 +Get Bookmark 3,CTRL+3,⌘3,Global,Go to bookmark 3 +Get Bookmark 4,CTRL+4,⌘4,Global,Go to bookmark 4 +Get Bookmark 5,CTRL+5,⌘5,Global,Go to bookmark 5 +Get Bookmark 6,CTRL+6,⌘6,Global,Go to bookmark 6 +Get Bookmark 7,CTRL+7,⌘7,Global,Go to bookmark 7 +Get Bookmark 8,CTRL+8,⌘8,Global,Go to bookmark 8 +Get Bookmark 9,CTRL+9,⌘9,Global,Go to bookmark 9 +Go To,CTRL+T,⌘T,Global,"Search for assets" +Ide Toolbar Clean,CTRL+F7,⌘F7,Global,Clean the build +Ide Toolbar Collapsedocks,F12,F12,Global,Collapse docks +Ide Toolbar Help,F1,F1,Global,Launch the help file +Ide Toolbar New,CTRL+N,⌘N,Global,Create new project +Ide Toolbar Open,CTRL+O,⌘O,Global,Open project +Ide Toolbar Package,CTRL+F8,⌘F8,Global,Create an executable package using the current target settings +Increment Text Size,F8,F8,Global,Increment text size (in text editors) +Jump To End,PageDown,PageDown,Global,Jump down a page (in text editors) +Jump To Start,PageUp,PageUp,Global,Jump up a page (in text editors) +Manage Plugins,CTRL+SHIFT+V,⌘⇧V,Global,Manage plugins +Mirror,X,X,Global,Mirror Horizontally +Move Flow Next,Tab,⇥,Global,Move flow next +Move Flow Previous,SHIFT+Tab,⇧⇥,Global,Move flow previous +Move Selection Down,Down,Down,Global,Move selection down +Move Selection Left,Left,Left,Global,Move selection left +Move Selection Right,Right,Right,Global,Move selection right +Move Selection Up,Up,Up,Global,Move selection up +Multi Select,CTRL,⌘,Global,Multi select +New Project,CTRL+N,⌘N,Global,Open the Start Page +New Sprite,CTRL+SHIFT+N,⌘⇧N,Global,Add a new sprite (when an object is selected in the workspace) +Open Asset Browser,CTRL+SHIFT+B,⌃⇧B,Global,Open the asset browser +Open Debug Info,CTRL+SHIFT+D,⌘⇧D,Global,Open the debug info +Open In Explorer,SHIFT+O,⇧O,Global,Open in Explorer +Open Inspector,CTRL+SHIFT+I,⌃⇧I,Global,Open a new Inspector window +Open Prefs Tree,CTRL+SHIFT+P,⌘⇧P,Global,Open Preferences +Open Project,CTRL+O,⌘O,Global,Open project +Open Search In Script Find,CTRL+F,⌘F,Global,Open a code or shader editor's Find and Replace in Find mode +Open Search In Script Replace,CTRL+H,⌘R,Global,Open a code or shader editor's Find and Replace in Replace mode +Open Search Replace,CTRL+SHIFT+F,⌘⇧F,Global,Open project-wide Search and Replace +Open Workspace Overview,CTRL+Tab,⌃⇥,Global,Open the Workspace Overview +Pan,Space,Space,Global,Pan +Paste,CTRL+V,⌘V,Global,Paste +Perform Included File Scan,CTRL+SHIFT+Q,⌘⇧Q,Global,Perform Included File Scan +Play,Space,Space,Global,Play +Play Preview,CTRL+Space,⌘Space,Global,Play Preview +Quit,ALT+F4,⌘Q,Global,Quit +Redo,CTRL+Y,⌘Y,Global,Redo +Remove From Selection,ALT,⌥,Global,Remove from selection (while holding CTRL) +Rename,F2,F2,Global,Rename +Rename Identifier,CTRL+SHIFT+R,⌃⇧R,Global,Rename the identifier that the cursor is currently at in the Code Editor +Reverse Path,CTRL+R,⌘R,Global,Reverse path +Run,F5,F5,Global,Run the current project using the current target settings +Run Memory Info,CTRL+SHIFT+M,⌘⇧M,Global,Run Memory Info and output result to Output window +Run Program,F5,F5,Global,Run the program +Save,CTRL+S,⌘S,Global,Save the current project +Save As,CTRL+SHIFT+S,⌘⇧S,Global,Save as +Select All,CTRL+A,⌘A,Global,Select all +Select Range,SHIFT,⇧,Global,Select range +Select Sprite,CTRL+SHIFT+S,⌘⇧S,Global,Select Sprite (in Object Editor) +Seq Smartguide Toggle Rulerlock,CTRL+ALT+SHIFT+Semicolon,⌃⌥⇧Semicolon,Global,Toggle smart guide rulerlock +Seq Smartguide Toggle Snapping,CTRL+SHIFT+Semicolon,⌃⇧Semicolon,Global,Toggle snapping to smart guides +Seq Smartguide Toggle Vis,CTRL+Semicolon,⌃Semicolon,Global,Toggle the smart guides +Set Bookmark 0,CTRL+SHIFT+0,⌘⌃0,Global,Set bookmark 0 +Set Bookmark 1,CTRL+SHIFT+1,⌘⌃1,Global,Set bookmark 1 +Set Bookmark 2,CTRL+SHIFT+2,⌘⌃2,Global,Set bookmark 2 +Set Bookmark 3,CTRL+SHIFT+3,⌘⌃3,Global,Set bookmark 3 +Set Bookmark 4,CTRL+SHIFT+4,⌘⌃4,Global,Set bookmark 4 +Set Bookmark 5,CTRL+SHIFT+5,⌘⌃5,Global,Set bookmark 5 +Set Bookmark 6,CTRL+SHIFT+6,⌘⌃6,Global,Set bookmark 6 +Set Bookmark 7,CTRL+SHIFT+7,⌘⌃7,Global,Set bookmark 7 +Set Bookmark 8,CTRL+SHIFT+8,⌘⌃8,Global,Set bookmark 8 +Set Bookmark 9,CTRL+SHIFT+9,⌘⌃9,Global,Set bookmark 0 +Toggle Grid Snap,CTRL+G,⌘G,Global,Toggle snapping to grid for the current editor +Undo,CTRL+Z,⌘Z,Global,Undo +Workspace Chain Move Down,CTRL+ALT+Down,⌘⌥Down,Global,Workspace Chain Move Down +Workspace Chain Move Down Left,CTRL+ALT+Down+Left,⌘⌥Down+Left,Global,Workspace Chain Move Down Left +Workspace Chain Move Down Right,CTRL+ALT+Down+Right,⌘⌥Down+Right,Global,Workspace Chain Move Down Right +Workspace Chain Move Left,CTRL+ALT+Left,⌘⌥Left,Global,Workspace Chain Move Left +Workspace Chain Move Right,CTRL+ALT+Right,⌘⌥Right,Global,Workspace Chain Move Right +Workspace Chain Move Up,CTRL+ALT+Up,⌘⌥Up,Global,Workspace Chain Move Up +Workspace Chain Move Up Left,CTRL+ALT+Up+Left,⌘⌥Up+Left,Global,Workspace Chain Move Up Left +Workspace Chain Move Up Right,CTRL+ALT+Up+Right,⌘⌥Up+Right,Global,Workspace Chain Move Up Right +Zoom,CTRL,⌘,Global,Zoom in/out +Zoom And Pan To Gadget,CTRL+ALT+Enter,⌘⌥Enter,Global,Zoom and pan to selected +Zoom Fit,CTRL+F,⌘F,Global,Zoom fit +Zoom In,CTRL+Equals,⌘Equals,Global,Zoom in +Zoom Out,CTRL+Minus,⌘Minus,Global,Zoom out +Zoom Reset,CTRL+Enter,⌘Enter,Global,Reset zoom +Add Frame,SHIFT+A,⇧A,Image Editor,Add a new frame +Arc Move Control Point A,CTRL,⌘,Image Editor, +Arc Move Control Point B,ALT,⌥,Image Editor, +Backspace Delete,BackSpace,⌫,Image Editor,Backspace +Centre Fit,ALT+F,⌥F,Image Editor,Fit image to centre +Centre Unit,ALT+C,⌥C,Image Editor,Show image at actual size +Colour Replace With Alpha,ALT,⌥,Image Editor, +Decrement Brush Size,Minus,Minus,Image Editor,Decrement current brush size +Decrement Brush Size2,KeypadMinus,KeypadMinus,Image Editor,Decrement current brush size +Draw Centred Shape,ALT,⌥,Image Editor,Draw centred shape +Draw Regular Shape,SHIFT,⇧,Image Editor,Draw regular shape +Edit Copy Win,CTRL+Insert,⌃Insert,Image Editor,Copy +Edit Cut Win,SHIFT+Delete,⇧⌫,Image Editor,Cut +Edit Paste Win,SHIFT+Insert,⇧Insert,Image Editor,Paste +Fill Tool Tile With Brush,ALT,⌥,Image Editor,Tile with the current brush (using Fill Tool) +Image Editor Add From File,CTRL+SHIFT+A,⌘⇧A,Image Editor,Add image from file +Image Editor Centre Fit,ALT+F,⌥F,Image Editor,Centre fit the image in the editor +Image Editor Centre Unit Scale,ALT+C,⌥C,Image Editor,Centre the image in the editor at unit scale +Image Editor Import From Strip,CTRL+I,⌘I,Image Editor,Import from strip +Import Files,CTRL+SHIFT+A,⌘⇧A,Image Editor,Import image files +Import From Strip,CTRL+I,⌘I,Image Editor,Import from strip +Increment Brush Size,Equals,Equals,Image Editor,Increment brush size +Increment Brush Size2,KeypadPlus,KeypadPlus,Image Editor,Increment brush size +Insert Frame,Insert,Insert,Image Editor,Insert Frame +Invert Selection,CTRL+I,⌃I,Image Editor,Invert Selection +Next Frame,2,2,Image Editor,Next Frame +Open Colour Panel On Select,CTRL,⌃,Image Editor, +Pixel Brush,Period,Period,Image Editor,Pixel Brush +Playback Toggle,3,3,Image Editor,Toggle Playback +Previous Frame,1,1,Image Editor,Previous Frame +Rotate Brush,Z,Z,Image Editor,Rotate brush by 90 degrees (all tools using a brush) +Select Arc Tool,A,A,Image Editor,Select the Arc tool +Select Colour Picker Tool,O,O,Image Editor, Select the Colour Picker tool +Select Colour Remover,H,H,Image Editor,Select the Colour remove tool +Select Colour Replacer,V,V,Image Editor,Select the Colour replace tool +Select Ellipse Tool,C,C,Image Editor,Select the Ellipse tool +Select Erase Tool,E,E,Image Editor,Select the Erase tool +Select Fill Tool,F,F,Image Editor,Select the Fill tool +Select Free Rotate Tool,U,U,Image Editor,Select the Rotate brush tool +Select Line Tool,L,L,Image Editor,Select the Line tool +Select Magic Wand Tool,W,W,Image Editor,Select the Magic wand tool +Select Paintbrush Tool,D,D,Image Editor,Select the Paintbrush tool +Select Pan Tool,M,M,Image Editor,Select the Pan tool +Select Polygon Tool,P,P,Image Editor,Select the Polygon tool +Select Rectangle Tool,R,R,Image Editor,Select the Rectangle tool +Select Select Rect Tool,S,S,Image Editor,Select the Rectangle select tool +Select Selection Paint Tool,Q,Q,Image Editor,Select the Paint selection tool +Select Text Tool,T,T,Image Editor,Select the Text tool +Snap Tool Modifier,SHIFT,⇧,Image Editor,Snap Tool Modifier +Toggle Ellipse Tool,SHIFT+C,⇧C,Image Editor,Toggle the Ellipse tool between outline/filled +Toggle Hsplit,ALT+H,⌥H,Image Editor,Toggle horizontal split view +Toggle Polygon Tool,SHIFT+P,⇧P,Image Editor,Toggle the Polygon tool between outline/filled +Toggle Rectangle Tool,SHIFT+R,⇧R,Image Editor,Toggle the Rectangle tool between outline/filled +Toggle Selection Brush,B,B,Image Editor,Toggle the brush +Toggle Vsplit,ALT+V,⌥V,Image Editor,Toggle vertical split view +Tool Commit Enter,Enter,Enter,Image Editor,Commit tool changes +Add Child,CTRL+L,⌘L,Object Editor,Add a child object to the current object +Add Event,CTRL+A,⌘A,Object Editor,Add an event to the current object +Add Variable,CTRL+ALT+T,⌘⌥T,Object Editor,Add a new variable to the current object's Variable Definitions +Edit Mask,CTRL+K,⌘K,Object Editor,Edit the mask sprite +Edit Parent,CTRL+SHIFT+O,⌘⇧O,Object Editor,Edit the parent object +Modify Collision Shape,CTRL+B,⌘B,Object Editor,Modify the object's physics collision shape +Object Editor Copy Event Win,CTRL+Insert,⌃Insert,Object Editor,Copy event +Object Editor Cut Event Win,SHIFT+Delete,⇧⌫,Object Editor,Cut event +Object Editor Paste Event Win,SHIFT+Insert,⇧Insert,Object Editor,Paste event +Open Events Window,CTRL+F,⌘F,Object Editor,Open Events window +Open Parent Window,CTRL+G,⌘G,Object Editor,Open Parent window +Open Physics Window,CTRL+H,⌘H,Object Editor,Open Physics window +Open Variable Definitions,CTRL+J,⌘J,Object Editor,Open Variable Definitions window +Physics Snap To Grid,CTRL+U,⌘U,Object Editor,Toggle grid snapping in the Physics Collision Shape window +Physics Toggle Grid,CTRL+SHIFT+Y,⌘Y,Object Editor,Toggle grid on or off in the Physics Collision Shape window +Select Mask,CTRL+SHIFT+M,⌘⇧M,Object Editor,Select a mask for the object +Select Parent,CTRL+P,⌘P,Object Editor,Select parent +Open Shift Path,CTRL+SHIFT+O,⌘⇧O,Path Editor,Open the Shift Path window +Pan To Path,CTRL+P,⌘P,Path Editor,Pan to path +Rotate Path,R,R,Path Editor,Rotate path (hold while dragging LMB) +Scale Path,S,S,Path Editor,Scale path (hold while dragging LMB) +Shift Down,Down,Down,Path Editor,Shift down +Shift Left,Left,Left,Path Editor,Shift left +Shift Right,Right,Right,Path Editor,Shift right +Shift Up,Up,Up,Path Editor,Shift up +Translate Path,T,T,Path Editor,Translate path (hold while dragging LMB) + Auto Tile Tool,A,A,Room Editor,Select auto tile tool (when working on a tile layer) + Tile Eraser Tool,E,E,Room Editor,Select tile eraser tool (when working on a tile layer) + Tile Fill Tool,F,F,Room Editor,Select tile fill tool (when working on a tile layer) + Tile Inheritance Tool,I,I,Room Editor,Select tile inheritance tool (when working on a tile layer) + Tile Line Tool,L,L,Room Editor,Select tile line tool (when working on a tile layer) + Tile Pen Tool,D,D,Room Editor,Select tile pen tool (when working on a tile layer) + Tile Rect Tool,R,R,Room Editor,Select tile rect tool (when working on a tile layer) + Tile Rotate Tool,Z,Z,Room Editor,Select tile rotate tool (when working on a tile layer) + Tile Selection Tool,S,S,Room Editor,Select tile selection tool (when working on a tile layer) +Activate Tile Select Window,CTRL+ALT+S,⌃⌥S,Room Editor, +Add New Asset Layer,CTRL+A,⌘A,Room Editor,Add new asset layer +Add New Background Layer,CTRL+B,⌘B,Room Editor,Add new background layer +Add New Folder Layer,CTRL+F,⌘F,Room Editor,Add new folder layer +Add New Path Layer,CTRL+P,⌘P,Room Editor,Add new path layer +Add New Tile Layer,CTRL+ALT+T,⌘⌥T,Room Editor,Add new tile layer +Copy Selection Win,CTRL+Insert,⌃Insert,Room Editor,Copy selection +Cut Selection Win,SHIFT+Delete,⇧⌫,Room Editor,Cut selection +Flip As Group,Y,Y,Room Editor,Flip selection as group vertically +Flip As Individuals,SHIFT+Y,⇧Y,Room Editor,Flip individual elements of selection vertically +Generate Tile Map,CTRL+ALT+G,⌘⌥G,Room Editor,Generate tile map +Mirror As Group,X,X,Room Editor,Mirror horizontally as group +Mirror As Individuals,SHIFT+X,⇧X,Room Editor,Mirror individual elements of selection horizontally +Open Instance Creation Order,CTRL+ALT+I,⌘⌥I,Room Editor,Open instance creation order +Open Layer Properties,CTRL+ALT+P,⌘⌥P,Room Editor, +Open Layer View,CTRL+ALT+L,⌘⌥L,Room Editor,Open layer view +Open Room Properties,CTRL+ALT+R,⌘⌥R,Room Editor, +Paint With Resource,ALT,⌥,Room Editor,Paint using the selected resource +Paste Selection Win,SHIFT+Insert,⇧Insert,Room Editor,Paste selection +Precise Item Placement,CTRL,⌃,Room Editor,Disable snap to grid for precise item placement +Room Editor Paint Brush,B,B,Room Editor,Room Editor Paint Brush +Select From Any Layer,P,P,Room Editor,Select from any layer (hold while clicking elements on the canvas) +Tile Flip Tool,Y,Y,Room Editor,Tile flip tool +Tile Mirror Tool,X,X,Room Editor,Tile mirror tool +Toggle Grid,G,G,Room Editor,Toggle grid +Toggle Macro Editing Mode,CTRL+E,⌃E,Room Editor,Toggle Macro Editing Mode +Move Canvas Items Down,Down,Down,Sequence Editor,Move the selected items down on the canvas +Move Canvas Items Down 10x,SHIFT+Down,⇧Down,Sequence Editor,Move the selected items down on the canvas (10x) +Move Canvas Items Left,Left,Left,Sequence Editor,Move the selected items left on the canvas +Move Canvas Items Left 10x,SHIFT+Left,⇧Left,Sequence Editor,Move the selected items left on the canvas (10x) +Move Canvas Items Right,Right,Right,Sequence Editor,Move the selected items right on the canvas +Move Canvas Items Right 10x,SHIFT+Right,⇧Right,Sequence Editor,Move the selected items right on the canvas (10x) +Move Canvas Items Up,Up,Up,Sequence Editor,Move the selected items up on the canvas +Move Canvas Items Up 10x,SHIFT+Up,⇧Up,Sequence Editor,Move the selected items up on the canvas (10x) +Sequence Add Keyframe,F9,F9,Sequence Editor,"Add a keyframe at the playhead position for all selected items on the canvas" +Sequence Center Item Origin,CTRL+SHIFT+Home,⌃⇧Home,Sequence Editor,Center the selected items around their origins +Sequence Delete Bksp,BackSpace,⌫,Sequence Editor,Delete the selected items +Sequence Expand Tracks All,CTRL+U,⌃U,Sequence Editor,Toggle expand/collapse for all tracks +Sequence Expand Tracks Selection,U,U,Sequence Editor,Toggle expand/collapse for the selected tracks in the Track Panel +Sequence Goto End,End,End,Sequence Editor,Move the playhead to the end of the sequence +Sequence Goto End Selection,SHIFT+End,⇧End,Sequence Editor,Move the playhead to the end of the selection +Sequence Goto Next Event,SHIFT+8,⇧8,Sequence Editor,Move the playhead to the next moment +Sequence Goto Prev Event,SHIFT+9,⇧9,Sequence Editor,Move the playhead to the previous moment +Sequence Goto Start,Home,Home,Sequence Editor,Move the playhead to the start of the sequence +Sequence Goto Start Selection,SHIFT+Home,⇧Home,Sequence Editor,Move the playhead to the start of the selection +Sequence Move Keys Left1,CTRL+Left,⌃Left,Sequence Editor,Move the selected keys left by 1 frame +Sequence Move Keys Left10,CTRL+SHIFT+Left,⌃⇧Left,Sequence Editor,Move the selected keys left by 10 frames +Sequence Move Keys Right1,CTRL+Right,⌃Right,Sequence Editor,Move the selected keys right by 1 frame +Sequence Move Keys Right10,CTRL+SHIFT+Right,⌃⇧Right,Sequence Editor,Move the selected keys right by 10 frames +Sequence Move Playhead Left1,ALT+Left,⌥Left,Sequence Editor,Move the playhead left by 1 frame +Sequence Move Playhead Left10,ALT+SHIFT+Left,⌥⇧Left,Sequence Editor,Move the playhead left by 10 frames +Sequence Move Playhead Right1,ALT+Right,⌥Right,Sequence Editor,Move the playhead right by 1 frame +Sequence Move Playhead Right10,ALT+SHIFT+Right,⌥⇧Right,Sequence Editor,Move the playhead right by 10 frames +Sequence New Broadcast Message,CTRL+8,⌃8,Sequence Editor,Add a new broadcast message at the playhead position +Sequence New Clipping Mask,CTRL+M,⌃M,Sequence Editor,Add a new clipping mask track +Sequence New Group,ALT+G,⌥G,Sequence Editor,Create a new group track and add the selected tracks to it +Sequence New Moment,CTRL+9,⌃9,Sequence Editor,Add a new moment at the playhead position +Sequence Next Keyframe,N,N,Sequence Editor,Move the playhead to the next keyframe in the selected parameter tracks +Sequence Prev Keyframe,M,M,Sequence Editor,Move the playhead to the previous keyframe in the selected parameter tracks +Sequence Remove Keyframe,F8,F8,Sequence Editor,Remove the keyframes at the playhead position on the currently selected tracks +Sequence Reset Item Position,CTRL+Home,⌃Home,Sequence Editor,Reset the position on the canvas of the currently selected items +Sequence Select Next Key,SHIFT+N,⇧N,Sequence Editor,Move the playhead to the next key +Sequence Select Prev Key,SHIFT+M,⇧M,Sequence Editor,Move the playhead to the previous key +Sequence Select Track Above,ALT+Up,⌥Up,Sequence Editor,Select the track above the current track in the Track Panel +Sequence Select Track Above Additive,CTRL+ALT+Up,⌃⌥Up,Sequence Editor,Add the track above the current track to the selection in the Track Panel +Sequence Select Track Below,ALT+Down,⌥Down,Sequence Editor,Select the track above the current track in the Track Panel +Sequence Select Track Below Additive,CTRL+ALT+Down,⌃⌥Down,Sequence Editor,Add the track below the current track to the selection in the Track Panel +Sequence Split Key Two Tracks,CTRL+ALT+D,⌃⌥D,Sequence Editor,Split Key Two Tracks +Sequence Split Keyframe,F7,F7,Sequence Editor,Split Keyframe +Sequence Stretch Keys Left,SHIFT+Left Bracket,⇧Left Bracket,Sequence Editor,Stretch the selected keys left +Sequence Stretch Keys Right,SHIFT+Right Bracket,⇧Right Bracket,Sequence Editor,Stretch the selected keys right +Sequence Toggle Autokey,F10,F10,Sequence Editor,"Toggle autokey" +Sequence Toggle Multiselect Origin,Q,Q,Sequence Editor,Toggle multiselect origin +Sequence Toggle Translation Path,CTRL+ALT+P,⌃⌥P,Sequence Editor,Toggle translation paths on the canvas +Sequence Trim Key Left,Left Bracket,Left Bracket,Sequence Editor,Trim selected keys left +Sequence Trim Key Right,Right Bracket,Right Bracket,Sequence Editor,Trim selected keys right +Toggle Canvas Rulers,CTRL+R,⌃R,Sequence Editor,Toggle the canvas rulers +Tool Origin,Y,Y,Sequence Editor,Select the Origin tool +Tool Rotate,R,R,Sequence Editor,Select the Rotate tool +Tool Scale,S,S,Sequence Editor,Select the Scale tool +Tool Translate,T,T,Sequence Editor,Select the Translate tool +Load Sound,CTRL+SHIFT+O,⌘⇧O,Sound Editor,Load sound +Loop Sound,L,L,Sound Editor,Toggle loop sound +Mute Sound,M,M,Sound Editor,Toggle mute sound +Open Mixer,CTRL+SHIFT+M,⌘⇧M,Sound Editor,Open the Sound Mixer +Play Sound,Space,Space,Sound Editor,Play/Pause/Resume sound +Rewind,R,R,Sound Editor,Rewind and stop sound +Loop All,L,L,Sound Mixer,Loop all +Mute All,M,M,Sound Mixer,Mute all (all mixer columns) +Play All,Space,Space,Sound Mixer,Play all sounds (all mixer columns) +Rewind All,R,R,Sound Mixer,Stop and rewind all +Add Sprite Frame,SHIFT+A,⇧A,Sprite Editor,Add sprite frame +Copy Frames Win,CTRL+Insert,⌃Insert,Sprite Editor,Copy sprite frames +Cut Frames Win,SHIFT+Delete,⇧⌫,Sprite Editor,Cut sprite frames +Import Image,CTRL+I,⌘I,Sprite Editor,Import image +Insert Sprite Frame,Insert,Insert,Sprite Editor,Insert sprite frame +Paste Frames Win,SHIFT+Insert,⇧Insert,Sprite Editor,Paste sprite frames +Resize Image,CTRL+R,⌘R,Sprite Editor,Open the Resize Properties window +Sprite Add Broadcast Message,CTRL+8,⌃8,Sprite Editor,Add broadcast message to sprite +Caret Down,Down,Down,Text Editor,Move cursor down +Caret Down+Column Select,ALT+SHIFT+Down,⌥⇧Down,Text Editor,Move cursor down while doing column select (rectangular area) +Caret Down+Scroll Down+Select,CTRL+SHIFT+Down,⌃⇧PageDown,Text Editor,Move cursor down while selecting lines +Caret Down+Select,SHIFT+Down,⇧Down,Text Editor,Move cursor down while selecting lines +Caret Left,Left,Left,Text Editor,Move cursor left +Caret Left+Column Select,ALT+SHIFT+Left,,Text Editor,Move cursor left while doing column select (rectangular area) +Caret Left+Select,SHIFT+Left,⇧Left,Text Editor,Move cursor left while selecting lines +Caret Right,Right,Right,Text Editor,Move cursor right +Caret Right+Column Select,ALT+SHIFT+Right,,Text Editor,Move cursor right while doing column select (rectangular area) +Caret Right+Select,SHIFT+Right,⇧Right,Text Editor,Move cursor right while selecting lines +Caret Up,Up,Up,Text Editor,Move cursor up +Caret Up+Column Select,ALT+SHIFT+Up,⌥⇧Up,Text Editor,Move cursor up while doing column select (rectangular area) +Caret Up+Scroll Up+Select,CTRL+SHIFT+Up,⌃⇧PageUp,Text Editor,Move cursor up while selecting lines +Caret Up+Select,SHIFT+Up,⇧Up,Text Editor,Move cursor up while selecting lines +Comment Line/Selection,CTRL+K,⌘K,Text Editor,Comment line or selection +De Tab,SHIFT+Tab,⇧⇥,Text Editor,Tab backwards +Delete Back,BackSpace,⌫,Text Editor,Backspace +Delete End Start,CTRL+Delete,⌃⌫,Text Editor,Delete from the cursor position to the end of the word +Delete Forward,Delete,⌫,Text Editor,Delete +Delete Line After Cursor,,⌃K,Text Editor,Delete line after cursor +Delete Line Before Cursor,,⌘⌫,Text Editor,Delete line before cursor +Delete Word Start,CTRL+BackSpace,⌥⌫,Text Editor,Delete from the cursor position to the start of the word +Document End,CTRL+End,⌃End,Text Editor,Move cursor to the end of the document +Document End+Select,CTRL+SHIFT+End,⌃⇧End,Text Editor,Move cursor to the end of the document and select everything in between +Document Start,CTRL+Home,⌃Home,Text Editor,Move cursor to the start of the document +Document Start+Select,CTRL+SHIFT+Home,⌃⇧Home,Text Editor,Move cursor to the start of the document and select everything in between +End,End,End,Text Editor,Move cursor to end of line +End+Column Select,ALT+SHIFT+End,⌥⇧End,Text Editor,Move cursor to end of line and column select +End+Select,SHIFT+End,⇧End,Text Editor,Move cursor to end of line and select text in between +Expand/Collapse Region,CTRL+Enter,⌘Enter,Text Editor,Expand/Collapse region +Fold Regions,CTRL+M,⌃M,Text Editor,Fold regions +Home,Home,Home,Text Editor,Move cursor to start of line +Home+Column Select,ALT+SHIFT+Home,⌥⇧Home,Text Editor,Move cursor to start of line and column select +Home+Select,SHIFT+Home,⇧Home,Text Editor,Move cursor to start of line and select +Line Break1,Enter,Enter,Text Editor,Line break +Line Break2,KeypadEnter,KeypadEnter,Text Editor,Line break +Next Region,CTRL+ALT+Down,⌘⌥Down,Text Editor,Next region +Page Down,PageDown,PageDown,Text Editor,Page down +Page Down+Select,SHIFT+PageDown,⇧PageDown,Text Editor,Page down + select +Page Up,PageUp,PageUp,Text Editor,Page up +Page Up+Select,SHIFT+PageUp,⇧PageUp,Text Editor,Page up + select +Previous Region,CTRL+ALT+Up,⌘⌥Up,Text Editor,Previous region +Restart Game,F6,F6,Text Editor,Restart game +Scroll Down,CTRL+Down,⌃PageDown,Text Editor,Scroll down (move cursor down and scroll down) +Scroll Up,CTRL+Up,⌃PageUp,Text Editor,Scroll up (move cursor up and scroll up) +Show Code Completion,CTRL+Space,⌃Space,Text Editor,Show code completion +Show Snippets,F4,F4,Text Editor,Show snippets +Tab,Tab,⇥,Text Editor,Tab +Text Editor Goto Line,CTRL+G,⌘G,Text Editor,Goto line number +Toggle Insert/Overwrite,Insert,Insert,Text Editor,Toggle Insert/Overwrite +Uncomment Line/Selection,CTRL+SHIFT+K,⌘⇧K,Text Editor,Uncomment line/selection +Unfold Regions,CTRL+U,⌃U,Text Editor,Unfold regions +Word Left,CTRL+Left,⌥Left,Text Editor,Move cursor to word on the left +Word Left+Select,CTRL+SHIFT+Left,⌥⇧Left,Text Editor,Move cursor to word on the left and select text in between +Word Right,CTRL+Right,⌥Right,Text Editor,Move cursor to word on the right +Word Right+Select,CTRL+SHIFT+Right,⌥⇧Right,Text Editor,Move cursor to word on the right and select text in between +Add Anim,Insert,Insert,Tileset Editor,Add animation (Tile Animation window) +Autotile Add Full Set,CTRL+F,⌘F,Tileset Editor,Add full auto tile set (Auto Tiling window) +Autotile Add Transition Set,CTRL+R,⌘R,Tileset Editor,Add auto tile transition set (Auto Tiling window) +Autotile Delete Set,Del,Del,Tileset Editor,Delete auto tile set (Auto Tiling window) +Autotile Show Guide,G,G,Tileset Editor,Toggle auto tile guide +Decrease Brush Size,KeypadMinus,KeypadMinus,Tileset Editor,Decrease brush size +Decrease Brush Size Keypad,KeypadMinus,KeypadMinus,Tileset Editor,Decrease brush size +Delete Tile Selection,Delete,⌫,Tileset Editor,Delete selection +Increase Brush Size,KeypadPlus,KeypadPlus,Tileset Editor,Increase brush size +Increase Brush Size Keypad,KeypadPlus,KeypadPlus,Tileset Editor,Decrease brush size +Invert Tile Selection,CTRL+I,⌃I,Tileset Editor,Invert tile selection +Move Anim Down,SHIFT+Down,⇧Down,Tileset Editor,Move animation down (Tile Animation window) +Move Anim Frame Left,SHIFT+Left,⇧Left,Tileset Editor,Move animation frame left (Tile Animation window) +Move Anim Frame Right,SHIFT+Right,⇧Right,Tileset Editor,Move animation frame right (Tile Animation window) +Move Anim Up,SHIFT+Up,⇧Up,Tileset Editor,Move animation up (Tile Animation window) +Next Anim,Down,Down,Tileset Editor,Next animation (Tile Animation window) +Next Anim Frame,Right,Right,Tileset Editor,Next animation frame (Tile Animation window) +Open Auto Tiling,CTRL+A,⌘A,Tileset Editor,Open Auto Tiling window +Open Brush Builder,CTRL+B,⌘B,Tileset Editor,Open Brush Builder window +Open Tile Animation,CTRL+ALT+T,⌘⌥T,Tileset Editor,Open Tile Animation window +Open Tileset Properties,CTRL+SHIFT+O,⌘⇧O,Tileset Editor,Open Tile Set Properties window +Prev Anim,Up,Up,Tileset Editor,Previous animation (Tile Animation window) +Prev Anim Frame,Left,Left,Tileset Editor,Previous animation frame (Tile Animation window) +Rotate,Z,Z,Tileset Editor,Rotate +Tile Autotile,A,A,Tileset Editor,Select Autotile tool (Brush Builder Tools) +Tile Eraser,E,E,Tileset Editor,Select Eraser tool (Brush Builder Tools) +Tile Fill,F,F,Tileset Editor,Select Fill tool (Brush Builder Tools) +Tile Line,L,L,Tileset Editor,Select Line tool (Brush Builder Tools) +Tile Pen,D,D,Tileset Editor,Select Pen tool (Brush Builder Tools) +Tile Rect,R,R,Tileset Editor,Select Rectangle tool (Brush Builder Tools) +Tile Select,S,S,Tileset Editor,Select Select Tiles tool (Brush Builder Tools) +Add Moment,Insert,Enter,Timeline Editor,Add new moment +Change Moment,CTRL+SHIFT+E,⌘⇧E,Timeline Editor,Change selected moment +Copy Moments Win,CTRL+Insert,⌃Insert,Timeline Editor,Copy selected moments +Cut Moments Win,SHIFT+Delete,⇧⌫,Timeline Editor,Cut selected moments +Edit Moment,ALT+Enter,⌥Enter,Timeline Editor,Edit moment (jump to code editor) +Merge Moment,CTRL+SHIFT+M,⌘⇧M,Timeline Editor,Merge selected moments +Paste Moments Win,SHIFT+Insert,⇧Insert,Timeline Editor,Paste moments +Unselect Moments,CTRL+U,⌘U,Timeline Editor,Unselect moments +Ai Assistant Search Next,F3,F3,AIAssistant, +Ai Assistant Search Previous,SHIFT+F3,⇧F3,AIAssistant, +Open Ai Assistant,CTRL+SHIFT+A,⌃⇧A,Global, +Feather Do Nothing Rewrite,SHIFT+F11,⇧F11,Feather, +Start Dnd Maker,CTRL+SHIFT+Q,⌘⇧Q,Global, +Brush From Selection,CTRL+B,⌃B,Image Editor, +Create Particle System,ALT+K,⌥K,Global, +Delete Selected Range,CTRL+D,⌘D,Font Editor, +Colour Picker Subtool,CTRL,⌘,Image Editor, +Brush Scaler Subtool,SHIFT+Z,⇧Z,Image Editor, +Create Resource GMParticle System,ALT+K,⌥K,Global, +Open Included File,ALT+I,⌥I,Global, +Auto Tile Tool,A,A,Room Editor, +Tile Eraser Tool,E,E,Room Editor, +Tile Fill Tool,F,F,Room Editor, +Tile Inheritance Tool,I,I,Room Editor, +Tile Line Tool,L,L,Room Editor, +Tile Pen Tool,D,D,Room Editor, +Tile Rect Tool,R,R,Room Editor, +Tile Rotate Tool,Z,Z,Room Editor, +Tile Selection Tool,S,S,Room Editor, diff --git a/Manual/ManualShortcutsTable.htm b/Manual/ManualShortcutsTable.htm new file mode 100644 index 000000000..a4688cf6d --- /dev/null +++ b/Manual/ManualShortcutsTable.htm @@ -0,0 +1,2763 @@ + +

AIAssistant

+ + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
F3F3AIAssistant
SHIFT+F3SHIFT+F3AIAssistant

Anim Curve Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
BackSpaceDeleteAnim Curve Editor
EscapeEscapeAnim Curve Editor
CTRL+WCTRL+WAnim Curve Editor
CTRL+ACMD+AAnim Curve Editor
CTRL+RCMD+RAnim Curve Editor

Asset Browser

+ + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+Right BracketCTRL+Right BracketAsset Browser
CTRL+Left BracketCTRL+Left BracketAsset Browser
CTRL+SHIFT+Right BracketCTRL+SHIFT+Right BracketAsset Browser
CTRL+SHIFT+Left BracketCTRL+SHIFT+Left BracketAsset Browser

Errors

+ + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+InsertCTRL+InsertErrors
CTRL+SHIFT+ACTRL+SHIFT+AErrors

Feather

+ + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
SHIFT+F11SHIFT+F11Feather

Font Editor

+ + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+ACMD+AFont Editor
CTRL+DCMD+DFont Editor
CTRL+SHIFT+OCMD+SHIFT+OFont Editor
CTRL+RCMD+RFont Editor

Global

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
TabTab,Global
SHIFT+TabSHIFT+Tab,Global
EnterEnterGlobal
CTRL+ZCMD+ZGlobal
CTRL+YCMD+YGlobal
ALT+F4CMD+QGlobal
CTRL+SHIFT+SCMD+SHIFT+SGlobal
CTRL+ECMD+EGlobal
SHIFT+F12SHIFT+F12Global
CTRL+WCMD+WGlobal
CTRL+EnterCMD+EnterGlobal
CTRL+EqualsCMD+EqualsGlobal
CTRL+MinusCMD+MinusGlobal
CTRL+ALT+EnterCMD+ALT+EnterGlobal
CTRL+ALT+UpCMD+ALT+UpGlobal
CTRL+ALT+DownCMD+ALT+DownGlobal
CTRL+ALT+LeftCMD+ALT+LeftGlobal
CTRL+ALT+RightCMD+ALT+RightGlobal
CTRL+ALT+Up+LeftCMD+ALT+Up+LeftGlobal
CTRL+ALT+Down+LeftCMD+ALT+Down+LeftGlobal
CTRL+ALT+Up+RightCMD+ALT+Up+RightGlobal
CTRL+ALT+Down+RightCMD+ALT+Down+RightGlobal
F2F2Global
EscapeEscapeGlobal
CTRL+DCMD+DGlobal
CTRL+XCMD+XGlobal
CTRL+CCMD+CGlobal
CTRL+VCMD+VGlobal
CTRL+ACMD+AGlobal
CTRL+KCMD+KGlobal
CTRL+SHIFT+KCMD+SHIFT+KGlobal
CTRL+PageUpCMD+PageUpGlobal
CTRL+PageDownCMD+PageDownGlobal
F7F7Global
F8F8Global
DeleteDeleteGlobal
F5F5Global
F11CMD+SHIFT+IGlobal
F10CMD+SHIFT+OGlobal
SHIFT+F11CMD+SHIFT+UGlobal
CTRL+SHIFT+PCMD+SHIFT+PGlobal
CTRL+TCMD+TGlobal
CTRL+TabCTRL+Tab,Global
F5F5Global
F6F6Global
CTRL+F7CMD+F7Global
CTRL+F8CMD+F8Global
CMD+SHIFT+VGlobal
CMD+SHIFT+DGlobal
CMD+SHIFT+MGlobal
CTRL+SHIFT+FCMD+SHIFT+FGlobal
CTRL+FCMD+FGlobal
CTRL+HCMD+RGlobal
CTRL+SHIFT+ICTRL+SHIFT+IGlobal
CTRL+SHIFT+0CMD+CTRL+0Global
CTRL+0CMD+0Global
CTRL+SHIFT+1CMD+CTRL+1Global
CTRL+1CMD+1Global
CTRL+SHIFT+2CMD+CTRL+2Global
CTRL+2CMD+2Global
CTRL+SHIFT+3CMD+CTRL+3Global
CTRL+3CMD+3Global
CTRL+SHIFT+4CMD+CTRL+4Global
CTRL+4CMD+4Global
CTRL+SHIFT+5CMD+CTRL+5Global
CTRL+5CMD+5Global
CTRL+SHIFT+6CMD+CTRL+6Global
CTRL+6CMD+6Global
CTRL+SHIFT+7CMD+CTRL+7Global
CTRL+7CMD+7Global
CTRL+SHIFT+8CMD+CTRL+8Global
CTRL+8CMD+8Global
CTRL+SHIFT+9CMD+CTRL+9Global
CTRL+9CMD+9Global
SHIFT+OSHIFT+OGlobal
CTRL+SHIFT+BCTRL+SHIFT+BGlobal
CTRL+SHIFT+ACTRL+SHIFT+AGlobal
F3F3Global
SHIFT+F3SHIFT+F3Global
CTRL+SHIFT+RCTRL+SHIFT+RGlobal
CTRL+PCMD+PGlobal
CTRL+RCMD+RGlobal
XXGlobal
YYGlobal
CTRL+GCMD+GGlobal
CTRL+SemicolonCTRL+SemicolonGlobal
CTRL+ALT+SHIFT+SemicolonCTRL+ALT+SHIFT+SemicolonGlobal
CTRL+SHIFT+SemicolonCTRL+SHIFT+SemicolonGlobal
SpaceSpaceGlobal
GGGlobal
LeftLeftGlobal
RightRightGlobal
UpUpGlobal
DownDownGlobal
CMD+SHIFT+QGlobal
CTRL+NCMD+NGlobal
CTRL+OCMD+OGlobal
CTRL+SCMD+SGlobal
ALT+JALT+JGlobal
ALT+EALT+EGlobal
ALT+FALT+FGlobal
ALT+NALT+NGlobal
ALT+OALT+OGlobal
ALT+PALT+PGlobal
ALT+RALT+RGlobal
ALT+CALT+CGlobal
ALT+GALT+GGlobal
ALT+AALT+AGlobal
ALT+UALT+UGlobal
ALT+SALT+SGlobal
ALT+BALT+BGlobal
ALT+TALT+TGlobal
ALT+KALT+KGlobal
CTRL+SHIFT+ECMD+SHIFT+EGlobal
CTRL+SpaceCMD+SpaceGlobal
CTRL+SHIFT+NCMD+SHIFT+NGlobal
CTRL+SHIFT+ECMD+SHIFT+EGlobal
CTRL+SHIFT+SCMD+SHIFT+SGlobal
CTRL+FCMD+FGlobal
CTRL+ACMD+AGlobal
CTRL+CCMD+CGlobal
PageDownPageDownGlobal
PageUpPageUpGlobal
F1F1Global
F12F12Global
CTRLCMDGlobal
SpaceSpaceGlobal
CTRLCMDGlobal
SHIFTSHIFTGlobal
ALTALTGlobal
CTRLCMDGlobal
SHIFTSHIFTGlobal
CTRL+QCTRL+QGlobal
ALT+KALT+KGlobal
ALT+IALT+IGlobal

Image Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
EqualsEqualsImage Editor
KeypadPlusKeypadPlusImage Editor
MinusMinusImage Editor
KeypadMinusKeypadMinusImage Editor
PeriodPeriodImage Editor
BBImage Editor
33Image Editor
EnterEnterImage Editor
ALT+VALT+VImage Editor
ALT+HALT+HImage Editor
ALT+CALT+CImage Editor
ALT+FALT+FImage Editor
22Image Editor
11Image Editor
SHIFT+DeleteSHIFT+DeleteImage Editor
CTRL+InsertCTRL+InsertImage Editor
SHIFT+InsertSHIFT+InsertImage Editor
CTRL+BCTRL+BImage Editor
CTRL+ICTRL+IImage Editor
SHIFT+ASHIFT+AImage Editor
InsertInsertImage Editor
BackSpaceDeleteImage Editor
CTRL+SHIFT+ACMD+SHIFT+AImage Editor
CTRL+ICMD+IImage Editor
CTRL+ICMD+IImage Editor
CTRL+SHIFT+ACMD+SHIFT+AImage Editor
ALT+CALT+CImage Editor
ALT+FALT+FImage Editor
DDImage Editor
EEImage Editor
FFImage Editor
HHImage Editor
VVImage Editor
LLImage Editor
OOImage Editor
RRImage Editor
SHIFT+RSHIFT+RImage Editor
CCImage Editor
SHIFT+CSHIFT+CImage Editor
SSImage Editor
QQImage Editor
WWImage Editor
PPImage Editor
SHIFT+PSHIFT+PImage Editor
AAImage Editor
UUImage Editor
ZZImage Editor
MMImage Editor
TTImage Editor
CTRLCMDImage Editor
SHIFT+ZSHIFT+ZImage Editor
CTRLCMDImage Editor
ALTALTImage Editor
SHIFTSHIFTImage Editor
ALTALTImage Editor
SHIFTSHIFTImage Editor
ALTALTImage Editor
ALTALTImage Editor
CTRLCTRLImage Editor

Context Menu

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+SHIFT+FCMD+SHIFT+FContext Menu
F1F1Context Menu
11Context Menu
22Context Menu
33Context Menu
44Context Menu
55Context Menu
66Context Menu
77Context Menu
88Context Menu
99Context Menu
00Context Menu
CCContext Menu
MMContext Menu
RRContext Menu
DelDelContext Menu
F9F9Context Menu
CTRL+PCTRL+PContext Menu

Object Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
SHIFT+InsertSHIFT+InsertObject Editor
CTRL+InsertCTRL+InsertObject Editor
SHIFT+DeleteSHIFT+DeleteObject Editor
CTRL+SHIFT+MCMD+SHIFT+MObject Editor
CTRL+KCMD+KObject Editor
CTRL+FCMD+FObject Editor
CTRL+GCMD+GObject Editor
CTRL+HCMD+HObject Editor
CTRL+JCMD+JObject Editor
CTRL+ACMD+AObject Editor
CTRL+PCMD+PObject Editor
CTRL+SHIFT+OCMD+SHIFT+OObject Editor
CTRL+LCMD+LObject Editor
CTRL+BCMD+BObject Editor
CTRL+SHIFT+YCMD+YObject Editor
CTRL+UCMD+UObject Editor
CTRL+ALT+TCMD+ALT+TObject Editor

Path Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+SHIFT+OCMD+SHIFT+OPath Editor
LeftLeftPath Editor
RightRightPath Editor
UpUpPath Editor
DownDownPath Editor
RRPath Editor
TTPath Editor
SSPath Editor

Room Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+ALT+ICMD+ALT+IRoom Editor
CTRL+ALT+LCMD+ALT+LRoom Editor
SHIFT+DeleteSHIFT+DeleteRoom Editor
CTRL+InsertCTRL+InsertRoom Editor
SHIFT+InsertSHIFT+InsertRoom Editor
SHIFT+XSHIFT+XRoom Editor
XXRoom Editor
SHIFT+YSHIFT+YRoom Editor
YYRoom Editor
CTRL+ALT+GCMD+ALT+GRoom Editor
CTRL+BCMD+BRoom Editor
CTRL+ALT+TCMD+ALT+TRoom Editor
CTRL+PCMD+PRoom Editor
CTRL+ACMD+ARoom Editor
CTRL+FCMD+FRoom Editor
CTRLCTRLRoom Editor
ALTALTRoom Editor
PPRoom Editor
AARoom Editor
YYRoom Editor
XXRoom Editor
EERoom Editor
FFRoom Editor
IIRoom Editor
LLRoom Editor
DDRoom Editor
RRRoom Editor
ZZRoom Editor
SSRoom Editor
CTRL+ALT+SCTRL+ALT+SRoom Editor
CTRL+ECTRL+ERoom Editor
EqualsEqualsRoom Editor
MinusMinusRoom Editor

Sequence Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
F7F7Sequence Editor
F8F8Sequence Editor
F9F9Sequence Editor
F10F10Sequence Editor
BackSpaceDeleteSequence Editor
QQSequence Editor
CTRL+SHIFT+HomeCTRL+SHIFT+HomeSequence Editor
CTRL+HomeCTRL+HomeSequence Editor
CTRL+ALT+PCTRL+ALT+PSequence Editor
ALT+SHIFT+LeftALT+SHIFT+LeftSequence Editor
ALT+SHIFT+RightALT+SHIFT+RightSequence Editor
ALT+LeftALT+LeftSequence Editor
ALT+RightALT+RightSequence Editor
CTRL+SHIFT+LeftCTRL+SHIFT+LeftSequence Editor
CTRL+SHIFT+RightCTRL+SHIFT+RightSequence Editor
CTRL+LeftCTRL+LeftSequence Editor
CTRL+RightCTRL+RightSequence Editor
SHIFT+UpSHIFT+UpSequence Editor
SHIFT+DownSHIFT+DownSequence Editor
SHIFT+LeftSHIFT+LeftSequence Editor
SHIFT+RightSHIFT+RightSequence Editor
UpUpSequence Editor
DownDownSequence Editor
LeftLeftSequence Editor
RightRightSequence Editor
Left BracketLeft BracketSequence Editor
Right BracketRight BracketSequence Editor
CTRL+ALT+DCTRL+ALT+DSequence Editor
SHIFT+Right BracketSHIFT+Right BracketSequence Editor
SHIFT+Left BracketSHIFT+Left BracketSequence Editor
NNSequence Editor
MMSequence Editor
SHIFT+NSHIFT+NSequence Editor
SHIFT+MSHIFT+MSequence Editor
HomeHomeSequence Editor
EndEndSequence Editor
SHIFT+HomeSHIFT+HomeSequence Editor
SHIFT+EndSHIFT+EndSequence Editor
UUSequence Editor
CTRL+UCTRL+USequence Editor
ALT+UpALT+UpSequence Editor
ALT+DownALT+DownSequence Editor
CTRL+ALT+UpCTRL+ALT+UpSequence Editor
CTRL+ALT+DownCTRL+ALT+DownSequence Editor
CTRL+MCTRL+MSequence Editor
ALT+GALT+GSequence Editor
CTRL+8CTRL+8Sequence Editor
CTRL+9CTRL+9Sequence Editor
SHIFT+8SHIFT+8Sequence Editor
SHIFT+9SHIFT+9Sequence Editor
TTSequence Editor
SSSequence Editor
RRSequence Editor
YYSequence Editor
CTRL+RCTRL+RSequence Editor

Sound Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+SHIFT+OCMD+SHIFT+OSound Editor
CTRL+SHIFT+MCMD+SHIFT+MSound Editor
MMSound Editor
SpaceSpaceSound Editor
LLSound Editor
RRSound Editor

Sound Mixer

+ + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
MMSound Mixer
SpaceSpaceSound Mixer
LLSound Mixer
RRSound Mixer

Sprite Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+8CTRL+8Sprite Editor
SHIFT+ASHIFT+ASprite Editor
InsertInsertSprite Editor
CTRL+InsertCTRL+InsertSprite Editor
SHIFT+InsertSHIFT+InsertSprite Editor
SHIFT+DeleteSHIFT+DeleteSprite Editor
CTRL+ICMD+ISprite Editor
CTRL+RCMD+RSprite Editor

Errors

+ + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+InsertCTRL+InsertErrors
CTRL+SHIFT+ACTRL+SHIFT+AErrors

Text Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
LeftLeftText Editor
RightRightText Editor
UpUpText Editor
DownDownText Editor
SHIFT+LeftSHIFT+LeftText Editor
SHIFT+RightSHIFT+RightText Editor
SHIFT+UpSHIFT+UpText Editor
SHIFT+DownSHIFT+DownText Editor
ALT+SHIFT+UpALT+SHIFT+UpText Editor
ALT+SHIFT+DownALT+SHIFT+DownText Editor
PageUpPageUpText Editor
PageDownPageDownText Editor
SHIFT+PageUpSHIFT+PageUpText Editor
SHIFT+PageDownSHIFT+PageDownText Editor
CTRL+UpCTRL+PageUpText Editor
CTRL+DownCTRL+PageDownText Editor
CTRL+SHIFT+UpCTRL+SHIFT+PageUpText Editor
CTRL+SHIFT+DownCTRL+SHIFT+PageDownText Editor
HomeHomeText Editor
EndEndText Editor
SHIFT+HomeSHIFT+HomeText Editor
SHIFT+EndSHIFT+EndText Editor
ALT+SHIFT+HomeALT+SHIFT+HomeText Editor
ALT+SHIFT+EndALT+SHIFT+EndText Editor
CTRL+HomeCTRL+HomeText Editor
CTRL+EndCTRL+EndText Editor
CTRL+SHIFT+HomeCTRL+SHIFT+HomeText Editor
CTRL+SHIFT+EndCTRL+SHIFT+EndText Editor
CTRL+LeftALT+LeftText Editor
CTRL+RightALT+RightText Editor
CTRL+SHIFT+LeftALT+SHIFT+LeftText Editor
CTRL+SHIFT+RightALT+SHIFT+RightText Editor
BackSpaceDeleteText Editor
DeleteDeleteText Editor
EnterEnterText Editor
KeypadEnterKeypadEnterText Editor
TabTab,Text Editor
SHIFT+TabSHIFT+Tab,Text Editor
CTRL+BackSpaceALT+DeleteText Editor
CTRL+DeleteCTRL+DeleteText Editor
CMD+DeleteText Editor
CTRL+KText Editor
F4F4Text Editor
CTRL+MCTRL+MText Editor
CTRL+UCTRL+UText Editor
CTRL+EnterCMD+EnterText Editor
CTRL+ALT+UpCMD+ALT+UpText Editor
CTRL+ALT+DownCMD+ALT+DownText Editor
InsertInsertText Editor
CTRL+SpaceCTRL+SpaceText Editor
F6F6Text Editor

Tileset Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+ICTRL+ITileset Editor
DeleteDeleteTileset Editor
InsertInsertTileset Editor
UpUpTileset Editor
DownDownTileset Editor
LeftLeftTileset Editor
RightRightTileset Editor
SHIFT+UpSHIFT+UpTileset Editor
SHIFT+DownSHIFT+DownTileset Editor
SHIFT+LeftSHIFT+LeftTileset Editor
SHIFT+RightSHIFT+RightTileset Editor
KeypadPlusKeypadPlusTileset Editor
KeypadMinusKeypadMinusTileset Editor
CTRL+SHIFT+OCMD+SHIFT+OTileset Editor
CTRL+BCMD+BTileset Editor
CTRL+ALT+TCMD+ALT+TTileset Editor
CTRL+ACMD+ATileset Editor
CTRL+FCMD+FTileset Editor
CTRL+RCMD+RTileset Editor
DDTileset Editor
EETileset Editor
FFTileset Editor
LLTileset Editor
RRTileset Editor
SSTileset Editor
AATileset Editor
ZZTileset Editor
DelDelTileset Editor
GGTileset Editor

Timeline Editor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
InsertEnterTimeline Editor
SHIFT+DeleteSHIFT+DeleteTimeline Editor
CTRL+InsertCTRL+InsertTimeline Editor
SHIFT+InsertSHIFT+InsertTimeline Editor
CTRL+SHIFT+ECMD+SHIFT+ETimeline Editor
CTRL+SHIFT+MCMD+SHIFT+MTimeline Editor
CTRL+UCMD+UTimeline Editor
ALT+EnterALT+EnterTimeline Editor

Context Menu

+ + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
InsertContext Menu

Text Editor

+ + + + + + + + + + + + + + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+GText Editor
ALT+SHIFT+LeftText Editor
ALT+SHIFT+RightText Editor

Global

+ + + + + + +
Windows Key BindingmacOS Key BindingScopeDescription
CTRL+ALT+MGlobal
+ + diff --git a/Manual/_page_generation/Template_Code_Page.htm b/Manual/_page_generation/Template_Code_Page.htm new file mode 100644 index 000000000..d7ab33939 --- /dev/null +++ b/Manual/_page_generation/Template_Code_Page.htm @@ -0,0 +1,69 @@ + + + + + + INSERT_TITLE + + + + + + + + + + +

INSERT_TITLE

+

Keyword Description Goes Here.

+

Additional Information Goes Here.

+

 

+

Syntax:

+

keyword_name(arguments);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
argument_name<Type_ Variable>Argument Description Goes Here
+

 

+

Returns:

+

<Type_ Variable> (Optional explanation)

+

 

+

Example:

+

code_example () {
+     
+ }

+

Explain The Code Example Here

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/_page_generation/Template_Normal_Page.htm b/Manual/_page_generation/Template_Normal_Page.htm new file mode 100644 index 000000000..ac45a138b --- /dev/null +++ b/Manual/_page_generation/Template_Normal_Page.htm @@ -0,0 +1,40 @@ + + + + + + INSERT_TITLE + + + + + + + + + + + +

INSERT_TITLE

+

 

+

 

+

 

+

 

+ + + + + + \ No newline at end of file diff --git a/Manual/_page_generation/Template_Visual_Page.htm b/Manual/_page_generation/Template_Visual_Page.htm new file mode 100644 index 000000000..820bb10c1 --- /dev/null +++ b/Manual/_page_generation/Template_Visual_Page.htm @@ -0,0 +1,58 @@ + + + + + + INSERT_TITLE + + + + + + + + + + +

Assign Variable Icon INSERT_TITLE

+

Description

+

 

+

Action Syntax:

+

Assign Variable Action

+

Arguments:

+ + + + + + + + + + + +
ArgumentDescription
  
+

 

+

Example:

+ +

Assign Variable ExampleThe above actions 

+ +

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/_page_generation/insert_text.bat b/Manual/_page_generation/insert_text.bat new file mode 100644 index 000000000..322eae9d1 --- /dev/null +++ b/Manual/_page_generation/insert_text.bat @@ -0,0 +1,13 @@ +@echo off +set inputfile=%1 +set outputfile=%2 +set texttofind=%3 +set texttoprepend=%~4 + +set inserted=0 +>"%outputfile%" ( + for /f "usebackq delims=" %%a in ("%inputfile%") do ( + if %inserted%==0 if "%%~a"==%texttofind% echo(%texttoprepend% & set inserted=1 + echo(%%a + ) +) \ No newline at end of file diff --git a/Manual/_page_generation/replace_text.bat b/Manual/_page_generation/replace_text.bat new file mode 100644 index 000000000..4e9b544a0 --- /dev/null +++ b/Manual/_page_generation/replace_text.bat @@ -0,0 +1,20 @@ +@echo off +REM -- Prepare the Command Processor -- +SETLOCAL ENABLEEXTENSIONS +SETLOCAL DISABLEDELAYEDEXPANSION + +::BatchSubstitude - parses a File line by line and replaces a substring" +::syntax: BatchSubstitude.bat OldStr NewStr File +:: OldStr [in] - string to be replaced +:: NewStr [in] - string to replace with +:: File [in] - file to be parsed +:$changed 20100115 +:$source https://www.dostips.com +if "%~1"=="" findstr "^::" "%~f0"&GOTO:EOF +for /f "tokens=1,* delims=]" %%A in ('"type %3|find /n /v """') do ( + set "line=%%B" + if defined line ( + call set "line=echo.%%line:%~1=%~2%%" + for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X + ) ELSE echo. +) \ No newline at end of file diff --git a/Manual/contents/Additional_Information/Guide_To_Primitives_And_Vertex_Building.htm b/Manual/contents/Additional_Information/Guide_To_Primitives_And_Vertex_Building.htm index fee6630da..2b1a72673 100644 --- a/Manual/contents/Additional_Information/Guide_To_Primitives_And_Vertex_Building.htm +++ b/Manual/contents/Additional_Information/Guide_To_Primitives_And_Vertex_Building.htm @@ -50,9 +50,9 @@

Guide de construction de Primitives et de v vertex_position(v_buff, 110, 110);
vertex_colour(v_buff, c_white, 1);
vertex_texcoord(v_buff, 1, 1);
- vertex_end(v_buff);
-
- // DRAW EVENT
+ vertex_end(v_buff);

+

Draw Event

+


var tex = sprite_get_texture(spr_Background, 0);
shader_set(shd_shimmer);
vertex_submit(v_buff, pr_trianglelist, tex);
diff --git a/Manual/contents/Additional_Information/Guide_To_Using_Buffers.htm b/Manual/contents/Additional_Information/Guide_To_Using_Buffers.htm index 0fe3b1447..d969f290a 100644 --- a/Manual/contents/Additional_Information/Guide_To_Using_Buffers.htm +++ b/Manual/contents/Additional_Information/Guide_To_Using_Buffers.htm @@ -24,7 +24,7 @@

Guide d'utilisation des tampons

Constant - description + Description buffer_fixed diff --git a/Manual/contents/Additional_Information/Project_Format.htm b/Manual/contents/Additional_Information/Project_Format.htm new file mode 100644 index 000000000..f056868ae --- /dev/null +++ b/Manual/contents/Additional_Information/Project_Format.htm @@ -0,0 +1,50 @@ + + + + + + + Project Format + + + + + + + + + +

Project Format

+

This page contains details on the project format used by GameMaker.

+

Format Basics

+

The YYP Project File

+

At the root is the main project file, with a *.yyp extension. It describes the resources in the project and other meta data specific to it.

+

The .resource_order File

+

Next to it is another file with the same name, but a *.resource_order extension instead. This file stores the order of groups and assets in The Asset Browser used when the filter is set to Custom Order.

+

 When using version control, you can e.g. add this file to .gitignore so each user of the project can have their own custom ordering in The Asset Browser.

+

YY Files

+

These are resource files; they store information on individual assets in a GameMaker project. They describe the data for the resource and any other files belonging to the resource (e.g. scripts, shaders, images and audio files). These data are stored in a JSON-like format.

+

YYZ Files

+

This type of file stores a compressed project export, created via the Export Project > YYZ option in The File Menu. Depending on the version of GameMaker, the compression method used may vary.

+

Local Asset Packages

+

These are created and imported from (part of) a project's contents using Create Local Package and Import Local Package respectively in The Tools Menu.

+

The following is an overview of the file formats used by different GameMaker versions: 

+ +

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/Additional_Information/Whitespace_Characters.htm b/Manual/contents/Additional_Information/Whitespace_Characters.htm new file mode 100644 index 000000000..8bf3ae3a1 --- /dev/null +++ b/Manual/contents/Additional_Information/Whitespace_Characters.htm @@ -0,0 +1,201 @@ + + + + + + + White-space Characters + + + + + + + + +

White-space Characters

+

The following table lists the character codes and escape sequences that GameMaker considers to be white-space characters. An empty cell in the table indicates there is no escape sequence for that character code.

+

For a detailed list of all these characters, see Whitespace_character.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Whitespace Characters
Escape SequenceUnicode Escape SequenceDescription
"\t""\u0009"character tabulation (tab)
"\n""\u000A"line feed (new line)
"\v""\u000B"line tabulation (vertical tab)
"\f""\u000C"form feed
"\r""\u000D"carriage return
" ""\u0020"space
 "\u0085"next line
 "\u000A"no-break space
 "\u1680"ogham space mark
 "\u180E"mongolian vowel separator
 "\u2000"en quad
 "\u2001"em quad
 "\u2002"en space
 "\u2003"em space
 "\u2004"three-per-em space
 "\u2005"four-per-em space
 "\u2006"six-per-em space
 "\u2007"figure space
 "\u2008"punctuation space
 "\u2009"thin space
 "\u200A"hair space
 "\u200B"zero width space
 "\u200C"zero width non-joiner
 "\u200D"zero width joiner
 "\u2028"line separator
 "\u2029"paragraph separator
 "\u202F"narrow no-break space
 "\u205F"medium mathematical space
 "\u2060"word joiner
 "\u3000"ideographic space
 "\uFEFF"zero width non-breaking space
+

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/Content.htm b/Manual/contents/Content.htm index a421e7988..764087f3c 100644 --- a/Manual/contents/Content.htm +++ b/Manual/contents/Content.htm @@ -4,7 +4,7 @@ Index du manuel GameMaker - + @@ -208,4 +208,4 @@
Copyright YoY scripting --> - + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_End.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_End.htm new file mode 100644 index 000000000..ec56d0178 --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_End.htm @@ -0,0 +1,65 @@ + + + + + + Get Audio Loop End + + + + + + + + + + + +

Get Audio Loop End Icon Get Audio Loop End

+

This action gets the loop end position of the given audio and stores it in a variable.

+

 

+

Action Syntax:

+

Get Audio Loop End

+

Arguments:

+ + + + + + + + + + + + + + + + + + + +
ArgumentDescription
SoundThe sound asset or playing sound to 
TargetThe name of the variable in which to store the loop end
TempWhether the target variable should be a temporary variable
+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_Start.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_Start.htm new file mode 100644 index 000000000..0dc18cd5c --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_Start.htm @@ -0,0 +1,65 @@ + + + + + + Get Audio Loop Start + + + + + + + + + + + +

Get Audio Loop Start Icon Get Audio Loop Start

+

This action is used to get the start point of the audio's loop.

+

 

+

Action Syntax:

+

Get Audio Loop Start

+

Arguments:

+ + + + + + + + + + + + + + + + + + + +
ArgumentDescription
SoundThe sound resource to set the pitch of
TargetThe name of the variable in which to store the state
TempWhether the target variable should be a temporary variable (Declare Temporary Variable)
+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_State.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_State.htm new file mode 100644 index 000000000..c1a01c2b7 --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Get_Audio_Loop_State.htm @@ -0,0 +1,65 @@ + + + + + + Get Audio Loop State + + + + + + + + + + + +

Get Audio Loop State Icon Get Audio Loop State

+

This action is used to get the loop state of a sound. You supply a sound, played with Play Audio and the target variable in which to store the result.

+

 

+

Action Syntax:

+

Get Audio Loop State

+

Arguments:

+ + + + + + + + + + + + + + + + + + + +
ArgumentDescription
SoundThe sound of which to get the loop state
TargetThe name of the variable in which to store the state
TempWhether the target variable should be a temporary variable
+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_End.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_End.htm new file mode 100644 index 000000000..f2c8e5530 --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_End.htm @@ -0,0 +1,61 @@ + + + + + + Set Audio Loop End + + + + + + + + + + + +

Set Audio Loop End Icon Set Audio Loop End

+

This action can be used to set the loop state of a sound.

+

 

+

Action Syntax:

+

Set Audio Loop End

+

Arguments:

+ + + + + + + + + + + + + + + +
ArgumentDescription
SoundThe sound resource to set the pitch of
OffsetThe track offset (for the loop end, 0.0 indicates the end of the audio)
+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_Start.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_Start.htm new file mode 100644 index 000000000..f646955b1 --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_Start.htm @@ -0,0 +1,61 @@ + + + + + + Set Audio Loop Start + + + + + + + + + + + +

Set Audio Loop Start Icon Set Audio Loop Start

+

This action is used to set the loop start point of a sound.

+

 

+

Action Syntax:

+

Set Audio Loop Start

+

Arguments:

+ + + + + + + + + + + + + + + +
ArgumentDescription
SoundThe Sound Asset or sound instance
OffsetThe track offset (0.0 is the start of the audio)
+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_State.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_State.htm new file mode 100644 index 000000000..2ddd19de0 --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Audio/Set_Audio_Loop_State.htm @@ -0,0 +1,61 @@ + + + + + + Set Audio Loop State + + + + + + + + + + + +

Set Audio Loop State Icon Set Audio Loop State

+

This action is used to set the loop state of an already playing sound, i.e. one played with the Play Audio action.

+

 

+

Action Syntax:

+

Set Audio Loop State

+

Arguments:

+ + + + + + + + + + + + + + + +
ArgumentDescription
SoundThe sound, played with Play Audio, to set the loop state of
LoopWhether to loop the sound between its loop start and end or not (true or false)
+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Movement/Add_Motion.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Movement/Add_Motion.htm new file mode 100644 index 000000000..83bd8b483 --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Movement/Add_Motion.htm @@ -0,0 +1,62 @@ + + + + + + Add Motion + + + + + + + + + + +

Assign Variable Icon Add Motion

+

This action accelerates the instance with the given speed in the given direction.

+

This is useful for controlling instances that accelerate gradually, like a space ship or a rolling ball, unlike, say, an RPG character which moves at a constant speed.

+

 

+

Action Syntax:

+

Assign Variable Action

+

Arguments:

+ + + + + + + + + + + + + + + +
ArgumentDescription
DirectionThe direction to accelerate in
SpeedThe speed of the acceleration
+

 

+

Example:

+

Assign Variable ExampleThis will cause the instance to accelerate in the direction of the sprite's rotation, with a speed of 0.1, if the up arrow key is held down.

+

You can modify the image_angle variable to turn the instance.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Movement/Move_And_Collide.htm b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Movement/Move_And_Collide.htm new file mode 100644 index 000000000..8e4e434ab --- /dev/null +++ b/Manual/contents/Drag_And_Drop/Drag_And_Drop_Reference/Movement/Move_And_Collide.htm @@ -0,0 +1,87 @@ + + + + + + Move And Collide + + + + + + + + + + +

Wrap Around Room Icon Move And Collide

+

This action moves the instance by the given distance on the X and Y axes, while avoiding the given object(s).

+

It allows your instance to move while navigating slopes or small steps that would otherwise prevent it from being able to move.

+

The "Iterations" argument is the number of steps it takes to get to the target position. Collisions with the given object are checked after each step.

+

For more details on how this works, see the GML Code version: move_and_collide.

+

 

+

Action Syntax:

+

Wrap Around Room Action

+

Arguments:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentDescription
ObjectThe object or instance ID to avoid (such as a wall object). You can click the  icon to add multiple objects to check collisions with.
X DistThe number of pixels to move on the X axis (horizontally)
Y DistThe number of pixels to move on the Y axis (horizontally)
IterationsThe number of steps to take to get to the target position (default is 4)
X OffsetThe x component of the direction in which to move in case of a collision; specify 0 to use the default behaviour (perpendicular direction of movement)
Y OffsetThe y component of the direction in which to move in case of a collision; specify 0 to use the default behaviour (perpendicular direction of movement)
Max X MovementThe maximum speed the instance should move on the X axis; specify -1 for no limit
Max Y MovementThe maximum speed the instance should move on the Y axis; specify -1 for no limit
+

 

+

Example:

+

Warp Around Room ExampleThis checks if the left arrow key is held, and in that case it moves the instance left by 2 pixels while checking for collisions with obj_wall.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Overview/Script_Functions.htm b/Manual/contents/GameMaker_Language/GML_Overview/Script_Functions.htm index cb989d9c8..17bc78efc 100644 --- a/Manual/contents/GameMaker_Language/GML_Overview/Script_Functions.htm +++ b/Manual/contents/GameMaker_Language/GML_Overview/Script_Functions.htm @@ -137,8 +137,7 @@

Noms de script et noms de fonction


indirectCall(method(undefined, myscript), arg);

- // OR
-
+ // 2
function indirectCall(func, arg)
{
    script_execute(func, arg);
diff --git a/Manual/contents/GameMaker_Language/GML_Overview/Structs/Static_Structs.htm b/Manual/contents/GameMaker_Language/GML_Overview/Structs/Static_Structs.htm new file mode 100644 index 000000000..2e8c2c894 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Overview/Structs/Static_Structs.htm @@ -0,0 +1,81 @@ + + + + + + Static Struct + + + + + + + + + + +

Static Struct

+

Every function has a "static struct", where its static variables are stored. You can get that struct using static_get:

+

function counter() {
+     static count = 0;
+     return count ++;
+ }
+
+ repeat (10) counter()
+
+ // Get static struct of counter()
+ var _static_counter = static_get(counter);
+
+ // Both of these read the same variable
+ show_debug_message(counter.count); // 10
+ show_debug_message(_static_counter.count); // 10 +

+

This is also true for constructor functions. Each constructor has a static struct, where its static variables and static methods are stored.

+

Every struct created from the constructor accesses its static variables from that static struct.

+

Static Chain

+

When you use constructor inheritance, those constructors form a "static chain" - a chain of static structs where each child links to its parent.

+

For example, let's say you have a constructor item, and a constructor potion which is a child of item:

+

function item() constructor {}
+
+ function potion() : item() constructor {}
+
+ var _potion = new potion(); +

+

You can get the static struct of potion using static_get(potion) - this is where the static variables for potion are stored. Let's call this static_potion.

+

Now, if you call static_get(static_potion), you will get the static struct for item! This is the same struct you would get from static_get(item).

+

function item () constructor {}
+ function potion () : item () constructor {}
+
+ var _potion = new potion();
+ var _static_potion = static_get(potion);
+
+ show_debug_message(static_get(item) == static_get(_static_potion)); // true (1) +

+

This is because item is the parent of the potion constructor, so the static struct for item is linked to the static struct for potion.

+

Checking Inheritance

+

You can use is_instanceof to check if a struct belongs to the given constructor, or has the constructor as a parent.

+

This is done by checking if your struct has the given constructor's static struct anywhere in its static chain.

+
+

Changing The Static Struct

+

The function static_set is provided to let you change the static struct of a function (constructor or not). This way you can change what static variables are available to a constructor and its structs, and also change the "static chain" that a constructor belongs to.

+

The recommended use-case for this function is deserialisation. If you're loading structs from JSON, those structs won't belong to any constructors, however you can change that by using static_set to "apply" a constructor to a struct, so that that struct receives its shared static variables and you can run is_instanceof to check its kind.

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Overview/Variables/Global_Variables.htm b/Manual/contents/GameMaker_Language/GML_Overview/Variables/Global_Variables.htm index 6ba786dd5..bbbe58383 100644 --- a/Manual/contents/GameMaker_Language/GML_Overview/Variables/Global_Variables.htm +++ b/Manual/contents/GameMaker_Language/GML_Overview/Variables/Global_Variables.htm @@ -24,19 +24,19 @@

Variables globales

Avec les variables globales, nous pouvons changer les valeurs et voir ces changements se refléter dans toutes les instances des objets qui font référence à cette variable. Comme pour les variables locales, vous devez veiller à ne pas nommer vos variables globales de la même manière que les variables d'instance, car cela pourrait vous poser des problèmes et faire apparaître des bogues dans vos jeux en raison du chevauchement des variables, ce qui peut parfois s'avérer difficile à déboguer. En général, vous devriez avoir un seul objet qui déclare toutes vos variables globales au tout début du jeu (par exemple, dans l'événement Room Start du premier objet placé dans la première pièce du jeu) ou une seule fonction de script qui les déclare toutes ensemble, car cela vous donne un endroit pratique pour revenir en arrière et tout référencer en même temps si vous avez besoin de vérifier un nom de variable ou de modifier une valeur.

GameMaker possède également une collection de variables globales "intégrées". Vous devez donc les connaître car vous pouvez donner le même nom à l'une de vos variables d'instance ou souhaiter avoir votre propre variable globale avec le même nom et vous demander pourquoi vous obtenez des erreurs ! Elles sont cependant faciles à repérer, car elles sont affichées dans une couleur différente dans l'éditeur de code et apparaissent également dans la barre d'autocomplétion en bas de la page. La majorité des variables globales intégrées ont des utilisations très spécifiques et sont répertoriées dans les sections appropriées du manuel - cependant, il y en a deux importantes qui sont utilisées fréquemment et qui ne sont pas répertoriées ailleurs :

Il existe également trois variables globales construites et dépréciées dont vous devez être conscient (ces variables sont uniquement conçues pour prendre en charge les projets hérités des versions précédentes de GameMaker et doivent être utilisées dans le cadre de la mise en œuvre du projet). ne pas être utilisé dans les nouveaux projets) :

Enfin, il existe deux variables qui peuvent être utilisées pour les fonctions et méthodes de script :

La forme suivante peut également être utilisée pour déclarer des variables globales, mais elle est inclus uniquement pour la rétrocompatibilitéet il n'est pas recommandé d'utiliser ce formulaire pour les nouveaux projets, car les futures versions de GameMaker pourraient ne pas le prendre en charge.

La deuxième façon de créer des variables globales consiste à les déclarer en tant que telles à l'aide de la déclaration globalvar, tout comme vous le feriez pour une variable locale à l'aide de la déclaration var.

diff --git a/Manual/contents/GameMaker_Language/GML_Overview/Variables/Instance_Variables.htm b/Manual/contents/GameMaker_Language/GML_Overview/Variables/Instance_Variables.htm index 5124cb1ee..5bef3ba56 100644 --- a/Manual/contents/GameMaker_Language/GML_Overview/Variables/Instance_Variables.htm +++ b/Manual/contents/GameMaker_Language/GML_Overview/Variables/Instance_Variables.htm @@ -49,5 +49,5 @@
Copyright YoY - - \ No newline at end of file + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_ids.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_ids.htm new file mode 100644 index 000000000..a49d9dbfd --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/asset_get_ids.htm @@ -0,0 +1,68 @@ + + + + + + asset_get_ids + + + + + + + + + + +

asset_get_ids

+

This function gets an array of references to assets of the given asset type.

+

 The returned array contains assets that you added through The Asset Browser as well as assets that you added dynamically at runtime.

+

 For the asset type asset_script the function returns both script assets (the ones you add to The Asset Browser) and the script functions they contain.

+

 

+

Syntax:

+

asset_get_ids(asset_type);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
asset_typeAsset Type ConstantThe type of asset to return in the array
+

 

+

Returns:

+

Array of Asset

+

 

+

Example:

+

var _arr_ids = asset_get_ids(asset_sprite);

+

The code above gets all sprites in the game at the time the function is called and stores them in a temporary variable _arr_ids. Sprites that you added before using the sprite_add_* functions are also included.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/tag_get_assets.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/tag_get_assets.htm index 08e6bea09..ca50f7748 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/tag_get_assets.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Assets_And_Tags/tag_get_assets.htm @@ -4,7 +4,7 @@ tag_get_assets - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm index 41f62d6d9..4fe40da21 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm @@ -4,7 +4,7 @@ Audio - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioBus.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioBus.htm new file mode 100644 index 000000000..9ab02f4cf --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioBus.htm @@ -0,0 +1,74 @@ + + + + + AudioBus Struct + + + + + + + + + + + +

AudioBus Struct

+

The AudioBus Struct struct stores information about an audio bus in GameMaker and is used to access it.

+

An audio bus is what GameMaker uses to process the audio that it plays.

+

The main audio bus always exists and can be accessed through the built-in struct audio_bus_main. A new bus can be created from audio_bus_create.

+
+

Struct Members

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MemberTypeDescription
bypassBooleanWhether the bus should be bypassed.
+ This passes the audio input through the bus to the output, bypassing all effects and gain scaling.
gainRealThe gain value applied to the output of the bus (0-1).
effectsArray of AudioEffect Struct structsThis allows access to the audio effects on the bus.
+ You can set, get and rearrange effects by manipulating this array.
+ The array size is fixed to 8, allowing a maximum of 8 effects. Attempting to access an out-of-range index throws an error.
+ Effect slots can be cleared by assigning undefined to them.
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioEffect.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioEffect.htm new file mode 100644 index 000000000..1e6a06eb4 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioEffect.htm @@ -0,0 +1,587 @@ + + + + + + AudioEffect Struct + + + + + + + + + + + + +

AudioEffect Struct

+

An AudioEffect struct stores the parameters used by an audio effect. You can change these values to adjust the effect in real-time.

+

This struct must be created using the audio_effect_create function. The parameters that are available in the struct depend on the type of audio effect that you pass to the function (see AudioEffectType Enum).

+
+

 All gain parameters are linear gains and range from 0 to infinity; values from 0 to 1 indicate a decrease in gain, values from 1 to infinity an increase. They can be converted to dB and back using lin_to_db and db_to_lin.

+

All structs of this type have a type and bypass property. All other properties are specific to certain types of effects.

+

Below is a list of struct members depending on the type of effect created.

+

Reverb (AudioEffectType.Reverb1)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.Reverb1 for Reverb.
bypassBooleanWhether the effect should be bypassed (ignored).
sizeRealThe size of the space [range: 0.0 - 1.0].
+
+ Larger sizes mean more reflections and a longer reverberation. +
dampRealThe amount that higher frequencies should be attenuated [range: 0.0 - 1.0].
mixRealThe proportion of the original/reverberated signal in the output [range: 0.0 - 1.0].
+
+ A value of 0.0 gives 100% of the original signal, a value of 1.0 gives 100% of the reverberated signal. A value of 0.5 results in 50% of the original and 50% of the reverberated signal.
+

Delay (AudioEffectType.Delay)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.Delay for Delay.
bypassBooleanWhether the effect should be bypassed (ignored).
timeRealThe length of the delay (in seconds).
feedbackRealThe proportion of the delayed signal which is fed back into the delay line [range: 0.0 - 1.0].
mixRealThe proportion of the original/delayed signal in the output [range: 0.0 - 1.0].
+
+ A value of 0.0 gives 100% of the original signal, a value of 1.0 gives 100% the delayed signal. A value of 0.5 results in 50% of the original and 50% of the delayed signal.
+

Distortion (AudioEffectType.Bitcrusher)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.Bitcrusher for Distortion.
bypassBooleanWhether the effect should be bypassed (ignored).
gainRealThe input gain going into the effect. There is a hard clipper (clipping at ±1.0) directly after this stage.
factorRealThe factor by which the original signal is downsampled [range: 0.0 - 100.0].
+
+ This is rounded down to an integer.
resolutionRealThe bit depth at which the signal is resampled [range: 1.0 - 16.0].
+
+ This is rounded down to an integer.
mixRealThe proportion of the original/distorted signal in the output [range: 0.0 - 1.0].
+
+ A value of 0.0 gives 100% of the original signal, a value of 1.0 gives 100% the distorted signal. A value of 0.5 results in 50% of the original and 50% of the distorted signal.
+

LPF (AudioEffectType.LPF2)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.LPF2 for LPF.
bypassBooleanWhether the effect should be bypassed (ignored).
cutoffRealThe cutoff frequency of the filter. Frequencies higher than the cutoff will be attenuated.
qRealThe quality factor of the filter [range: 1.0 - 100.0].
+
+ This is a dimensionless parameter which indicates how peaked (in gain) the frequency is around the cutoff. The greater the value, the greater the peak. +
+

HPF (AudioEffectType.HPF2)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.HPF2 for HPF.
bypassBooleanWhether the effect should be bypassed (ignored).
cutoffRealThe cutoff frequency of the filter. Frequencies lower than the cutoff will be attenuated.
qRealThe quality factor of the filter [range: 1.0 - 100.0].
+
+ This is a dimensionless parameter which indicates how peaked (in gain) the frequency is around the cutoff. The greater the value, the greater the peak. +
+

Gain (AudioEffectType.Gain)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.Gain for Gain.
bypassBooleanWhether the effect should be bypassed (ignored).
gainRealThe gain value applied to the input signal.
+

Tremolo (AudioEffectType.Tremolo)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.Tremolo for Tremolo.
bypassBooleanWhether the effect should be bypassed (ignored).
rateRealThe frequency of the LFO modulating the gain (0.0-20.0 Hz)
intensityRealThe proportion of the input signal which should be modulated by the LFO (0.0-1.0). Put differently, it is the proportion (or fraction) of the signal's/sample's amplitude that is affected by the LFO.
offsetRealThe proportion of a waveform's period that the right-hand channel's LFO should be offset by compared to the left-hand channel (0.0-1.0) At a value of 0.0 and 1.0 the left-hand and right-hand channel's LFO waveforms coincide (because the shape is periodic, i.e. repeats)
shapeAudioLFOType EnumThe waveform shape that the LFO should output.
+

EQ (AudioEffectType.EQ)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.EQ for EQ.
bypassBooleanWhether the effect should be bypassed (ignored).
locutAudioEffect StructA filter of type AudioEffectType.HPF2.
loshelfAudioEffect StructA filter of type AudioEffectType.LoShelf.
eq1AudioEffect StructA filter of type AudioEffectType.PeakEQ.
eq2AudioEffect StructA filter of type AudioEffectType.PeakEQ.
eq3AudioEffect StructA filter of type AudioEffectType.PeakEQ.
eq4AudioEffect StructA filter of type AudioEffectType.PeakEQ.
hishelfAudioEffect StructA filter of type AudioEffectType.HiShelf.
hicutAudioEffect StructA filter of type AudioEffectType.LPF2.
+

PeakEQ (AudioEffectType.PeakEQ)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.PeakEQ for the Peak EQ Filter.
bypassBooleanWhether the effect should be bypassed (ignored).
freqRealThe frequency (in Hz) of the filter [range: 10 - 20,000]*. This represents the centre frequency of the peak.
+
+  *The upper limit is either 20,000 or half of the audio device's sample rate, whichever is lower. +
qReal The quality factor of the filter [range: 1.0 - 100.0]. This is a dimensionless parameter which narrows the peak created, so that a smaller range of frequencies around the centre frequency are affected. The greater the value, the narrower the peak.
gainRealThe linear gain applied to the centre frequency [range: 0.0 - inf]. Frequencies around the centre frequency will also have a gain applied, which reduces depending on the quality factor and distance from the centre frequency. A gain lower than 1 represents a decrease in volume.
+

HiShelf (AudioEffectType.HiShelf)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.HiShelf for the HiShelf Filter.
bypassBooleanWhether the effect should be bypassed (ignored).
freqRealThe frequency (in Hz) of the filter [range: 10 - 20,000]*. This represents the midpoint of the shelf's slope.
+
+ Frequencies higher than this value will have a constant gain applied.
+
+  *The upper limit is either 20,000 or half of the audio device's sample rate, whichever is lower. +
qReal The quality factor of the filter [range: 1.0 - 100.0]. This is a dimensionless parameter which increases the steepness of the filter's slope, at the cost of some resonance at frequencies around the top of the shelf's slope. The greater the value, the steeper the slope, and the greater the resonance.
gainRealThe linear gain applied to frequencies in the shelf [range 0.0 - inf]. A gain lower than 1 represents a decrease in volume.
+

LoShelf (AudioEffectType.LoShelf)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.LoShelf for the LoShelf Filter.
bypassBooleanWhether the effect should be bypassed (ignored).
freqRealThe frequency (in Hz) of the filter [range: 10 - 20,000]*. This represents the midpoint of the shelf's slope.
+
+ Frequencies lower than this value will have a constant gain applied.
+
+  *The upper limit is either 20,000 or half of the audio device's sample rate, whichever is lower. +
qReal The quality factor of the filter [range: 1.0 - 100.0]. This is a dimensionless parameter which increases the steepness of the filter's slope, at the cost of some resonance at frequencies around the top of the shelf's slope. The greater the value, the steeper the slope, and the greater the resonance.
gainRealThe linear gain applied to frequencies in the shelf [range 0.0 - inf]. A gain lower than 1 represents a decrease in volume.
+

Compressor (AudioEffectType.Compressor)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDescription
typeAudioEffectType EnumA read-only property that stores the type of audio effect stored in this struct. It is set to AudioEffectType.Compressor for a Compressor effect.
bypassBooleanWhether the effect should be bypassed (ignored).
ingainRealThe gain scalar applied to the input signal [range: 0 - inf]. This allows audio to be pushed into the compression threshold.
thresholdRealThe amplitude level above which the compressor will begin to apply gain reduction [range: 0.001 - 1].
ratioRealThe ratio by which audio that exceeds the threshold is reduced [range: 1 - inf]. The compression ratio applied is ratio : 1.
attackRealThe responsiveness (in seconds) of the compressor in compressing audio above the threshold [range: 0.001 - 0.1].
releaseRealThe responsiveness (in seconds) of the compressor in stopping compressing audio below the threshold [range: 0.01 - 1].
outgainRealThe gain scalar applied to the output signal [range: 0 - inf]. This allows compensating for the overall level reduction caused by the compression process.
+

 

+

 

+ + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioEffectType.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioEffectType.htm new file mode 100644 index 000000000..82302436d --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioEffectType.htm @@ -0,0 +1,76 @@ + + + + + + + AudioEffectType Enum + + + + + + + + + + + +

AudioEffectType Enum

+

This is one of the built-in Enums that GameMaker provides. Pass a value from this Enum to audio_effect_create to determine the type of audio effect that you want to create.

+

Below is a list of audio effects that are currently available to choose from. See AudioEffect Struct for the parameters you can set for each effect.

+

AudioEffectType.Bitcrusher

+

This is a bitcrusher effect to create distortion. It does this in four steps (or stages), that take place in the following order: 

+

Gain  Clipper  Sample rate reduction  Resolution reduction

+

First the gain factor is applied to the input signal.

+

The resulting signal is then clipped between -1 and 1 (essentially doing clamp on every sample). This is the first step that introduces distortion.

+

Next, sample rate reduction reduces the quality of the audio by downsampling it. This leads to distortion.

+

Resolution reduction reduces the quality of the audio by decreasing the number of bits to represent a sample. As there are less bits to store the same value, some information is lost. This also leads to distortion.

+

AudioEffectType.Delay

+

This is a delay effect, which delays the input signal by a given amount of time and mixes this delayed version with the original signal.

+

AudioEffectType.Gain

+

This is a gain effect, which amplifies the input signal by the given gain factor.

+
+

AudioEffectType.HPF2

+

This is a high-pass filter (shortened to HPF). A filter is used for filtering out certain frequencies.

+

A high-pass filter lets higher frequencies pass and mutes lower frequencies. The frequency at which this happens is called the cutoff frequency. All frequencies below this frequency are filtered.

+

A whistle at a high pitch is an example of a high frequency.

+

AudioEffectType.LPF2

+

This is a low-pass filter (shortened to LPF). A filter is used for filtering out certain frequencies.

+

A low-pass filter lets lower frequencies pass and mutes higher frequencies. The frequency at which this happens is called the cutoff frequency. All frequencies above this frequency are filtered.

+

Bass and drum kicks are typically low frequencies in audio.

+

AudioEffectType.Reverb1

+

This is a reverb effect. It combines the original signal with a reverberated version of it. High frequencies can be dampened (reduced).

+

A reverb effect is typically used to change the environment in which the audio is heard. You can configure reverb to make the environment appear anywhere between a small room and a grand hall or a vast open space.

+

AudioEffectType.Tremolo

+

This is a tremolo effect. It makes use of an LFO (Low-Frequency Oscillator) to modulate audio effect parameters at audio rates (as opposed to game-frame rates).

+

A tremolo effect changes the amplitude of a sound.

+

AudioEffectType.EQ

+

This is a Parametric EQ (equalizer) effect. It combines multiple filters, each at a different frequency, to modify the frequency content of audio.

+

This effect contains a high-pass, a low-pass, 4 peak EQs, a high-shelf and a low-shelf filter.

+

Here is an example of how this allows you to control frequencies:

+

+

AudioEffectType.PeakEQ

+

This filter creates a peak or a dip in the spectrum by a specified gain around a specified centre frequency.

+

AudioEffectType.HiShelf

+

This filter passes all frequencies, but increases or reduces frequencies above the shelf frequency by a specified gain.

+

AudioEffectType.LoShelf

+

This filter passes all frequencies, but increases or reduces frequencies below the shelf frequency by a specified gain.

+

AudioEffectType.Compressor

+

This is a compressor effect. It reduces the dynamic range of the audio going into it, resulting in an output with smaller level differences.

+

This effect performs downward compression, which reduces the volume of loud sounds above a certain threshold. The quiet sounds below the threshold remain unaffected.

+

The audio channels are linked when evaluating the input signal's current level. This means that each channel will have the same gain reduction applied to it. This is done in order to prevent image shifting changing the user's localisation of positioned audio.

+

 

+

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioLFOType.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioLFOType.htm new file mode 100644 index 000000000..2fe910296 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/AudioLFOType.htm @@ -0,0 +1,92 @@ + + + + + + AudioLFOType Enum + + + + + + + + + + +

AudioLFOType Enum

+

This built-in enum contains the possible LFO types to select when using an audio effect that is modulated by an LFO.

+

LFO stands for Low-Frequency Oscillation. Similarly, the thing that oscillates, i.e. goes up and down according to a certain shape, is called a Low-Frequency Oscillator. An LFO outputs a shape that repeats indefinitely; the shape is periodic (after a certain period the same shape returns)

+

In audio processing an LFO is used to modulate audio effect parameters at audio rates (as opposed to game-frame rates)

+

You could do this yourself through code, e.g. change the gain value of sound instances, but this will only happen as many times per second as the game speed that you set (see game_set_speed). If e.g. the game speed is set to 60 then an update will happen 60 times per second.

+

On the other hand, the audio that GameMaker plays has a much higher frequency (e.g. 44100, 48000, etc.). This means that a sample is played 44100 times a second or 48000 times a second. An LFO updates the parameter with every sample that is played instead of only a couple of times per second.

+

 An LFO outputs a signal at a low frequency (0-20Hz) but calculates/updates the value at a high frequency (the audio's frequency, e.g. 44100 or 48000).

+

GameMaker has a few built-in Audio LFO types (or shapes): 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Audio LFO Types/Shapes
SineSquareTriangleSawtoothInverse Sawtooth
AudioLFOType.SineAudioLFOType.SquareAudioLFOType.TriangleAudioLFOType.SawtoothAudioLFOType.InvSawtooth
+

AudioLFOType.InvSawtooth

+

This LFO type outputs an inverse sawtooth shape. The shape looks like this: 

+

+

AudioLFOType.Sawtooth

+

This LFO type outputs a sawtooth shape. The shape looks like this: 

+

+

AudioLFOType.Sine

+

This LFO type outputs a sine shape (sin). The shape looks like this: 

+

+

AudioLFOType.Square

+

This LFO type outputs a square shape. The shape looks like this: 

+

+

AudioLFOType.Triangle

+

This LFO type outputs a triangle shape. The shape looks like this: 

+

+

 

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/Audio_Effects.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/Audio_Effects.htm new file mode 100644 index 000000000..2f4b8d712 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/Audio_Effects.htm @@ -0,0 +1,102 @@ + + + + + + + Audio Effects + + + + + + + + + + + +

Audio Effects

+

GameMaker offers a selection of audio effects, such as reverb, delay, bitcrusher, parametric EQ, etc.

+

Sounds are always played through "buses". All sounds in GameMaker are played through its main bus.

+

Effects are applied on buses. GameMaker allows you to:

+
    +
  • Apply effects to the main bus, hence applying effects to all sounds
  • +
  • Create a custom bus and apply effects to that bus + +
  • +
+

Setting Up Audio Effects

+

Audio Buses

+

Audio effects are processed on an "audio bus".

+

GameMaker has one audio bus by default, the main audio bus, which you can access through the built-in audio_bus_main struct.

+

All audio that you play in GameMaker ends up on this audio bus, whether that is 2D audio, 3D audio or emitter audio. This is referred to as all audio being routed to the main bus.

+

You can create your own bus to apply effects to a few sounds. All custom buses are routed to the main bus, so the parameters and effects on the main bus are applied to all other buses.

+

 An audio bus can have a maximum of 8 effects assigned to its effects array. Set a slot to undefined to remove an effect.

+

Adding effects to the main bus

+

The quickest way to apply effects to all audio is by adding them to the main bus: 

+

var _ef_reverb = audio_effect_create(AudioEffectType.Reverb1);
+ _ef_reverb.size = 0.6;
+ _ef_reverb.mix = 0.5;
+ audio_bus_main.effects[0] = _ef_reverb;

+

This first creates a new audio effect of type AudioEffectType.Reverb1. Its parameters are then set by directly setting the members of the returned AudioEffect Struct.

+

The size of the reverb effect is set to 0.6 and the mix value to 0.5 (how much of the effect can be heard from 0-1, similar to lerp).

+

The effect is then assigned to the main audio bus's effects array. Assigning the effect to a slot in the array enables the effect.

+

 Because the effect is processed from the moment it's assigned, it's good practice to first set the effect's parameters and only then assign the effect to the effects array. This will make sure that no transition from no effect to an audible effect occurs.

+

Bypassing Effects

+

Sometimes you might want to turn off individual effects or turn off all effects on a bus. You can do this by setting bypass for an effect or a bus to true

+

// Bypassing an effect
+ audio_bus_main.effects[0].bypass = true;

+

// Bypassing all effects on a bus
+ audio_bus_main.bypass = true;

+

Setting bypass to true means that what comes out of the bus or effect is the same as what goes in -- the input is the output.

+

For a single effect this means that this effect is skipped, for a bus this means that all effects on the bus are skipped.

+

Applying Effects To Audio Emitters

+

By default audio emitters output directly to the main bus, so the audio that is played on an emitter will end up there and have the same effects applied as all other audio.

+

You can add effects to an audio emitter by creating a new audio bus using audio_bus_create and assigning it to the emitter using audio_emitter_bus

+

emitter = audio_emitter_create(); // Emitter is created
+ emitter_bus = audio_bus_create(); // Bus is created
+ audio_emitter_bus(emitter, emitter_bus); // Emitter is assigned to bus

+

Assigning an emitter to a bus will make the emitter output to that bus. You can assign any number of emitters to a bus.

+

Any audio output on a bus created using audio_bus_create still ends up on GameMaker's main audio bus.

+

This means that you can apply a delay effect to all sounds that are played on an emitter, and a reverb effect on the main audio bus. Audio that is played on the emitter is processed by the audio bus assigned to it so it will be heard with the delay effect from the emitter bus and the reverb effect from the main bus. Audio that is played directly on the main bus will only have the reverb effect applied.

+

To get the audio bus that is assigned to an emitter, use audio_emitter_get_bus.

+

 As previously mentioned, audio can only be processed on a different bus than the main bus by playing it on an emitter (using audio_play_sound_on).

+

Multiple Assignment of Audio Effects

+

A single audio effect struct returned by audio_effect_create can be assigned to multiple effect slots (either on the same bus or on different buses): 

+

ef_lpf = audio_effect_create(AudioEffectType.LPF2, {cutoff: 300, q: 1.5});
+
+ bus_1.effects[0] = ef_lpf;
+ bus_1.effects[4] = ef_lpf;
+ bus_2.effects[0] = ef_lpf; +

+

For each of these assignments a new effect is instantiated. You could compare this to Objects And Instances; the struct returned by audio_effect_create returns an "object" and every assignment creates a new "instance" of it. The "instance" is that what actually processes the audio for the effect slot it is assigned to. Each effect slot gets its own "instance" of the effect.

+

When you make changes to any of the variables of the ef_lpf struct here, the effect's parameters will change accordingly on bus_1.effects[0], bus_1.effects[4] and bus_2.effects[0].

+

Platform Limitations

+

When targeting HTML5, audio buses and effects functionality will be limited in the following situations: 

+
    +
  • The game is running on iOS Safari (due to a significant bug in WebKit).
  • +
  • The game is running in an insecure context (in which audio worklets are not available). An example of this would be using your phone to access a locally-hosted game on the same network.
  • +
+

In these situations audio buses and effects functions, enums and structs can still be used without generating GML errors, but they will mostly have no audible effect (the exception to this being audio bus gain and bus routing).

+

Code Reference

+
+

See Also (placeholder)

+
    +
  1. Topic List
  2. +
+
+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_clear_emitters.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_clear_emitters.htm new file mode 100644 index 000000000..558a0f611 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_clear_emitters.htm @@ -0,0 +1,67 @@ + + + + + + audio_bus_clear_emitters + + + + + + + + + + +

audio_bus_clear_emitters

+

This function clears the list of all audio emitters on the given bus and relinks them to the main bus.

+

 A bus that has no emitters linked to it is not processed.

+

 

+

Syntax:

+

audio_bus_clear_emitters(bus);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
busAudioBus StructThe bus of which to clear the emitters
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

audio_bus_clear_emitters(bus1);

+

The above code clears all emitters linked to an existing audio bus bus1, reassigning them to the main audio bus audio_bus_main.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_create.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_create.htm new file mode 100644 index 000000000..4d458ada5 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_create.htm @@ -0,0 +1,53 @@ + + + + + + audio_bus_create + + + + + + + + + + + +

audio_bus_create

+

This function creates a new audio bus and returns an AudioBus Struct through which you can access and modify it.

+

 A user-created audio bus will be garbage collected when it's unreferenced and any linked emitters are destroyed, and as such there is no "destroy" or "free" function for audio buses.

+

 

+

Syntax:

+

audio_bus_create();

+

 

+

Returns:

+

AudioBus Struct

+

 

+

Example:

+

emitter1 = audio_emitter_create();
+ emitter1_bus = audio_bus_create();
+ audio_emitter_bus(emitter1, emitter1_bus);
+ audio_play_sound_on(emitter1, snd_Ambience, true, 100);

+

The above code first creates a new audio emitter and a new audio bus. It then assigns the emitter to the bus, and plays a sound on the emitter.

+

The sound will have any effects from emitter1_bus applied first and then the ones fromaudio_bus_main.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_get_emitters.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_get_emitters.htm new file mode 100644 index 000000000..08ae23573 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_get_emitters.htm @@ -0,0 +1,67 @@ + + + + + + audio_bus_get_emitters + + + + + + + + + + +

audio_bus_get_emitters

+

This function returns an array of the Audio Emitters that are connected to the given AudioBus Struct.

+

 To get the audio bus that an audio emitter is connected to, use audio_emitter_get_bus.

+

 

+

Syntax:

+

audio_bus_get_emitters(bus);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
busAudioBus StructThe audio bus to get the connected emitters from
+

 

+

Returns:

+

Array of Audio Emitter ID

+

 

+

Example:

+

var _emitters = audio_bus_get_emitters(bus_fx);

+

The above code calls audio_bus_get_emitters to get the emitters connected to an audio bus bus_fx. The returned array is stored in a temporary variable _emitters.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_main.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_main.htm new file mode 100644 index 000000000..27701a344 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_bus_main.htm @@ -0,0 +1,51 @@ + + + + + + audio_bus_main + + + + + + + + + + + +

audio_bus_main

+

This built-in struct represents the main audio bus used by GameMaker.

+

The main bus represents the main mix in GameMaker's audio, which is the combination of all currently active sound sources after they have been processed (to apply effects, positioning, doppler effect etc.) and all emitters. All of GM's audio ends up on this bus.

+

Any audio effect that you apply to the main bus will be heard on all sounds, as all buses are routed to this one.

+

 

+

Syntax:

+

audio_bus_main

+

 

+

Returns:

+

AudioBus Struct

+

 

+

Example:

+

var _ef_reverb = audio_effect_create(AudioEffectType.Reverb1);
+ audio_bus_main.effects[0] = _ef_reverb;

+

The above code first creates a new audio effect and stores it in a temporary variable _ef_reverb. It then assigns this new effect as the first effect on the main audio bus's effects array.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_effect_create.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_effect_create.htm new file mode 100644 index 000000000..00df6388c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Effects/audio_effect_create.htm @@ -0,0 +1,86 @@ + + + + + + audio_effect_create + + + + + + + + + + + +

audio_effect_create

+

This function creates a new audio effect and returns the AudioEffect Struct through which you can access and modify it. Alternatively, you can pass a struct to the function to immediately initialise the effect's parameters.

+

For a list of possible audio effects that you can create, see AudioEffectType Enum.

+

The members of the returned struct are dependent on the type of audio effect created. For all possible audio effect structs, see: AudioEffect Struct

+

 

+

Syntax:

+

audio_effect_create(type, [params]);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
typeAudioEffectType EnumThe type of audio effect to create (e.g. AudioEffectType.Reverb1)
paramsStruct  The parameters of the audio effect (see AudioEffect Struct for the available parameters)
+

 

+

Returns:

+

AudioEffect Struct

+

 

+

Example 1:

+

var _ef_distortion = audio_effect_create(AudioEffectType.Bitcrusher);
+ _ef_distortion.gain = 1.1;
+ _ef_distortion.factor = 20;
+ _ef_distortion.resolution = 8;
+ _ef_distortion.mix = 0.5;
+ audio_bus_main.effects[0] = _ef_distortion;

+

The above code first creates a new distortion effect of type AudioEffectType.Bitcrusher using audio_effect_create. It then configures the effect by setting the effect's parameters.

+

Finally it assigns the effect to the main audio bus, which starts processing the effect.

+

 

+

Example 2:

+

audio_bus_main.effects[0] = audio_effect_create(AudioEffectType.Bitcrusher, {
+     gain: 1.1, factor: 20, resolution: 8, mix: 0.5
+ });

+

The above code first creates a new distortion effect, like in Example 1, and immediately initialises its parameters by passing a struct that contains values for some of its parameters.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_bus.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_bus.htm new file mode 100644 index 000000000..91175424a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_bus.htm @@ -0,0 +1,77 @@ + + + + + audio_emitter_bus + + + + + + + + + + + +

audio_emitter_bus

+

This function connects an audio emitter to a bus.

+

This will cause all output of the emitter to be sent to the given bus. All effects on the bus will be applied to the emitter's output.

+

You can assign any number of emitters to a bus.

+

 

+

Syntax:

+

audio_emitter_bus(emitter, bus);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
emitterAudio Emitter IDThe audio emitter
busAudioBus StructThe audio bus to which the emitter is assigned
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

emitter = audio_emitter_create();
+ var _new_bus = audio_bus_create();
+ audio_emitter_bus(emitter, _new_bus); +

+

The above code first creates an audio emitter, and then an audio bus using audio_bus_create. It assigns the emitter to the new bus using audio_emitter_bus.

+

You can reset an emitter's bus configuration by assigning it back to audio_bus_main.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_get_bus.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_get_bus.htm new file mode 100644 index 000000000..92271e232 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_emitter_get_bus.htm @@ -0,0 +1,68 @@ + + + + + audio_emitter_get_bus + + + + + + + + + + + +

audio_emitter_get_bus

+

This function returns the bus that an audio emitter is connected to.

+

By default audio emitters are connected to the main audio bus, accessed through audio_bus_main. If the emitter had a different audio bus assigned using audio_emitter_bus, it will return that bus's struct.

+

 

+

Syntax:

+

audio_emitter_get_bus(emitter);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
emitterAudio Emitter IDThe emitter to get the bus for
+

 

+

Returns:

+

AudioBus Struct

+

 

+

Example:

+

var bus = audio_emitter_get_bus(emitter);
+ show_debug_message(bus);

+

The above code first stores the bus assigned to an emitter in a temporary variable bus. It then displays the contents of the returned AudioBus Struct struct in a debug message.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.htm index 5d0c23c6d..8512ea1b7 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Emitters/audio_play_sound_on.htm @@ -4,7 +4,7 @@ audio_play_sound_on - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_get_assets.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_get_assets.htm new file mode 100644 index 000000000..2304a3f5a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_get_assets.htm @@ -0,0 +1,66 @@ + + + + + + audio_group_get_assets + + + + + + + + + + +

audio_group_get_assets

+

This function returns an array containing the sound asset IDs belonging to the audio group with the given ID.

+

 

+

Syntax:

+

audio_group_get_assets(group_index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
group_indexAudio Group IDThe index of the audio group
+

 

+

Returns:

+

Array of Sound Asset

+

 

+

Example:

+

var _assets = audio_group_get_assets(audiogroup_default);

+

In the above code, an array containing all asset IDs in the default audio group audiogroup_default is returned by a call to audio_group_get_assets and stored in a temporary variable _assets.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_get_gain.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_get_gain.htm new file mode 100644 index 000000000..ac6230efa --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_group_get_gain.htm @@ -0,0 +1,66 @@ + + + + + + audio_group_get_gain + + + + + + + + + + +

audio_group_get_gain

+

This function returns the gain of the audio group with the given ID.

+

 

+

Syntax:

+

audio_group_get_gain(groupID);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
groupIDAudio Group IDThe ID of the audio group
+

 

+

Returns:

+

Real (the gain of the audio group)

+

 

+

Example:

+

var _default_group_gain = audio_group_get_gain(audiogroup_default);

+

This gets the gain of the default audio group and stores it in a variable.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_sound_get_audio_group.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_sound_get_audio_group.htm new file mode 100644 index 000000000..b0a48f75d --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audio_sound_get_audio_group.htm @@ -0,0 +1,66 @@ + + + + + + audio_sound_get_audio_group + + + + + + + + + + +

audio_sound_get_audio_group

+

This function returns the ID of the audio group the given sound asset or sound instance belongs to.

+

 

+

Syntax:

+

audio_sound_get_audio_group(sound_index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
sound_indexSound Asset or Sound Instance IDThe index of a sound asset or instance
+

 

+

Returns:

+

Audio Group ID

+

 

+

Example:

+

var _group = audio_sound_get_audio_group(snd_animal);

+

The above code gets the ID of the audio group assigned to the sound snd_animal and stores it in a temporary variable _group.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audiogroup_default.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audiogroup_default.htm new file mode 100644 index 000000000..eada4e4b1 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Groups/audiogroup_default.htm @@ -0,0 +1,46 @@ + + + + + + audiogroup_default + + + + + + + + + + +

audiogroup_default

+

This is a built-in constant that represents the default audio group.

+

All newly added Sound Assets are added to this audio group by default, unless you create new ones and assign the sounds to one of those.

+

 This audio group is a special audio group. Any non-streamed assets in it are guaranteed to be loaded at game start. Streamed sounds are also assigned to this group, but are ignored when it is loaded.

+

 

+

Syntax:

+

audiogroup_default

+

 

+

Example:

+

audio_group_set_gain(audiogroup_default, 0.5, 0);

+

The above code sets the gain of the default audio group to 0.5. The change in gain takes place instantly.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/Audio_Loop_Points.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/Audio_Loop_Points.htm new file mode 100644 index 000000000..ae4a0afee --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/Audio_Loop_Points.htm @@ -0,0 +1,100 @@ + + + + + + + Audio Loop Points + + + + + + + + + +

Audio Loop Points

+

Audio Loop Points allow you to loop a part (or section) of an audio asset.

+

While you can manually control audio playback using audio_sound_get_track_position and audio_sound_set_track_position, this will never be accurate for looping a section, as audio is processed at a much higher rate, e.g. 44100 or 48000 times a second (the sample rate), which is a lot more than the default game speed of 60. This means that many samples may have already played between the time you call one function and the next.

+

By using the functions provided for audio looping, the looping is performed on the audio thread, at audio rates.

+

 You cannot use buffer-based audio queues or audio sync groups with the audio looping functions. All other kind of audio can be used without problems, including buffer sounds and streams

+

Function Reference

+

Here are the GML Code functions for audio looping:

+ +

Loop Section

+

Every sound asset and sound instance has a single loop section, defined by a start and end time in seconds. The part of the sound between this start and end will play looped if the sound is set to loop.

+

Every sound that you play using any of the audio_play_sound_ functions gets its default loop start and loop end time from the asset when played, e.g.: 

+

audio_sound_loop_start(snd_loop, 2);
+ audio_sound_loop_end(snd_loop, 6);
+ ins_sound = audio_play_sound(snd_loop, 100, true);
+ audio_sound_loop_end(ins_sound, 10);

+

By default, a sound is set to loop from the beginning to the end. This corresponds to a start value of 0.0 seconds and an end value of 0.0 seconds (corresponding to audio_sound_length).

+

The loop end position must be after the loop start position, except when they are both set to 0.0 (i.e. loop the sound from start to end).

+

Enabling/Disabling Looping

+

Setting the loop state of a sound instance can be done in two ways. The first is when playing the sound using audio_play_sound or any of the other audio_play_sound_ functions: 

+

ins_sound = audio_play_sound(snd_loop, 100, true);

+

The second is by calling the function audio_sound_loop on an already playing sound: 

+

audio_sound_loop(ins_sound, true);

+

 When a sound's track position reaches the loop end position GameMaker checks whether it should loop. If at that moment its loop state is set to true, the sound will jump back to the loop start position. If not, it will continue playing the sound until the end, unless you change either the track position or the loop end.

+

Examples

+

The following are a couple of ways in which you can use audio loop points to loop audio.

+

Intro & Outro

+

In this situation you have an audio file with an intro, a looping mid-section and an outro. The audio is played from the start, plays the intro part first, then moves to the looped part and keeps playing this looped until the audio is set to no longer loop. At that point the looped part will finish playing a last time to then transition to the outro part.

+

audio_sound_loop_start(snd_music, 10);
+ audio_sound_loop_end(snd_music, 20);
+ ins_sound = audio_play_sound(snd_music, 100, true);  // Play the sound looped

+

Once the sound is in the looping part, the sound instance can then be set to no longer loop: 

+

audio_sound_loop(ins_sound, false);

+

After changing this, the remainder of the looping part will be played, followed by the outro part.

+

 Once the sound has stopped playing ins_sound will no longer refer to a valid sound instance and you will need to play a new one using audio_play_sound.

+

Multiple Loops

+

Every sound has one loop section. You can add multiple loop sections yourself by storing them in a struct and manually applying the start and end of the loop section you want to use at any given moment: 

+

loops = [
+     {start: 0, end: 10},
+     {start: 10, end: 20},
+     {start: 20, end: 30}
+ ];
+
+ section = 2;
+
+ audio_sound_loop_start(snd_several_sections, loops[section].start);
+ audio_sound_loop_end(snd_several_sections, loops[section].end);
+ ins_sound = audio_play(snd_several_sections, 200, true); +

+

Converting from BPM

+

Using the BPM of a piece of music you can calculate the time one "beat" takes. This way you can loop parts of a sound that correspond precisely to beats or bars in the music: 

+

var _bpm_to_sec = time_bpm_to_seconds(126);
+ var _beats_per_bar = 4;
+ var _bars = 4;
+ audio_sound_loop_start(snd_bgm, _bars * _beats_per_bars);

+

This code sets the loop start position for a sound asset snd_bgm to the start of the fifth bar.

+

See: 

+ +

Limitations

+
    +
  • When pushing the feature to its limits (e.g. with extremely small loop-sections), compressed sounds will incur a performance penalty. In such cases, it is better to use uncompressed sound assets.
  • +
+

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop.htm new file mode 100644 index 000000000..f3beb2bcc --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop.htm @@ -0,0 +1,66 @@ + + + + + + audio_sound_get_loop + + + + + + + + + + +

audio_sound_get_loop

+

This function returns whether the given sound instance being played is set to loop.

+

 

+

Syntax:

+

audio_sound_get_loop(index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexSound Instance IDThe index of the sound instance
+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

var _loop = audio_sound_get_loop(snd_car);

+

The above code calls audio_sound_get_loop on an existing sound asset snd_car and stores the result in a temporary variable _loop.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop_end.htm new file mode 100644 index 000000000..7ebe852d6 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop_end.htm @@ -0,0 +1,68 @@ + + + + + + audio_sound_get_loop_end + + + + + + + + + + +

audio_sound_get_loop_end

+

This function returns the loop end point in seconds for the given sound asset or sound instance.

+


+ +

+

Syntax:

+

audio_sound_get_loop_end(index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexSound Asset or Sound Instance IDThe index of the sound asset or instance
+

 

+

Returns:

+

Real

+

 

+

Example:

+

var _loop_end_time = audio_sound_get_loop_end(snd_loop);

+

The above code calls audio_sound_get_loop_end on an existing sound asset snd_loop and stores the returned value in a variable _loop_end_time.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop_start.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop_start.htm new file mode 100644 index 000000000..ad4306b5a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_get_loop_start.htm @@ -0,0 +1,68 @@ + + + + + + audio_sound_get_loop_start + + + + + + + + + + +

audio_sound_get_loop_start

+

This function returns the loop start point in seconds for the given sound asset or sound instance.

+


+ +

+

Syntax:

+

audio_sound_get_loop_start(index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexSound Asset or Sound Instance IDThe ID of a sound asset or a sound instance
+

 

+

Returns:

+

Real

+

 

+

Example:

+

var _loop_start_time = audio_sound_get_loop_start(snd_loop);

+

The above code calls audio_sound_get_loop_start on an existing sound asset snd_loop and stores the returned value in a variable _loop_start_time.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop.htm new file mode 100644 index 000000000..cc1bc96a3 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop.htm @@ -0,0 +1,74 @@ + + + + + + audio_sound_loop + + + + + + + + + + +

audio_sound_loop

+

This function enables or disables looping for a playing sound instance (returned by any of the audio_play_sound_ functions).

+

 This function will set the loop state of a playing sound but the sound will not loop if the track position is already past the loop end point. Set the track position to a position before the loop end point using audio_sound_set_track_position or set the loop end point past the track position so the end point can be reached.

+

 

+

Syntax:

+

audio_sound_loop(index, state);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexSound Instance IDThe index of the sound instance
stateBooleanWhether to loop the sound between the loop start and end or not
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

snd_car1 = audio_play_sound(snd_car, 100, false);
+ audio_sound_loop(snd_car1, true); +

+

The above example calls audio_play_sound to play a sound snd_car, not looping. The new sound instance is stored in a variable snd_car1. Then audio_sound_loop is called to enable looping for the sound.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm new file mode 100644 index 000000000..eea46d71c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm @@ -0,0 +1,75 @@ + + + + + + audio_sound_loop_end + + + + + + + + + + +

audio_sound_loop_end

+

This function sets the loop end point in seconds for the given sound asset or sound instance. This must be higher than the set loop start point, except when it's 0, which is the end of the sound - this means you can specify 0 to set the loop end point to the end of the sound.

+

See: Audio Loop Points

+

 

+

Syntax:

+

audio_sound_loop_end(index, time);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexSound Asset or Sound Instance IDThe sound asset or sound instance for which to set the loop end time
timeRealThe loop end time in seconds
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

audio_sound_loop_start(snd_machine, 4);
+ audio_sound_loop_end(snd_machine, 10);
+ ins_sound = audio_play_sound(snd_snd_machine, 100, true); +

+

The above code sets the loop start point for the existing sound asset snd_machine to 4 seconds and the loop end point to 10 seconds. The sound is then played with a priority of 100 and loop set to true. The new sound instance gets its loop start and end position from the sound asset. Its ID is stored in a variable ins_sound.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm new file mode 100644 index 000000000..ffacb4149 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm @@ -0,0 +1,75 @@ + + + + + + audio_sound_loop_start + + + + + + + + + + +

audio_sound_loop_start

+

This function sets the loop start point in seconds for the given sound asset or sound instance.

+

See: Audio Loop Points

+

 The loop start point should be before the loop end point. 0.0 indicates the start of the sound.

+

 

+

Syntax:

+

audio_sound_loop_start(index, time);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexSound Asset or Sound Instance IDThe sound asset or sound instance for which to set the loop start time
timeRealThe loop start time in seconds
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

audio_sound_loop_start(snd_machine, 4);
+ audio_sound_loop_end(snd_machine, 10);
+ ins_sound = audio_play_sound(snd_snd_machine, 100, true);

+

The above code sets the loop start point for the existing sound asset snd_machine to 4 seconds and the loop end point to 10 seconds. The sound is then played with a priority of 100 and loop set to true. The new sound instance gets its loop start and end position from the sound asset. Its ID is stored in a variable ins_sound.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.htm new file mode 100644 index 000000000..cc01cea25 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Properties.htm @@ -0,0 +1,117 @@ + + + + + + + Audio Properties Overview + + + + + + + + + +

Audio Properties Overview

+

This page gives a detailed overview of the audio properties that GameMaker supports and the different "levels" at which you can set/change them.

+

The table below lists all applicable levels for the basic audio properties, and lists the functions you can use to set and get each property at each level.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LevelGainPitchOffsetListener Mask
Assetaudio_sound_gain
+ audio_sound_get_gain +
audio_sound_pitch
+ audio_sound_get_pitch +
audio_sound_set_track_position
+ audio_sound_get_track_position +
N/A
Groupaudio_group_set_gain
+ audio_group_get_gain +
N/AN/AN/A
Emitteraudio_emitter_gain
+ audio_emitter_get_gain +
audio_emitter_pitch
+ audio_emitter_get_pitch +
N/Aaudio_emitter_set_listener_mask
+ audio_emitter_get_listener_mask +
Instance/Voiceaudio_sound_gain
+ audio_sound_get_gain
+ audio_play_sound, etc. +
audio_sound_pitch
+ audio_sound_get_pitch
+ audio_play_sound, etc. +
audio_sound_set_track_position
+ audio_sound_get_track_position
+ audio_play_sound, etc. +
audio_play_sound, etc.
Global/Listeneraudio_master_gain
+ audio_set_master_gain
+ audio_get_master_gain +
N/AN/Aaudio_set_listener_mask
+ audio_get_listener_mask +
ResultGasset * Ggroup * Gemitter * GinstancePasset * Pemitter * PinstanceAsset-level offset unless instance-level offset is passed to the audio_play_sound_* functionsMemitter & Minstance (bitwise AND, see Bitwise Operators)
+

Notes

+
+

This can still be changed in-game later by calling audio_sound_gain with the sound asset ID as the argument: 

+

audio_sound_gain(snd_Explode, 0, 0);  // Set the asset-level gain to 0 (new instances of this sound play muted)

+

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_is_paused.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_is_paused.htm new file mode 100644 index 000000000..fb7f3fde1 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/audio_sync_group_is_paused.htm @@ -0,0 +1,71 @@ + + + + + + audio_sync_group_is_paused + + + + + + + + + + +

audio_sync_group_is_paused

+

This function can be used to check if audio in a synchronised group is paused.

+

The function takes in a sync group ID as returned by the function audio_create_sync_group.

+
+

 

+

Syntax:

+

audio_sync_group_is_paused(group_index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
group_indexAudio Sync Group IDThe group index to check.
+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

if !audio_sync_group_is_paused(sync_group)
+ {
+     audio_resume_sync_group(sync_group);
+ }

+

The above code first checks to see if the audio sync group sync_group is paused. If that is the case, it resumes playing the sync group using audio_resume_sync_group.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_falloff_set_model.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_falloff_set_model.htm index f5885ba43..808ded2be 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_falloff_set_model.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_falloff_set_model.htm @@ -4,7 +4,7 @@ audio_falloff_set_model - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.htm index a55cbb7ba..23f5545bb 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound.htm @@ -73,7 +73,7 @@

Exemple 1 :

if health <= 0
{
    lives -= 1;
-     audio_play_sound(snd_PlayerDead, 10, false);
+     audio_play_sound(snd_PlayerDead, 10, false);
}

Le code ci-dessus vérifie la variable globale "health" et si elle est inférieure ou égale à 0, il enlève 1 à la variable globale "lives" et joue un son.

Exemple 2 :

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_ext.htm new file mode 100644 index 000000000..be75607ec --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_play_sound_ext.htm @@ -0,0 +1,117 @@ + + + + + + audio_play_sound_ext + + + + + + + + + + +

audio_play_sound_ext

+

This function plays any sound asset in your game using any combination of parameters.

+
+

The function takes its parameters as a struct. Depending on the parameters that you provide, the function behaves like audio_play_soundaudio_play_sound_at or audio_play_sound_on. The only key that is strictly required in the struct is the sound key.

+

The full list of keys is as follows: 

+
    +
  • sound (Sound Asset or Audio Queue ID, required)
  • +
  • priority (Real, optional), defaults to 0
  • +
  • loop (Boolean, optional), defaults to false
  • +
  • gain (Real, optional), defaults to 1.0
  • +
  • offset (Real, optional), defaults to the asset-level offset
  • +
  • pitch (Real, optional), defaults to 1.0
  • +
  • listener_mask (Real, optional), defaults to the emitter-level listener mask/global listener mask
  • +
  • emitter (Audio Emitter ID, optional), defaults to undefined
  • +
  • position (Struct, optional), defaults to undefined + +
  • +
+

Syntax:

+

audio_play_sound_ext(params);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
paramsStructA struct containing the key-value pairs for each of the parameters that you want to set. The sound key is required and takes a Sound Asset as a value.
+

 

+

Returns:

+

Sound Instance ID

+

 

+

Example 1: Playing a basic sound (similar to audio_play_sound)

+

audio_play_sound_ext({ sound: snd_ambience });

+

The above code plays a sound "snd_ambience". The sound instance gets a default priority of 0 and won't be looped. All other sound properties are default as they haven't been provided in the struct.

+

 

+

Example 2: Playing a sound on an emitter (similar to audio_play_sound_on)

+

var _sound_params =
+ {
+     sound: snd_shot,
+     priority: 20,
+     gain: 1.2,
+     pitch: 2,
+     emitter: em_north_entrance
+ };
+ audio_play_sound_ext(_sound_params); +

+

The above code first creates a temporary struct _sound_params. It stores the settings to play a sound "snd_shot" with a priority of 20, a gain of 1.2 and a pitch of 2 on an existing emitter em_north_entrance. It then plays the sound with those settings using audio_play_sound_ext.

+

 

+

Example 3: Playing a sound at a given position in 3D audio space (similar to audio_play_sound_at)

+

var _sound_params =
+ {
+     sound: snd_shot,
+     pitch: 1.1,
+     position:
+     {
+         x: 100,
+         y: 100,
+         z: 20
+     }
+ };
+ audio_play_sound_ext(_sound_params); +

+

The above code creates a temporary struct _sound_params. The struct stores the settings to play a sound "snd_shot" with a pitch of 1.1 at an x  of 100, a y of 100 and z of 20. The sound is then played with those settings using audio_play_sound_ext.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.htm index 4f50193e5..e464f43b3 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_get_track_position.htm @@ -4,7 +4,7 @@ audio_sound_get_track_position - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_set_track_position.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_set_track_position.htm index 055a0ab5a..68c809b89 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_set_track_position.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_set_track_position.htm @@ -4,7 +4,7 @@ audio_sound_set_track_position - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm new file mode 100644 index 000000000..298cf30ad --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm @@ -0,0 +1,79 @@ + + + + + + audio_system_is_initialised + + + + + + + + + + +

audio_system_is_initialised

+

This function returns whether the audio system (the main bus) is initialised on HTML5. For targets other than HTML5, this function will always return true.

+

On the HTML5 platform it is possible for the audio engine to not have finished loading on game start. Until it has, you should not do any of the following: 

+ +

 This function differs from audio_system_is_available, which reflects the ability to play audio and depends on the state of the Web Audio context. The audio system has to be initialised first before it can be available.

+

Syntax:

+

audio_system_is_initialised();

+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

 

+

Create Event

+

// Initially, the audio system is not initialised
+ audio_initialised = false;
+
+ em_emitter = -1;
+ bus_special_effects = -1; +

+

Step Event

+

// Check until the system is initialised
+ if !audio_initialised && audio_system_is_initialised()
+ {
+     audio_initialised = true;
+     
+     // First-time initialization
+     bus_special_effects = audio_bus_create();
+     bus_special_effects[0] = audio_effect_create(AudioEffectType.Reverb1);
+     em_emitter = audio_emitter_create();
+     audio_emitter_bus(em_emitter, bus_special_effects);
+ }
+
+ if audio_initialised
+ {
+     // The audio system can be used here
+     // ...
+ } +

+

At the game's start, a variable audio_initialised is set to false in an object's Create event. In its Step event, the function audio_system_is_initialised is called for as long as audio_initialised remains false. Once the function returns true, the contents after the first if statement are executed: audio_initialised is set to true, which prevents further calls to the function, and a custom audio bus and emitter are set up. Once audio_initialised is true, the code of the second if statement is executed, which can be interaction with the audio system, e.g. changing effect parameters.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/db_to_lin.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/db_to_lin.htm new file mode 100644 index 000000000..ba6a54425 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/db_to_lin.htm @@ -0,0 +1,70 @@ + + + + + + db_to_lin + + + + + + + + + + +

db_to_lin

+

This function converts a gain expressed in decibels (dB) to a linear gain, which can be used with functions such as audio_sound_gain.

+

Changes in gain can be expressed in dB. This corresponds better to how we perceive changes in amplitude (human perception of sound is not linear).

+

The conversion from a gain expressed in dB to a linear gain is done using the following formula: gain_linear = power(10, gain_db/20);

+

  0dB means no change in gain (i.e. a linear gain of 1). An increase of 6dB roughly corresponds to a doubling of the linear gain, a decrease of 6dB (i.e. an increase of -6dB) to a halving of it.

+

Also see: lin_to_db

+

 

+

Syntax:

+

db_to_lin(x);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
xRealThe value to convert
+

 

+

Returns:

+

Real

+

 

+

Example:

+

var _lin = db_to_lin(-3);

+

The above code calculates the linear gain reduction corresponding to a reduction of 3dB. The result of the conversion is stored in a temporary variable _lin.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/lin_to_db.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/lin_to_db.htm new file mode 100644 index 000000000..8809affb3 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/lin_to_db.htm @@ -0,0 +1,68 @@ + + + + + + lin_to_db + + + + + + + + + + +

lin_to_db

+

This function converts a linear gain to a gain expressed in decibels (dB). You get a linear gain value from functions such as audio_sound_get_gain.

+

Changes in gain can be expressed in dB. This corresponds better to how we perceive changes in amplitude (human perception of sound is not linear).

+

The conversion from a gain expressed in dB to a linear gain is done using the formula: gain_db = 20 * log10(gain_linear);

+

 

+

Syntax:

+

lin_to_db(x);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
xRealThe value to convert
+

 

+

Returns:

+

Real

+

 

+

Example:

+

var _db = lin_to_db(1.5);

+

The above code calculates the gain in dB corresponding to a linear gain of 1.5. The result of the conversion is stored in a temporary variable _db.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Extensions/extension_get_version.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Extensions/extension_get_version.htm new file mode 100644 index 000000000..b0a0bcfd6 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Extensions/extension_get_version.htm @@ -0,0 +1,74 @@ + + + + + + extension_get_version + + + + + + + + + + +

extension_get_version

+

This functions gets the version of an Extension Asset with the given name, and returns it as a string formatted as "major.minor.revision".

+

 

+

Syntax:

+

extension_get_version(ext_name);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
extension_nameStringThe name of the extension
+

 

+

Returns:

+

String

+

 

+

Example:

+

var _version_string = extension_get_version("MyExtension");
+ var _values = string_split(_version_string, ".");
+ var _major = _values[0], _minor = _values[1], _revision = _values[2];
+ show_debug_message($"Version: {_ver}\nMajor: {_major}\nMinor: {_minor}\nRevision:{_revision}");
+ if (_major < 1)
+ {
+     show_debug_message("At least version 1 of the extension is required.");
+     game_end();
+ }

+

The above code first calls extension_get_version to get a string containing the version number of an extension named "MyExtension". It stores the returned value in a temporary variable _version_string and calls string_split on that to get the major and minor version number, as well as the revision number. These are assigned to the temporary variables _major, _minor and _revision respectively. A debug message shows this information. Finally the major version number is checked; if it is too low a debug message is output and the game is ended by calling game_end.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_cache_glyph.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_cache_glyph.htm new file mode 100644 index 000000000..9ac32bcd6 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_cache_glyph.htm @@ -0,0 +1,73 @@ + + + + + + font_cache_glyph + + + + + + + + + + +

font_cache_glyph

+

This function lets you pre-cache a character glyph from a font.

+

If you don't pre-cache a character using this function, it's automatically cached before it's drawn for the first time.

+

This function returns a struct with the x and y position of the glyph on the font's texture page, e.g. { x : 208, y : 62 }. To get a handle to the texture page that the cached glyph is on you can use font_get_texture.

+

 

+

Syntax:

+

font_cache_glyph(font, glyph_index);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
fontFont AssetThe font to cache a character or glyph from
glyph_indexRealThe index (or character code) of the glyph to cache (see ord/string_ord_at)
+

 

+

Returns:

+

Struct

+

 

+

Example:

+

var _glyph = font_cache_glyph(fnt_gui, 65);

+

The above code caches the glyph with the index 65 from a font asset, and stores the returned struct in a local variable.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.htm new file mode 100644 index 000000000..523b2e610 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_effects.htm @@ -0,0 +1,180 @@ + + + + + + font_enable_effects + + + + + + + + + + +

font_enable_effects

+

This function is used to enable various effects on an SDF font. The font must have been enabled to use SDF in The Font Editor or at runtime using font_enable_sdf.

+

These effects will appear when you use your font at runtime with draw_set_font, or use it in a text track in a Sequence.

+

The enable argument takes true/false for enabling/disabling effects. The actual properties for your effects are supplied in the optional params struct.

+

Effects

+

This function supports the following effects:

+
    +
  • Outline
  • +
  • Glow
  • +
  • Drop Shadow
  • +
+
+
Fig. 1
+
+

Each effect has its own set of properties, described below. These properties are supplied in a struct.

+

A single font can have any of these effects applied to it at the same time.

+

 The SDF spread value limits how far an effect can spread from a glyph's edge.

+

General

+
+

There are a few "general" properties:

+
    +
  • thickness: Add or remove thickness from the font. Minimum: -32, Maximum: 32.
  • +
  • coreColour: The colour of the core part of the font (excluding any outlines, glows, etc.).
  • +
  • coreAlpha: The alpha of the core part of the font.
  • +
+
+

Outline

+
+

The following properties are provided for Outline:

+
    +
  • outlineEnable: Enable or disable the Outline effect. Disabled by default.
  • +
  • outlineDistance: The thickness of the outline from the edge of each glyph. Minimum: 0, Maximum: 64.
  • +
  • outlineColour: The colour of the outline.
  • +
  • outlineAlpha: The alpha of the outline.
  • +
+
+

Glow

+
+

The following properties are provided for Glow:

+
    +
  • glowEnable: Enable or disable the Glow effect. Disabled by default.
  • +
  • glowStart: The distance from the glyph edge where the glow starts fading out. Minimum: 0, Maximum: 64.
  • +
  • glowEnd: The distance from the glyph edge where the glow has fully faded. Minimum: 0, Maximum: 64.
  • +
  • glowColour: The colour of the glow.
  • +
  • glowAlpha: The alpha of the glow.
  • +
+
+

Drop Shadow

+
+

The following properties are provided for Drop Shadow:

+
    +
  • dropShadowEnable: Enable or disable the Drop Shadow effect. Disabled by default.
  • +
  • dropShadowSoftness: Softness or blur level of the shadow. Minimum: 0, Maximum: 64.
  • +
  • dropShadowOffsetX: How much the shadow is moved on the X axis, 0 is the same as the text. E.g. a value of 4 moves it right by 4 pixels.
  • +
  • dropShadowOffsetY: How much the shadow is moved on the Y axis, 0 is the same as the text. E.g. a value of 4 moves it down by 4 pixels.
  • +
  • dropShadowColour: The colour of the shadow.
  • +
  • dropShadowAlpha: The alpha of the shadow.
  • +
+

The offset of the drop shadow is affected by the scale at which the text is drawn, so a 10px offset will become 100px when drawn with a scale of 10.

+
    +
+
+

The colour of an effect will be multiplied with whatever blend colour is set when the text is drawn.

+

 

+

Syntax:

+

font_enable_effects(ind, enable, [params]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indFont AssetThe index of the font (must be SDF-enabled)
enableBooleanEnable (true) or disable (false) effects
paramsStruct  A struct containing effect properties
+

 

+

Returns:

+

N/A

+

 

+

Example 1:

+

Create Event

+

font_enable_effects(fnt_outline, true, {
+     outlineEnable: true,
+     outlineDistance: 2,
+     outlineColour: c_black
+ });
+
+ font_enable_effects(fnt_glow, true, {
+     glowEnable: true,
+     glowEnd: 16,
+     glowColour: c_red
+ }); +

+

This modifies two font assets that presumably have SDF enabled.

+

The first font fnt_outline gets outline enabled with some properties set, and the second font fnt_glow gets some glow properties.

+

You would draw text with these fonts by doing this in a Draw event:

+

Draw Event

+

draw_set_font(fnt_outline);
+ draw_text(x, y, "This font has an outline.");
+
+ draw_set_font(fnt_glow);
+ draw_text(x, y + 60, "This font has a glow."); +

+

This switches to the outline font to draw text with an outline, and then switches to the glow font to draw glowing text.

+

The result of this font can be seen in Fig. 1 at the top of this page.

+

 

+

Example 2:

+

font_enable_effects(fnt_heading, true, {
+     dropShadowEnable: true,
+     dropShadowSoftness: 20,
+     dropShadowOffsetX: 4,
+     dropShadowOffsetY: 4,
+     dropShadowAlpha: 1,
+     outlineEnable: true,
+     outlineDistance: 2,
+     outlineColour: c_black,
+     glowEnable: true,
+     glowEnd: 6,
+     glowColour: c_red,
+     glowAlpha: 4
+ });

+

This example demonstrates that you can apply multiple effects to the same font at once:

+
+
Fig. 2
+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_sdf.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_sdf.htm new file mode 100644 index 000000000..194bb80fd --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_sdf.htm @@ -0,0 +1,88 @@ + + + + + + font_enable_sdf + + + + + + + + + + +

font_enable_sdf

+

This function is used to enable or disable SDF Rendering for the given font. The font must have been added using font_add() and loaded from a font file - you cannot use SDF with sprite fonts or fonts that were added through the IDE.

+

Once SDF is enabled for a font, you can apply various effects to it.

+

 This function cannot be used on HTML5, as HTML5 does not support adding freetype fonts.

+

 

+

Syntax:

+

font_enable_sdf(ind, enable);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indFont AssetThe index of the font for which to enable/disable SDF rendering
enableBooleanWhether to enable SDF rendering for the font or not
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

/// Create Event
+ new_font = font_add("STENCIL.TTF", 32, false, false, 32, 128);
+ font_enable_sdf(new_font, true);
+
+ /// Draw Event
+ draw_set_font(new_font);
+ draw_set_halign(fa_center);
+ draw_set_valign(fa_middle);
+
+ var _sinval = dsin(current_time / 4);
+ var _scale = 4 * (1 + _sinval * 0.3);
+
+ draw_text_transformed(500, 400, "Hello World! (animated version)", _scale, _scale, 0); +

+

The above code shows the code of an object's Create event and Draw event. In the Create event a custom font is added using font_add and stored in an instance variable new_font. SDF rendering is enabled for the font by calling font_enable_sdf.

+

In the Draw event, the font is set to new_font and text alignment is set to centred (both horizontally and vertically). Next some values are calculated to animate the text scale. Finally some text is drawn scaled using draw_text_transformed.

+

Because the font is SDF-enabled, this text should remain sharp as it scales up and down.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_get_sdf_enabled.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_get_sdf_enabled.htm new file mode 100644 index 000000000..5075ed67d --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_get_sdf_enabled.htm @@ -0,0 +1,67 @@ + + + + + + font_get_sdf_enabled + + + + + + + + + + +

font_get_sdf_enabled

+

This function returns whether SDF Rendering is enabled for the given font or not.

+

 

+

Syntax:

+

font_get_sdf_enabled(ind);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indFont AssetThe index of the font to check
+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

var _sdf_enabled = font_get_sdf_enabled(fnt_title);
+ show_debug_message("SDF rendering is {0} enabled for fnt_title", _sdf_enabled ? "" : "not");

+

The above code checks if SDF rendering is enabled for the font fnt_title and stores the value in a variable _sdf_enabled. It then shows a readable debug message showing the result.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_get_sdf_spread.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_get_sdf_spread.htm new file mode 100644 index 000000000..d43321f28 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_get_sdf_spread.htm @@ -0,0 +1,68 @@ + + + + + + font_get_sdf_spread + + + + + + + + + + +

font_get_sdf_spread

+

This function returns the spread value used for the given font. The font must be SDF-enabled.

+

If the font doesn't exist, the function will return -1.

+

 

+

Syntax:

+

font_get_sdf_spread(ind);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indFont AssetThe index of the font for which to get the spread value
+

 

+

Returns:

+

Real

+

 

+

Example:

+

var _spread = font_get_sdf_spread(my_font);
+ shader_set_uniform_f(uni_spread, _spread);

+

The above code gets the spread value for a font, and passes it into a shader uniform.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_sdf_spread.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_sdf_spread.htm new file mode 100644 index 000000000..45c2c12c6 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_sdf_spread.htm @@ -0,0 +1,76 @@ + + + + + + font_sdf_spread + + + + + + + + + + +

font_sdf_spread

+

This function is used to change the spread value of an SDF-enabled font. The spread limits how much font effects can spread from a glyph's edge.

+

The spread value is the distance (in pixels) that the signed distance field extends from the edge of each glyph. The spread can be between 2 and 32 pixels (inclusive), and the default is 8.

+

This is also useful for running custom shaders on your text, as a larger spread value will allow for effects with larger radii (such as glows). However a larger spread value will mean that the font will take up more space on the texture page. In contrast, a smaller spread value will save texture space, and also improve rendering precision.

+

 

+

Syntax:

+

font_sdf_spread(ind, spread);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indFont AssetThe index of the font (must be SDF-enabled)
spreadRealThe new spread value, between 2 and 32 pixels (inclusive)
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

new_font = font_add("STENCIL.TTF", 32, false, false, 32, 128);
+ font_enable_sdf(new_font, true);
+ font_sdf_spread(new_font, 16); +

+

This will load a font from an included TTF file, enable SDF for it and set its spread value to 16 pixels.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Paths/path_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Paths/path_end.htm index 8a2c4d4d5..0c5960287 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Paths/path_end.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Paths/path_end.htm @@ -27,7 +27,7 @@

Exemple :

if place_meeting(x, y, obj_Blocker)
{
-     path_end();
+     path_end();
}

Le code ci-dessus mettra fin à la trajectoire actuelle si l'instance détecte une collision avec une instance de l'objet donné.

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_add.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_add.htm index 60354b13c..46638725c 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_add.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_add.htm @@ -26,8 +26,8 @@

Les retours :

Exemple :

global.myroom = room_add();
- room_set_width(global.myroom, 640);
- room_set_height(global.myroom, 480);
+ room_set_width(global.myroom, 1280);
+ room_set_height(global.myroom, 720);
room_set_persistent(global.myroom, false);

Cette opération crée une nouvelle pièce et enregistre son index dans la variable "global.myroom". Elle définit ensuite sa largeur à 640 pixels, sa hauteur à 480 pixels et sa persistance à false.

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_exists.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_exists.htm index b94d36be5..857a2694c 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_exists.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_exists.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + index The index of the room to check. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_info.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_info.htm new file mode 100644 index 000000000..40a3e3592 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_info.htm @@ -0,0 +1,859 @@ + + + + + + room_get_info + + + + + + + + + + +

room_get_info

+

This function gets information on a room from storage and returns it as a struct. You can choose to exclude information through the given optional arguments.

+

 The function cannot be used to get the current state of an active room (the current room or an already visited persistent room). In this case it returns the original state of the room.

+

The room must have been previously created using The Asset Browser or added in-game using room_add.

+

The format of the returned struct is as follows:

+

room_info_struct = 
+ {
+     instances: 
+     [
+         {/* Instance Info Struct */},
+         {/* Instance Info Struct */},
+     ],
+     layers:
+     [
+         {
+             elements:
+             [
+                 {/* Layer Element Info Struct */},
+                 {
+                     /* Example */
+                     type: layerelementtype_tilemap,
+                     tiles: [/* Tile Map Data */]
+                 }
+             ]
+         },
+     ],
+     views:
+     [
+         {/* View Info Struct */},
+     ]
+ }

+

The tables below list all the possible structs that can be contained in the returned struct:

+

Room Info

+
+

This is the main struct returned by the function. All variables listed below are present at the root of this returned struct:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Room Info Struct
Variable NameData TypeDescription
widthRealThe width of the room
heightRealThe height of the room
creationCodeScript FunctionThe index of the script function that contains this room's creation code
physicsWorldBooleanWhether the room has a physics world
physicsGravityXRealThe physics world's gravity component along the x axis
physicsGravityYRealThe physics world's gravity component along the y axis
physicsPixToMetersRealThe physics world's pixel-to-metre scale
persistentBooleanWhether the room is persistent
enableViewsBooleanWhether views are enabled for the room
clearDisplayBufferBooleanWhether to clear the display buffer before drawing the room
clearViewportBackgroundBooleanWhether to clear viewports' backgrounds before drawing to them
colourColourThe clear colour used when clearDisplayBuffer is set to true
instancesArray of Room Instance Info StructAn array listing all instances placed in the room with basic information on them
layersArray of Room Layer Info StructAn array listing all room layers, in order of increasing depth
viewsArray of Room View Info StructAn array listing all views, ordered by view index
+
+

Instance Info

+
+

This type of struct represents one instance in the room.

+

These structs are found in the instances array, which is part of the main struct returned by the function.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Instance Info Struct
Variable NameData TypeDescription
idObject InstanceThe instance ID
object_indexStringThe name of the object this is an instance of (use asset_get_index to get the actual object)
xRealThe x coordinate of the instance's position
yRealThe y coordinate of the instance's position
angleRealThe rotation angle of the instance
image_indexRealThe image index used by the instance
image_speedRealThe image speed of the instance
colourColourThe blend colour used to draw the instance
creation_codeScript FunctionThe index of the script function that contains the instance's creation code
pre_creation_codeScript FunctionThe index of the script function that contains the instance's pre-creation code
+
+

Layer Info

+
+

This type of struct represents one layer in the room.

+

These structs are found in the layers array, which is part of the main struct returned by the function.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Layer Info Struct
Variable NameData TypeDescription
idRealThe layer ID
nameStringThe name of the layer
visibleBooleanWhether the layer is visible
depthRealThe depth of the layer
xoffsetRealThe x offset of the layer
yoffsetRealThe y offset of the layer
hspeedRealThe horizontal speed of the layer
vspeedRealThe vertical speed of the layer
effectEnabledBooleanWhether the layer filter/effect is currently enabled
effectToBeEnabledBooleanWhether the layer filter/effect should be enabled/disabled in the next frame (the next value of effectEnabled)
effectFX StructA struct containing the effect's parameters (-1 if no layer effect is set)
shaderIDShader AssetThe shader to be applied to the layer (layer_shader)
elementsArray of Room Layer Element Info StructAn array listing all elements on the layer. Each element type struct contains information specific to it.
+
+

View Info

+
+

This type of struct represents one view in the room.

+

These structs are found in the views array, which is part of the main struct returned by the function.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
View Info Struct
Variable NameData TypeDescription
visibleBooleanWhether the view is visible
cameraIDCamera IDThe camera assigned to this view
xviewRealThe x coordinate of the view camera's position
yviewRealThe y coordinate of the view camera's position
wviewRealThe width of the view's camera
hviewRealThe height of the view's camera
hspeedRealThe horizontal movement speed of the view
vspeedRealThe vertical movement speed of the view
xportRealThe x position on screen where the view is drawn
yportRealThe y position on screen where the view is drawn
wportRealThe width of the viewport
hportRealThe height of the viewport
objectObject AssetThe object of which the first instance in the room should be followed by the camera
hborderRealThe horizontal border around the instance of the object to follow
vborderRealThe vertical border around the instance of the object to follow
+
+

Layer Element Info

+
+

This type of struct represents one element in a layer.

+

These structs are found in the elements array, which is part of a layer struct.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Layer Element Info Struct
Variable NameData TypeDescription
All Element Types
idRealThe unique ID of the element
typeLayer Element Type ConstantThe type of element
Background Element Type
sprite_indexSprite AssetThe sprite used by the background
image_indexRealThe sprite's subimage
xscaleRealThe scale along the x axis
yscaleRealThe scale along the y axis
htiledBooleanWhether to tile the background image horizontally
vtiledBooleanWhether to tile the background image vertically
stretchBooleanWhether to stretch the background so it fills the entire room
visibleBooleanWhether the background should be visible
blendColourColourThe blend colour to draw the background with
blendAlphaRealThe alpha value between 0 and 1 to use
image_speedRealThe image speed of the background
speed_typeSprite Speed ConstantThe units in which image_speed is expressed, either spritespeed_framespersecond or spritespeed_framespergameframe
nameStringThe name of the background
Instance Element Type
inst_idObject InstanceThe ID of the instance
Sprite Element Type
sprite_indexSprite AssetThe sprite index of this sprite element
image_indexRealThe subimage of the sprite
xRealThe x coordinate of the sprite's position
yRealThe y coordinate of the sprite's position
image_xscaleRealThe scale of the image along the x axis
image_yscaleRealThe scale of the image along the y axis
image_angleRealThe image angle
image_alphaRealThe alpha value between 0 and 1
image_blendColourThe blend colour
image_speedRealThe animation speed of the image, expressed in speed_type units
speed_typeSprite Speed ConstantThe units in which image_speed is expressed, either spritespeed_framespersecond or spritespeed_framespergameframe
nameStringThe name of the sprite element as given in The Room Editor (default is graphic_*)
Tile Map Element Type
xRealThe x position (or offset) of the tile map in the room
yRealThe y position (or offset) of the tile map in the room
tileset_indexTile Set AssetThe tile set that this tile map uses
data_maskRealThe bitmask value for the tile map
tilesArray of RealThis variable is only present when the tilemap_data parameter is set to true. It is a one-dimensional array that contains all the tile map data, listed row by row.
widthRealThe width in cells of the tile map
heightRealThe height in cells of the tile map
nameStringThe tile map's name
Particle System Element Type
psParticle System AssetThe particle system
xRealThe x coordinate of the particle system's position
yRealThe y coordinate of the particle system's position
angleRealThe angle by which the particle system is rotated
xscaleRealThe scale along the x axis of the particle system
yscaleRealThe scale along the y axis of the particle system
blendColourThe blend colour to use to draw the particle system
alphaRealThe alpha value between 0 and 1 to use
nameStringThe name of the particle system element as defined in The Room Editor (default is particle_*)
Tile Element Type
visibleBooleanWhether the tile is visible
sprite_indexSprite AssetThe sprite this tile is on
xRealThe x coordinate of the tile position
yRealThe y coordinate of the tile position
widthRealThe width of the tile
heightRealThe height of the tile
image_xscaleRealThe scale factor along the x axis of the tile
image_yscaleRealThe scale factor along the y axis of the tile
image_angleRealThe angle of the tile
image_blendColourThe blend colour to use to draw the tile
image_alphaRealThe alpha to use
xoRealThe x offset
yoRealThe y offset
Sequence Element Type
xRealThe x coordinate of the sequence position
yRealThe y coordinate of the sequence position
image_xscaleRealThe scale along the x axis of the entire sequence
image_yscaleRealThe scale along the y axis of the entire sequence
image_angleRealThe angle by which the sequence is rotated
image_alphaRealThe alpha value between 0 and 1 to use
image_blendColourThe blend colour to use to draw the sequence
image_speedRealThe animation speed of the sequence, expressed in speed_type units
speedTypeSprite Speed ConstantThe units in which image_speed is expressed, either spritespeed_framespersecond or spritespeed_framespergameframe
seq_idSequence AssetThe sequence asset
nameStringThe name of the sequence element as defined in The Room Editor (default is graphic_*)
head_positionRealThe playhead position of the sequence
+
+

 

+

Syntax:

+

room_get_info(room, [views], [instances], [layers], [layer_elements], [tilemap_data]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
roomRoom AssetThe room to get the info from
viewsBoolean  Whether to include view information in the struct (defaults to true)
instancesBoolean  Whether to include instance information in the struct (defaults to true)
layersBoolean  Whether to include layer information in the struct (defaults to true)
layer_elementsBoolean  Whether to include layer element information in the struct (defaults to true, requires layers to be set to true)
tilemap_dataBoolean  Whether to include tile map data in the struct (defaults to true, requires layers and layer_elements to be set to true)
+

 

+

Returns:

+

Room Info Struct

+

 

+

Example:

+

var _info = room_get_info(Room1);
+ var _info_json = json_stringify(_info, true);
+ show_debug_message(_info_json);

+

The above code gets the information of the room Room1, converts the returned struct to a JSON string using json_stringify, then outputs it in a debug message. All view, instance, layer, layer element and tile map information is included in the output.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_name.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_name.htm index e0ee80670..514c3f3d8 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_name.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_get_name.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + index The index of the room to check the name of. @@ -39,7 +39,7 @@

Les retours :

Exemple :

var roomname = room_get_name(room);

- draw_text(32, 32, roomname); + draw_text(32, 32, _roomname);

Le code ci-dessus obtiendra le nom de la pièce actuelle et l'affichera à l'écran.

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_add.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_add.htm index 2df6e3485..6c62f8030 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_add.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_add.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + index The index of the room to add an object instance to. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_clear.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_clear.htm index 6665ef871..ccd0915d8 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_clear.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_instance_clear.htm @@ -4,7 +4,7 @@ room_instance_clear - + @@ -26,7 +26,7 @@

Syntaxe :

ArgumentsType Description - + index The index of the room to clear all instances in. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_persistent.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_persistent.htm index abfc344a2..617a52c11 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_persistent.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_persistent.htm @@ -26,7 +26,7 @@

Les retours :

Exemple :

if lives < 1
{
-     room_persistent = false;
+     room_persistent = false;
    room_goto(rm_start);
}

Le code ci-dessus vérifie la variable "lives" et si elle est inférieure à 1, il définit la persistance de la pièce à false et change ensuite de pièce.

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_camera.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_camera.htm index 37da76046..eb2530c29 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_camera.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_camera.htm @@ -4,7 +4,7 @@ room_set_camera - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_view_enabled.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_view_enabled.htm index d38beb302..7a0a3d6fe 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_view_enabled.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_view_enabled.htm @@ -4,7 +4,7 @@ room_set_view_enabled - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_viewport.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_viewport.htm index 2233997d4..360c8209e 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_viewport.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Rooms/room_set_viewport.htm @@ -4,7 +4,7 @@ room_set_viewport - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Scripts/script_execute_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Scripts/script_execute_ext.htm index 29a16c1e8..ec6868ea5 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Scripts/script_execute_ext.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Scripts/script_execute_ext.htm @@ -4,7 +4,7 @@ script_execute_ext - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_f_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_f_buffer.htm new file mode 100644 index 000000000..b379bc32a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Shaders/shader_set_uniform_f_buffer.htm @@ -0,0 +1,104 @@ + + + + + + shader_set_uniform_f_buffer + + + + + + + + + + + +

shader_set_uniform_f_buffer

+

With this function you can set the value of a shader uniform to a list of floating point values that are stored in a buffer.

+

As floats are represented in a buffer using the buffer_f32 data type, this function expects the data in the range given by offset and count to be formatted as consecutive values of this type.

+
+

Syntax:

+

shader_set_uniform_f_buffer(uniform, buffer, offset, count);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
handleShader Uniform HandleThe handle to the shader uniform as returned by shader_get_uniform
bufferBuffer IDThe buffer to read the values from
offsetRealThe offset (in bytes) in the buffer
countRealThe number of values of type buffer_f32 to be used (see Buffer Data Type Constant)
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

/// Create Event
+ var _values = 4;
+ var _size = buffer_sizeof(buffer_f32);
+ buffer = buffer_create(_values * _size, buffer_fixed, 1);
+
+ buffer_write(buffer, buffer_f32, 1);
+ buffer_write(buffer, buffer_f32, 0.7);
+ buffer_write(buffer, buffer_f32, 0.9);
+ buffer_write(buffer, buffer_f32, 1);
+
+ uni_blend_colour = shader_get_uniform(shader_Colorize, "u_vBlendColour");
+
+
+ /// Draw Event
+ shader_set(shader_Colorize);
+ shader_set_uniform_f_buffer(uni_blend_colour, _buffer, 0, 4);
+ vertex_submit(global.vb_character, pr_trianglelist, -1);
+ shader_reset();
+
+
+ /// Clean Up event
+ buffer_delete(buffer); +

+

The above code first creates a new buffer buffer of a fixed size that has room to store four values (_values) of type buffer_f32. This is done in an object's Create event. Four values between 0 and 1 are then written to the buffer that represent, in order, the R, G, B and A component of a blend colour. After that a handle is retrieved to a uniform vec4 u_vBlendColour; uniform defined in a shader named "shader_Colorize". Next in the Draw event this shader is set, the four values in the buffer are passed to the shader using shader_set_uniform_f_buffer, and the model in a vertex buffer named vb_character is submitted (i.e. drawn). After that the shader is reset. Finally in the Clean Up event the buffer is deleted to avoid a memory leak.

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_destroy.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_destroy.htm new file mode 100644 index 000000000..bf1ff9648 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_destroy.htm @@ -0,0 +1,66 @@ + + + + + + skeleton_attachment_destroy + + + + + + + + + + +

skeleton_attachment_destroy

+

This function destroys a custom attachment created using one of the skeleton_attachment_create/skeleton_attachment_create_colour or skeleton_attachment_replace/skeleton_attachment_replace_colour functions.

+

After destroying an attachment the name becomes available again and you can create a new attachment  with that name using skeleton_attachment_create.

+

Syntax:

+

skeleton_attachment_destroy(name);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the attachment to destroy
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

skeleton_attachment_destroy("leg_left");

+

The above code destroys an existing custom attachment with the name "leg_left".

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_exists.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_exists.htm new file mode 100644 index 000000000..518639242 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_exists.htm @@ -0,0 +1,72 @@ + + + + + + skeleton_attachment_exists + + + + + + + + + + +

skeleton_attachment_exists

+

This function returns if a custom attachment with the given name exists on the skeletal animation sprite.

+

 

+

Syntax:

+

skeleton_attachment_exists(name);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the attachment
+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

if skeleton_attachment_exists("LegAttachment")
+ {
+     skeleton_attachment_replace("LegAttachment", spr_leg_modified, 0, 0, 0, 1, 1, 0);
+ }
+ else
+ {
+     skeleton_attachment_create("LegAttachment", spr_leg, 0, 0, 0, 1, 1, 0);
+ }

+

The above code first checks if an attachment named "LegAttachment" exists on the current skeletal animation sprite using skeleton_attachment_exists. If it does the attachment with that name is replaced using skeleton_attachment_replace. If it doesn't skeleton_attachment_create is called to create a new attachment named "LegAttachment".

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_replace.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_replace.htm new file mode 100644 index 000000000..af62daa9a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_replace.htm @@ -0,0 +1,105 @@ + + + + + + skeleton_attachment_replace + + + + + + + + + + +

skeleton_attachment_replace

+

This function replaces an existing custom attachment on the current instance's skeletal animation sprite with another one.

+

The change to the attachment will be visible in all Slots that have the attachment assigned.

+

 

+

Syntax:

+

skeleton_attachment_replace(name, sprite, ind, xorigin, yorigin, xscale, yscale, rot);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the attachment to replace
spriteSprite AssetThe index of the sprite asset to use for the attachment
indRealThe image_index of the sprite to use
xoriginRealThe x origin to use for the image. The sprite's origin is ignored.
yoriginRealThe y origin to use for the image. The sprite's origin is ignored.
xscaleRealThe horizontal scale factor of the image
yscaleRealThe vertical scale factor of the image
rotRealThe rotation of the image. This is added to the bone's rotation.
+

 

+

Returns:

+

Real (1 if successful, -1 if not)

+

 

+

Example:

+

if skeleton_attachment_exists("weapon_attachment")
+ {
+     skeleton_attachment_replace("weapon_attachment", spr_baseball, 0, 0, 0, 1, 1, 0);
+ }

+

The above code first checks if an attachment named "weapon_attachment" exists. If it exists, the attachment is replaced with a new one that uses a sprite "spr_baseball" and has no change in origin (offset), scale or rotation.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_replace_colour.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_replace_colour.htm new file mode 100644 index 000000000..ad4327ea6 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Attachments/skeleton_attachment_replace_colour.htm @@ -0,0 +1,117 @@ + + + + + + skeleton_attachment_replace_colour + + + + + + + + + + +

skeleton_attachment_replace_colour

+

This function replaces an existing custom attachment on the current instance's skeletal animation sprite with another one. It also sets the blend colour to use when drawing this attachment.

+

The change to the attachment will be visible in all Slots that have the attachment assigned.

+

 

+

Syntax:

+

skeleton_attachment_replace_colour(name, sprite, ind, xorigin, yorigin, xscale, yscale, rot, colour, alpha);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the attachment to replace
spriteSprite AssetThe index of the sprite asset to use for the attachment
indRealThe image_index of the sprite to use
xoriginRealThe x origin to use for the image. The sprite's origin is ignored.
yoriginRealThe y origin to use for the image. The sprite's origin is ignored.
xscaleRealThe horizontal scale factor of the image
yscaleRealThe vertical scale factor of the image
rotRealThe rotation of the image. This is added to the bone's rotation.
colourColourThe blend colour to use when drawing the sprite
alphaRealThe alpha value to use when drawing the sprite
+

 

+

Returns:

+

Real (1 if successful, -1 if not)

+

 

+

Example:

+

if skeleton_attachment_exists("fruit_attachment")
+ {
+     skeleton_attachment_replace_colour("fruit_attachment", spr_apple, 0, 0, 0, 1, 1, 0, c_lime, 1);
+ }

+

The above code first checks if an attachment with the name "fruit_attachment" exists on the skeleton. If it does, it replaces the attachment image with a sprite "spr_apple", with no change in offset, rotation or scale and a  colour of c_lime and alpha value of 1.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skins/skeleton_skin_create.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skins/skeleton_skin_create.htm new file mode 100644 index 000000000..4926cbe19 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Skeletal_Animation/Skins/skeleton_skin_create.htm @@ -0,0 +1,76 @@ + + + + + + skeleton_skin_create + + + + + + + + + + +

skeleton_skin_create

+

This function creates a new runtime skin for skeletal animation sprites through code.

+

The new skin is created with the name that you provide and takes a list of existing skins in the skeletal animation sprite. The attachments that are linked to these skins are included in the new skin. By combining existing skins in this way you can create custom characters (by grouping attachments).

+

Creating a skin in this way corresponds visually to pinning a combination of existing skins in the Skins view of the animation tool.

+

 For skins created using this function you have to pass the struct that it returns to skeleton_skin_set instead of the skin name.

+

 

+

Syntax:

+

skeleton_skin_create(name, skins);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the new skin
skinsArrayAn array of names (as String) of existing skins in the skeletal animation sprite that will be used in the new skin.
+

 

+

Returns:

+

Skeleton Skin Struct

+

 

+

Example:

+

var skin = skeleton_skin_create("new_skin", ["hat/red", "shirt/green", "trousers/blue"]);
+ skeleton_skin_set(skin);

+

The above code first calls skeleton_skin_create to add a new runtime skin called "new_skin". The skin is created from three existing skins in the skeletal animation sprite: "hat/red", "shirt/green" and "trousers/blue". The result is stored in a temporary variable skin.

+

It then sets the skin of the skeletal animation sprite of the current instance to this new skin.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_add_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_add_ext.htm new file mode 100644 index 000000000..a10ec4c16 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_add_ext.htm @@ -0,0 +1,155 @@ + + + + + + sprite_add_ext + + + + + + + + + + +

sprite_add_ext

+

This function loads an image from an external file or URL asynchronously and adds it as a new sprite.

+

This is the asynchronous version of sprite_add; instead of blocking execution of code and thereby freezing the game, it continues execution of the game's code after the function is called and triggers an asynchronous Image Loaded event once the sprite is fully loaded.

+

The supported image file formats are PNG, JPEG, GIF, QOIF and Spine JSON files (the Spine JSON files require that their associated atlas and image files are placed next to them).

+

 Spine JSON files are only supported for locally stored files, not for files requested via HTTP (the same as for sprite_add).

+

The async_load DS Map will contain the following fields in the async Image Loaded event: 

+
    +
  • "filename" - the path to the file that was originally passed to the function
  • +
  • "id" - the sprite ID, as returned by the function
  • +
  • "http_status"contains the status value of the HTTP request if one was made, or 200 ("OK") if the image was loaded from a file
  • +
  • "status" - contains a value of 0 or greater to indicate the load was successful, or one of the following (negative) error codes in case something went wrong: 
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Sprite Add Error Constant
ConstantDescriptionValue
sprite_add_ext_error_unknownThis is a generic error code when none of the others apply (the HTML5 runner only returns this constant in case of failure).-1
sprite_add_ext_error_cancelledThis constant indicates that the request was cancelled while it was in progress.-2
sprite_add_ext_error_spritenotfoundThis constant indicates that a sprite was removed somehow partway through the loading process.-3
sprite_add_ext_error_loadfailedThis constant indicates that a file loading operation failed.-4
sprite_add_ext_error_decompressfailedThis constant indicates that image decompression failed (which could be due to e.g. a corrupted file or unsupported image format).-5
sprite_add_ext_error_setupfailedIndicates that, even though all data was loaded and decompressed, sprite resource creation itself failed.-6
+
+

 

+

Syntax:

+

sprite_add_ext(fname, imgnum, xorig, yorig, prefetch);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
fnameStringThe path to the image file to add as a sprite (either a local file path or a web address)
imgnumRealThe number of subimages in the file (1 for a single image, GIF or Spine sprite)
xorigRealThe x position of the new sprite's origin
yorigRealThe y position of the new sprite's origin
prefetchBooleanWhether to immediately load the sprite into GPU memory
+

 

+

Returns:

+

Sprite Asset

+

 

+

Example:

+

Create Event

+

sprite_index = -1;
+ new_sprite = sprite_add_ext("my_new_sprite_index.png", 1, 0, 0, true);

+

Async Image Loaded Event

+

var _sprite_id = async_load[?"id"];
+ if (_sprite_id == new_sprite)
+ {
+     sprite_index = _sprite_id;
+ }

+

Draw Event

+

if (sprite_index != -1)
+ {
+     draw_self();
+ }

+

The above example defines code in three Object Events. In the Create event the instance's sprite_index is first set to -1 and the function sprite_add_ext is called with fname set to "my_new_sprite_index.png" (i.e. an image file in the root of the datafiles directory). The sprite ID returned by the function is stored in an instance variable new_sprite.

+

In the async Image Loaded event the value stored in async_load[?"id"] is compared to the value in new_sprite. If the two are equal, it means this Image Loaded event was triggered for the call to sprite_add_ext made earlier in the Create event (there may be many other calls to sprite_add_ext). The ID of the newly loaded sprite is then assigned as this instance's sprite_index.

+

In the Draw Event instances of the object call draw_self if their sprite_index is not set to -1 (or, rather, no longer set to -1).

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush_multi.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush_multi.htm index c38dc2db7..ff621f078 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush_multi.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sprites/Sprite_Manipulation/sprite_flush_multi.htm @@ -4,7 +4,7 @@ sprite_flush_multi - + @@ -26,7 +26,7 @@

Syntaxe :

ArgumentsType Description - + array Array with the sprite indices to flush diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Tilsets/tileset_get_info.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Tilsets/tileset_get_info.htm new file mode 100644 index 000000000..4c4363b24 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Tilsets/tileset_get_info.htm @@ -0,0 +1,163 @@ + + + + + + tileset_get_info + + + + + + + + + + +

tileset_get_info

+

This function returns a struct containing information on a tile set.

+

The returned struct contains the following variables: 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tile Set Info Struct
Variable NameData TypeDescription
widthRealThe width of the whole tile set texture (in pixels)
heightRealThe height of the whole tile set texture (in pixels)
textureRealThe texture ID
tile_widthRealThe width of a single tile (in pixels)
tile_heightRealThe height of a single tile (in pixels)
tile_horizontal_separatorRealThe number of pixels horizontally on each side of each tile (making the space between two tiles 2 * tile_horizontal_separator)
tile_vertical_separatorRealThe number of pixels vertically on each side of each tile (making the space between two tiles 2 * tile_vertical_separator)
tile_columnsRealThe number of columns on each row of the tile set
tile_countRealThe number of tiles
frame_countRealThe number of frames of animation per animation
frame_length_msint64 (signed 64-bit integer)The number of milliseconds for frame animation
framesStructA struct containing all the animation frames. Each tile number has a key in the struct, each entry is an array of the frames to use (each array should be frame_count long).
+

 

+

Syntax:

+

tileset_get_info(index);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indexTile Set AssetThe tile set to get the info from
+

 

+

Returns:

+

Tile Set Info Struct (in case of a valid Tile Set Asset) or undefined (no valid tile set given)

+

 

+

Example 1: Showing the output 

+

var _info = tileset_get_info(ts_Forest);
+ show_debug_message(_info);

+

The above code calls tileset_get_info to get information about an existing tile set ts_Forest and stores the result in a temporary variable _info. The info is then shown in a debug message.

+

 

+

Example 2: Finding the top-left corner position of a tile

+

// tnumber is the number of the tile that you want to find
+ var _tnumber = 7;
+ var _ts_info = tileset_get_info(ts_Forest);
+ if is_undefined(_ts_info) == false
+ {
+     var _twidth = _ts_info.tile_width + 2 * _ts_info.tile_horizontal_separator;
+     var _theight = _ts_info.tile_height + 2 * _ts_info.tile_vertical_separator;
+     var _tile_x = (_tnumber mod _ts_info.tile_columns) * _twidth;
+     var _tile_y = (_tnumber div _ts_info.tile_columns) * _theight;
+     show_debug_message("The top-left coordinates of tile index {0} are: ({1}, {2})", _tnumber, _tile_x, _tile_y);
+ }
+ else
+ {
+     show_debug_message("No valid tile set was provided to the function");
+ }

+

The above code finds the coordinates of the top-left corner of the given tile index. First the index of the tile is defined and stored in a temporary variable _tnumber. Then tileset_get_info is called on an existing tile set ts_Forest and the returned struct is stored in _ts_info. Next an if statement checks if the variable contains a valid struct (accessing the variables in the next steps will throw errors otherwise).
+ If it does, some variables are calculated. _twidth and _theight are the total width and height of a tile on the tile set, including the border on both sides (_ts_info.tile_horizontal_separator and _ts_info.tile_vertical_separator) _tile_x is the remainder of the tile index divided by the number of columns and _tile_y is the number of times _ts_info.tile_columns fits into the tile index. After this, a debug message is shown with the top-left coordinates (the separator offsets not yet included).
+ If the case an invalid tile set was provided to the function a different debug message is shown.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Buffers.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Buffers.htm index fd8e5e4e4..d98c4abf3 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Buffers.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Buffers.htm @@ -9,7 +9,7 @@ - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Transferring_Data_Between_Buffers.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Transferring_Data_Between_Buffers.htm new file mode 100644 index 000000000..49bcb4ccb --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/Transferring_Data_Between_Buffers.htm @@ -0,0 +1,58 @@ + + + + + + + Transferring Data Between Buffers + + + + + + + +

Transferring Data Between Buffers

+

This page gives an overview of how you can transfer data between buffers and vertex buffers.

+

At the lowest level, a buffer is a contiguous region in memory that consists of bytes. Using the functions buffer_read and buffer_write (and buffer_peekbuffer_poke and buffer_fill) basic data types can be written into a buffer. On top of this, these basic data types can be combined to create data structures where each entry in the structure follows a given format.

+

Stride

+

Items stored in a buffer in such a structured way all take up the same number of bytes. This is the number of bytes to move to go from one item to the next and is called the stride.

+

Buffer to Buffer

+

The following functions allow copying parts of data from one buffer to another: 

+
    +
  • buffer_copy: copies a contiguous block of bytes once
  • +
  • buffer_copy_stride: copies a contiguous block of bytes multiple times. You can use this to copy e.g. all positions, all colours, all UV's, etc.
  • +
+

Buffer to Vertex Buffer

+

A vertex buffer is a special type of buffer. The vertex format determines what data is written to the buffer and in which order. You don't have to write the values directly, but can call functions such as vertex_position_3d, vertex_colourvertex_texcoord, etc.

+

A few things are specific to vertex buffers: 

+
    +
  • The stride in this case is the size of the vertex format (and that of a vertex).
  • +
  • Most components of the vertex attributes are stored as a 32bit float (buffer_f32).
  • +
  • Each of the components of a colour attribute (R, G, B, A) is stored as an unsigned byte (buffer_u8).
  • +
+

The following schematic shows how the data in a vertex buffer maps to the data in a buffer, and the other way around: 

+

+

 You can use the function vertex_format_get_info to get information on how the data of a vertex in a given format is laid out in a buffer.

+

The following functions can be used to transfer data between buffers and vertex buffers and vice versa: 

+ +

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_end.htm index db7667738..87d885300 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_end.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_end.htm @@ -4,7 +4,7 @@ buffer_async_group_end - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_option.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_option.htm index 76cae2b25..3911e79db 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_option.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_async_group_option.htm @@ -52,9 +52,9 @@

Les retours :

Exemple :

buffer_async_group_begin("save_folder_name");
- buffer_async_group_option("showdialog", false);
- buffer_async_group_option("slottitle", "Catch The Haggis Save");
- buffer_async_group_option("subtitle", "All your haggis are saved here!");
+ buffer_async_group_option("showdialog", false);
+ buffer_async_group_option("slottitle", "Catch The Haggis Save");
+ buffer_async_group_option("subtitle", "All your haggis are saved here!");
save = buffer_save_async(buff, "Player_Save.sav", 0, 16384);
buffer_async_group_end();

Le code ci-dessus démarre un groupe buffer puis définit les options du groupe avant de définir 4 fichiers à sauvegarder de manière asynchrone. La définition du groupe est ensuite terminée (à ce moment-là, la sauvegarde commence).

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode.htm index bbc8006bb..9705e5aa6 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode.htm @@ -39,7 +39,7 @@

Les retours :

Exemple :

ini_open("Save.ini");
- buff = buffer_base64_decode(ini_read_string("Save", "Slot1", ""));
+ buff = buffer_base64_decode(ini_read_string("Save", "Slot1", ""));
ini_close();

Le code ci-dessus ouvrira un fichier ini, puis lira une chaîne de caractères dans la fonction de décodage. Cette fonction renvoie un indice buffer, qui est stocké dans la variable "buff", contenant les données précédemment encodées et sauvegardées. Le fichier ini est ensuite fermé.

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode_ext.htm index 75975d88f..26f293a0b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode_ext.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_decode_ext.htm @@ -27,7 +27,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to decode the string into. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_encode.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_encode.htm index 30687cd26..eeee40e13 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_encode.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_base64_encode.htm @@ -26,7 +26,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to use. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_compress.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_compress.htm index b199fe281..17b08a679 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_compress.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_compress.htm @@ -24,7 +24,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to compress. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_from_vertex_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_from_vertex_buffer.htm index 9c58ce4f8..e05801047 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_from_vertex_buffer.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_from_vertex_buffer.htm @@ -4,7 +4,7 @@ buffer_copy_from_vertex_buffer - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_stride.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_stride.htm new file mode 100644 index 000000000..d84e0aa64 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_copy_stride.htm @@ -0,0 +1,191 @@ + + + + + + buffer_copy_stride + + + + + + + + + + +

buffer_copy_stride

+

This function copies the given number of items from a source buffer to a destination buffer, where all items have the same size in bytes and are spaced apart evenly by a different number of bytes in the source and destination buffer.

+

You can use this function with buffers that store items and their attributes in a structured way, e.g. game data, vertex data or any other data in a known format.

+
+

+

The function call belonging to the above diagram would look as follows: buffer_copy_stride(src_buffer, 6, 2, 6, 3, dest_buffer, 8, 2);

+

You can interpret the source offset as the sum of two offsets: an offset to the start of the item data and an offset within the item (i.e. which attribute of the item to copy).

+

Stride

+

The stride is the number of bytes to go from one item to the next. A positive value moves forward, a negative value moves backward.

+

For example, in case of GameMaker's default vertex format the stride value is 24 (3*4+4*1+2*4). The number of bytes to move from one (x, y, z) position in the buffer to the next is 24, the number of bytes to move from one colour value to the next is also 24, as well as the number of bytes to move from one UV to the next.

+

You "select" the attribute you want to copy by changing the offset, meanwhile the stride remains unchanged: 

+

+

How It Works

+
    +
  • The function starts by moving src_offset bytes from the start of the source buffer and dest_offset bytes from the start of the destination buffer.
  • +
  • It then repeats src_count times the following:  +
      +
    • Copy src_size bytes of data from the current offset in the source buffer to the current offset in the destination buffer.
    • +
    • Move src_stride bytes to the right or to the left in the source buffer, depending on the sign of src_stride, and dest_stride bytes to the left or right in the destination buffer.
    • +
    +
  • +
+

Usage Notes

+
    +
  • The stride value can be greater than the number of bytes that an item actually uses. These bytes in between may contain other data or no useful data at all.
  • +
  • By setting dest_stride to a value greater than src_size you can insert "gaps" between values written to the destination buffer.
  • +
  • In case of a fixed-size buffer (buffer_fixed) or of a non-wrapping buffer the copying stops when the end of the buffer is reached. For a buffer that's set to wrap (buffer_wrap) copying will continue from the start of the buffer.
  • +
+

 

+

Syntax:

+

buffer_copy_stride(src_buffer, src_offset, src_size, src_stride, src_count, dest_buffer, dest_offset, dest_stride);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
src_bufferBuffer IDThe buffer containing the source data
src_offsetRealThe offset, in bytes, in the source buffer to start copying bytes. When negative, it is subtracted from the buffer size.
src_sizeRealThe size, in bytes, of a single item to copy
src_strideRealThe number of bytes between two items. This value can be negative and be set to 0.
src_countRealThe number of items to copy
dest_bufferBuffer IDThe buffer to copy the data to
dest_offsetRealThe offset, in bytes, in the destination buffer to write the data. This offset can be negative.
dest_strideRealThe number of bytes between two items in the destination buffer. This value can be negative.
+

 

+

Returns:

+

N/A

+

 

+

Example 1: Basic Usage

+

var _num_items = 200;
+ var _attribute_size = buffer_sizeof(buffer_u16);
+ var _itemsize_source = buffer_sizeof(buffer_f32) + _attribute_size;
+ buff_source = buffer_create(_num_items * _itemsize_source, buffer_fixed, 1);
+ buff_destination = buffer_create(_num_items * _attribute_size, buffer_fixed, 1);
+
+ var _i = 0;
+ repeat(_num_items)
+ {
+     buffer_write(buff_source, buffer_f32, random_range(-100, 100));
+     buffer_write(buff_source, buffer_u16, _i++);
+ }
+
+ buffer_copy_stride(buff_source, 4, _attribute_size, _itemsize_source, _num_items, buff_destination, 0, _attribute_size); +

+

The above code shows basic usage of the buffer_copy_stride function. First, a couple of temporary variables are defined that store the number of items in source and destination buffer, the stride of the source buffer and the size of an item. Two buffers of fixed size are then created, one to store the source data and one to store the destination data. The references to them are stored in the variables buff_source and buff_destination respectively. Next, the source buffer has 200 items written to it using buffer_write. Every item consists of one random buffer_f32 value between -100 and 100 followed by a buffer_f16 value that stores an index. Finally, the second buffer_f16 element of each item is copied to the destination buffer using buffer_copy_stride. The first buffer_f16 value is written to byte 0 (as dest_offset is set to 0), the next one is written to byte 2 (dest_stride is set to _itemsize which is 2), the next one to byte 4, and so on. After the function call, buff_destination will contain the 200 buffer_f16 values in buff_source one right after the other, with no bytes in-between.

+

 

+

Example 2: Negative Offset & Stride

+

var _item_size = buffer_sizeof(buffer_f32);
+ var _num_items = 100;
+
+ var _i = 0;
+ buff_numbers = buffer_create(_num_items * _item_size, buffer_fixed, 4);
+ repeat(_num_items) buffer_write(buff_numbers, buffer_f32, _i++);
+
+ buff_data = buffer_create(2048, buffer_fixed, 4);
+ buffer_copy_stride(buff_numbers, -_item_size, _item_size, -_item_size, _num_items, buff_data, 0, 12); +

+

The above code first initialises two temporary variables that are used in the code that follows: the size of a single item _item_size and the number of items _num_items. It then creates a new buffer of a fixed size with room for this number of items. The byte alignment can be set to 4 since every item is stored at an integer multiple of 4 bytes. Next, a repeat loop writes the values 0 to 100 to the buffer, using buffer_write. After that, another fixed-size buffer of 2048 bytes is created and stored in the variable buff_data. Finally, buffer_copy_stride is called to write the numbers in the source buffer buff_numbers to the destination buffer buff_data. Because of the negative value of the source offset, the last number in the buffer is the first one to be written. Also, the numbers are traversed backwards because of the negative value of the source stride. The destination stride of 12 makes sure the numbers are spaced 12 bytes apart in buff_data. As a result buff_data contains the numbers in reverse order, with 12 bytes between each of them.

+

 

+

Example 3: Stride set to 0

+

var _item_size = buffer_sizeof(buffer_f32);
+ buff_source = buffer_create(_item_size, buffer_fixed, 4);
+ buff_destination = buffer_create(16 * _item_size, buffer_fixed, 4);
+
+ buffer_write(buff_source, buffer_f32, 1);
+
+ buffer_copy_stride(buff_source, 0, _item_size, 0, 4, buff_destination, 0, 5 * _item_size); +

+

The above code shows how you can use a stride value of 0 to keep copying the same value multiple times to a destination buffer.

+

First, the size of an item is set to the size of a float (buffer_f32) and stored in _item_size. Next, the source and destination buffer are created with a fixed size and an alignment of 4 (since floats always align to multiples of 4 bytes). The source buffer can only store a single float, the destination buffer can store 16 floats. Then, the value 1 is written to the source buffer. Finally, this value is copied a total of 4 times using buffer_copy_stride with a destination stride value of 5 times the item size. After the function has finished buff_destination will contain the values of an identity matrix.

+

 

+

Example 4: Interleaving Data from Multiple Buffers

+

Create Event

+

vertex_format_begin();
+ array_foreach([vertex_format_add_position_3d, vertex_format_add_colour, vertex_format_add_texcoord], script_execute);
+ vertex_format = vertex_format_end();
+
+ buff_positions_xyz = buffer_base64_decode("JqwCQwuLi0J5DIBBcQc3Q27Ar0NNpBZD+WSqQ8B9OEPB0YtD");
+ buff_colours_rgba = buffer_base64_decode("Ud93/wghI//D2cr/");
+ buff_uvs = buffer_base64_decode("9KQyP69/UT9Uxak+ybENPzKNZzwxS1A9");
+
+ buff_vertex_data = buffer_create(3 * 24, buffer_fixed, 1);
+ buffer_copy_stride(buff_positions_xyz, 0, 3 * 4, 3 * 4, 3, buff_vertex_data, 0, 24);
+ buffer_copy_stride(buff_colours_rgba, 0, 4 * 1, 4 * 1, 3, buff_vertex_data, 12, 24);
+ buffer_copy_stride(buff_uvs, 0, 2 * 4, 2 * 4, 3, buff_vertex_data, 16, 24);
+ vb = vertex_create_buffer_from_buffer(buff_vertex_data, vertex_format); +

+

Draw Event

+

vertex_submit(vb, pr_trianglelist, -1);

+

The above example shows how to join together data that's stored as attributes in separate buffers. The data are combined into a single buffer, in which the data are interleaved.

+

First, in the Create event, the default vertex format is created and assigned to an instance variable vertex_format. Then the three buffers containing the attribute data are created from base64-encoded data: buff_positions_xyz stores the (x, y, z) position data of 3 vertices, buff_colours_rgba stores their RGBA colour data and buff_uvs their UV data. The values of each attribute are stored one after the other, e.g. buff_positions_xyz stores the (x, y, z) position of the first vertex, followed by the (x, y, z) position of the second vertex, followed by that of the third vertex, etc.

+

After that, another buffer buff_vertex_data is created to store the interleaved vertex data. Each of the three calls to buffer_copy_stride then reads the values of each attribute (position, colour and uv) and places them in the correct positions in the destination buffer, leaving room for the other attributes to be written by the next call to the function. Finally a vertex buffer is created from the data in the buffer.

+

In the Draw event, the vertex buffer is submitted. This will draw a triangle.

+


+ +

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_crc32.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_crc32.htm index 53ded4ff0..bad04e4af 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_crc32.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_crc32.htm @@ -4,7 +4,7 @@ buffer_crc32 - + @@ -26,7 +26,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to use. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_decompress.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_decompress.htm index 4ceb1c356..37ddccba9 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_decompress.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_decompress.htm @@ -24,7 +24,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to decompress. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_exists.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_exists.htm index a1153650e..e5ea17f19 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_exists.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_exists.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to check. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_fill.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_fill.htm index 9482b7d4c..ebf84c335 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_fill.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_fill.htm @@ -26,7 +26,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to fill. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_alignment.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_alignment.htm index 6ced78907..39e39ed09 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_alignment.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_alignment.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to check. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_type.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_type.htm index 23a921b73..f164e4e96 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_type.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_type.htm @@ -53,7 +53,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to check. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load.htm index 24cb25e41..d1302ad34 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load.htm @@ -31,7 +31,7 @@

Syntaxe :

ArgumentsType Description - + filename The name of the file to load from. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_async.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_async.htm index b93e4d077..0a8bec107 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_async.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_async.htm @@ -4,7 +4,7 @@ buffer_load_async - + @@ -31,7 +31,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to load. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_ext.htm index abb9e87d7..c397124c3 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_ext.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_ext.htm @@ -4,7 +4,7 @@ buffer_load_ext - + @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to load into. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_partial.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_partial.htm index 4ca262931..372bff9fb 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_partial.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_load_partial.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to load into (destination). diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_md5.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_md5.htm index db5067992..374fae0f6 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_md5.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_md5.htm @@ -9,7 +9,7 @@ - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_read.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_read.htm index 321560013..2e2306a54 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_read.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_read.htm @@ -4,7 +4,7 @@ buffer_read - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_resize.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_resize.htm index 7598bbe77..ecab25ee7 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_resize.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_resize.htm @@ -24,7 +24,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to change the size of. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_save_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_save_ext.htm index 6ae7d7055..77e5ce52a 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_save_ext.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_save_ext.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to save. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_set_used_size.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_set_used_size.htm index ee8644d80..b01ab6ec2 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_set_used_size.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_set_used_size.htm @@ -4,7 +4,7 @@ buffer_set_used_size - + @@ -26,7 +26,7 @@

Syntaxe :

ArgumentsType Description - + buffer The index of the buffer to use. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_sha1.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_sha1.htm index 9be405dc1..e72f625c7 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_sha1.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_sha1.htm @@ -9,7 +9,7 @@ - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_write.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_write.htm index 9e03f0bb9..3a4e4147e 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_write.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_write.htm @@ -4,7 +4,7 @@ buffer_write - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_copy_transforms.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_copy_transforms.htm new file mode 100644 index 000000000..3129e78e5 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/camera_copy_transforms.htm @@ -0,0 +1,77 @@ + + + + + + camera_copy_transforms + + + + + + + + + + +

camera_copy_transforms

+

This function copies all transform-related settings of the source camera to the destination camera.

+

More specifically, it copies the source camera's view and projection matrices, as well as the view position, size, speed, border and angle values.

+

 This function is mostly meant for internal use by GameMaker when working with filters and effects though you can use it as a convenient way to copy one camera's transforms to another one.

+

 The function doesn't copy the source camera's begin, end and update scripts.

+

 

+

Syntax:

+

camera_copy_transforms(dest_camera, src_camera);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
dest_cameraCamera IDThe camera to copy the source camera's transforms to (projection and view matrix)
src_cameraCamera IDThe camera that contains the projection and view matrices that you want to copy
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

cam1 = view_camera[0];
+ cam2 = camera_create();
+ camera_copy_transforms(cam2, cam1); +

+

The above code assigns the camera that GameMaker creates internally for view 0 (that you can first configure in The Room Editor) to an instance variable cam1. Then it creates a new, "empty" camera cam2 using the function camera_create. It then copies cam1's transform-related settings to cam2 by calling camera_copy_transforms.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm index b01366323..279efd35a 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm @@ -4,7 +4,7 @@ view_surface_id - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_get_showborder.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_get_showborder.htm new file mode 100644 index 000000000..7574e87b1 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_get_showborder.htm @@ -0,0 +1,48 @@ + + + + + window_get_showborder + + + + + + + + + + +

window_get_showborder

+

This function gets whether the game is shown in a borderless window or not.

+

It corresponds to the Borderless Window option in the Windows Graphics options; it gets the value of that checkbox in-game.

+
+

 

+

Syntax:

+

window_get_showborder();

+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

var _border_shown = window_get_showborder();

+

The above code gets whether the window border is shown and stores the result in a temporary variable _border_shown.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_delta_x.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_delta_x.htm new file mode 100644 index 000000000..f7d922591 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_delta_x.htm @@ -0,0 +1,48 @@ + + + + + + window_mouse_get_delta_x + + + + + + + + + + +

window_mouse_get_delta_x

+

This function returns the X movement delta of the mouse cursor.

+

This is the amount of pixels the cursor has moved on the X axis, between the previous and current step of the game.

+

 This function returns the delta value both when the mouse is locked and when it's not (see window_mouse_get_locked).

+

 

+

Syntax:

+

window_mouse_get_delta_x();

+

 

+

Returns:

+

Real

+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_delta_y.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_delta_y.htm new file mode 100644 index 000000000..7dc014be4 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_delta_y.htm @@ -0,0 +1,48 @@ + + + + + + window_mouse_get_delta_y + + + + + + + + + + +

window_mouse_get_delta_y

+

This function returns the Y movement delta of the mouse cursor.

+

This is the amount of pixels the cursor has moved on the Y axis, between the previous and current step of the game.

+

 This function returns the delta value both when the mouse is locked and when it's not (see window_mouse_get_locked).

+

 

+

Syntax:

+

window_mouse_get_delta_y();

+

 

+

Returns:

+

Real

+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_locked.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_locked.htm new file mode 100644 index 000000000..a02b89997 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_get_locked.htm @@ -0,0 +1,46 @@ + + + + + + window_mouse_get_locked + + + + + + + + + + +

window_mouse_get_locked

+

This function returns if the mouse is locked (true) or not (false).

+

 

+

Syntax:

+

window_mouse_get_locked();

+

 

+

Returns:

+

Boolean

+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_set_locked.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_set_locked.htm new file mode 100644 index 000000000..ab118d6be --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_mouse_set_locked.htm @@ -0,0 +1,68 @@ + + + + + + window_mouse_set_locked + + + + + + + + + + +

window_mouse_set_locked

+

This function locks the mouse cursor in place inside the window, and makes it invisible.

+

Mouse movement can still be read through the functions window_mouse_get_delta_x and window_mouse_get_delta_y.

+

The cursor is set back to its previous "visible" state when mouse lock is disabled again, i.e. when the function is called with enable set to false.

+

 Use window_mouse_get_locked to get the locked state of the mouse.

+

 

+

Syntax:

+

window_mouse_set_locked(enable);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
enableBooleanWhether to lock the mouse or not
+

 

+

Returns:

+

N/A

+

 

+

Example: Basic Use

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_set_showborder.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_set_showborder.htm new file mode 100644 index 000000000..1752f57a4 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/The_Game_WIndow/window_set_showborder.htm @@ -0,0 +1,67 @@ + + + + + window_set_showborder + + + + + + + + + + +

window_set_showborder

+

This function sets whether the game is shown in a borderless window or not.

+

It corresponds to the Borderless Window option in the Windows Graphics options; it changes the value of that checkbox in-game.

+
+

 

+

Syntax:

+

window_set_showborder(show);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
showBooleanWhether to show the window border
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

window_set_showborder(!window_get_showborder());

+

The above line of code toggles the window border. 

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_get_gui_height.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_get_gui_height.htm index a367f7c5e..9d6ad8ca3 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_get_gui_height.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_get_gui_height.htm @@ -40,10 +40,10 @@

Exemple :

Copyright YoYo Games Ltd. 2022 Tous droits réservés
\ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_set_timing_method.htm b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_set_timing_method.htm index 1965fe145..aa8ae3476 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_set_timing_method.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Cameras_And_Display/display_set_timing_method.htm @@ -9,8 +9,8 @@ - - + + @@ -60,7 +60,7 @@

Les retours :

Exemple :

if display_get_timing_method() != tm_sleep
{
-     display_set_timing_method(tm_sleep);
+     display_set_timing_method(tm_sleep);
    if display_get_sleep_margin() != 20
    {
        display_set_sleep_margin(20);
@@ -83,6 +83,7 @@

Copyright YoY display_set_timing_method tm_sleep tm_countvsyncs +tm_systemtiming --> + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_load_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_load_buffer.htm index 4b2c32b35..836fd9a24 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_load_buffer.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_load_buffer.htm @@ -4,7 +4,7 @@ ds_map_secure_load_buffer - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_save_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_save_buffer.htm index 5cdcef132..71e9c3b0d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_save_buffer.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Data_Structures/DS_Maps/ds_map_secure_save_buffer.htm @@ -4,7 +4,7 @@ ds_map_secure_save_buffer - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/The_Debug_Overlay.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/The_Debug_Overlay.htm new file mode 100644 index 000000000..9437fcb3c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/The_Debug_Overlay.htm @@ -0,0 +1,168 @@ + + + + + + + The Debug Overlay + + + + + + + + + +

The Debug Overlay

+

The Debug Overlay is an in-game overlay that displays various realtime debug information about your game.

+

It includes the following three windows by default: FPS (open by default), Log, and Audio. Additionally, it displays the GameMaker version in the top-right corner, along with the version and name of the project.

+

The Debug Overlay can be accessed using the functions show_debug_overlay and show_debug_log, the first opens the overlay with the FPS window open, the second with the Log window open.

+

You can define your own, custom debug views in The Debug Overlay using dbg_view. Debug views can have sections added to them using dbg_section, which you can add controls to such as sliders, string input boxes, etc. These allow you to change the values of variables through references created using ref_create. The DebugView option under the Debug menu determines if custom views are visible. All debug views are listed under the Views menu and can have their visibility toggled here.

+

+

Debug

+

FPS

+

The title bar for this window shows the current number of texture swaps, the number of vertex batches, the current FPS (fps_real) and a bar showing the stacked time values: 

+

+

Texture swaps and vertex batches will never be zero and will normally show values of 2 or 3, since even with an empty room and no objects GameMaker still has to draw and batch things.

+

Inside this window, you have two sections: a graph and a bar.

+

The graph displays the FPS (fps_real) by default, where the horizontal axis is the amount of time passed since the FPS menu was opened, and the vertical axis is the frame time in seconds.

+

+

The FrameTime value is the time each frame took to process, in seconds. This value should be less than the time a single frame can take. If the game speed is e.g. set to 60FPS, then every frame can take at most 1/60 = 0.0166... seconds. If it takes any longer than that, it means that GameMaker is still processing the current frame while it should already be processing the next one. The (real) FPS will drop below the game speed as a result.

+

Enable the Stacked option to display the time values for specific types of processing that GameMaker does: 

+

+

These are: 

+
    +
  • Garbage Collector: Time spent by the Garbage Collector
  • +
  • IO&YoYo: Time spent for input/output (keyboard, mouse, gamepads, networking), and some OS processing
  • +
  • Update: Time spent in the update loop of the game (Step events, etc.)
  • +
  • Draw: Time spent drawing (Draw events)
  • +
  • Text: Time spent by the text in Sequences
  • +
  • Scroll: Time spent processing scrolling backgrounds in rooms, and video
  • +
+

You can click on each value in the top-right corner (next to their coloured boxes) to toggle their visibilities.

+

The History bar controls the horizontal range that is visible in the graph. You can set this between 1 and 30 seconds.

+

Log

+

This window displays the Output Log, same as the one that appears in the IDE under The Output Window.

+

All debug messages that you show using show_debug_message and show_debug_message_ext are also shown here.

+

+

The text field at the bottom of the window allows you to provide basic console input: 

+
    +
  • You can write a global variable name to print its value, or a global function name to execute it, with space-separated arguments (e.g. func arg0 arg1)
  • +
  • The console stores a history of your last commands. Press the Up and Down arrow keys to go through the previous commands.
  • +
  • The console also supports autocomplete that you can access by pressing the Tab key, which will be shown when the cursor is on a word with more than 2 characters. Up and Down keys select the option in the dropdown box and Escape closes the autocomplete: 
  • +
+

+

 While you type commands in the console input, GameMaker continues to trigger events based on the Keyboard Input that you provide, meaning your game still receives input.

+

The input follows a couple rules: 

+
    +
  • If the first word is a global function, then it will be executed with the arguments given.
  • +
  • If the first word is a built-in variable, then its value is printed.
  • +
+

All subsequent words following the first word are converted into values that are passed as arguments to the function, as follows: 

+
    +
  • First it tries to interpret it as a global scope value, if one is found, it is passed in as an argument
  • +
  • If it is an asset name then the reference to that asset is passed
  • +
  • true and false can be used for boolean values
  • +
  • If it is a number then a real number is passed
  • +
  • Any text surrounded by double quotes "" is treated as a string
  • +
  • Anything else not following the above rule is treated as a string
  • +
+

 All scripts are executed within the scope of the global struct.

+

A simple command looks like this: 

+

show_debug_message "Hello World!"

+

 No parentheses should be added here. If you add them here like you normally would in GML Code, the function won't be executed and a line ERROR : unknown command will be shown in the output.

+

Finally, you can Clear the output and Copy its contents to the clipboard.

+

Audio

+

This window shows debug information related to the audio playing in your game.

+

The graph displays the most recent output buffer on the audio thread. This is the output signal that GameMaker sends to the audio device, after all mixing and processing.

+

The horizontal axis in this graph is the frame number in the buffer, and the vertical axis is the amplitude, typically ranging between -1 and 1.

+

The list at the bottom shows you each sound "source" that is currently playing, or may potentially play a sound. The columns display the following values:

+
    +
  • source: The ID of the source
  • +
  • buffer: The ID of the buffer attached to this source
  • +
  • numProcessed: The number of queued buffers that the source has played through (which gets cleaned up at certain points)
  • +
  • numQueued: The number of buffers that are queued on this source (including processed ones)
  • +
  • gain: The source gain as a 16-bit value (0-65535)
  • +
  • name: The name of the asset. Dynamically created assets (such as buffer sounds) will not show a name.
  • +
  • pos: The current playback position of the source in frames (as a hex value)
  • +
+

These sources are limited by the audio_channel_num value.

+

DebugView

+

This toggles the visibility of all custom debug views created using dbg_view.

+

Views

+

This menu lists all the custom debug views that you've created using dbg_view.

+

Each menu item shows the name of the debug view with a check mark on the right if the view is set to be visible. Clicking the menu item toggles the visibility of this debug view.

+

 The Debug menu's DebugView setting must be enabled for any custom debug views to be shown.

+

+

Creating Debug Views

+

A custom debug view is created using dbg_view:

+

custom_dbgview = dbg_view("Custom Debug View", true);

+

The first argument is its name, the second is its visibility. Optional parameters can be passed to customise its position and size.

+

Within debug views, you create sections using dbg_section

+

custom_section = dbg_section("Custom Section");

+

To these sections you add controls that display and/or modify the value that they're linked to via a reference created with ref_create.

+

References can be created to all kinds of variables. Each control supports a reference to one or more datatypes.

+

 Variables must exist within a struct or instance as a debug view is declared once, so local variables cannot be displayed.

+

Visually, controls are laid out in a grid that has two columns: most controls span two columns, some only a single. Two single column controls can be placed on a single line by calling dbg_same_line

+

button1 = function()
+ {
+     show_debug_message("Button1 clicked!");
+ }
+
+ ref = ref_create(self, "button1");
+ dbg_text("This text will go here");
+ dbg_same_line();
+ dbg_button("Button1", ref); +

+

 A debug control created before a section is created will be added to a new section named "Default". A debug section that's created before a debug view is created will be added to a debug view "Default".

+

The above lines of code will show the following window in The Debug Overlay

+

+

System

+

This menu contains two settings related to the debug overlay: 

+
    +
  • Scale - the scale factor of the debug overlay, default is x1
  • +
  • Alpha - the alpha value to use to draw the overlay, default is 0.8
  • +
+

Function Reference

+

General

+ +

Views

+ +

Controls

+ +

 

+

 

+ + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_add_font_glyphs.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_add_font_glyphs.htm new file mode 100644 index 000000000..167f08fbf --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_add_font_glyphs.htm @@ -0,0 +1,127 @@ + + + + + + dbg_add_font_glyphs + + + + + + + + + + +

dbg_add_font_glyphs

+

This function adds a range of characters from a TTF font to be used for text rendering in The Debug Overlay. You supply a font name as a string, which must be present in the Included Files.

+

 The glyphs that you want to add must be present in the given TTF font.

+

The following values can be used to specify the range:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Font Range Constant
 RangeDescription
-1Default Latin range
0Greek
1Korean
2Japanese
3Chinese Full
4Chinese Simplified Common
5Cyrillic
6Thai
7Vietnamese
+

 

+

Syntax:

+

dbg_add_font_glyphs(filename, [size], [font_range]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
filenameStringThe filename of the TTF file to use
sizeReal  The size of the font in pixels (default is 13)
font_rangeReal  The range of characters to add (default is -1 for the Latin range)
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

dbg_add_font_glyphs("korean_font.ttf", 24, 1);

+

The above code adds the glyphs of the Korean character range from the TTF font file "korean_font.ttf". The used font size is 24.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_button.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_button.htm new file mode 100644 index 000000000..19e41f82e --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_button.htm @@ -0,0 +1,84 @@ + + + + + + dbg_button + + + + + + + + + + +

dbg_button

+

This function creates a button control within the current debug section. Clicking the button executes a Function.

+

The current debug section is the one last created using dbg_section.

+
+

 

+

Syntax:

+

dbg_button(label, ref[, width, height]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
labelStringThe text label to show next to the button
refReference or Script Function or FunctionA reference to a Function or Script Function created using ref_create or a function
widthReal  The width of the button in pixels
heightReal  The height of the button in pixels
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

dbg_button("Click me!", function() {show_debug_message("Clicked the button!"});

+

The above code creates a button control in an object's Create event using dbg_button. Since no calls are made to dbg_view or dbg_section, the button is added to a new debug section named "Default" in a new debug view named "Default". Clicking the button calls a function that shows a debug message using show_debug_message.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_checkbox.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_checkbox.htm new file mode 100644 index 000000000..3819a64bf --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_checkbox.htm @@ -0,0 +1,79 @@ + + + + + + dbg_checkbox + + + + + + + + + + +

dbg_checkbox

+

This function creates a checkbox control within the current debug section.

+

The checkbox takes the value of a Boolean variable. Clicking it toggles the variable.

+

The current debug section is the one last created using dbg_section.

+
+

 

+

Syntax:

+

dbg_checkbox(ref[, label]);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
refReferenceA reference to a Boolean variable created using ref_create
labelString  A label to display next to the checkbox
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

toggle = false;
+
+ var _ref_to_toggle = ref_create(self, "toggle");
+ dbg_checkbox(_ref_to_toggle, "The Toggle Switch"); +

+

The code above sets a boolean variable toggle in the Create event. It creates a reference to the variable using ref_create, stores it in a local variable _ref_to_toggle and passes that to dbg_checkbox. Since no calls were made to dbg_view or dbg_section, a new view "Default" and a new section "Default" are created that the checkbox control is added to. The checkbox will show a text label "The Toggle Switch" next to it.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_colour.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_colour.htm new file mode 100644 index 000000000..30a851275 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_colour.htm @@ -0,0 +1,95 @@ + + + + + + dbg_colour + + + + + +

dbg_colour

+

This function creates a colour control within the current debug section.

+

The control takes the value of a Colour variable and shows the R, G and B component: 

+

You can change the R, G and B value by double-clicking on the value and entering a new value. You can also click the square on the right that shows the colour to bring up a colour picker dialog to select a new colour.

+

 The value is an RGB colour value, without an alpha component.

+
+

 

+

Syntax:

+

dbg_colour(ref[, label]);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
refReferenceA reference created using ref_create to a Colour variable
labelString  A label to show next to the colour control
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

my_view = dbg_view($"Settings for {id}", true);
+ my_section = dbg_section("Colours");
+ dbg_colour(ref_create(self, "image_blend"), "Blend Colour");

+

Clean Up Event

+

dbg_section_delete(my_section);
+ dbg_view_delete(my_view);

+

The code above is added to an object's Create event. Every instance of this object that executes the code creates a new debug view using dbg_view, stores it in an instance variable my_view and adds a section named "Colours" to it using dbg_section, stored in a variable my_section. Each of them then adds a colour control using dbg_colour that changes that instance's image_blend colour.

+

In the Clean Up event, every instance of this object deletes its debug view and section that it created (my_view and my_section respectively).

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_drop_down.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_drop_down.htm new file mode 100644 index 000000000..c865f880b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_drop_down.htm @@ -0,0 +1,82 @@ + + + + + + dbg_drop_down + + + + + + + + + + +

dbg_drop_down

+

This function creates a drop down control for an integer value within the current debug section.

+

The values and names for the drop down are specified as a comma-delimited string, where integer values can optionally be specified after a colon symbol. For example "Zero,One:10,Two:20" creates a 3 entry drop down that will set the variable to the value 0, 10 or 20, depending on the selected option.

+
+

 

+

Syntax:

+

dbg_drop_down(ref, specifier[, label]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
refReferenceA reference to the variable, created using ref_create
specifierStringA comma-delimited string listing the options and, optionally, the integer value to use (e.g. "Zero,One:10,Two:20")
labelString  A label to show next to the dropdown
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

difficulty = 1;
+ var _ref = ref_create(self, "difficulty");
+ dbg_drop_down(_ref, "Easy:0,Normal:1,Hard:2,Impossible:3"); +

+

The code above first set an instance variable difficulty that stores the game's difficulty level. It creates a reference to the variable using ref_create and creates a dropdown control using dbg_drop_down to change the variable through that reference. The specifier lists the four difficulty levels as "Easy:0,Normal:1,Hard:2,Impossible:3".

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_same_line.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_same_line.htm new file mode 100644 index 000000000..a3ba9f560 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_same_line.htm @@ -0,0 +1,58 @@ + + + + + + dbg_same_line + + + + + + + + + + +

dbg_same_line

+

This function tells GameMaker to place the next debug control on the same line as the current one (if both are single column controls).

+
+

See Also (placeholder)

+
    +
  1. Topic List
  2. +
+
+

 

+

Syntax:

+

dbg_same_line();

+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

dbg_view("Custom View", true);
+ dbg_button("Button1", function() {show_debug_message("Clicked Button1");});
+ dbg_same_line();
+ dbg_button("Button2", function() {show_debug_message("Clicked Button2");}); +

+

The code above first defines a new debug view using dbg_view and sets it to be visible. It then adds two buttons directly to the debug view, meaning they will be added to a new debug section "Default". After that, two button controls are added using dbg_button, which will be placed on the same line because of the dbg_same_line between the two function calls. Both functions show a basic debug message.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_section.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_section.htm new file mode 100644 index 000000000..37c4db81e --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_section.htm @@ -0,0 +1,76 @@ + + + + + + dbg_section + + + + + + + + + + +

dbg_section

+

This function creates a section in the debug view last added with dbg_view and shows it in The Debug Overlay.

+

 If no debug view is active then the section is added to a new debug view named "Default".

+

Usage Notes

+
    +
  • A debug section groups together multiple debug controls inside a debug view.
  • +
  • Most controls span two columns, others only a single one (dbg_text and dbg_button).
  • +
  • Two single-column controls can be placed on the same row by calling dbg_same_line.
  • +
  • A debug section's contents can be copy-pasted to and from the clipboard as JSON using the Copy and Paste buttons.
  • +
+

 

+

Syntax:

+

dbg_section(name);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the new debug section
+

 

+

Returns:

+

Debug Section Pointer

+

 

+

Example:

+

dbg_view("CustomDebugView");
+ dbg_section("Player Variables"); +

+

The code above creates a new debug view using dbg_view named "CustomDebugView" and adds a new section "Player Variables" to it using dbg_section.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_section_delete.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_section_delete.htm new file mode 100644 index 000000000..7fe7bf452 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_section_delete.htm @@ -0,0 +1,70 @@ + + + + + + dbg_section_delete + + + + + + + + + + +

dbg_section_delete

+

This function deletes a debug section that was previously added with dbg_section.

+

 

+

Syntax:

+

dbg_section_delete(section);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
sectionPointer.DebugSectionA pointer to a debug section returned by dbg_section
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

config_section = dbg_section("Config");

+

Key Pressed Event - Space

+

dbg_section_delete(config_section);

+

The above code first creates a new debug section using dbg_section named "Config" in the Create event. Because no call to dbg_view was made before, the section is added to a debug view named "Default".

+

In the Space Key Pressed Event, the debug section is deleted using dbg_section_delete.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider.htm new file mode 100644 index 000000000..298c3fbfc --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider.htm @@ -0,0 +1,86 @@ + + + + + + dbg_slider + + + + + + + + + + +

dbg_slider

+

This function creates a slider control for a Real value within the current debug section.

+

You can optionally provide a minimum and maximum value for the slider.

+
+

 

+

Syntax:

+

dbg_slider(ref[, minimum, maximum, label]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
refReferenceA reference to a Real value, created using ref_create
minimumReal  The minimum value that the slider can have
maximumReal  The maximum value that the slider can have
labelString  The label to show next to the slider
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

my_var = 7;
+ dbg_slider(ref_create(self, "my_var"), 0, 10); +

+

The above code is executed in an object's Create event, or any other event that isn't performed continuously. First, an instance variable my_var is set. Then, a slider control is created using dbg_slider. It receives a reference to the variable, returned by ref_create, and values of 0 and 10 for the minimum and maximum parameters. Dragging the slider changes the value of the instance's my_var variable.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider_int.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider_int.htm new file mode 100644 index 000000000..d8da604af --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider_int.htm @@ -0,0 +1,87 @@ + + + + + + dbg_slider_int + + + + + + + + + + +

dbg_slider_int

+

This function creates a slider control for an integer Real value within the current debug section.

+

Moving the slider "truncates" the referenced variable (i.e. sets its fractional part to zero) and changes its integer part in steps of 1.

+

You can optionally provide a minimum and maximum value for the slider.

+
+

 

+

Syntax:

+

dbg_slider_int(dbgref, [minimum], [maximum], [label]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
dbgrefReferenceA reference to a Real value, created using ref_create
minimumReal  The minimum value that the slider can have
maximumReal  The maximum value that the slider can have
labelString  The label to show next to the slider
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

my_var = 127;
+ dbg_slider_int(ref_create(my_var), 0, 200, "Variable"); +

+

The above code is executed in an object's Create event, or any other event that isn't performed continuously. First, an instance variable my_var is set. Then, an integer slider control is created using dbg_slider_int. The function receives a reference to the variable, returned by ref_create, values of 0 and 200 for the minimum and maximum parameters and a label "Variable". Dragging the slider changes the value of the instance's my_var variable in steps of 1.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_sprite.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_sprite.htm new file mode 100644 index 000000000..1657f1385 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_sprite.htm @@ -0,0 +1,84 @@ + + + + + + dbg_sprite + + + + + + + + + + +

dbg_sprite

+

This function creates a sprite view of the referenced sprite with the specified image index within the current debug section.

+

A reference, created using ref_create, is passed for both the sprite and the image index.

+
+

 

+

Syntax:

+

dbg_sprite(sprite_ref, image_index_ref[, label]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
sprite_refReferenceA reference to a variable holding a sprite index, created using ref_create
image_index_refReferenceA reference to a variable that holds the image index to show, created using ref_create
labelString  The label to display next to the sprite view
+

 

+

Returns:

+

N/A

+

 

+

Example: Sprite View for an Instance's Sprite

+

Create Event

+

ref_to_sprite = ref_create(self, "sprite_index");
+ ref_to_image_index = ref_create(self, "image_index");
+ dbg_sprite(ref_to_sprite, ref_to_image_index); +

+

The above code sets up a basic sprite view for an instance's sprite. The code is added to an event that is only executed once, e.g. the Create event.

+

First, two references are created using ref_create: one to the current instance's sprite_index variable (stored in ref_to_sprite), the other to the instance's image_index variable (stored in ref_to_image_index). Next, the sprite view is created using dbg_sprite, with arguments the two references created before.

+

The sprite's frame will change based on the value of image_index, and so is drawn animated in the sprite view. The sprite will also change whenever the instance's sprite_index changes.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_text.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_text.htm new file mode 100644 index 000000000..6ab9ae6cf --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_text.htm @@ -0,0 +1,75 @@ + + + + + + dbg_text + + + + + + + + + + +

dbg_text

+

This function creates a read-only text label within the current debug section. You can use this to explain surrounding controls.

+

Both a String and a Reference to a variable containing a string can be passed to the function. The text can be multiline.

+

 See dbg_text_input for a control that allows modifiable text.

+
+

 

+

Syntax:

+

dbg_text(ref_or_string);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
ref_or_stringReference or StringA string or a reference to a variable that can be converted to string, returned by ref_create
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

text = "text";
+ ref_to_text = ref_create(self, "text");
+ dbg_text(ref_to_text);
+ dbg_text(text);
+ dbg_text("More text"); +

+

The above code assigns some text to an instance variable text. It then creates a reference to that variable using ref_create and stores it in ref_to_text. Next, it adds three text controls to a new debug view "Default" that will be created, under a new section "Default". The three calls to dbg_text add a text entry in three different ways: the first provides the reference to the text variable, the second passes the variable text itself (which assigns the value the variable currently has) and the last passes a string directly.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_text_input.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_text_input.htm new file mode 100644 index 000000000..f24198e4c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_text_input.htm @@ -0,0 +1,76 @@ + + + + + + dbg_text_input + + + + + + + + + + +

dbg_text_input

+

This function creates a text field within the current debug section. You can use this to modify a string variable.

+
+

 

+

Syntax:

+

dbg_text_input(ref[, label]);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
refReferenceA reference to a variable created using ref_create
labelString  The label to show next to the text input
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

description = "This description can be changed";
+ var _ref = ref_create(self, "description");
+ dbg_text_input(_ref, "Enter the description here:"); +

+

The above code first assigns some text to an instance variable description. It then creates a reference to this variable using ref_create. Next, it creates a text input control using dbg_text_input, the reference links the control to the variable.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_view.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_view.htm new file mode 100644 index 000000000..bcd87bc92 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_view.htm @@ -0,0 +1,101 @@ + + + + + + dbg_view + + + + + + + + + + +

dbg_view

+

This function creates a custom debug view and shows it in The Debug Overlay.

+

A debug view is a custom window in this overlay that contains sections that you can add controls to. The controls can change the value of the variable they reference.

+

References to variables can be created using ref_create.

+

Usage Notes

+
    +
  • The function returns a pointer to the debug view that can be used with dbg_view_delete to delete it again.
  • +
  • A debug view contains one or more debug sections, that you add using dbg_section.
  • +
  • All custom debug views are listed under the Views menu and can have their visibility changed there.
  • +
+

 

+

Syntax:

+

dbg_view(name, visible[, x, y, width, height]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
nameStringThe name of the debug view
visibleBooleanWhether the debug view should be visible when the debug overlay is opened
xReal  The x position of the debug view, the default -1 indicates it can be placed anywhere
yReal  The y position of the debug view, the default -1 indicates it can be placed anywhere
widthReal  The width of the debug view (default is 500)
heightReal  The height of the debug view (default is 400)
+


+ +

+

Returns:

+

Debug View Pointer

+

 

+

Example:

+

dbg_view("CustomDebugView", true);

+

The above code creates a new debug view named "CustomDebugView" and brings up The Debug Overlay with the debug view visible.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_view_delete.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_view_delete.htm new file mode 100644 index 000000000..7020af013 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_view_delete.htm @@ -0,0 +1,70 @@ + + + + + + dbg_view_delete + + + + + + + + + + +

dbg_view_delete

+

This function deletes an existing debug view created using dbg_view.

+

 

+

Syntax:

+

dbg_view_delete(view);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
viewPointer.DebugViewA pointer to a debug view
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

debug_view = dbg_view("View", true);

+

Key Pressed Event - Space

+

dbg_view_delete(debug_view);

+

The above code first creates a debug view using dbg_view named "View" in the Create event and stores the pointer to it in an instance variable debug_view.

+

In the Space Key Pressed event, the debug view is deleted using dbg_view_delete.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_watch.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_watch.htm new file mode 100644 index 000000000..e707ff8b8 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_watch.htm @@ -0,0 +1,81 @@ + + + + + + dbg_watch + + + + + + + + + + +

dbg_watch

+

This function creates a watch for a variable within the current debug section.

+

This is simply used to monitor a variable's value, and cannot be used to change it. Look at the Debug View Function Reference for controls that allow variable modification.

+

Each value is converted to a String and displayed.

+
+

 

+

Syntax:

+

dbg_watch(ref[, label]);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
refReferenceA reference to a variable created with ref_create
labelString  The label to show
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

counter = 0;
+
+ dbg_watch(ref_create(self, "counter"), "Counter"); +

+

Step Event

+

counter += 1;

+

The above code first initialises a variable counter in the Create event. It then adds a watch for this variable using dbg_watch.

+

In the Step event, the counter is incremented, a change that will be shown by the watch.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/is_debug_overlay_open.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/is_debug_overlay_open.htm new file mode 100644 index 000000000..730f01677 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/is_debug_overlay_open.htm @@ -0,0 +1,48 @@ + + + + + + is_debug_overlay_open + + + + + + + + + + +

is_debug_overlay_open

+

This function returns whether The Debug Overlay is currently open or not.

+

 

+

Syntax:

+

is_debug_overlay_open();

+

 

+

Returns:

+

Boolean

+

 

+

Example:

+

var _open = is_debug_overlay_open();
+ show_debug_overlay(!_open);

+

The above code first calls is_debug_overlay_open and assigns the result to a temporary variable _open. It then toggles the debug overlay by passing the negated value to show_debug_overlay.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Debugging/show_debug_log.htm b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/show_debug_log.htm new file mode 100644 index 000000000..b9977b8fe --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Debugging/show_debug_log.htm @@ -0,0 +1,70 @@ + + + + + + show_debug_log + + + + + + + + + + +

show_debug_log

+

This function opens The Debug Overlay with only the Log window open. This overlay is disabled by default.

+

This window allows you to enter basic commands in the text input at the bottom. See the Log section for more info.

+

+

 All scripts are executed within the scope of the global struct.

+

 To bring up The Debug Overlay with the FPS window open, use show_debug_overlay instead.

+

 

+

Syntax:

+

show_debug_log(enable);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
enableBooleanWhether to show the debug log
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

show_debug_log(true);

+

The code above opens The Debug Overlay with the Log window open.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_depth.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_depth.htm new file mode 100644 index 000000000..4bef4e122 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_get_depth.htm @@ -0,0 +1,49 @@ + + + + + + gpu_get_depth + + + + + + + + + + +

gpu_get_depth

+

This function returns the current depth (i.e. the z coordinate) for the 2D drawing functions (such as sprites or primitives).

+

By default, it will be equal to the current layer's depth, but this can be changed using gpu_set_depth.

+

 

+

Syntax:

+

gpu_get_depth();

+

 

+

Returns:

+

Real

+

 

+

Example:

+

var _depth = gpu_get_depth();
+ show_debug_message($"The depth used for drawing is currently set to: {_depth}");

+

The code above gets the current depth value used for drawing using gpu_get_depth and outputs it in a debug message.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.htm new file mode 100644 index 000000000..6bbdc3397 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/GPU_Control/gpu_set_depth.htm @@ -0,0 +1,111 @@ + + + + + + gpu_set_depth + + + + + + + + + + +

gpu_set_depth

+

This function sets the depth (i.e. the z coordinate) for GameMaker's 2D drawing functions (sprites, shapes, primitives, text, etc.)

+

By default, GameMaker uses the layer's depth when drawing flat graphics, but this function allows you to use your own. This can be used to draw at a different depth, or draw individual sprites/primitives at their own depths.

+

 This function doesn't change the depth of the layer when called in a layer begin script (see layer_script_begin). If you need to change the depth of a specific layer in the layer begin script you should do so using layer_force_draw_depth instead.

+

 GameMaker only changes the depth when it starts drawing a new layer, so you may want to restore the original depth (saved previously from gpu_get_depth) after you're done drawing, so any subsequent calls will not be affected by your depth change.

+

 

+

Syntax:

+

gpu_set_depth(depth);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
depthRealThe new depth value to use for drawing
+

 

+

Returns:

+

N/A

+

 

+

Example 1: "depth = -y"

+

Draw Event

+

var _zwrite = gpu_get_zwriteenable();
+ var _ztest = gpu_get_ztestenable();
+ gpu_set_zwriteenable(true);
+ gpu_set_ztestenable(true);
+ var _depth = gpu_get_depth();
+
+ gpu_set_depth(-y);
+
+ draw_self();
+
+ gpu_set_depth(_depth);
+ gpu_set_zwriteenable(_zwrite);
+ gpu_set_ztestenable(_ztest); +

+

The above code sets the depth used for drawing to the current instance's -y. This gives an easy way to draw instances behind other instances once they move "behind" them, if those instances also have their depth set to -y.

+

First, z-writing and z-testing are enabled on the GPU using gpu_set_zwriteenable and gpu_set_ztestenable. Their current values are stored in temporary variables _zwrite and _ztest respectively, as well as the current depth, which is stored in a temporary variable _depth. The depth is then set to the instance's -y using gpu_set_depth and the instance is drawn normally using draw_self.

+

Finally, depth, z-writing and z-testing are all set to their previous value in order to not affect further drawing.

+

 

+

Example 2: Drawing an Hourglass Shape using Circles

+

Draw Event

+

gpu_set_zwriteenable(true);
+ gpu_set_ztestenable(true);
+ matrix_set(matrix_view, matrix_build_lookat(220, 0, 90, 0, 0, 90, 0, 0, 1));
+ matrix_set(matrix_projection, matrix_build_projection_perspective_fov(60, room_width/room_height, 1, 10000));
+
+ var _depth = gpu_get_depth(); // store previous depth
+ var _col = draw_get_colour();

+
+ var n = 180;
+ for (var z = 0; z <= n; z += 10)
+ {
+     gpu_set_depth(z);
+     draw_set_colour(make_color_hsv(z / n * 255, 150, 250));
+     draw_circle(0, 0, 40 + lengthdir_x(20, z / n * 360), false);
+ }
+
+ draw_set_colour(_col);
+ gpu_set_depth(_depth);        // restore previous depth +

+

The code above draws a coloured hourglass-like shape in the Draw event.

+

First, z-writing and z-testing are enabled (gpu_set_zwriteenable and gpu_set_ztestenable) and an appropriate projection (matrix_build_projection_perspective_fov) and view matrix (matrix_build_lookat) are built and set using matrix_set. Next, the current depth value and draw colour are stored so they can be restored later.

+

After this, a couple of circles are drawn in a for loop using draw_circle. The depth used to draw each circle is set to the value of the loop variable z, which is increased by 10 every iteration. The radius of the circle varies in a way that the final shape looks like an hourglass shape. The draw colour is changed to bring variation in the colours of the circles.

+

Finally, the draw colour and depth are set back to the values they had before, in order to not affect further drawing on the instance's layer.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_delay.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_delay.htm new file mode 100644 index 000000000..e49f5e91b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_delay.htm @@ -0,0 +1,100 @@ + + + + + + part_emitter_delay + + + + + +

part_emitter_delay

+

This function sets the delay before the particle emitter creates particles for the first time when it is in stream mode.

+

The value for the delay is chosen to be a random value between delay_min and delay_max.

+
+

 

+

Syntax:

+

part_emitter_delay(ps, ind, delay_min, delay_max, delay_unit);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
psParticle System InstanceThe index of the particle system containing the emitter
indParticle Emitter IDThe emitter index
delay_minRealThe minimum possible value for the delay, expressed in delay_unit
delay_maxRealThe maximum possible value for the delay, expressed in delay_unit
delay_unitTime Source Unit ConstantThe unit in which delay_min and delay_max are expressed
+

 

+

Returns:

+

N/A

+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_enable.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_enable.htm new file mode 100644 index 000000000..358c6bede --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_enable.htm @@ -0,0 +1,106 @@ + + + + + + part_emitter_enable + + + + + + + + + + +

part_emitter_enable

+

This function enables or disables the given particle emitter.

+

Usage Notes

+ +

 

+

Syntax:

+

part_emitter_enable(ps, ind, enable);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
psParticle System IDThe index of the particle system the emitter's in
indParticle Emitter IDThe index of the emitter to change
enableBooleanWhether to enable the emitter or not
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

 

+

Create Event

+

ps = part_system_create();
+
+ pe1 = part_emitter_create(ps);
+ part_emitter_region(ps, pe1, 100, 200, 100, 200, ps_shape_rectangle, ps_distr_gaussian);
+ part_emitter_enable(ps, pe1, false);
+ pe2 = part_emitter_create(ps);
+ part_emitter_region(ps, pe2, 200, 300, 100, 200, ps_shape_rectangle, ps_distr_gaussian);
+
+ pt = part_type_create();
+ part_type_speed(pt, 2, 2, 0, 0);
+ part_type_direction(pt, 90, 90, 0, .2);
+
+ part_emitter_stream(ps, pe1, pt, 2);
+ part_emitter_stream(ps, pe2, pt, 2); +

+

Cleanup Event

+

part_emitter_destroy(ps, pe1);
+ part_emitter_destroy(ps, pe2);
+ part_system_destroy(ps);
+ part_type_destroy(pt);

+

The above code creates a particle system ps in the Create event and adds two emitters to it: pe1 and pe2. The emitters are each configured to emit particles in a rectangular region of 100x100 pixels, using a gaussian distribution (i.e. more particles in the center). Emitter pe1 is set to disabled using part_emitter_enable. A particle type pt is then created and its speed and direction configured so all particles of this type will move upward with a constant speed of 2 pixels per step.

+

The two emitters are then "turned on" using part_emitter_stream: each of them is configured to create two particles per step. Since pe1 was set tdisabled, it will not emit any particles. pe2 is enabled and emits particles normally.

+

Finally, since they're dynamic resources, the particle emitters, the system and the type are all destroyed in the Cleanup event.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_interval.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_interval.htm new file mode 100644 index 000000000..011d64dfa --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_interval.htm @@ -0,0 +1,87 @@ + + + + + + part_emitter_interval + + + + + + + + + + +

part_emitter_interval

+

This function sets the interval between two consecutive bursts for the given emitter in case it is working in stream mode.

+

Every time the interval timer times out, i.e. after every burst, a new value for the interval is chosen as a random value between interval_min and interval_max.

+
+

 

+

Syntax:

+

part_emitter_interval(ps, ind, interval_min, interval_max, interval_unit);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
psParticle System InstanceThe index of the particle system the emitter is in
indParticle Emitter IDThe index of the particle emitter
interval_minRealThe minimum possible value for the interval, expressed in interval_unit
interval_maxRealThe maximum possible value for the interval, expressed in interval_unit
interval_unitTime Source Unit ConstantThe unit in which the interval values are expressed
+

 

+

Returns:

+

N/A

+

 

+

Example:

+
+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_relative.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_relative.htm new file mode 100644 index 000000000..b3c34d934 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Emitters/part_emitter_relative.htm @@ -0,0 +1,96 @@ + + + + + + part_emitter_relative + + + + + + + + + + +

part_emitter_relative

+

This function sets relative mode for a particle emitter. With relative mode enabled, the number of particles created becomes relative to its area.

+

Usage Notes

+
    +
  • The larger the emitter area set using part_emitter_region, the more particles that will be created.
  • +
  • The number parameter of the functions part_emitter_stream and part_emitter_burst changes: it becomes the percentage of the emitter area that should be covered with new particles.
  • +
  • By default, new particle emitters created using part_emitter_create don't have relative mode enabled.
  • +
+

 

+

Syntax:

+

part_emitter_relative(ps, ind, enable);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
psParticle System IDThe index of the particle system the emitter belongs to
indParticle Emitter IDThe index of the particle emitter
enableBooleanWhether to enable or disable relative mode for the emitter
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

 

+

Create Event

+

ps = part_system_create();
+ pe = part_emitter_create(ps);
+ part_emitter_region(ps, pe, 20, 120, 20, 120, ps_shape_rectangle, ps_distr_linear);
+ part_emitter_relative(ps, pe, true);
+ pt = part_type_create();
+ part_type_shape(pt, pt_shape_flare);
+
+ part_emitter_stream(ps, pe, pt, 2); +

+

Cleanup Event

+

part_emitter_destroy(pe);
+ part_system_destroy(ps);
+ part_type_destroy(pt);

+

The above code creates a particle system ps and adds a single emitter pe to it. The emitter is set to emit particles in a rectangular region of 100x100 pixels, starting at (20, 20). It is then set to emit particles in relative mode. Next, a particle type is created and configured to draw a flare shape pt_shape_flare. Finally, the emitter is set to stream particles of the created type continuously. Since relative mode was enabled, the number of 2 means that the emitter will create the number of particles needed to cover 2% of the emitter area every step.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_particles_burst.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_particles_burst.htm new file mode 100644 index 000000000..62182ac23 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_particles_burst.htm @@ -0,0 +1,104 @@ + + + + + + part_particles_burst + + + + + + + + + + +

part_particles_burst

+

This function creates a single burst of all the particles contained in the given Particle System Asset. The particles are created in the given particle system instance ind.

+

The function gives you a quick way to add a particle effect that you made in The Particle System Editor to an existing particle system.

+

This is as if you'd add the emitters inside that particle system asset to the given particle system and then call part_emitter_burst on all of them.

+

 Particles won't be created for any disabled emitters in the Particle System Asset (which is Enabled unchecked).

+

 

+

Syntax:

+

part_particles_burst(ind, x, y, partsys);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle System InstanceThe index of the particle system in which to create the particles
xRealThe x position to burst the particles
yRealThe y position to burst the particles
partsysParticle System AssetThe particle system asset of which to burst particles
+

 

+

Returns:

+

N/A

+

 

+

Example 1:

+

Create Event

+

ps = part_system_create_layer("Effects", false);
+
+ repeat(10)
+ {
+     var _x = random(room_width);
+     var _Y = random(room_height);
+     part_particles_burst(ps, _x, _y, ps_Fireworks);
+ } +

+

The code above first creates a new particle system on a room layer named "Effects" and stores the index in an instance variable ps. The part_particles_burst function is then called 10 times in a repeat loop to add particles from a Particle System Asset ps_Fireworks to the particle system ps.

+

 

+

Example 2:

+

Create Event

+

ps = part_system_create_layer("Effects", false);
+
+ layer_script_begin("Effects", method({ps}, function()
+ {
+     part_particles_burst(ps, random(room_width), random(room_height), ps_Fireworks);
+ })); +

+

The code above also creates a new particle system on a room layer named "Effects". It then sets a method as the layer begin script. The method gets the particle system ID ps via the struct. Inside it, the function part_particles_burst is used to create particles of the ps_Fireworks Particle System Asset at random positions in the room. This way, particles are created continuously, since the layer begin scripts run every step. The layer begin script can be removed to end the creation of particles from the asset.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_angle.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_angle.htm new file mode 100644 index 000000000..4baf2d633 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_angle.htm @@ -0,0 +1,72 @@ + + + + + + part_system_angle + + + + + + + + + + +

part_system_angle

+

This function changes the angle that the given particle system is rendered with.

+

 

+

Syntax:

+

part_system_angle(ind, angle);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle System IDThe index of the particle system to change.
angleRealThe new angle of the particle system.
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

var _mouse_dir = point_direction(x, y, mouse_x, mouse_y);
+ part_system_angle(pt_sys, _mouse_dir);

+

This gets the direction from the position of the instance towards the mouse cursor, and applies that as the angle of a particle system.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_colour.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_colour.htm new file mode 100644 index 000000000..be322001b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_colour.htm @@ -0,0 +1,91 @@ + + + + + + part_system_colour + + + + + +

part_system_colour

+

This function changes the blend colour and alpha that the given particle system is rendered with. This is similar to image_blend and image_alpha in instances.

+

 

+

Syntax:

+

part_system_color(ind, color, alpha);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle System IDThe index of the particle system to change.
colorColourThe new colour of the particle system.
alphaRealThe new alpha of the particle system.
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

part_system_colour(pt_sys, c_red, 0.5);

+

This changes the colour of a particle system to red, with an alpha of 0.5.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_global_space.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_global_space.htm new file mode 100644 index 000000000..08fdadda4 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Systems/part_system_global_space.htm @@ -0,0 +1,117 @@ + + + + + + part_system_global_space + + + + + + + + + + +

part_system_global_space

+

This function enables global space particles for the given particle system.

+

When global space particles are disabled (the default), the positions of the particles are relative to the particle system's position. When you move such a particle system, its particles will move with it.

+

Enabling global space allows you to move a particle system without moving the particles in it. This can be used e.g. to create a trail of particles

+ + + + + + + + + + + + + + + + + +
DisabledEnabled
+

In the example above, individual particles are being created in the particle system at the same position, and the particle system itself is being moved to the ship's location every frame.

+

The first video shows global space disabled, so all particles stick to its system, however in the second video particles stay in the room position where they were created.

+

Once enabled, you can move and rotate your particle systems with part_system_position and part_system_angle respectively, without moving the individual particles inside them.

+

 If you enable global space on a particle system that already has particles inside it, you may see those existing particles jump to new positions on the screen as they switch from being relative to the particle system to being relative to the room origin.

+

 

+

Syntax:

+

part_system_global_space(ind, enable);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle System IDThe index of the particle system
enableBooleanWhether to enable or disable global space particles
+

 

+

Returns:

+

N/A

+

 

+

Example: Particle System Following an Instance

+

Create Event

+

ps = part_system_create();
+ part_system_global_space(ps, true);
+ pe = part_emitter_create(ps);
+
+ pt = part_type_create();
+ part_type_shape(pt, pt_shape_flare);
+ part_type_direction(pt, 0, 360, 0, 0.3);
+ part_type_speed(pt, 0.1, 0.2, 0, 0.01);
+ part_type_scale(pt, 0.3, 0.3);
+
+ part_emitter_stream(ps, pe, pt, 2); +

+

Step Event

+

part_system_position(ps, x, y);
+ part_system_angle(ps, direction);

+

Clean Up Event

+

part_emitter_destroy(pe);
+ part_system_destroy(ps);
+ part_type_destroy(pt);

+

The above code shows how to add a particle system to an instance, so that it leaves a trail of particles behind when the instance is moved around.

+

In the Create event a basic particle system is set up, with a single emitter added to it. Using part_system_global_space, it is configured to have its particles in global space. A basic particle type is also added, which is configured to have a flare shape (pt_shape_flare), a starting direction that can be any random value between 0 and 360, a starting speed anywhere between 0.1 and 0.2 pixels per step and a scale factor of 0.3.

+

In the Step event the particle system's position and angle are set to the instance's (x, y) position and its direction, respectively.

+

Finally, in the Clean Up event, the particle emitter, system and type are destroyed in order to prevent memory leaks.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_size_x.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_size_x.htm new file mode 100644 index 000000000..d97d64b25 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_size_x.htm @@ -0,0 +1,100 @@ + + + + + + part_type_size_x + + + + + + + + + + +

part_type_size_x

+

This function sets a range for the starting size of the given particle type on the X axis, and how it changes over its lifetime.

+

 If the size must be the same on both axes, use part_type_size instead.

+

 

+

Syntax:

+

part_type_size_x(ind, size_min_x, size_max_x, size_incr_x, size_wiggle_x);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle Type IDThe particle type index
size_min_xRealThe minimum size along the x axis that particles of this type can be created with
size_max_xRealThe maximum size along the x axis that particles of this type can be created with
size_incr_xRealThe size along the x axis to add every step
size_wiggle_xRealThe "wiggle" value; the maximum random value that can be added every step
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

 

+

Create Event

+

ps = part_system_create();
+ pt = part_type_create();
+ part_type_shape(pt, pt_shape_pixel);
+ part_type_size_x(pt, 1, 2, 0.2, 0.1); +

+

Step Event

+

part_particles_create(ps, mouse_x, mouse_y, pt, 3);

+

Clean Up Event

+

part_system_destroy(ps);
+ part_type_destroy(pt);

+

The above code first creates a new particle system in the Create event, as well as a particle type using part_type_create. The index is stored in an instance variable pt. It then sets the size on the x axis for particles of the newly created type using part_type_size_x: when they're created, particles of this type will get a random size on the x axis that is at least 1 and at most 2. For every step of their lifetime, 0.2 will be added to the size on the x axis of each of them, along with a random value of at most 0.1.

+

In the Step event, 3 particles of this new type are created in the particle system ps at the mouse position using part_particles_create.

+

Finally, in the Clean Up event, both the particle system and particle type are destroyed.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_size_y.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_size_y.htm new file mode 100644 index 000000000..a22b670f9 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_size_y.htm @@ -0,0 +1,100 @@ + + + + + + part_type_size_y + + + + + + + + + + +

part_type_size_y

+

This function sets a range for the starting size of the given particle type on the Y axis, and how it changes over its lifetime.

+

 If the size must be the same on both axes, use part_type_size instead.

+

 

+

Syntax:

+

part_type_size_y(ind, size_min_y, size_max_y, size_incr_y, size_wiggle_y);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle Type IDThe particle type index
size_min_yRealThe minimum size on the y axis that particles of this type can be created with
size_max_yRealThe maximum size on the y axis that particles of this type can be created with
size_incr_yRealThe size along the y axis to add every step
size_wiggle_yRealThe "wiggle" value; the maximum random value that can be added every step
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

 

+

Create Event

+

ps = part_system_create();
+ pt = part_type_create();
+ part_type_shape(pt, pt_shape_pixel);
+ part_type_size_y(pt, 1, 2, 0.2, 0.1); +

+

Step Event

+

part_particles_create(ps, mouse_x, mouse_y, pt, 3);

+

Clean Up Event

+

part_system_destroy(ps);
+ part_type_destroy(pt);

+

The above code first creates a new particle system in the Create event, as well as a particle type using part_type_create. The index is stored in an instance variable pt. It then sets the size on the y axis for particles of the newly created type using part_type_size_y: when they're created, particles of this type will get a random size on the y axis that is at least 1 and at most 2. For every step of their lifetime, 0.2 will be added to the size on the y axis of each of them, along with a random value of at most 0.1.

+

In the Step event, 3 particles of this new type are created in the particle system ps at the mouse position using part_particles_create.

+

Finally, in the Clean Up event, both the particle system and particle type are destroyed.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_subimage.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_subimage.htm new file mode 100644 index 000000000..01fcd5cec --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/Particle_Types/part_type_subimage.htm @@ -0,0 +1,95 @@ + + + + + + part_type_subimage + + + + + + + + + + +

part_type_subimage

+

This function sets the sub-image (or frame) to use for the given particle type, if it uses a custom sprite set using part_type_sprite.

+

Usage Notes

+
    +
  • The effect of this function depends on the arguments passed to part_type_sprite:  +
      +
    • This function will have no effect if the particle type's sprite is set to use a random sub-image.
    • +
    • If the sprite isn't set to random: +
        +
      • When animate is set to true, the sprite animation will loop, starting at the sub-image set by this function.
      • +
      • When animate is set to false, the particle will use the sub-image as set by this function during its lifetime.
      • +
      +
    • +
    +
  • +
+

 

+

Syntax:

+

part_type_subimage(ind, subimg);

+ + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
indParticle Type IDThe index of the particle type
subimgRealThe sub-image (frame) to use
+

 

+

Returns:

+

N/A

+

 

+

Example 1: Non Animated Sprite Sub-image

+

pt = part_type_create();
+ part_type_sprite(pt, spr_cards, false, false, false);
+ part_type_subimage(pt, 2); +

+

The code above creates a new particle type and stores its index in an instance variable pt. It then configures the particle type using part_type_sprite to use a custom sprite asset spr_cards that won't play its animation and doesn't use a random sub-image. Finally, the sub-image to use is set to 2 in the call to part_type_subimage. As a result, all particles of this type will display sub-image 2 of spr_cards for their entire lifetime.

+

 

+

Example 2: Animated Sprite That Starts Playing at Sub-image

+

pt = part_type_create();
+ part_type_sprite(pt, spr_cards, true, false, false);
+ part_type_subimage(pt, 2); +

+

The code above creates a new particle type and stores the index in an instance variable pt. It then configures the particle type using part_type_sprite to use a custom sprite asset spr_cards that will play its animation. Since the random argument set to false, a random sub-image isn't chosen for the sprite. Instead, the sub-image provided in the call to part_type_subimage is used instead. As a result, all particles of this particle type will use the sprite spr_cards, animated all starting the animation at sub-image (or frame) 2.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/effect_create_depth.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/effect_create_depth.htm new file mode 100644 index 000000000..b2374e72d --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/effect_create_depth.htm @@ -0,0 +1,95 @@ + + + + + + effect_create_depth + + + + + + + + + + +

effect_create_depth

+

This function creates a simple particle effect at the given depth.

+

You supply a depth value and a particle kind, along with its position, size and colour. The size takes three possible values: 0 (small), 1 (medium), or 2 (large).

+

 The effect types ef_rain and ef_snow don't use the x/y position (although you must still provide them).

+

The available constants for the different particle kinds are: 

+
+

 

+

Syntax:

+

effect_create_depth(depth, kind, x, y, size, colour);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
depthRealThe depth at which to create the effect
kindEffect Type ConstantThe kind of effect to create
xRealThe x position to create the effect at (unused by ef_rain and ef_snow)
yRealThe y position to create the effect at (unused by ef_rain and ef_snow)
sizeRealThe size of the effect (0 = small, 1 = medium, 2 = large)
colourColourThe colour of the effect
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

effect_create_depth(depth, ef_explosion, x, y, 2, c_dkgray);

+

The code above creates a large, dark gray coloured explosion particle effect (ef_explosion) at the depth and x, y position of the calling instance.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/effect_create_layer.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/effect_create_layer.htm new file mode 100644 index 000000000..689878aae --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/effect_create_layer.htm @@ -0,0 +1,95 @@ + + + + + + effect_create_layer + + + + + + + + + + +

effect_create_layer

+

This function creates a simple particle effect at the given layer.

+

You supply a layer name or ID, and a particle kind, along with its position, size and colour. The size takes three possible values: 0 (small), 1 (medium), or 2 (large).

+

 The effect types ef_rain and ef_snow don't use the x/y position (although you must still provide them).

+

The available constants for the different particle kinds are: 

+
+

 

+

Syntax:

+

effect_create_layer(layer_id, kind, x, y, size, colour);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
layer_idString or Layer IDThe layer at which to create the effect
kindEffect Type ConstantThe kind of effect to create
xRealThe x position to create the effect at (unused by ef_rain and ef_snow)
yRealThe y position to create the effect at (unused by ef_rain and ef_snow)
sizeRealThe size of the effect (0 = small, 1 = medium, 2 = large)
colourColourThe colour of the effect
+

 

+

Returns:

+

N/A

+

 

+

Example 1: 

+

effect_create_layer("Particles", ef_spark, x, y, 1, c_yellow);

+

The code above creates a medium-sized yellow spark particle effect (ef_spark) at the (x, y) position of the calling instance, on an existing layer named "Particles". This code can be placed in a Step event of an object to create a continuous trail of sparks.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.htm new file mode 100644 index 000000000..3e801220b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Particles/particle_get_info.htm @@ -0,0 +1,564 @@ + + + + + + particle_get_info + + + + + + + + + + +

particle_get_info

+

This function returns a struct with information about a Particle System Asset created using The Particle System Editor.

+

The returned struct is a Particle System Info Struct, which contains an Array of Particle Emitter Info Structs. Each of these emitter structs stores info on the particle type that the emitter uses in its parttype variable, which contains a Particle Type Info Struct.

+

 If no valid Particle System Asset is passed to the function, GameMaker will throw an error.

+

In a simplified way, the contents of the struct returned by this function look something like the following:

+

part_sys_info_struct =
+ {
+     emitters:
+     [
+         {
+             parttype:
+             {
+                 // Particle type properties...
+             }
+             // All other particle emitter properties...
+         }
+         // More emitters...
+     ]
+     // All other particle system properties...
+ };

+

The tables below list all variables that are available in each of these three structs.

+

Particle System Info

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Particle System Info Struct
Variable NameData TypeDescription
nameStringThe name of the particle system asset.
xoriginRealThe X origin of the particle system.
yoriginRealThe Y origin of the particle system.
global_spaceBooleanWhether this particle system has global space particles enabled (see part_system_global_space).
oldtonewBooleanWhether old particles should be drawn behind new ones (true) or not (false).
emittersArray of Particle Emitter Info StructAn array of emitter info structs, ordered the same as in The Particle System Editor.
+
+

Particle Emitter Info

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Particle Emitter Info Struct
Variable NameData TypeDescription
nameStringThe name of the emitter.
modeParticle Emitter Mode ConstantThe mode in which to emit particles. Either ps_mode_stream or ps_mode_burst.
enabledBooleanWhether the particle emitter is enabled.
numberRealThe number of particles to create every frame if mode is ps_mode_stream or to create only once if mode is ps_mode_burst. Density (percent coverage) when in relative mode.
relativeBooleanWhether the emitter is in relative mode, in which the number of particles created by the emitter is relative to the area of its region (see part_emitter_relative).
xminRealThe X coordinate of the left side of the emitter's region.
xmaxRealThe X coordinate of the right side of the emitter's region.
yminRealThe Y coordinate of the top of the emitter's region.
ymaxRealThe Y coordinate of the bottom of the emitter's region.
distributionParticle Emitter Distribution ConstantThe distribution style of the particles. One of the ps_distr_* constants.
shapeParticle Emitter Shape ConstantThe shape of the emitter's region. One of the ps_shape_* constants.
parttypeParticle Type Info StructThe particle type info struct containing information this emitter's particle type.
delay_minRealThe minimum delay between particle bursts in stream mode, expressed in delay_unit.
delay_maxRealThe maximum delay between particle bursts in stream mode, expressed in delay_unit.
delay_unitTime Source Unit Constant The unit in which delay_min and delay_max are expressed
interval_minRealThe minimum time between particle bursts in stream mode, expressed in interval_unit.
interval_maxReal The maximum time between particle bursts in stream mode, expressed in interval_unit.
interval_unitTime Source Unit ConstantThe unit in which interval_min and interval_max are expressed.
+
+

Particle Type Info

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Particle Type Info Struct
Variable NameData TypeDescription
General
indParticle Type IDThe index of the particle type. This can be used e.g. with the function part_particles_create.
Shape / Sprite
spriteSprite AssetThe index of the sprite that the particle type uses or -1.
frameRealThe sprite subimage in case a sprite is used.
animateBooleanIf true then the sprite is animated, starting from the frame subimage.
stretchBooleanIf true then the animation is stretched over the particle's lifetime.
randomBooleanIf true then a random subimage is used instead of frame.
shapeParticle Shape ConstantThe particle shape. One of the pt_shape_* constants. Used only if sprite is -1.
Size
size_xminRealThe minimum size a particle of this type can have on the X axis when it is created (the size is determined randomly for each particle and can vary from size_xmin to size_xmax).
size_yminRealThe minimum size a particle of this type can have on the Y axis when it is created (the size is determined randomly for each particle and can vary from size_ymin to size_ymax).
size_xmaxRealThe maximum size a particle of this type can have on the X axis when it is created (the size is determined randomly for each particle and can vary from size_xmin to size_xmax).
size_ymaxRealThe maximum size a particle of this type can have on the Y axis when it is created (the size is determined randomly for each particle and can vary from size_ymin to size_ymax).
size_xincrRealThe value to increase/decrease the particle size on the X axis by each frame.
size_yincrRealThe value to increase/decrease the particle size on the Y axis by each frame.
size_xwiggleRealValue randomly added or subtracted from the particle's X size each frame.
size_ywiggleRealValue randomly added or subtracted from the particle's Y size each frame.
Scale
xscaleRealThe X scale of the particle image (sprite or shape).
yscaleRealThe Y scale of the particle image (sprite or shape).
Life
life_minRealThe minimum life of particles of this type (in number of frames).
life_maxRealThe maximum life of particles of this type (in number of frames).
Secondary Particles
death_typeParticle Type IDThe type of particle spawned on death or -1.
death_numberRealThe number of particles spawned on death.
step_typeParticle Type IDThe type of particle spawned each step or -1.
step_numberRealThe number of particles spawned each step.
Speed
speed_minRealThe minimum speed (in pixels per frame) of the particle when it's created (this starting speed is determined randomly for each particle and ranges from speed_min to speed_max).
speed_maxRealThe maximum speed (in pixels per frame) of the particle when it's created (this starting speed is determined randomly for each particle and ranges from speed_min to speed_max).
speed_incrRealThe value to increase/decrease the particle speed by each frame.
speed_wiggleRealA value randomly added or subtracted from the particle speed each frame.
Direction
dir_minRealThe minimum direction (in degrees) for a particle when it's created (this starting direction is determined randomly for each particle and ranges from dir_min to dir_max).
dir_maxRealThe maximum direction (in degrees) for a particle when it's created (this starting direction is determined randomly for each particle and ranges from dir_min to dir_max).
dir_incrRealThe value to increase/decrease the particle direction by each frame.
dir_wiggleRealA value randomly added or subtracted from the particle direction each frame.
Gravity
grav_amountRealThe amount of gravity applied to the particle each frame (in pixels per frame).
grav_dirRealThe gravity direction.
Orientation
ang_minRealThe minimum starting angle (in degrees) of the particle sprite when created (this starting angle is determined randomly for each particle and ranges from ang_min to ang_max).
ang_maxRealThe maximum starting angle (in degrees) of the particle sprite when created (this starting angle is determined randomly for each particle and ranges from ang_min to ang_max).
ang_incrRealThe value to increase/decrease the particle angle by each frame.
ang_wiggleRealA value randomly added or subtracted from the particle angle each frame.
ang_relativeBooleanIf true then the particle angle is relative to its direction.
Color & Alpha
color1ColourThe color of the particle when created.
color2ColourThe color of the particle when halfway through its lifespan.
color3ColourThe color of the particle at the end of its lifespan.
alpha1RealThe alpha of the particle when created.
alpha2RealThe alpha of the particle when halfway through its lifespan.
alpha3RealThe alpha of the particle at the end of its lifespan.
additiveBooleanIf true then the particle is drawn with additive blending (i.e. using the Blend Mode Constant bm_add).
+
+

 

+

Finally there is also a constant for the particle emitter mode: 

+ + + + + + + + + + + + + + + + + + + + +
Particle Emitter Mode Constant
ConstantDescription
ps_mode_streamThe particle emitter streams the given number of particles continuously (see part_emitter_stream)
ps_mode_burstThe particle emitter emits a single burst of the given number of particles (see part_emitter_burst)
+

 

+

Syntax:

+

particle_get_info(partsys);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
partsysParticle System AssetThe particle system asset to get the info from.
+

 

+

Returns:

+

Particle System Info Struct

+

 

+

Example 1: Particle Type Info

+

var _particle_info = particle_get_info(ps_Clouds);
+ var _asset_name = _particle_info.name;
+
+ var _arr_emitters = _particle_info.emitters;
+ if (array_length(_arr_emitters) > 0)
+ {
+     var _type_info = _arr_emitters[0].parttype;
+    
+     if _type_info.additive
+     {
+         show_debug_message("The first emitter in {0} creates shiny particles!", _asset_name);
+     }
+ } +

+

The above code first gets information from an existing Particle System Asset ps_Clouds using particle_get_info and assigns the returned struct to a temporary variable _particle_info. It then looks up the emitters in the particle system through the Particle System Info Struct's emitters variable. If the particle system contains any emitters (i.e. the array's length is greater than 0), the first emitter's parttype variable is assigned to a temporary variable _type_info and checked for additive blending (bm_add). Finally a debug message is shown if additive blending is used for the particle type.

+

 

+

Example 2: Listing Emitter Names

+

var _particle_info = particle_get_info(ps_Environment);
+ var _asset_name = _particle_info.name;
+
+ var _emitter_names = array_map(_particle_info.emitters, function(_element, _index) { return _element.name; });
+ _emitter_names = string_join_ext(", ", _emitter_names);
+
+ show_debug_message("{0} contains the following particle emitters: {1}", _asset_name, _emitter_names); +

+

The above code first calls particle_get_info to retrieve information about an existing Particle System Asset ps_Environment. The asset's name is stored in a temporary variable _asset_name. After that, an array of emitter names is generated from the Particle System Info Struct's emitters variable and converted to a string listing all names, separated by a comma, using string_join_ext. Finally a debug message displays the information in a readable form.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_argb.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_argb.htm index ad5a7820c..dc6892ce5 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_argb.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_argb.htm @@ -4,7 +4,7 @@ vertex_argb - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_colour.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_colour.htm index d81b42582..022108821 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_colour.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_colour.htm @@ -4,7 +4,7 @@ vertex_colour - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_create_buffer_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_create_buffer_ext.htm index e9d28731d..3799cf32b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_create_buffer_ext.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_create_buffer_ext.htm @@ -25,7 +25,7 @@

Syntaxe :

ArgumentsType Description - + size The initial size of the buffer (in bytes). diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_end.htm index 4113d3237..792f7b18d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_end.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_end.htm @@ -4,7 +4,7 @@ vertex_end - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float1.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float1.htm index c2a3751a2..855d51a70 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float1.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float1.htm @@ -4,7 +4,7 @@ vertex_float1 - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float2.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float2.htm index f895203f2..12e7ca55c 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float2.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float2.htm @@ -4,7 +4,7 @@ vertex_float2 - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float3.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float3.htm index 8c8283a68..5ab8cd30b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float3.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float3.htm @@ -4,7 +4,7 @@ vertex_float3 - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float4.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float4.htm index a6e779805..fe80144c6 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float4.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_float4.htm @@ -4,7 +4,7 @@ vertex_float4 - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_colour.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_colour.htm index cb74b1406..1294befd0 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_colour.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_colour.htm @@ -1,5 +1,4 @@ - @@ -47,5 +46,5 @@
Copyright YoY - - \ No newline at end of file + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position.htm index 27720671b..212d07726 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position.htm @@ -1,5 +1,4 @@ - @@ -46,5 +45,5 @@
Copyright YoY - - \ No newline at end of file + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position_3d.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position_3d.htm index ae4214148..dd0ace981 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position_3d.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_add_position_3d.htm @@ -1,5 +1,4 @@ - @@ -46,5 +45,5 @@
Copyright YoY - - \ No newline at end of file + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_begin.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_begin.htm index f99b68967..a0f505087 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_begin.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_begin.htm @@ -1,5 +1,4 @@ - @@ -46,5 +45,5 @@
Copyright YoY - - \ No newline at end of file + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_end.htm index 29ebae8a8..b4047eb23 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_end.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_end.htm @@ -25,8 +25,8 @@

Les retours :

Exemple :

vertex_format_begin();
- vertex_format_add_colour();
vertex_format_add_position();
+ vertex_format_add_colour();
my_format = vertex_format_end();

Le code ci-dessus créera un nouveau format de vertex avec seulement des valeurs de couleur et de position, puis stockera l'identifiant du format dans la variable "my_format".

diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_get_info.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_get_info.htm new file mode 100644 index 000000000..dccf91a87 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_format_get_info.htm @@ -0,0 +1,111 @@ + + + + + + vertex_format_get_info + + + + + + + + + + +

vertex_format_get_info

+

This function returns a struct with information on a previously created vertex format.

+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vertex Format Info Struct
VariableTypeDescription
strideRealThe total size in bytes of a single vertex
num_elementsRealThe number of elements (vertex attributes) in a single vertex
elementsArrayAn array of elements. Each array element is a struct containing the following: 
+ - usage (Vertex Usage Type Constant)
+ - type (Vertex Data Type Constant)
+ - size (Real)
+ - offset (Real)
+

 

+

Syntax:

+

vertex_format_get_info(format);

+ + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
formatVertex FormatThe vertex format, as returned by vertex_format_end
+

 

+

Returns:

+

Vertex Format Info Struct

+

 

+

Example:

+

vertex_format_begin();
+ vertex_format_add_position_3d();
+ vertex_format_add_normal();
+ vertex_format_add_colour();
+ vertex_format_add_texcoord();
+ vertex_format_add_custom(vertex_type_float1, vertex_usage_texcoord);
+ vertex_format = vertex_format_end();
+
+ var _info = vertex_format_get_info(vertex_format);
+ show_debug_message(json_stringify(_info, true)); +

+

The above code first creates a custom vertex format and then gets the info using vertex_format_get_info. After that, the info is shown in a debug message.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_freeze.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_freeze.htm index 694fbf3da..d5b03bf9c 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_freeze.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_freeze.htm @@ -4,7 +4,7 @@ vertex_freeze - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_get_number.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_get_number.htm index 204a93b20..b18489537 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_get_number.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_get_number.htm @@ -4,7 +4,7 @@ vertex_get_number - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_normal.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_normal.htm index e3186d411..3eacc2b4e 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_normal.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_normal.htm @@ -4,7 +4,7 @@ vertex_normal - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position.htm index 36fd5510a..b4df8b1f5 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position.htm @@ -4,7 +4,7 @@ vertex_position - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position_3d.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position_3d.htm index 4c391b314..8ac4ce315 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position_3d.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_position_3d.htm @@ -4,7 +4,7 @@ vertex_position_3d - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_texcoord.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_texcoord.htm index 4237ab266..18accb5ee 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_texcoord.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_texcoord.htm @@ -4,7 +4,7 @@ vertex_texcoord - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_ubyte4.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_ubyte4.htm index 730b65c7f..790820c82 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_ubyte4.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_ubyte4.htm @@ -4,7 +4,7 @@ vertex_ubyte4 - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_buffer.htm new file mode 100644 index 000000000..708fd4ab1 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_buffer.htm @@ -0,0 +1,107 @@ + + + + + + vertex_update_buffer_from_buffer + + + + + + + + + + +

vertex_update_buffer_from_buffer

+

This function updates the contents of a vertex buffer using data in the given buffer.

+

 You cannot pass a frozen vertex buffer as the destination buffer.

+

Usage Notes

+
    +
  • The data in the source buffer should be formatted the same as the destination vertex buffer's vertex format. If it's not, you may get unexpected or no results.
  • +
  • You can use the function vertex_format_get_info to get the size and offset of an attribute.
  • +
  • Writing data outside of the vertex buffer's current size will resize the vertex buffer as required.
  • +
+

 

+

Syntax:

+

vertex_update_buffer_from_buffer(dest_vbuff, dest_offset, src_buffer[, src_offset, src_size]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
dest_vbuffVertex Buffer IDThe vertex buffer to copy to
dest_offsetRealThe offset in the destination buffer to start writing the data
src_bufferBuffer IDThe source buffer to copy from
src_offsetReal  The offset in bytes in the source buffer to start copying. Defaults to 0.
src_sizeReal  The size of the data in bytes to copy from the source buffer. Defaults to -1. When -1 the whole buffer is copied.
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

vertex_format_begin();
+ vertex_format_add_position_3d();     // Three buffer_f32 values
+ vertex_format_add_texcoord();        // Two buffer_f32 values
+ vertex_format = vertex_format_end();
+
+ var _i = 0, _vertex_size = (3 + 2) * buffer_sizeof(buffer_f32), _buff = buffer_create(1000, buffer_fixed, 4);
+ repeat(51)
+ {
+     repeat(3) buffer_write(_buff, buffer_f32, random(500));        // x, y, z
+     repeat(2) buffer_write(_buff, buffer_f32, ((_i++ mod 6) < 3)); // u, v
+ }
+
+ vb = vertex_create_buffer_from_buffer_ext(_buff, vertex_format, 0, 30);
+ vertex_update_buffer_from_buffer(vb, 0, _buff, 40 * _vertex_size, 3 * _vertex_size); +

+

The code above first creates a new vertex format that consists of a 3D position attribute and a texture coordinate attribute. It then initialises a couple of temporary variables: a loop counter, the source buffer and the size in bytes of a single vertex. The (3 + 2) refers to the three float values used to store a position and the two float values to store a UV coordinate. The buffer is then filled with some random values to create a total of 51 randomly positioned vertices, or 17 triangles, stored as pr_trianglelist (see Primitive Type Constant). After that, a new vertex buffer is created from the first 30 vertices in the buffer. Finally, the first three vertices in this vertex buffer are updated with a call to vertex_update_buffer_from_buffer; they are overwritten with the data of vertex index 40, 41 and 42 in the original buffer.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.htm new file mode 100644 index 000000000..619cece67 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Primitives/vertex_update_buffer_from_vertex.htm @@ -0,0 +1,121 @@ + + + + + + vertex_update_buffer_from_vertex + + + + + + + + + + +

vertex_update_buffer_from_vertex

+

This function updates the contents of a vertex buffer using (part of) the contents of another vertex buffer.

+

 You cannot pass frozen vertex buffers into this function.

+

Usage Notes

+
    +
  • You can optionally provide the starting vertex and the number of vertices to copy.
  • +
  • The destination vertex buffer's vertex format should have the same attributes as the source vertex buffer (its Vertex Format can be different).
  • +
  • If the destination vertex buffer never had any vertices added to it, the vertices will be added using the source buffer's vertex format.
  • +
  • Writing data outside of the vertex buffer's current size will resize the vertex buffer as required.
  • +
+

 

+

Syntax:

+

vertex_update_buffer_from_vertex(dest_vbuff, dest_vert, src_vbuff[, src_vert, src_vert_num]);

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
dest_vbuffVertex BufferThe destination vertex buffer to copy vertices to
dest_vertRealThe index of the first vertex in the destination vertex buffer to copy to
src_vbuffVertex BufferThe source vertex buffer to copy vertices from
src_vertReal  The index of the first vertex in the source vertex buffer to copy
src_vert_numReal  The number of vertices to copy
+

 

+

Returns:

+

N/A

+

 

+

Example:

+

Create Event

+

vertex_format_begin();
+ vertex_format_add_position_3d();     // Three buffer_f32 values
+ vertex_format_add_color();           // Four buffer_u8 values
+ vertex_format_add_texcoord();        // Two buffer_f32 values
+ vertex_format = vertex_format_end();
+
+ vb = vertex_create_buffer();
+ vertex_begin(vb, vertex_format);
+ vertex_position_3d(vb, 100, 100, 0);
+ vertex_color(vb, c_lime, 1);
+ vertex_texcoord(vb, 0, 0);
+ vertex_position_3d(vb, 200, 100, 0);
+ vertex_color(vb, c_lime, 1);
+ vertex_texcoord(vb, 1, 0);
+ vertex_position_3d(vb, 200, 200, 0);
+ vertex_color(vb, c_lime, 1);
+ vertex_texcoord(vb, 1, 1);
+ vertex_end(vb);
+
+ vb2 = vertex_create_buffer();
+
+ vertex_update_buffer_from_vertex(vb2, 0, vb); +

+

Draw Event

+

vertex_submit(vb2, pr_trianglelist, -1);

+

The above code shows how to duplicate a vertex buffer's contents to another, newly created vertex buffer.

+

First, in the Create event, a vertex format identical to the Passthrough Vertex Format is created and stored in a variable vertex_format. Then, a new vertex buffer is created and filled with three vertices, according to the vertex format. After that, a second vertex buffer vb2 is created and updated with the vertex data in vb using vertex_update_buffer_from_vertex. After the function call, the vertex data in vb2 will be identical to that in vb.

+

Finally, in the Draw event, vb2 is drawn using vertex_submit.

+

 

+

 

+ + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.htm index e32afc0ea..a0401232c 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/Surfaces.htm @@ -27,7 +27,7 @@

Surfaces

  • Troisièmement, vous ne devez créer des surfaces que dans l'événement draw. Si vous créez une surface dans l'événement Create d'une instance, vous pouvez potentiellement obtenir le même index que le site application_surface. Cela peut alors causer beaucoup de problèmes et de confusion car vous pensez utiliser votre propre surface, alors que vous utilisez en fait la cible de rendu actuelle. Vous devriez également toujours essayer de limiter le dessin d' une surface dans l'événement draw, car en raison de la manière optimisée dont GameMaker dessine à l'écran, il est recommandé de garder toutes les fonctions de dessin dans l'événement draw - cela inclut l'effacement d'une surface lors de sa première création, etc... Dessiner sur une surface en dehors de l'événement draw est possible et peut même être nécessaire pour certains effets, mais ce n'est pas la façon dont il faut procéder.
  • Quatrièmement, lorsque vous dessinez manuellement sur une surface, celle-ci est toujours à la position (0,0). Cela signifie que vous devrez peut-être convertir des coordonnées absolues en coordonnées relatives pour la surface. Par exemple, si vous avez une surface de la taille d'une caméra et que vous souhaitez dessiner sur cette surface quelque chose qui est actuellement visible dans la caméra, vous devez soustraire les coordonnées x et y de la vue de la caméra des coordonnées x et y réelles pour obtenir une position relative par rapport à la position (0,0) de la surface. Ainsi, le code ressemblerait à quelque chose comme ceci :
  • -

    if view_current = 0
    +

    if view_current == 0
    {
        surface_set_target(surf);
        with (obj_Effect)
    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_get_position.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_get_position.htm index a8a6ea80b..72fea8958 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_get_position.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_get_position.htm @@ -4,7 +4,7 @@ application_get_position - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface.htm index d164c412a..cbc26e80d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface.htm @@ -4,7 +4,7 @@ application_surface - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_draw_enable.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_draw_enable.htm index 9c3ce8e26..3597f01de 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_draw_enable.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_draw_enable.htm @@ -4,7 +4,7 @@ application_surface_draw_enable - + @@ -29,7 +29,7 @@

    Syntaxe :

    ArgumentsType Description - + flag The flag will be either true (activé, la valeur par défaut) ou false (désactivé). diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_enable.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_enable.htm index b83bd516c..2ac0aaa68 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_enable.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_enable.htm @@ -4,7 +4,7 @@ application_surface_enable - + @@ -42,11 +42,11 @@

    Exemple :

    {
        if application_surface_is_enabled()
        {
    -         application_surface_enable(false);
    +         application_surface_enable(false);
        }
        else
        {
    -         application_surface_enable(true);
    +         application_surface_enable(true);
        }
    }

    Le code ci-dessus vérifie l'appui sur une touche et active ou désactive la surface de l'application en fonction de son état (comme dans un menu d'options).

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_is_enabled.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_is_enabled.htm index 034ee8bd7..213038c77 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_is_enabled.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/application_surface_is_enabled.htm @@ -4,7 +4,7 @@ application_surface_is_enabled - + @@ -27,7 +27,7 @@

    Les retours :

    Exemple :

    if keyboard_check_pressed(vk_space)
    {
    -     if application_surface_is_enabled()
    +     if application_surface_is_enabled()
        {
            application_surface_enable(false);
        }
    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy.htm index 3a1947997..0409b0150 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy.htm @@ -4,7 +4,7 @@ surface_copy - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy_part.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy_part.htm index 1ea79e16e..a3839a1fc 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy_part.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_copy_part.htm @@ -4,7 +4,7 @@ surface_copy_part - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.htm index c13235d9e..e8dca1f25 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_depth_disable.htm @@ -4,7 +4,7 @@ surface_depth_disable - + @@ -33,7 +33,7 @@

    Syntaxe :

    ArgumentsType Description - + disable If set to true le tampon de profondeur sera désactivé pour les surfaces créées. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.htm index 619706ae8..ea01bf729 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_exists.htm @@ -43,9 +43,9 @@

    Exemple :

    }
    else
    {
    -     if view_current = 1
    +     if view_current == 1
        {
    -         draw_surface(surf,0,0);
    +         draw_surface(surf, 0, 0);
        }
    }

    Le code ci-dessus va vérifier si une surface indexée dans la variable "surf" existe, et si ce n'est pas le cas, il va la recréer. Si elle existe, il vérifie alors quelle vue est actuellement dessinée et si c'est la vue [1], il dessine la surface.

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_format_is_supported.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_format_is_supported.htm new file mode 100644 index 000000000..aebdbf0ce --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_format_is_supported.htm @@ -0,0 +1,70 @@ + + + + + + surface_format_is_supported + + + + + + + + + + + +

    surface_format_is_supported

    +

    This function returns whether the given surface format is supported on the current platform. All formats are listed here.

    +

     

    +

    Syntax:

    +

    surface_format_is_supported(format);

    + + + + + + + + + + + + + +
    ArgumentTypeDescription
    formatSurface Format ConstantThe surface format to check
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example:

    +

    if (surface_format_is_supported(surface_rgba32float))
    + {
    +     my_surf = surface_create(320, 180, surface_rgba32float);
    +     // ...
    + }
    + else
    + {
    +     show_debug_message("Effect disabled, 32-bit surface not supported");
    + }

    +

    This checks if the surface_rgba32float format is supported on the current platform, and in that case it creates a surface with that format. However, if the format is not supported, it instead prints a message to the output log.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_free.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_free.htm index 004df92d6..e69ab1c32 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_free.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_free.htm @@ -4,7 +4,7 @@ surface_free - + @@ -25,7 +25,7 @@

    Syntaxe :

    ArgumentsType Description - + surface_id The ID of the surface to be freed. @@ -39,7 +39,7 @@

    Les retours :

    Exemple :

    if keyboard_check_pressed(vk_escape)
    {
    -     surface_free(surf);
    +     surface_free(surf);
        room_goto(rm_Menu);
    }

    Le code ci-dessus vérifie si une touche a été pressée et s'il en détecte une, il libère la mémoire réservée à la surface indexée dans la variable "surf" et change ensuite de pièce.

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.htm index 817287b29..41b4bc54b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_depth_disable.htm @@ -4,7 +4,7 @@ surface_get_depth_disable - + @@ -27,7 +27,7 @@

    Les retours :

    Exemple :

    if (!surface_exists(surf))
    {
    -     if surface_get_depth_disable() == false
    +     if surface_get_depth_disable() == false
        {
            surface_depth_disable(true);
        }
    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_format.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_format.htm new file mode 100644 index 000000000..c14038069 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_format.htm @@ -0,0 +1,73 @@ + + + + + + surface_get_format + + + + + + + + + + + +

    surface_get_format

    +

    This function returns the format of the given surface. All formats are listed here.

    +

     

    +

    Syntax:

    +

    surface_get_format(surface_id);

    + + + + + + + + + + + + + +
    ArgumentTypeDescription
    surface_idSurfaceThe surface to get the format of
    +

     

    +

    Returns:

    +

    Surface Format Constant

    +

     

    +

    Example:

    +

    var _format = surface_get_format(my_surf);
    + if (_format == surface_rgba8unorm)
    + {
    +     var _buffer = buffer_create(1, buffer_grow, 1);
    +     buffer_get_surface(_buffer, my_surf, 0);
    +     buffer_seek(_buffer, buffer_seek_start, 0);
    +     show_debug_message(buffer_read(_buffer, buffer_u8));
    +     show_debug_message(buffer_read(_buffer, buffer_u8));
    +     show_debug_message(buffer_read(_buffer, buffer_u8));
    +     show_debug_message(buffer_read(_buffer, buffer_u8));
    + }

    +

    This gets the format of a surface, and checks if it's surface_rgba8unorm, meaning each pixel has 4 channels (RGBA) with each channel having 8 bits (1 byte).

    +

    If the format matches, it creates a buffer and writes the surface to that buffer. It then seeks to the start of the buffer and reads the first four bytes, i.e. the RGBA values for the first pixel. It prints each channel's value to the output log.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_height.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_height.htm index f7a515dd9..06d48369f 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_height.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_height.htm @@ -4,7 +4,7 @@ surface_get_height - + @@ -26,7 +26,7 @@

    Syntaxe :

    ArgumentsType Description - + surface_id The ID of the surface to get the height of. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target.htm index faf14db81..848de8f79 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target.htm @@ -4,7 +4,7 @@ surface_get_target - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.htm index 7e01c8156..bb250673a 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_target_ext.htm @@ -4,7 +4,7 @@ surface_get_target_ext - + @@ -25,7 +25,7 @@

    Syntaxe :

    ArgumentsType Description - + index The render target index to check (from 0 to 3). diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture.htm index 6f11efe2b..668830c2b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_texture.htm @@ -4,7 +4,7 @@ surface_get_texture - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_width.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_width.htm index 63b5c2ebf..250e43978 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_width.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_get_width.htm @@ -4,7 +4,7 @@ surface_get_width - + @@ -26,7 +26,7 @@

    Syntaxe :

    ArgumentsType Description - + surface_id The ID of the surface to get the width of. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_getpixel.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_getpixel.htm index 1e3b00872..d9e15ee5f 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_getpixel.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_getpixel.htm @@ -4,7 +4,7 @@ surface_getpixel - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.htm index 1477dde45..3e2b36f50 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_reset_target.htm @@ -32,7 +32,7 @@

    Exemple :

        {
            draw_self();
        }
    -     surface_reset_target();
    +     surface_reset_target();
    }
    else
    {
    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_resize.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_resize.htm index 53949794e..bbf0e4fe3 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_resize.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_resize.htm @@ -4,7 +4,7 @@ surface_resize - + @@ -25,7 +25,7 @@

    Syntaxe :

    ArgumentsType Description - + surface_id The ID of the surface to change. @@ -47,7 +47,7 @@

    Les retours :

    Exemple :

    if view_wport[0] != surface_get_width(application_surface) || view_hport[0] != surface_get_height(application_surface)
    {
    -     surface_resize(application_surface, view_wport[0],view_hport[0]);
    +     surface_resize(application_surface, view_wport[0],view_hport[0]);
    }

    Le code ci-dessus vérifie la taille du port d'affichage par rapport à celle de la surface "aplication_surface" et si elle est différente, la surface est redimensionnée.

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save.htm index 7032e8178..c83e33759 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save.htm @@ -4,7 +4,7 @@ surface_save - + @@ -42,7 +42,7 @@

    Les retours :

    Exemple :

    if keyboard_check_pressed(ord("S")
    {
    -     surface_save(surf, "test.png");
    +     surface_save(surf, "test.png");
    }

    Le code ci-dessus vérifie si l'utilisateur appuie sur la touche "S" du clavier et si c'est le cas, il enregistre la surface indexée dans la variable "surf" sur le disque.

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save_part.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save_part.htm index 9c7330986..aa500d8bd 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save_part.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_save_part.htm @@ -4,7 +4,7 @@ surface_save_part - + @@ -58,7 +58,7 @@

    Les retours :

    Exemple :

    if keyboard_check_pressed(ord("S")
    {
    -     surface_save_part(surf, "test.png", 0, 0, 100, 100);
    +     surface_save_part(surf, "test.png", 0, 0, 100, 100);
    }

    Le code ci-dessus vérifie si l'utilisateur appuie sur la touche "S" du clavier et si c'est le cas, il enregistre une partie de la surface indexée dans la variable "surf" sur le disque.

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.htm index 72359e4c7..c6ec7e889 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/Textures.htm @@ -4,7 +4,7 @@ Textures - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/draw_texture_flush.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/draw_texture_flush.htm index d142b6230..7aab94dc5 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/draw_texture_flush.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/draw_texture_flush.htm @@ -4,7 +4,7 @@ draw_texture_flush - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_debug_messages.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_debug_messages.htm index 2924b9fff..e80f5affd 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_debug_messages.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_debug_messages.htm @@ -24,7 +24,7 @@

    Syntaxe :

    ArgumentsType Description - + enable Enable or disable the texture debug messages diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_flush.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_flush.htm index e76df28d5..c2a9e18b0 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_flush.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_flush.htm @@ -4,7 +4,7 @@ texture_flush - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_height.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_height.htm index db4160e9c..63b2f21ca 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_height.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_height.htm @@ -4,7 +4,7 @@ texture_get_height - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_texel_height.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_texel_height.htm index 81eec2859..73f4d38c6 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_texel_height.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_texel_height.htm @@ -4,7 +4,7 @@ texture_get_texel_height - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_uvs.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_uvs.htm index 81a79d7fd..00cc6262c 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_uvs.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_get_uvs.htm @@ -4,7 +4,7 @@ texture_get_uvs - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.htm index 2e6e75b68..d86e26456 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_prefetch.htm @@ -4,7 +4,7 @@ texture_prefetch - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_set_stage.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_set_stage.htm index 80bfa3ee7..42d636d38 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_set_stage.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texture_set_stage.htm @@ -4,7 +4,7 @@ texture_set_stage - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_names.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_names.htm new file mode 100644 index 000000000..66afbec85 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_names.htm @@ -0,0 +1,50 @@ + + + + + + texturegroup_get_names + + + + + + + + + + +

    texturegroup_get_names

    +

    This function returns an array containing the names of all Texture Groups contained in the game.

    +

     The texture group that GameMaker adds the fallback texture to is included. Empty texture groups may not be included as they're filtered by the asset compiler.

    +

     

    +

    Syntax:

    +

    texturegroup_get_names();

    +

     

    +

    Returns:

    +

    Array of String

    +

     

    +

    Example:

    +

    var _arr_names = texturegroup_get_names();
    + show_debug_message("Texture Groups:\n--------------");
    + array_foreach(_arr_names, show_debug_message);

    +

    The above code gets the names of all texture groups using texturegroup_get_names and lists them in the debug output.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_status.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_status.htm new file mode 100644 index 000000000..21407e7ce --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_status.htm @@ -0,0 +1,106 @@ + + + + + + texturegroup_get_status + + + + + + + + + + +

    texturegroup_get_status

    +

    This function returns the status of the given Dynamic Texture Group. The status will be one of the following constants:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Texture Group Status Constant
    ConstantDescriptionValue
    texturegroup_status_unloadedThe Texture Group is still on disk and not in memory0
    texturegroup_status_loadingThe Texture Group is currently being loaded from disk1
    texturegroup_status_loadedThe Texture Group has been loaded into RAM2
    texturegroup_status_fetchedThe Texture Group has been loaded and fetched into VRAM, ready for use3
    +

    For information on its use, see: Dynamic Textures

    +

     

    +

    Syntax:

    +

    texturegroup_get_status(groupname);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    groupnameStringThe name of the Texture Group as a string. These are defined in the Texture Groups window.
    +

     

    +

    Returns:

    +

    Texture Group Status Constant

    +

     

    +

    Example:

    +

    var _tg = "tg_UI";
    + var _status = texturegroup_get_status(_tg);
    +
    + if (_status == texturegroup_status_unloaded)
    + {
    +     texturegroup_load(_tg);
    + } +

    +

    This gets the status of the "tg_UI" Texture Group, and if it's unloaded, it loads it.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_tilesets.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_tilesets.htm index 9cb143ffb..16f48b6ee 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_tilesets.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_get_tilesets.htm @@ -4,7 +4,7 @@ texturegroup_get_tilesets - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_load.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_load.htm new file mode 100644 index 000000000..dfe6d55e0 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_load.htm @@ -0,0 +1,81 @@ + + + + + + texturegroup_load + + + + + + + + + + +

    texturegroup_load

    +

    This function is used to load a Dynamic Texture Group from disk into RAM.

    +

    By default, it will also decompress and fetch the group into VRAM. This can be disabled by setting the second argument to false, which will leave you to manually pre-fetch it later or have it fetched automatically when an image is drawn from it.

    +

    If the Texture Group was loaded successfully, the function returns 0, otherwise it returns -1.

    +

    For information on its use, see: Dynamic Textures

    +

     

    +

    Syntax:

    +

    texturegroup_load(groupname, [prefetch=true]);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    groupnameStringThe name of the Texture Group as a string. These are defined in the Texture Groups window.
    prefetchBoolean  If true (default), the group is decompressed and fetched into VRAM. If false, it's only loaded into RAM, remaining compressed.
    +

     

    +

    Returns:

    +

    Real

    +

     

    +

    Example:

    +

    var _loaded = texturegroup_load("tg_UI");
    +
    + if (_loaded < 0)
    + {
    +     show_debug_message("tg_UI could not be loaded.");
    + } +

    +

    This will attempt to load the Dynamic Texture Group with the name "tg_UI" into memory and also pre-fetch it.

    +

    If the Texture Group wasn't loaded, it prints a message to the output log.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_set_mode.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_set_mode.htm new file mode 100644 index 000000000..3a7198d50 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_set_mode.htm @@ -0,0 +1,90 @@ + + + + + + texturegroup_set_mode + + + + + + + + + + +

    texturegroup_set_mode

    +

    This function allows you to set three things:

    +
      +
    1. Mode: You can set whether Dynamic Texture Groups use Implicit (default) or Explicit loading, by using false for Implicit and true for Explicit.
      +
      + For information on modes, see: Dynamic Group Modes +
    2. +
    3. Debug: You can enable debugging, which will show you all of your game's Texture Pages along with their status in-game.
      + +
    4. +
    5. Default Sprite: This is the default sprite that appears when the mode is set to Explicit, and the texture you're drawing to draw has not been loaded.
      +
      + For more information, see: Explicit +
    6. +
    +

     

    +

     

    +

    Syntax:

    +

    texturegroup_set_mode(explicit, [debug=false, default_sprite=-1]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    explicitBooleanThe mode used for Dynamic Texture Groups: Implicit (false), or Explicit (true)
    debugBoolean  Enable/disable Texture Group debugging
    default_spriteSprite Asset  Only used in Explicit mode: The sprite used as the "fallback" texture when another texture is not loaded (the whole texture page is drawn)
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    texturegroup_set_mode(true, false, spr_fallback);

    +

    This will enable Explicit mode, disable debugging and set spr_fallback as the fallback sprite for unloaded textures.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_unload.htm b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_unload.htm new file mode 100644 index 000000000..8af47d0e4 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Drawing/Textures/texturegroup_unload.htm @@ -0,0 +1,68 @@ + + + + + + texturegroup_unload + + + + + + + + + + +

    texturegroup_unload

    +

    This function is used to unload a loaded Dynamic Texture Group from memory back into disk, in its original, compressed form.

    +

    You can't unload a default (non-dynamic) Texture Group.

    +

    For information on its use, see: Dynamic Textures

    +

     

    +

    Syntax:

    +

    texturegroup_unload(groupname);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    groupnameStringThe name of the Texture Group as a string. These are defined in the Texture Groups window.
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    texturegroup_unload("tg_UI");

    +

    This will unload the Dynamic Texture Group with the name "tg_UI".

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Binary_Files/file_bin_open.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Binary_Files/file_bin_open.htm index e43115402..964fc2512 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Binary_Files/file_bin_open.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Binary_Files/file_bin_open.htm @@ -4,7 +4,7 @@ file_bin_open - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_add_file.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_add_file.htm new file mode 100644 index 000000000..dde0de83e --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_add_file.htm @@ -0,0 +1,85 @@ + + + + + + zip_add_file + + + + + + + + + + +

    zip_add_file

    +

    This function is used to add a file into a ZIP file created with zip_create.

    +

    If the call is successful, the function will return 0, otherwise it will throw a fatal error.

    +

    The src file is only loaded when zip_save is called later, so an invalid file will not throw an error during this call.

    +
    +

     

    +

    Syntax:

    +

    zip_add_file(zip_object, dest, src);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    zip_objectZIP FileA ZIP file created with zip_create
    destStringThe destination file name to be created in the ZIP. Can include directories.
    srcStringThe source file to be placed into the ZIP
    +

     

    +

    Returns:

    +

    Real

    +

     

    +

    Example:

    +

    var _zip = zip_create();
    +
    + zip_add_file(_zip, "new.txt", "new.txt");
    + zip_add_file(_zip, "sounds/snd_attack_arc_01.wav", "snd_attack_arc_01.wav");
    +
    + zip_save(_zip, "upload.zip"); +

    +

    This creates a new ZIP file, adds two files to it (with the second file in a subdirectory called sounds/) and then saves the ZIP to disk as upload.zip.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_create.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_create.htm new file mode 100644 index 000000000..bc666a644 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_create.htm @@ -0,0 +1,56 @@ + + + + + + zip_create + + + + + + + + + + +

    zip_create

    +

    This function creates a new ZIP file and returns its reference. This ZIP file is stored in memory, where you can add files to it using zip_add_file, and save it to disk using zip_save.

    +

    Files added to a ZIP file are always compressed at the maximum compression level.

    +

    The ZIP file is automatically garbage-collected when it's no longer referenced. As long as it is referenced, it will continue to exist in memory and files can be added to it at any time, even after zip_save is called on it. However you can't add files into the ZIP while it's in the middle of being saved to disk.

    +
    +

     

    +

    Syntax:

    +

    zip_create();

    +

     

    +

    Returns:

    +

    ZIP File

    +

     

    +

    Example:

    +

    var _zip = zip_create();
    +
    + zip_add_file(_zip, "new.txt", "new.txt");
    + zip_add_file(_zip, "sounds/snd_attack_arc_01.wav", "snd_attack_arc_01.wav");
    +
    + zip_save(_zip, "upload.zip"); +

    +

    This creates a new ZIP file, adds two files to it (with the second file in a subdirectory called sounds/) and then saves the ZIP to disk as upload.zip.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_save.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_save.htm new file mode 100644 index 000000000..1eda03826 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_save.htm @@ -0,0 +1,84 @@ + + + + + + zip_save + + + + + + + + + + +

    zip_save

    +

    This function saves the ZIP file that you created with zip_create to the given file path.

    +

    If the call is successful, a request ID is returned, and later the Async Save / Load event is triggered where this ID can be checked. In case of an error, a fatal error is thrown.

    +

    The async_load map in the Save / Load event will contain the following keys:

    +
      +
    • "id": The request ID as returned by the original function call
    • +
    • "status": 0 if the ZIP extracted successfully, -1 if it failed
    • +
    +
    +

     

    +

    Syntax:

    +

    zip_save(zip_object, path);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    zip_objectZIP FileA ZIP file created with zip_create
    pathStringThe file path that the ZIP will be saved as
    +

     

    +

    Returns:

    +

    Real

    +

     

    +

    Example:

    +

    var _zip = zip_create();
    +
    + zip_add_file(_zip, "new.txt", "new.txt");
    + zip_add_file(_zip, "sounds/snd_attack_arc_01.wav", "snd_attack_arc_01.wav");
    +
    + zip_save(_zip, "upload.zip"); +

    +

    This creates a new ZIP file, adds two files to it (with the second file in a subdirectory called sounds/) and then saves the ZIP to disk as upload.zip.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_unzip_async.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_unzip_async.htm new file mode 100644 index 000000000..e0559bae9 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/zip_unzip_async.htm @@ -0,0 +1,92 @@ + + + + + + zip_unzip_async + + + + + + + + + + +

    zip_unzip_async

    +

    The function is the asynchronous equivalent of zip_unzip. It takes a path to a ZIP file, and the target directory where it should be extracted.

    +

    If the call is successful, a request ID is returned, and later the Async Save / Load event is triggered where this ID can be checked. The async_load map in that event will contain the following keys:

    +
      +
    • "id": The request ID as returned by the original function call
    • +
    • "status": 0 if the ZIP extracted successfully, -1 if it failed
    • +
    +

    This function will trigger a fatal error if it's called between buffer_async_group_begin and buffer_async_group_end calls.

    +

    Please read the zip_unzip page for file system limitations.

    +
    +

     

    +

    Syntax:

    +

    zip_unzip_async(zip_file, target_directory);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    zip_fileStringThe zip file to open
    target_directoryStringThe target directory to extract the files to
    +

     

    +

    Returns:

    +

    Real

    +

     

    +

    Example:

    +

    level_data_request = zip_unzip_async("/downloads/level_data.zip", working_directory + "extracted/");

    +

    Async Save/Load event

    +

    var _id = async_load[? "id"];
    +
    + if (_id == level_data_request)
    + {
    +     var _status = async_load[? "status"];
    +
    +     if (_status < 0)
    +     {
    +         show_debug_message("ZIP file extraction failed.");
    +     }
    + } +

    +

    The above code attempts to extract a ZIP file into the working directory. In the Async Save/Load event, it checks the status of that request, and prints a message to the output log if it failed.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_create.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_create.htm index c549f43d5..0c4123b59 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_create.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_create.htm @@ -26,7 +26,7 @@

    Syntaxe :

    ArgumentsType Description - + dname The name of the directory to create. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_destroy.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_destroy.htm index 8aab58856..bfc56e458 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_destroy.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_destroy.htm @@ -26,7 +26,7 @@

    Syntaxe :

    ArgumentsType Description - + dname The name of the directory to remove. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_exists.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_exists.htm index 7b994ffea..f564b41ff 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_exists.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_Directories/directory_exists.htm @@ -25,7 +25,7 @@

    Syntaxe :

    ArgumentsType Description - + dname The name of the directory to look for. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_delete.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_delete.htm index 52e68c785..ef3c9abad 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_delete.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_delete.htm @@ -25,7 +25,7 @@

    Syntaxe :

    ArgumentsType Description - + fname The name of the file to delete. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_rename.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_rename.htm index b1f599e73..0835be182 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_rename.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/File_System/file_rename.htm @@ -25,7 +25,7 @@

    Syntaxe :

    ArgumentsType Description - + oldname The name of the file to change. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Ini_Files/ini_open.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Ini_Files/ini_open.htm index 014f90212..cbb3a6a7f 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Ini_Files/ini_open.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Ini_Files/ini_open.htm @@ -4,7 +4,7 @@ ini_open - + @@ -28,7 +28,7 @@

    Syntaxe :

    ArgumentsType Description - + name The filename for the .ini file. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_from_string.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_from_string.htm index 357a254af..3eb78c82d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_from_string.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_from_string.htm @@ -26,7 +26,7 @@

    Syntaxe :

    ArgumentsType Description - + string The string to create the file from. @@ -58,5 +58,5 @@
    Copyright YoY - - \ No newline at end of file + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_read.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_read.htm index d864a222a..9d57b80ec 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_read.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Text_Files/file_text_open_read.htm @@ -27,7 +27,7 @@

    Syntaxe :

    ArgumentsType Description - + fname The name of the file to read from. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_change.htm b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_change.htm new file mode 100644 index 000000000..3bd9260f3 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_change.htm @@ -0,0 +1,141 @@ + + + + + + game_change + + + + + + + + + + +

    game_change

    +

    This function ends the current game and launches another game that's included in the Included Files.

    +

    It allows you to have a main game from which you can launch other games that you keep in a different GameMaker project. The function can be called again in the launched game to return back to the main game.

    +

    The function is supported on the Windows, macOS, PS4, PS5 and Switch platforms.

    +

     This function only works in VM builds.

    +

     GameMaker names the .win file differently depending on whether your game is running from the IDE or from the final executable (created using Create Executable in The Build Menu). When running from the IDE the name will be $"{game_project_name}.win", if not it will be "data.win". You should always make sure to refer to the right name, e.g. by setting up a different configuration.

    +

     Since the child games' external files are included in the main game's datafiles, they can be accessed from the main game as well.

    +

    Usage Notes

    +
      +
    • Each of the games to be launched by the main game should be included in a subdirectory of the Included Files: the game's data.win file and other external included files should go into this folder. This folder structure could look as follows (essentially a copy of the contents in the final game's directory, without the executable file):  +
        +
      • game1 +
          +
        • game1.win
        • +
        • bgm_groovy.ogg
        • +
        • texgroup1_0.yytex
        • +
        • options.ini
        • +
        +
      • +
      • game2 +
          +
        • game2.win
        • +
        • game_data.json
        • +
        • options.ini
        • +
        +
      • +
      • ...
      • +
      +
    • +
    • This function only works on certain platforms, and on some platforms it will only work in a packaged build.
    • +
    • All saves, achievements, etc. will be done under the title ID set by the launcher project.
    • +
    • As this function ends the current game before launching the new one, the Game End event is triggered for the current game and the Game Start event is triggered for the game that is being launched.
    • +
    +

    Argument Values Per Platform

    +
    +

    The table below provides an example of the working directory and launch parameters to be provided on each of the supported platforms: 

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PlatformWorking DirectoryLaunch Parameters
    Windows"/game2""-game game2.win"
    macOS"game2"""
    PS4/PS5"""-game /app0/games/game2/game.win"
    Switch"rom:/game2/"""
    +
    +
    +

     

    +

    Syntax:

    +

    game_change(working_directory, launch_parameters);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    working_directoryStringThe working directory of the game to be launched
    launch_parametersStringThe command-line parameters to pass to the game to be launched
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example 1: Launching an Included Game (on Windows)

    +

    game_change("/chapter3", "-game chapter3.win");

    +

    The above code runs from the launcher game and launches the "Chapter 3" game, which is stored in a subdirectory "chapter3"  under Included Files.

    +

     

    +

    Example 2: Returning to the Main/Launcher Game (on Windows)

    +

    game_change("/../", "-game main_game.win");

    +

    The code above runs from a game that was launched from the launcher game and returns to the main/launcher game. The double dots .. indicate that the game's working directory is one above the current working directory.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_load_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_load_buffer.htm index 672f72de5..cf7577b4b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_load_buffer.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_load_buffer.htm @@ -24,7 +24,7 @@

    Syntaxe :

    ArgumentsType Description - + buffer The buffer id to load from. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_save_buffer.htm b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_save_buffer.htm index 1148f60bc..a16035173 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_save_buffer.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_save_buffer.htm @@ -26,7 +26,7 @@

    Syntaxe :

    ArgumentsType Description - + buffer The buffer id to save to. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_set_speed.htm b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_set_speed.htm index fefd88f1f..114e0f956 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_set_speed.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/General_Game_Control/game_set_speed.htm @@ -65,11 +65,11 @@

    Les retours :

    Exemple :

    if os_browser == browser_not_a_browser
    {
    -     game_set_speed(60, gamespeed_fps);
    +     game_set_speed(60, gamespeed_fps);
    }
    else
    {
    -     game_set_speed(30, gamespeed_fps);
    +     game_set_speed(30, gamespeed_fps);
    }

    Le code ci-dessus vérifie si le jeu s'exécute dans un navigateur et définit la vitesse du jeu en conséquence sous forme de valeur FPS.

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/Live_Wallpapers.htm b/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/Live_Wallpapers.htm new file mode 100644 index 000000000..5c0e8f9a7 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/Live_Wallpapers.htm @@ -0,0 +1,39 @@ + + + + + + + Live Wallpapers + + + + + + + + + +

    Live Wallpapers

    +

    This page lists functions for use with the Live Wallpaper functionality.

    +

    For information on how to set these up, see the helpdesk article on GX Live Wallpapers.

    +

    Functions

    +

    The following functions are given for Live Wallpapers:

    + +

    Also see: Wallpaper Events

    +

     

    +

     

    + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/wallpaper_set_config.htm b/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/wallpaper_set_config.htm new file mode 100644 index 000000000..14c2a212e --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/wallpaper_set_config.htm @@ -0,0 +1,201 @@ + + + + + + wallpaper_set_config + + + + + + + + + + +

    wallpaper_set_config

    +

    This function sends the configuration for your wallpaper to the companion app. It takes a "settings" array containing your options/sections, where each option/section is a struct.

    +

    Settings Array

    +

    The array should have the following format: 

    +

    array = 
    + [
    +     {section_or_option},
    +     {section_or_option},
    +     {section_or_option}
    + ];

    +

    Each entry in this array is either a section or an option.

    +

    Section Struct

    +

    A section struct requires the following format: 

    +

    {
    +     type: "section",
    +     name: "unique_identifier",
    +     label: "Label for this section in the companion app",
    +     children: [{section}, {option}, ...]
    + }

    +

    The children property in a section struct is an array. Each entry in this array is either another section struct or an option struct.

    +

    Option Struct

    +

    An option struct requires the following format: 

    +

    {
    +     type: "type_of_return_value",
    +     name: "unique_identifier",
    +     label: "Label for this section in the companion app"
    + }

    +

    The following types are allowed for the type property: "range", "boolean", "string", "string_multiline", "color" (or "colour"), "file" and "folder".

    +

    Depending on the type, you must provide extra properties to the option struct: 

    +

    "range"

    +
    +

    {
    +     type: "range",
    +     value: <a number, default value>,
    +     min: <a number, minimum range value>,
    +     max: <a number, maximum range value>,
    +     step: <a number, distance between possible values>
    + }

    +
    +

    "boolean"

    +
    +

    {
    +     type: "boolean",
    +     value: <true or false, default value>
    + }

    +
    +

    "string"

    +
    +

    {
    +     type: "string",
    +     value: <a string, default value>
    + }

    +
    +

    "string_multiline"

    +
    +

    {
    +     type: "string_multiline",
    +     value: <a string that can have newlines, e.g. "Line 1\nLine 2\nLine 3\nLine4">
    + }

    +
    +

    "color" (or "colour")

    +
    +

    {
    +     type: "colour",
    +     value: <a colour, default value>
    + }

    +
    +

    "file"

    +
    +

    {
    +     type: "file",
    +     value: <a string containing file path, e.g. "C:\\Users\\MyUser\\Pictures\\MyPicture.png">
    + }

    +
    +

    "folder"

    +
    +

    {
    +     type: "folder",
    +     value: <a string containing a folder path, e.g. "C:\\Users\\MyUser\\Pictures\\">
    + }

    +
    +

     

    +

     

    +

    Syntax:

    +

    wallpaper_set_config(settings_array);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    settings_arrayArrayAn array containing section and option structs as detailed above
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    var _config = 
    + [
    +     {
    +         type: "section",
    +         name: "animation",
    +         label: "Animation",
    +         children:
    +         [
    +             {
    +                 type: "range",
    +                 name: "speed",
    +                 "label": "Rotation speed",
    +                 value: 50,
    +                 min: 0,
    +                 max: 200,
    +                 step: 25
    +             },
    +             {
    +                 type: "boolean",
    +                 name: "clockwiseRotation",
    +                 label: "Clockwise rotation",
    +                 value: false
    +             },
    +             {
    +                 type: "boolean",
    +                 name: "pause",
    +                 label: "Pause animation",
    +                 value: true
    +             }
    +         ]
    +     },
    +     {
    +         type: "section",
    +         name: "colours",
    +         label: "Colours",
    +         children:
    +         [
    +            {
    +                 type: "colour",
    +                 name: "blendColor",
    +                 label: "Blend colour",
    +                 value: #FA1E4E
    +             },
    +             {
    +                 type: "range",
    +                 name: "blendAlpha",
    +                 label: "Blend alpha",
    +                 value: 100
    +             }
    +         ]
    +     }
    + ];
    +
    + wallpaper_set_config(_config); +

    +

    The code above shows an example of the wallpaper_set_config function with two sections. The first section contains three options (a range and two booleans) and the second section contains two options (a colour and a range).

    +

    This example initialises the array first in a local variable, and passes that into the function call. You can skip the variable stuff and initialise the array in the function arguments directly if you wish to do so.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/wallpaper_set_subscriptions.htm b/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/wallpaper_set_subscriptions.htm new file mode 100644 index 000000000..48dbf9f22 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Live_Wallpapers/wallpaper_set_subscriptions.htm @@ -0,0 +1,165 @@ + + + + + + wallpaper_set_subscriptions + + + + + + + + + + +

    wallpaper_set_subscriptions

    +

    This function subscribes to the given metric(s) from the Companion app. This is used to get real-time system information, and enable mouse input, which is disabled for Live Wallpapers by default.

    +

     The user must have the Companion app installed on Windows for metrics to work. See this guide for setting up the Companion app.

    +

    Arguments

    +

    You pass an array into this function, containing one or more of the following strings: "desktop_mouse", "cpu", "gpu", "battery", "ram", "disk", "network", "audio".

    +

    "desktop_mouse" enables mouse input for your Live Wallpaper. The other options allow the Wallpaper Subscription Data event to be triggered, where you receive data on the metrics you chose to subscribe to.

    +

    Receiving Metrics

    +

    Within the Wallpaper Subscription Data event you will receive updates for subscribed metrics, around once every second, except for audio which is ten times a second, and disk which is twice a minute.

    +

    The event will contain a wallpaper_subscription_data variable which is a struct, containing the following members:

    +

    wallpaper_subscription_data Struct

    +
    +
      +
    • cpu (Struct): Information about the CPU, if you subscribed to it. +
        +
      • num_devices (Real): The number of CPU devices. 0 if no devices were found.
      • +
      • devices (Array): Array of CPU devices. Each entry in this array is a struct, containing the following members: +
          +
        • name (String): The name of the CPU.
        • +
        • num_logical_cores (Integer Real): Number of logical cores.
        • +
        • num_physical_cores (Integer Real): Number of physical cores.
        • +
        • usage_pct (Integer Real): The load percentage of the CPU.
        • +
        • current_clock_speed_MHz (Integer Real): The current clock speed of the CPU in MHz.
        • +
        • max_clock_speed_MHz (Integer Real): The maximum clock speed of the CPU in MHz.
        • +
        +
      • +
      +
    • +
    • gpu (Struct): Information about the GPU, if you subscribed to it. Supports NVIDIA and AMD cards. +
        +
      • num_devices (Real): The number of GPU devices. 0 if no devices were found.
      • +
      • devices (Array): Array of GPU devices. Each entry in this array is a struct, containing the following members: +
          +
        • name (String): The name of the GPU.
        • +
        • usage_pct (Integer Real): The load percentage of the GPU.
        • +
        • clock_speed_MHz (Integer Real): The current clock speed of the GPU in MHz.
        • +
        • fan_speed_pct or fan_speed_rpm (Integer Real): The target speed of the GPU fan. Expressed as a percentage of the maximum speed on NVIDIA GPUs and in RPM on AMD GPUs.
        • +
        • power_usage_W (Integer Real): The power usage of the GPU in Watt.
        • +
        • temperature_C (Integer Real): The temperature of the GPU in Celsius.
        • +
        • memory_available_bytes (Integer Real): How much of the GPU memory is available in bytes.
        • +
        • memory_total_bytes (Integer Real): The total GPU memory in bytes.
        • +
        +
      • +
      +
    • +
    • battery (Struct): Information about the battery, if you subscribed to it. +
        +
      • num_devices (Real): The number of battery devices. 0 if no devices were found.
      • +
      • devices (Array): Array of battery devices. Each entry in this array is a struct, containing the following members: +
          +
        • name (String): The name of the battery.
        • +
        • is_charging (Boolean): Indicates if the battery is charging.
        • +
        • remaining_charge_pct (Integer Real): Percentage of the charge left in the battery.
        • +
        • remaining_time_min (Integer Real): The estimated time left of the battery in minutes.
        • +
        +
      • +
      +
    • +
    • ram (Struct): Information about the RAM, if you subscribed to it. +
        +
      • num_devices (Real): The number of RAM devices. 0 if no devices were found.
      • +
      • devices (Array): Array of RAM devices. Each entry in this array is a struct, containing the following members: +
          +
        • name (String): The name of the RAM.
        • +
        • available_bytes (Integer Real): How much of the RAM memory is available in bytes.
        • +
        • total_bytes (Integer Real): The total RAM memory in bytes.
        • +
        +
      • +
      +
    • +
    • disk (Struct): Information about the disk, if you subscribed to it. +
        +
      • num_devices (Real): The number of disks. 0 if no devices were found.
      • +
      • devices (Array): Array of disks. Each entry in this array is a struct, containing the following members: +
          +
        • name (String): The name of the disk.
        • +
        • available_bytes (Integer Real): How much of the disk memory is available in bytes.
        • +
        • total_bytes (Integer Real): The total disk memory in bytes.
        • +
        +
      • +
      +
    • +
    • network (Struct): Information about the network, if you subscribed to it. +
        +
      • num_devices (Real): The number of network devices. 0 if no devices were found.
      • +
      • devices (Array): Array of network devices. Each entry in this array is a struct, containing the following members: +
          +
        • bandwidth_bps (Integer Real): The bandwidth of the network in bits per second.
        • +
        • send_bps (Integer Real): The current bytes sent per second on the network.
        • +
        • received_bps (Integer Real): The current bytes received per second on the network.
        • +
        +
      • +
      +
    • +
    • audio (Struct): Contains information related to audio, if you subscribed to it. +
        +
      • output (Array of Reals): Represents a spectrum of measured sound amplitudes. The array indices correspond to frequencies ranging from 0 to 2205 Hz. It's important to note that when visualizing this spectrum, the intervals on the x-axis should be in logarithmic scale. To clarify, if the k-th interval has a length of L_k, the length of the interval for the (k+1)-th frequency should be L_(k+1) = L_k^1.1.
      • +
      +
    • +
    +
    +

    If some information could not be retrieved from the system, its corresponding variable will not be present in this structure. That may cause a crash if you try to access a variable that doesn't exist. To prevent that, use struct_exists to check that a variable exists in a struct, before accessing it.

    +

     

    +

     

    +

    Syntax:

    +

    wallpaper_set_subscriptions(subscriptions);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    subscriptionsArrayAn array containing strings, which are the metrics you want to subscribe to
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +
    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/debug.log b/Manual/contents/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/debug.log new file mode 100644 index 000000000..8f009230a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Movement_And_Collisions/Collisions/debug.log @@ -0,0 +1 @@ +[0822/174729.392:ERROR:check.cc(290)] Check failed: false. NOTREACHED log messages are omitted in official builds. Sorry! diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_and_collide.htm b/Manual/contents/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_and_collide.htm new file mode 100644 index 000000000..fbf5b8c34 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Movement_And_Collisions/Movement/move_and_collide.htm @@ -0,0 +1,136 @@ + + + + + + move_and_collide + + + + + + + + + + +

    move_and_collide

    +

    This function moves the instance by the given distance on the X and Y axes, while avoiding the given object or tile map.

    +

    It allows your instance to move while navigating slopes or small steps that would otherwise prevent it from being able to move.

    +

    The function returns an array containing the IDs of the instances and tile maps it collided with.

    +

    obj Argument

    +
    +

    How Does It Work?

    +

    The function will move your instance step-by-step, checking for collisions at each step/iteration. The obj argument is the object, instance or tile map it should avoid, and by default the function moves your instance in 4 steps (which you can change with the num_iterations argument).

    +

    At each iteration, it moves your instance by point_distance(0, 0, dx, dy)/num_iterations pixels in the given direction, and then checks for collisions. If num_iterations is 4, and you want to move (8, 0),  it will move your instance by 2 pixels each iteration before checking for collisions.

    +

    If a collision is found during an iteration, it will try to move around it by moving your instance the same amount in a direction perpendicular to dx, dy, or toward the vector given in the optional xoff, yoff arguments.

    +

    If, at any iteration, the function finds a collision in the direction dx, dy and is able to move around it (either in a perpendicular direction or in the xoff, yoff direction), movement in that other direction will be counted as an iteration.

    +

    Speed Limit

    +

    The optional max_x_move and max_y_move arguments let you specify the maximum distance your instance can move on the X and Y axes.

    +

    This serves to avoid a common problem in platformers, where the downward velocity (gravity) of the player is added to its horizontal speed when it hits the ground, making it walk faster for one frame.

    +

     This function uses the sprite collision mask of the instance to check for collisions (see The Sprite Editor for more info).

    +

     

    +

    Syntax:

    +

    move_and_collide(dx, dy, obj, [num_iterations], [xoff], [yoff], [max_x_move], [max_y_move]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    dxRealThe distance to try to move along the X axis
    dyRealThe distance to try to move along the Y axis
    objObject Asset or Object Instance or Tile Map Element ID or ArrayAn object, instance, tile map ID, keywords all/other, or array containing these items
    num_iterationsReal  The number of steps to take, e.g. if (dx, dy) is (10, 0) and the number of steps to take is 5, then every iteration the instance will move the instance by 10/5 = 2 pixels before checking collisions. The default value is 4.
    xoffReal  The x component of the direction in which to move in case of a collision; specify 0 to use the default behaviour (perpendicular direction of movement)
    yoffReal  The y component of the direction in which to move in case of a collision; specify 0 to use the default behaviour (perpendicular direction of movement)
    max_x_moveReal  The maximum speed the instance should move on the X axis; specify -1 for no limit (which is the default behaviour)
    max_y_moveReal  The maximum speed the instance should move on the Y axis; specify -1 for no limit (which is the default behaviour)
    +

     

    +

    Returns:

    +

    Array of Object Instances

    +

     

    +

    Example 1: Basic Movement

    +

    move_and_collide(8, 0, all);

    +

    The above code will try to move the calling instance to the right 8 pixels and avoid instances of any object (indicated by the all keyword). Since the num_iterations argument is not provided, the number of iterations is 4.

    +

     

    +

    Example 2: Showing Instances Collided With

    +

    var _colliding_instances = move_and_collide(speed_x, speed_y, obj_terrain);
    +
    + for (var i = 0; i < array_length(_colliding_instances); i++)
    + {
    +     var _collider = _colliding_instances[i];
    +     with (_collider)
    +     {
    +         show_debug_message("Collision with instance {0}", id);
    +     }
    + } +

    +

    The above code executes the move_and_collide function in the calling instance. It tries to move it using the custom speed_x and speed_y variables, and tries to avoid instances of obj_terrain. The instances that the calling instance collides with are stored in a temporary array _colliding_instances and shown using a for loop and show_debug_message.

    +

     

    +

    Example 3: Tile Map

    +

    var _tilemap = layer_tilemap_get_id("Tiles_1");
    +
    + move_and_collide(8, 0, _tilemap); +

    +

    The above code will try to move the calling instance to the right 8 pixels and avoid colliding with tiles in the layer "Tiles_1".

    +

    As you only need to get your tile map ID once, you can move the first line to the Create event.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/OS_And_Compiler/os_set_orientation_lock.htm b/Manual/contents/GameMaker_Language/GML_Reference/OS_And_Compiler/os_set_orientation_lock.htm new file mode 100644 index 000000000..33c21e41c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/OS_And_Compiler/os_set_orientation_lock.htm @@ -0,0 +1,68 @@ + + + + + + os_set_orientation_lock + + + + + + + + + + +

    os_set_orientation_lock

    +

    This function changes the orientations that are allowed for the game. You can enable or disable landscape and portrait orientations separately.

    +

    Calling this function will disable the flipped versions of both orientations, which are found in the Android / iOS Game Options.

    +

     

    +

    Syntax:

    +

    os_set_orientation_lock(landscape_enable, portrait_enable);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    landscape_enableBooleanSet to true or false to enable or disable landscape orientations.
    portrait_enableBooleanSet to true or false to enable or disable portrait orientations.
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    os_set_orientation_lock(true, true);

    +

    This enables both landscape and portrait orientations.

    +

     

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data.htm b/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data.htm index 0623d6cd7..84049faea 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data.htm @@ -4,7 +4,7 @@ physics_particle_get_data - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data_particle.htm b/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data_particle.htm index e8b859933..7c23baa68 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data_particle.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Physics/Soft_Body_Particles/physics_particle_get_data_particle.htm @@ -4,7 +4,7 @@ physics_particle_get_data_particle - + diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/show_debug_message_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/show_debug_message_ext.htm new file mode 100644 index 000000000..51aefa283 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/show_debug_message_ext.htm @@ -0,0 +1,80 @@ + + + + + + show_debug_message_ext + + + + + + + + + + +

    show_debug_message_ext

    +

    This function shows a custom debug message in The Output Window and The Debug Overlay at runtime.

    +

    The syntax of this function is identical to that of the string_ext function; aside from a single argument it can also take a Format String with placeholders and and array with additional arguments to replace the placeholders with.

    +
    +

    Syntax:

    +

    show_debug_message_ext(value_or_format, values_array);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    value_or_formatAny (if value) or String (if format)The value to be turned into a string.
    values_arrayArray of Any  An array containing the values to be inserted at the placeholder positions.
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example 1:

    +

    show_debug_message_ext("{0} - {1}", [1, "First item"]);

    +

     

    +

     

    +

    Example 2:

    +

    numbers = [59, 23, 656, 8, 54];
    + array_sort(numbers, true);
    +
    + show_debug_message_ext("The three lowest numbers are: {0}, {1} and {2}", numbers); +

    +

    The above code first defines an array with some numbers, and sorts them in an ascending order. It then uses that array in a show_debug_message_ext() to call to insert its first three numbers into a format string, and then print the resulting string to the Output Log.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_concat.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_concat.htm new file mode 100644 index 000000000..7ea377a7e --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_concat.htm @@ -0,0 +1,73 @@ + + + + + + string_concat + + + + + + + + + + +

    string_concat

    +

    This function concatenates (joins together) the string representations of all arguments that are passed to it, and returns the result as a new string.

    +

    Arguments that are not strings will have the string() function run on them implicitly. See Conversion From Non-String Types for information on how those data types are converted.

    +

    If you want to join strings with certain characters between them, use string_join().

    +

     

    +

    Syntax:

    +

    string_concat(value1 [, value2, ... max_val]);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    value1AnyThe first value to concatenate
    [, value2, ... max_val]Any  Additional values to concatenate
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    result = string_concat("W", "o", "r", "d", "s");

    +

    The above code calls string_concat on a series of letters to make a word. The new string is stored in a variable result.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_concat_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_concat_ext.htm new file mode 100644 index 000000000..b08d9a422 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_concat_ext.htm @@ -0,0 +1,78 @@ + + + + + + string_concat_ext + + + + + + + + + + +

    string_concat_ext

    +

    This function concatenates (joins together) the string representations of all elements in the given array, and returns the result as a new string.

    +

    Values that are not strings will have the string() function run on them implicitly. See Conversion From Non-String Types for information on how those data types are converted.

    +

     

    +

    Syntax:

    +

    string_concat_ext(values_array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    values_arrayArrayThe array of values to concatenate
    offsetReal  The offset, or starting index, in the array to start concatenating elements. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of array elements to concatenate, starting at the offset. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    var _some_letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"];
    + var _concat = string_concat_ext(_some_letters, -5, -3);

    +

    The above code first creates an array with the first ten letters of the alphabet and stores it in a temporary variable _some_letters. It then calls string_concat_ext on this array with an offset (starting position) of -5 (at the position of the letter "f") and a length of -3 (3 elements going from right to left).

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_ends_with.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_ends_with.htm new file mode 100644 index 000000000..76584b000 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_ends_with.htm @@ -0,0 +1,75 @@ + + + + + + string_ends_with + + + + + + + + + + +

    string_ends_with

    +

    This function checks if a string ends with a given substring. It returns true if it does, or false if it doesn't.

    +

     

    +

    Syntax:

    +

    string_ends_with(str, substr);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    strStringThe string to check for the occurrence of the given substring at the end
    substrStringThe substring that the string should end with
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example:

    +

    var _message = "Hello World.";
    + if string_ends_with(_message, ".") || string_ends_with(_message, "?") || string_ends_with(_message, "!")
    + {
    +     show_debug_message("The message is a valid sentence.");
    + }

    +

    The above code first defines a string and stores it in a temporary variable _message. It then makes three calls to the function string_ends_with to check if the string ends with one of the following three punctuation marks: ".", "?" or "!". If the message ends in any of those, it shows a debug message.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_ext.htm new file mode 100644 index 000000000..cb1735699 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_ext.htm @@ -0,0 +1,80 @@ + + + + + + string_ext + + + + + + + + + + +

    string_ext

    +

    This function creates a new string, allowing you to insert placeholders in the main "format string", and to specify an array containing the values to be inserted into those placeholders.

    +

    When only one argument is provided to the function, this argument is considered to be a value, which will be converted to a string from its original data type. When the second argument is given, the first argument is considered a Format String and the second argument an array that contains values to be inserted into the format string.

    +

    Format String

    +

    For information on format strings, see: string()

    +

    This function works in a similar manner, but instead of the values being passed as separate arguments, they're passed as an array in the second argument.

    +
    +

     

    +

    Syntax:

    +

    string_ext(value_or_format [, values]);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    value_or_formatAny (if value) or String (if format)The value to be turned into a string.
    valuesArray  An array of values to be inserted at the placeholder positions.
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    numbers = [59, 23, 656, 8, 54];
    + array_sort(numbers, true);
    +
    + var _str = string_ext("The three lowest numbers are: {0}, {1} and {2}", numbers); +

    +

    The above code first defines an array with some numbers, and sorts them in an ascending order. It then uses that array in a string_ext() to call to insert its first three numbers into a format string.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_foreach.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_foreach.htm new file mode 100644 index 000000000..492bb3c32 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_foreach.htm @@ -0,0 +1,100 @@ + + + + + + string_foreach + + + + + + + + + + +

    string_foreach

    +

    This function executes a callback function on all characters of the given string.

    +

    The function optionally takes in a starting position and a length that define the range of characters over which to iterate, and the direction of iteration (left-to-right or right-to-left).

    +

    The callback function will receive two arguments for each character in the string: the character itself, and its position in the string.

    +
    +

     

    +

    Syntax:

    +

    string_foreach(string, function, [pos], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    stringStringThe string to iterate over
    functionFunctionThe function to execute for each of the characters in the range, with arguments character and position
    posReal  The starting position (default is 1 for strings). Negative values count from the end of the string (e.g. -1 is the position of the last character, -2 is the position of the one before last character, etc.). 0 is treated the same as 1.
    lengthReal  The number of characters to iterate over and the direction in which to iterate (left-to-right (positive value) or right-to-left (negative value)).
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example 1:

    +

    function debug_character(character, position)
    + {
    +     show_debug_message(character);
    + }
    +
    + string_foreach("test", debug_character); +

    +

    The above code first defines a function debug_character that prints the character to the log using show_debug_message. It then calls the function string_foreach on a string "test" to execute the debug_character function on all its characters.

    +

     

    +

    Example 2:

    +

    function debug_extended(character, position)
    + {
    +     show_debug_message("{0}: {1}", position, character);
    + }
    +
    + string_foreach("1234567890", debug_extended, -1, -infinity); +

    +

    The above code first defines a function debug_extended that shows a debug message with both the position and the character in it. Then, string_foreach is called with the debug_extended function on the string "1234567890". Because the offset is -1, the first character on which the function will execute is the last one ("0"). The characters are traversed in a descending order because of the negative length ("0", "9", "8", "7", "6", ..., "1").

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_join.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_join.htm new file mode 100644 index 000000000..0954a378a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_join.htm @@ -0,0 +1,77 @@ + + + + + + string_join + + + + + + + + + + +

    string_join

    +

    This function joins together the string representations of all arguments that are passed to it, inserting the given "delimiter" between each argument. The function returns the joined string.

    +

    Arguments that are not strings will have the string() function run on them implicitly. See Conversion From Non-String Types for information on how those data types are converted.

    +

     

    +

    Syntax:

    +

    string_join(delimiter, value1 [, value2, ... max_val]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    delimiterStringThe string to insert between the values
    value1AnyThe first value to join
    [, value2, ... max_val]Any  The other values to join
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    countdown_message = string_join("... ", "Ready", "Set", "Go!");

    +

    The above code calls string_join to create a new string from a few phrases, joined together by the string "... ". The result is stored in a variable named countdown_message.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_join_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_join_ext.htm new file mode 100644 index 000000000..950133416 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_join_ext.htm @@ -0,0 +1,92 @@ + + + + + + string_join_ext + + + + + + + + + + +

    string_join_ext

    +

    This function joins together the string representations of all values in the given array (or part of the array), inserting the given "delimiter" between each value. The function returns the joined string.

    +

    Values that are not strings will have the string() function run on them implicitly. See Conversion From Non-String Types for information on how those data types are converted.

    +

     

    +

    Syntax:

    +

    string_join_ext(delimiter, values_array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    delimiterStringThe string to insert between the values
    values_arrayArrayThe array containing the values to join together
    offsetReal  The offset, or starting index, in the array to start joining elements. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of array elements to concatenate, starting at the offset. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example 1:

    +

    var _words = string_join_ext(" ", ["This", "example", "joins", "words"]);

    +

    The above code joins the words in the array into a single string using a space as the delimiter.

    +

     

    +

    Example 2:

    +

    var _buffer = buffer_create(1, buffer_grow, 1);
    + var _text_lines = ["This", "file", "will", "have", "multiple", "lines"];
    + var _file_contents = string_join_ext("\r\n", _text_lines);
    + buffer_write(_buffer, buffer_text, _file_contents);
    + buffer_save(_buffer, save_dir + "/" + "text.txt");
    + buffer_delete(_buffer);

    +

    The above code first creates a grow buffer and assigns it to a temporary variable _buffer. It then creates an array with a number of elements and stores that in another variable _text_lines. It then calls string_join_ext on the array with a separator "\r\n", which results in new lines between all the given strings.

    +

    It writes the resulting string to the buffer as a buffer_text value and then saves the contents of the buffer to a file named "text.txt" in a directory save_dir. Finally it deletes the buffer to prevent memory leaks.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_split.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_split.htm new file mode 100644 index 000000000..de521f1ec --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_split.htm @@ -0,0 +1,102 @@ + + + + + + string_split + + + + + + + + + + +

    string_split

    +

    This function splits a string into separate strings using the given delimiter. The separated strings are returned in a new array.

    +

    The delimiter string is the boundary (either a single character or a string of characters) which causes the string to split.

    +

    For example, if the string is "This is the string", it can be split by using a single space character " " as the delimiter. The resulting array will look like this: ["This", "is", "the", "string"], with the original string being "split" wherever the delimiter was present.

    +

    The delimiter itself is never included in the resulting strings.

    +

    Also see: string_split_ext

    +

     

    +

    Syntax:

    +

    string_split(string, delimiter, [remove_empty], [max_splits]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    stringStringThe string to split using the given delimiter
    delimiterStringThe delimiter to use
    remove_emptyBoolean  This parameter determines if empty array elements should be removed from the array or not (default is false). It can be useful for those situations where two delimiters are right next to each other in the string, with nothing in between. By default, in this case, an empty string is added to the array (representing the empty string between those two delimiters). If you don't want these empty strings in the array then you should set this parameter to true instead.
    max_splitsReal  This parameter determines the maximum number of splits to make. Any delimiters that come after max_splits become part of the last string, e.g. splitting "1|2|3|4|5" with a max_splits of 3 and | as the delimiter will return ["1", "2", "3", "4|5"].
    +

     

    +

    Returns:

    +

    Array

    +

     

    +

    Example 1:

    +

    file_path = "C:/Users/someone/Documents/data.json";
    +
    + var _path_parts = string_split(file_path, "/");
    +
    + show_debug_message(_path_parts);
    +
    + drive_name = _path_parts[0];
    + file_name = array_last(_path_parts); +

    +

    The above code first creates a string path that stores a path to a file. It then calls string_split on the path with a forward slash "/" as the delimiter and stores the array it returns in a temporary variable _path_parts.

    +

    Then it shows a debug message showing the contents of the _path_parts array. Finally it stores the first array entry (the drive letter) in a variable drive_name and the last array entry (the name of the file) in a variable file_name.

    +

     

    +

    Example 2:

    +

    the_string = "abc|def||ghi|jkl|mno|pqrs|tuv|wxyz";
    + string_parts = string_split(the_string, "|", true, 5);
    +
    + show_debug_message_ext("{0}, {1}, {2}, {3}, {4}", string_parts); +

    +

    The above code creates a string the_string and splits it into a total of 5 (the value of max_splits) separate strings using string_split. By setting remove_empty to true, empty array elements such as the white space between the delimiter after "def" and the delimiter before "ghi" is first removed. Finally it displays a debug message using show_debug_message_ext, printing the first five slots in the array.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_split_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_split_ext.htm new file mode 100644 index 000000000..2f57d3766 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_split_ext.htm @@ -0,0 +1,83 @@ + + + + + + string_split_ext + + + + + + + + + + +

    string_split_ext

    +

    This function splits a string into into separate strings using any of the delimiters in an array. The resulting strings are returned in a new array.

    +

    The delimiter array contains all possible values at which the string is split. For example, you can have a string that you want to split "Name,Age;Height|Description". In the end you want the individual words but there are multiple delimiter characters, which you can specify in an array: [",", ";", "|"]. The result of string_split_ext on the given string with this array will then be ["Name", "Age", "Height", "Description"].

    +

    Also see: string_split

    +

     

    +

    Syntax:

    +

    string_split_ext(string, delimiter_array, [remove_empty], [max_splits]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    stringStringThe string to split using any of the provided delimiters
    delimiter_arrayArray of StringAn array with the delimiters on which to split the string
    remove_emptyBoolean  This parameter determines if empty array elements should be removed from the array or not (default is false). It can be useful for those situations where two delimiters are right next to each other in the string, with nothing in between. By default, in this case, an empty string is added to the array (representing the empty string between those two delimiters). If you don't want these empty strings in the array then you should set this parameter to true instead.
    max_splitsReal  This parameter determines the maximum number of splits to make. Any delimiters that come after max_splits become part of the last string, e.g. splitting "1|2|3|4|5" with a max_splits of 3 and | as the delimiter will return ["1", "2", "3", "4|5"].
    +

     

    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    words = string_split_ext("here,there;everywhere,and beyond", [",", ";"]);

    +

    The above code splits a string using two different delimiters "," and ";". It stores the resulting array in the variable words.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_starts_with.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_starts_with.htm new file mode 100644 index 000000000..8d7f23c81 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_starts_with.htm @@ -0,0 +1,75 @@ + + + + + + string_starts_with + + + + + + + + + + +

    string_starts_with

    +

    This function checks if a string starts with the given substring. It returns true if it does, or false if it doesn't.

    +

     

    +

    Syntax:

    +

    string_starts_with(str, substr);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    strStringThe string to check for the occurrence of the given substring at the start
    substrStringThe substring that the string should start with
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example:

    +

    var _message = "Hello world";
    + if string_starts_with(_message, "Hello")
    + {
    +     show_debug_message("Greeting successful!");
    + }

    +

    The above code first creates a string and stores it in a temporary variable _message. It then checks if the string starts with the string "Hello" and shows a debug message if that is the case.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim.htm new file mode 100644 index 000000000..b51fe8934 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim.htm @@ -0,0 +1,76 @@ + + + + + + string_trim + + + + + + + + + + +

    string_trim

    +

    This function returns a new string with all leading and trailing white-space characters removed.

    +
    +

    +

    +
     
    +

    Syntax:

    +

    string_trim(str);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    strStringThe string to trim
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example 1:

    +

    clean_string = string_trim("     Text somewhere in the middle.    ");

    +

    The above code calls the function string_trim on a string that contains both leading and trailing spaces. The result is assigned to a local variable named clean_string.

    +

    Example 2:

    +

    var _string_from_literal = @"
    + The first line 
    + is followed by the second line
    + ";
    + clean_string = string_trim(_string_literal);

    +

    The above code first defines a string literal that contains newlines by prefixing it with the @ character. It assigns the new string to the temporary variable _string_from_literal. This string is then trimmed using string_trim and the result is stored in a new variable clean_string.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim_end.htm new file mode 100644 index 000000000..03149e376 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim_end.htm @@ -0,0 +1,68 @@ + + + + + + string_trim_end + + + + + + + + + + +

    string_trim_end

    +

    This function returns a new string with all trailing white-space characters removed.

    +
    +

     

    +

    Syntax:

    +

    string_trim_end(str);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    strStringThe string to trim
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    var _the_string = "A\nB\n\C\nD\n\n\n\n\n\n";
    + var _clean_string = string_trim_end(_the_string);

    +

    The above code first defines a string with many newlines at the end and stores it in a temporary variable _the_string. It then calls string_trim_end to remove all the newline characters at the end of the string (but not the ones between the letters) and stores the result in another temporary variable _clean_string.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim_start.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim_start.htm new file mode 100644 index 000000000..8bea29342 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_trim_start.htm @@ -0,0 +1,69 @@ + + + + + + string_trim_start + + + + + + + + + + +

    string_trim_start

    +

    This function returns a new string with all leading white-space characters removed.

    +
    +

     

    +

    Syntax:

    +

    string_trim_start(str);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    strStringThe string to trim
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    var _string_with_a_bit_of_everything = "     \t\t\t\tHello World";
    + var _trimmed_string = string_trim_start(_string_with_a_bit_of_everything);
    + show_debug_message(_trimmed_string);

    +

    The above code first creates a temporary string named _string_with_a_bit_of_everything. This string contains a couple of leading spaces and tabs before the actual text. It then trims all whitespace from the start of the string by calling string_trim_start and the result is stored in a new temporary variable _trimmed_string. Finally this new string is shown in a debug message.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Time_Sources/time_source_get_parent.htm b/Manual/contents/GameMaker_Language/GML_Reference/Time_Sources/time_source_get_parent.htm index 20e1d932f..af552a5c0 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Time_Sources/time_source_get_parent.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Time_Sources/time_source_get_parent.htm @@ -3,7 +3,7 @@ - + time_source_get_parent diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/Array_Functions.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/Array_Functions.htm new file mode 100644 index 000000000..e2ac499f7 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/Array_Functions.htm @@ -0,0 +1,129 @@ + + + + + + + Array Functions + + + + + + + + + + +

    Array Functions

    +

    There are a few functions associated with the use of Arrays too. These are designed to give you flexibility in your code, and will permit you to create more functional and dynamic arrays when making your games.

    +

    Basic Array Functions

    + +

    Advanced Array Functions

    + +

    Extended Array Functions

    + +

    Callback Method

    +

    A callback method is passed into an array function, such as array_foreach, along with an array.

    +

    GameMaker runs your callback method on each element of the given array. For each element in the array, it passes two arguments into your callback method:

    +
      +
    • Value of the array element
    • +
    • Index of the array element
    • +
    +

    In your callback method, you can use these arguments to calculate a return value, if the array function requires it (such as array_map).

    +

    Based on what your callback method returns for each element, either a result value or a modified copy of the array is returned. However if you're using one of the _ext functions, the original array is modified instead of being copied.

    +

    Predicate Method

    +

    When a callback method is required to only return true or false, it's called a predicate method. A predicate is used to tell whether an element in the array qualifies a condition.

    +

    Example: Predicate

    +

    Let's create a predicate method to check if an array contains the string "apple" inside it.

    +

    For this, we would use the array_any function:

    +

    var _array =
    + [
    +     "apple",
    +     "banana",
    +     "coconut",
    +     "dragonfruit"
    + ]
    +
    + var _contains_apple = array_any(_array, function(_val, _ind)
    + {
    +     return _val == "apple"
    + });
    +
    + show_debug_message(_contains_apple); // prints 1 (true) +

    +

    Our predicate method checks if _val == "apple" and returns the result. When this is true for any one of the array's elements, array_any returns true.

    +

    By default, a predicate method runs on all elements inside the array, however most advanced array functions also take two extra parameters: offset and length.

    +

    Offset And Length

    +

    The offset and length parameters let you decide which part of the array you want the function to look through, and which direction you want it to go (forwards or backwards).

    +
      +
    • The offset is the 0-based index where the function starts operating on the array. +
        +
      • The offset can be a negative number, in which case it will start from the end of the array. For example, an offset of -1 refers to the last element of the array, -2 refers to the second-last element, and so on.
      • +
      +
    • +
    • The length is the number of elements that are checked in the array, starting at the offset. +
        +
      • The length can also be negative, in which case the function will operate backwards. For example, if you start with an offset of 3 and a length of 3, then elements 3, 4, 5 will be covered. With a length of -3, elements 3, 2, 1 will be covered.
      • +
      • You can use infinity or -infinity as the length to traverse an array to its end or its beginning, respectively.
      • +
      +
    • +
    +

    If the function returns a modified version of the array, only the elements that were operated on will be returned, in the order they were operated in. For example, with an offset of 3 and length of 3, elements 3, 4, 5 will be operated on and returned as a new array, and the rest of the elements (e.g. 0, 1, 2, 6, 7, etc.) will be scrapped.

    +

     

    +

     

    + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_all.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_all.htm new file mode 100644 index 000000000..e5d34e8f5 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_all.htm @@ -0,0 +1,56 @@ + + + + + + array_all + + + + + + + + + + +

    array_all

    +

    This function is used to check if all of the elements in the given array match the same condition. You check that by passing a Predicate Function that runs on each element of the given array, and returns true or false.

    +

    This function returns true if your predicate function returns true for all of the elements in the given array range, otherwise it returns false.

    +
    +


    + +

    +
    +

    Returns:

    +

    Boolean (whether the function returned true for all elements in the array or range)

    +

     

    +

    Example:

    +

    function is_even(element, index)
    + {
    +     return (element mod 2 == 0);
    + }
    + values = [2, 4, 8, 10, 12, 14, 18, 22, 46];
    + var all_elements_are_even = array_all(values, is_even);

    +

    The above code first defines a function is_even that returns true if the value is even.

    +

    It then creates an array values and adds some numbers to it.

    +

    Finally it calls array_all on the array and stores the result in a temporary variable all_elements_are_even. As all values in the array are even, all_elements_are_even will be set to true.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_any.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_any.htm new file mode 100644 index 000000000..82e9c4ede --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_any.htm @@ -0,0 +1,62 @@ + + + + + + array_any + + + + + + + + + + +

    array_any

    +

    This function is used to check if any one element in the given array matches a condition. You check that by passing a Predicate Function that runs on each element of the given array, and returns true or false.

    +

    This function returns true if the predicate function returns true for at least one of the elements in the given array range.

    +
    +

     

    +
    +

    Returns:

    +

    Boolean (true if there is any element in the array for which the predicate returns true, false if there isn't any)

    +

     

    +

    Example:

    +

    var _array =
    + [
    +     "apple",
    +     "banana",
    +     "coconut",
    +     "dragonfruit"
    + ]
    +
    + var _contains_apple = array_any(_array, function(_val, _ind)
    + {
    +     return _val == "apple"
    + });
    +
    + show_debug_message(_contains_apple); // prints 1 (true) +

    +

    This creates an array containing strings of fruit names. We want to check if the array contains "apple" anywhere.

    +

    The predicate function _contains_apple checks if _val == "apple" and returns the result. When this is true for any one of the array's elements, array_any returns true.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_concat.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_concat.htm new file mode 100644 index 000000000..e5207a235 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_concat.htm @@ -0,0 +1,79 @@ + + + + + + array_concat + + + + + + + + + + +

    array_concat

    +

    This function takes multiple arrays as arguments, joins them together (in the order of the arguments), and returns the joined array.

    +

     

    +

    Syntax:

    +

    array_concat(array1, array2 [, array3, ... array_n]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    array1ArrayThe first array to concatenate
    array2ArrayThe second array to concatenate
    [array3, ... array_n]Array  Additional arrays to concatenate
    +

    +

    Returns:

    +

    Array (new array with all arrays concatenated)

    +

     

    +

    Example:

    +

    array_1 = [1, 2, 3];
    + array_2 = [4, 5, 6];
    + array_3 = [7, 8, 9];
    + new_array = array_concat(array_1, array_2, array_3);

    +

    The above code first creates three arrays: array_1, array_2 and array_3. It then joins the arrays together using array_concat and stores the result in new_array.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_contains.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_contains.htm new file mode 100644 index 000000000..3b8020ff4 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_contains.htm @@ -0,0 +1,101 @@ + + + + + + array_contains + + + + + + + + + + +

    array_contains

    +

    This function checks if the given value exists in the array, or in a part of it. It returns true if the value exists, or false if not.

    +

     To check if an array not just contains a value but rather contains a value that satisfies a certain condition, use array_any.

    +

     

    +

    Syntax:

    +

    array_contains(array, value, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array in which to look for the value
    valueAnyThe value to look for in the array
    offsetReal  The offset, or starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example 1:

    +

    var _digits_decimal = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
    + var _contains = array_contains(_digits_decimal, 3);
    + show_debug_message("The array contains the digit 3: {0}", _contains);

    +

    The above code first defines an array _digits_decimal containing the decimal digits from 0 to 9. It then calls array_contains to check if the value 3 is in the array. Finally it shows a debug message with the result.

    +

     

    +

    Example 2: array of arrays

    +

    var _a = [0, 1, 2];
    + var _b = _a;
    + var _array_of_arrays = 
    + [
    +     [
    +         "this", "that", "another thing"
    +     ],
    +     _a
    + ];
    + show_debug_message(array_contains(_array_of_arrays, _a));
    + show_debug_message(array_contains(_array_of_arrays, _b));
    + show_debug_message(array_contains(_array_of_arrays, [0, 1, 2]));
    + show_debug_message(array_contains(_array_of_arrays, ["this", "that", "another thing"]));

    +

    The above code first defines three temporary variables: an array _a, a variable _b referring to _a and an array _array_of_arrays.

    +

    It then shows four debug messages with the result of calling array_contains in 4 different situations. _array_of_arrays contains _a because it has been added to it as an element. It also contains _b because _b refers to _a. The remaining checks return false because even though the arrays contain the same values, they aren't the same arrays.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.htm new file mode 100644 index 000000000..1ec5b6af2 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_contains_ext.htm @@ -0,0 +1,100 @@ + + + + + + array_contains_ext + + + + + + + + + + +

    array_contains_ext

    +

    This function checks if the given array (or a part of it) contains any or all of the given values.

    +

    The matchAll argument determines if all values should be present in the array (true) or if any one of the values will do (false).

    +

    The values array may contain duplicates. When matchAll is enabled, this allows you to check exactly how many occurrences of a value exist in the original array.

    +

     To check if an array not just contains a value but rather contains a value that satisfies a certain condition, use array_any.

    +

     

    +

    Syntax:

    +

    array_contains_ext(array, values, [matchAll], [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array in which to look for the values
    valuesArrayAn array containing the values to look for. Add a value multiple times with the matchAll argument set to true to require that a value occurs multiple times (see Example 2). Order isn't taken into account, i.e. the values don't have to occur in the array in the order they're listed here.
    matchAllBoolean  Whether all values should be present in the array (true) or any of the values will do (false).
    offsetReal  The offset, or starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example 1: Check if any of the given values is present in an array

    +

    hand = ["1", "1", "4", "J", "J", "Q", "7", "10", "K", "8", "7", "8", "5"];
    + var _high_cards = ["A", "K", "Q", "J"];
    + var _any_high_cards = array_contains_ext(hand, _high_cards);
    + show_debug_message(_any_high_cards);

    +

    The above code first creates an array hand with 13 values. It then defines another array _high_cards that defines which are considered "high" cards. Next the hand array is checked for any of these using array_contains_ext and the result is stored in a temporary variable _any_high_cards. Finally a debug message shows the value of the variable _any_high_cards.

    +

     

    +

    Example 2: Check if all values are present in an array

    +

    inputs = ["left", "right", "left", "left", "up", "down", "right"];
    + var _required_inputs = ["left", "left", "left"];
    + var _input_valid = array_contains_ext(inputs, _required_inputs, true);
    + show_debug_message(_input_valid);

    +

    The above code creates an array containing a sequence of inputs. Then it creates another array which contains the inputs that make the sequence valid (i.e. having only three occurrences of "left"). It then calls array_contains_ext to validate the inputs array, stores the result in a variable and prints it to the output log.

    +

     

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_copy_while.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_copy_while.htm new file mode 100644 index 000000000..db04c587c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_copy_while.htm @@ -0,0 +1,54 @@ + + + + + + array_copy_while + + + + + + + + + + +

    array_copy_while

    +

    This function creates a new array and adds elements of the input array to it while (or as long as) the predicate function returns true.

    +

    The function stops execution as soon as the predicate function returns false. The first element for which the predicate function returns false and any elements that come after it are not added to the new array.

    +

     This function is identical to array_filter with the difference that this function stops execution after the first time the predicate function returns false. array_filter on the other hand continues to check elements, even after encountering an element for which the predicate function returns false.

    +
    +

     

    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    array = ["1", "2", "3", "STOP", "4", "5", "6", "STOP", "7", "8", "9"];
    + array_up_to_stop = array_copy_while(array, function(element, index)
    + {
    +     return (element != "STOP");
    + }, -1, -infinity);

    +

    The above code first creates an array array that stores strings containing the first 9 digits, with the string "STOP" in between.

    +

    Then the function array_copy_while is called on this array, with a predicate function that returns true if the element is not equal to the string "STOP".

    +

    The offset parameter is set to -1 and the length to -infinity. This will start iterating over the values backwards starting at the last array index.

    +

    Finally the result is stored in the variable array_up_to_stop, which should only contain "9", "8" and "7", in that order, as the array was traversed in reverse.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.htm new file mode 100644 index 000000000..b9370f1fa --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_create_ext.htm @@ -0,0 +1,97 @@ + + + + + + array_create_ext + + + + + + + + + + +

    array_create_ext

    +

    This function creates an array of the given size. For each element in the new array, it calls the given callback function, and applies the return value to that element.

    +

    Using this function you can initialise the array with values that change depending on the array index.

    +

    Callback function

    +
    +

    The callback function supplied in the second argument should take 1 argument, which is the index of the current array element. It can return any type of value, which is stored in the array at that index.

    +

    Syntax:

    +

    function(index);

    + + + + + + + + + + + + + +
    ArgumentTypeDescription
    indexRealThe current array index
    +
    +

     

    +

    Syntax:

    +

    array_create_ext(size, function);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    sizeRealThe size of the array
    functionFunctionThe callback function used to initialise each entry
    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    var _f = function(_index)
    + {
    +     return _index + 1;
    + }
    + array = array_create_ext(100, _f);
    + show_debug_message(array);

    +

    The above code first creates a temporary function _f that takes in an index as an argument, and returns that index with 1 added to it.

    +

    It then uses array_create_ext with the _f function which creates an array filled with the integer numbers from 1 to 100.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_filter.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_filter.htm new file mode 100644 index 000000000..ad11f10b7 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_filter.htm @@ -0,0 +1,59 @@ + + + + + + array_filter + + + + + + + + + + +

    array_filter

    +

    This function returns a new array that is the filtered version of the given array (or a range of it).

    +

    You supply a Predicate Function which runs for all elements in the array. It should return either true or false based on a condition.

    +

    Elements for which the predicate function returns true are included in the returned array, and ones that get false are ignored.

    +

    By default the function checks the whole array. You can optionally supply Offset And Length arguments to check a part of the array, traversing the array forward or backward.

    +
    +

     See array_copy_while which is similar, but stops execution after the first false return of the predicate function.

    +
    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    function passed_the_test(element, index)
    + {
    +     return element >= 50;
    + }
    +
    + scores = [0, 15, 4, 78, 96, 65, 49];
    + passed = array_filter(scores, passed_the_test); +

    +

    The above code first defines a function passed_the_test that takes in element and index parameters, which is usual for array predicate functions.

    +

    The function returns true if the value of element is greater than or equal to 50, otherwise it returns false.

    +

    It then creates an array scores with various values between 0 and 100. Finally it calls array_filter on this array and stores the new array in a variable passed.

    +

    The passed array would only contain values from the scores array that were greater than or equal to 50, satisfying the condition set in the predicate function.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_filter_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_filter_ext.htm new file mode 100644 index 000000000..5ce7a1a40 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_filter_ext.htm @@ -0,0 +1,59 @@ + + + + + + array_filter_ext + + + + + + + + + + +

    array_filter_ext

    +

    This function is similar to array_filter, but instead of returning a new array, it modifies the original array that was passed as an argument.

    +

    You supply a Predicate Function which runs for all elements in the array. It should return either true or false based on a condition.

    +

    The first element for which the predicate function returns true is written at the index given by offset, others are written to subsequent indices (in the direction given by the sign of the length parameter).

    +

    This function returns the new number of valid elements, starting at the given offset position and in the direction set by the length argument. For this function, it's the number of elements for which the predicate returned true, and were written back to the array.

    +
    +
    +
    +

    Returns:

    +

    Real (the number of valid elements in the array)

    +

     

    +

    Example:

    +

    var _is_even = function(_element, _index) {
    +     return (_element mod 2) == 0;
    + }
    +
    + var _values = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    + var _valid_elements = array_filter_ext(_values, _is_even, -2, -infinity); +

    +

    The above code first defines a function _is_even that takes element and index parameters and returns true when the element is an even number.

    +

    An array values is then initialised with the digits from 1 to 9.

    +

    Finally array_filter_ext is called on this array with the predicate function. It takes a starting index of -2 (the second-last index) and a length of -infinity. This will start checking at 8 and go backwards to the beginning of the array.

    +

    From there the function finds 4 even numbers (8, 6, 4, 2), so it returns 4 as the new valid number of elements.

    +

    Since this function mutates the original array, _values becomes [1, 2, 3, 4, 2, 4, 6, 8, 9], writing the even numbers into the array from the index where it started searching.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_find_index.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_find_index.htm new file mode 100644 index 000000000..44566e577 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_find_index.htm @@ -0,0 +1,57 @@ + + + + + + array_find_index + + + + + + + + + + +

    array_find_index

    +

    This function is used to find the index of the first array element that satisfies a condition.

    +

    You supply a Predicate Function which runs for all elements in the array. It should return either true or false based on a condition.

    +

    As soon as the predicate function returns true for an element, the function stops and returns the index of that element.

    +

    If the predicate doesn't return true on any element, the function returns -1.

    +
    +

     If you use an offset of -1 and a negative length (-infinity), then this function will search backwards from the end of the array, essentially letting you find the last element in the array that satisfies the predicate condition.

    +
    +

    Returns:

    +

    Real (the index of the first element found or -1 if nothing was found)

    +

     

    +

    Example:

    +

    var _f = function(_element, _index)
    + {
    +     return (_element > 0);
    + }
    +
    + var _array = [-1, -8, -2, -4, 0, 3, 8, 7, 5];
    + var _index = array_find_index(_array, _f); +

    +

    The above code first creates a function that takes an array element and its index as the input. The function returns true if the element is greater than 0 and false if not. An array with values is then created.

    +

    Finally an index is found using array_find_index and stored in a temporary variable index. This variable will contain the value 5, as the first positive value in the array, 3, is at array index 5.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_first.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_first.htm new file mode 100644 index 000000000..4c12944a5 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_first.htm @@ -0,0 +1,73 @@ + + + + + + array_first + + + + + + + + + + +

    array_first

    +

    This function returns the element at the start of the array, i.e. the first element at index 0.

    +

     Use array_shift to also remove the first element from the array.

    +

     

    +

    Syntax:

    +

    array_first(array);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to get the first value from
    +

     

    +

    Returns:

    +

    Any (Any valid data type that an array can hold)

    +

     

    +

    Example:

    +

    var _first_added_enemy = array_first(enemies);
    +
    + with (_first_added_enemy)
    + {
    +     show_debug_message(string(id) + " is the first enemy in the array.");
    + } +

    +

    The above code gets the first enemy instance added to the array enemies and stores it in a temporary variable _first_added_enemy. It then lets the instance display a debug message with the id of the instance.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_foreach.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_foreach.htm new file mode 100644 index 000000000..79144b23a --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_foreach.htm @@ -0,0 +1,104 @@ + + + + + + array_foreach + + + + + + + +

    array_foreach

    +

    This function loops through an array (or a range of it) and executes the Callback Method for each element.

    +

     You cannot use this function to change array elements directly, i.e. by writing  + element = value; +  in the function. You can make changes if the array element references something else (e.g. when the array element itself is an array or struct).

    +

    Callback Function

    +
    +

    The callback function you pass into this function should take the following arguments:

    +

    Syntax:

    +

    function(element, index);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    elementAnyThe current array element
    indexRealThe current array index
    +

    This callback function should not return a value. It simply executes the function on all elements in the given range.

    +
    +
     
    +
    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    var _array =
    + [
    +     { x: 4,  y: 5  },
    +     { x: 12, y: 8  },
    +     { x: 75, y: 23 }
    + ];
    +
    + var _set_x_to_index = function(_element, _index)
    + {
    +     _element.x = _index;
    + }
    +
    + array_foreach(_array, _set_x_to_index); +

    +

    The above code first creates a temporary array of structs array where each struct stores and x and y value.

    +

    It then defines a temporary function x_to_index that takes in an element and an index, and sets the element's x to that index.

    +

    It expects the element parameter to be a struct. Finally array_foreach is called with the array and the function as the arguments. After the code has executed all structs will have their x value set to their array index.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_get_index.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_get_index.htm new file mode 100644 index 000000000..993afe1a1 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_get_index.htm @@ -0,0 +1,94 @@ + + + + + + array_get_index + + + + + + + + + + +

    array_get_index

    +

    This function gets the index of a specific value in the given array.

    +

    Optionally an offset and length parameter can be provided to the function to define the range of the array in which to search.

    +

    If the value isn't found, -1 is returned.

    +

     If you're looking for the index of the first array element that satisfies a condition, use array_find_index.

    +

     

    +

    Syntax:

    +

    array_get_index(array, value, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array in which to look for the value
    valueAnyThe value to look for
    offsetReal  The offset, or starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    +

     

    +

    Returns:

    +

    Real (the index of the first occurrence of the value if found or -1 if it isn't found)

    +

     

    +

    Example 1:

    +

    var _array = array_create(100, 1);
    + _array[7] = 13;
    + var _index = array_get_index(_array, 13);
    + show_debug_message("The value 13 was found at index {0}", _index);

    +

    The above code first creates a temporary array _array of size 100 and sets the value at index 7 to 13. It then looks for the index of that value 13 using array_get_index. Finally a debug message is shown showing the index.

    +

     

    +

    Example 2:

    +

    var _array = ["a", "b", "c", "d", "e", "d", "c", "b", "a"];
    + var _pos1 = array_get_index(_array, "d");                 // 3
    + var _pos2 = array_get_index(_array, "d", 6);              // -1
    + var _pos3 = array_get_index(_array, "d", -1, -infinity);  // 5

    +

    In the above code an array _array is initialised with a set of letters. The position of the letter "d" is then looked up three times, with different values for offset and length. The results of the calls to array_get_index are shown in the comments.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_intersection.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_intersection.htm new file mode 100644 index 000000000..4d2e1e277 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_intersection.htm @@ -0,0 +1,82 @@ + + + + + + array_intersection + + + + + + + + + + +

    array_intersection

    +

    This function returns a new array with the intersection of all arrays that you provide to it. An intersection refers to all the values that are present in all of the provided arrays.

    +

    The function also removes any duplicates found in the intersection, so it only returns unique values.

    +
    +

    Syntax:

    +

    array_intersection(array1, array2 [, array3, ... array_n]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    array1ArrayThe first array
    array2ArrayThe second array
    [array3, ... array_n]Array  Additional arrays to include in the intersection
    +

    Returns:

    +

    Array (the intersection of the provided arrays)

    +

     

    +

    Example:

    +

    var _array1 = [1, 1, 2, 7, 12];
    + var _array2 = [1, 2, 4, 5, 7];
    + var _array3 = [1, 4, 5, 7];
    +
    + var _array_intersection = array_intersection(_array1, _array2, _array3); +

    +

    The above code first creates three temporary arrays _array1_array2 and _array3. It then calls array_intersection to create a new array that is the intersection of these three arrays.

    +

    The _array_intersection array will be set to [1, 7] as these are the unique values present throughout all three arrays.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_last.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_last.htm new file mode 100644 index 000000000..e7182a061 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_last.htm @@ -0,0 +1,73 @@ + + + + + + array_last + + + + + + + + + + +

    array_last

    +

    This function returns the last element in the given array, i.e. the last element at index array_length(array)-1.

    +

    This function does not modify the array. To remove the last element of the array while reading it, use array_pop.

    +

     

    +

    Syntax:

    +

    array_last(array);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to get the last value from
    +

     

    +

    Returns:

    +

    Any (Any valid data type that an array can hold)

    +

     

    +

    Example:

    +

    var _last_added_enemy = array_last(enemies);
    +
    + with (_last_added_enemy)
    + {
    +     show_debug_message(string(id) + " is the last enemy in the array.");
    + } +

    +

    The above code gets the last enemy instance added to the array enemies and stores it in a temporary variable _last_added_enemy. It then lets that instance display a debug message with the id of the instance.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_length.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_length.htm index b303aa0b3..e5ee7f743 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_length.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_length.htm @@ -26,7 +26,7 @@

    longueur du tableau

    // Returns the third dimension of the array
    val = array_length(my_array[0][0]);

    - // etc... + // etc.

    Syntaxe :

    diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_map.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_map.htm new file mode 100644 index 000000000..f8939ce5b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_map.htm @@ -0,0 +1,85 @@ + + + + + + array_map + + + + + + + + + + +

    array_map

    +

    This function returns a new array that is a modified version of the given array (or a range of it), based on a callback function.

    +

    You provide an array, and a Callback Method, which is called for each element in the given array. The callback function can return any value, which is applied to that index in a new copy of the array.

    +

    After the callback is executed for all elements, the modified array (or the affected range of it) is returned as a new array. The original array is not changed; for that, see array_map_ext.

    +

    Callback Function

    +
    +

    The callback function you pass into this function should take the following arguments:

    +

    Syntax:

    +

    function(element, index);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    elementAnyThe current array element
    indexRealThe current array index
    +

    This callback function should return a value of Any type that will be applied back to the array element.

    +
    +

     

    +
    +

     

    +

    Returns:

    +

    Array

    +

     

    +
     
    +

    Example:

    +

    var _numbers = [1, 2, 3, 4, 5];
    +
    + var _double = function (_element, _index)
    + {
    +     return _element * 2;
    + }
    +
    + var _numbers_doubled = array_map(_numbers, _double); +

    +

    The above code creates an array _numbers with numbers from 1 to 5.

    +

    It creates a function _double that takes the array element and index, and returns the element multiplied by 2.

    +

    This function is then used in an array_map call, which returns a modified version of the array with all numbers doubled: [2, 4, 6, 8, 10].

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_map_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_map_ext.htm new file mode 100644 index 000000000..2aa8b3bdb --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_map_ext.htm @@ -0,0 +1,78 @@ + + + + + + array_map_ext + + + + + + + + + + +

    array_map_ext

    +

    This function is similar to array_map, but instead of returning a new array, it modifies the original array that was passed as an argument.

    +

    You supply a Callback Function which runs for all elements in the array. It can return any value which is applied back to the original array, starting at the index given by offset, in the direction given by the sign of the length parameter.

    +

    This function returns the new number of valid elements, starting at the given offset position and in the direction set by the length argument. For this function, it's the number of elements modified in the given range.

    +

    Callback Function

    +
    +

    The callback function you pass into this function should take the following arguments:

    +

    Syntax:

    +

    function(element, index);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    elementAnyThe current array element
    indexRealThe current array index
    +

    This callback function should return a value of Any type that will be applied back to the array element.

    +
    +
    +

     

    +
    +

     

    +

    Returns:

    +

    Real (the number of valid elements in the array)

    +

     

    +
     
    +

    Example:

    +

    var _values = [7, 4, 11, 9, 12, 21, 17, 1, 2, 3];
    + elements = array_map_ext(_values, sqr, 2, 5);

    +

    The above code first creates an array values with a set of numbers. It then applies the built-in sqr function to a range of the array using array_map_ext.

    +

    After the function has executed the array values will hold in indices 2 to 6 the square of the values that were originally there.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reduce.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reduce.htm new file mode 100644 index 000000000..3f8e95dfb --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reduce.htm @@ -0,0 +1,135 @@ + + + + + + array_reduce + + + + + + + + + + +

    array_reduce

    +

    This function is used to obtain one value from an array, by processing all array elements one-by-one.

    +

    You supply a Callback Method which runs for each element of the given array. The callback function must return a value, which is passed to the next element's callback, in its previous argument.

    +

    Callback Function

    +
    +

    Syntax:

    +

    function(previous, current, index);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    previousAnyThe value returned by the previous iteration
    currentAnyThe element value of the current iteration
    indexRealThe index of the current iteration
    +

     

    +
    +

    The first time this callback function is called, its previous argument is set to the value of the first array element (or the element at the given offset), and the first iteration of the array range is skipped, meaning callbacks start from the second element in the given range.

    +

    If you supply the init parameter to this function, the first iteration will not be skipped, and the previous parameter for the first element's callback will be set to the init value you passed.

    +

    When the callback function returns a value, it's carried over into the next iteration. This process is repeated, until the given array (or the provided range) has been fully iterated. The function returns the value obtained from the final element's callback.

    +

    Finally there are a couple of special cases, which are handled as follows: 

    +
      +
    • If the array has one element and no initial value is given, the function returns the first array element.
    • +
    • If the array is empty and an initial value is supplied, the function returns that initial value. If none is given, the function throws an error.
    • +
    +

     

    +

    Syntax:

    +

    array_reduce(array, function, [init], [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to use
    functionFunctionThe function to use for each element
    initAny  The initial value to use as the first carried value. If none is provided this defaults to array[offset] and the first iteration is skipped.
    offsetReal  The offset, or the starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2 > 1 > 0 instead of 0 > 1 > 2). See Offset And Length
    +

     

    +

    Returns:

    +

    Any

    +

     

    +

    Example:

    +

    var _array = [2, 1, 3, 4, 5];
    +
    + var _min_value = function(_previous, _current, _index)
    + {
    +     return min(_previous, _current);
    + }
    +
    + var _value = array_reduce(_array, _min_value); +

    +

    The above code tries to find the smallest value in an array. It first creates a temporary array array and fills it with a set of numbers.

    +

    Then it creates a new function min_value that returns either the previous or current argument, whichever is smaller.

    +

    Finally it calls array_reduce on the array, using _min_value as the callback function, and stores the final result in a temporary variable value. This variable will contain 1 as that is the smallest value in the array.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reverse.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reverse.htm new file mode 100644 index 000000000..d46120b19 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reverse.htm @@ -0,0 +1,80 @@ + + + + + + array_reverse + + + + + + + + + + +

    array_reverse

    +

    This function returns a new array with all the elements from the given array (or a range of it) in a reversed order.

    +

    You can also reverse only a part of the array by supplying Offset And Length values. In this case the returned array will have a length corresponding to the range given by these values (e.g. if offset and length refer to a range of 5 elements then the new array will contain 5 elements).

    +

     

    +

    Syntax:

    +

    array_reverse(array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to reverse
    offsetReal  The offset, or the starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2 > 1 > 0 instead of 0 > 1 > 2). See: Offset And Length
    +

     

    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    countdown = [5, 4, 3, 2, 1, 0];
    +
    + countdown_reverse = array_reverse(countdown); +

    +

    The above code creates an array countdown. It then creates an array countdown_reverse with the same elements but reversed.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reverse_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reverse_ext.htm new file mode 100644 index 000000000..1dc1fd571 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_reverse_ext.htm @@ -0,0 +1,82 @@ + + + + + + array_reverse_ext + + + + + + + + + + +

    array_reverse_ext

    +

    This function is similar to array_reverse, but instead of returning a modified array, it modifies the original array that you passed into the function.

    +

    By default, it reverse the whole array. You can reverse only a part of the array by supplying Offset And Length values.

    +

    The function returns the number of elements that were modified in the array.

    +
    +

     

    +

    Syntax:

    +

    array_reverse_ext(array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to use
    offsetReal  The offset, or the starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2 > 1 > 0 instead of 0 > 1 > 2). See: Offset And Length
    +

     

    +

    Returns:

    +

    Real (the number of valid elements in the array)

    +

     

    +

    Example:

    +

    values = [1, 2, 3, 4, 8, 7, 6, 5];
    +
    + array_reverse_ext(values, -4, 4); +

    +

    The above code first creates an array values. It then reverses the order of the last four elements using array_reverse_ext.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.htm new file mode 100644 index 000000000..98de113b9 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shift.htm @@ -0,0 +1,100 @@ + + + + + + array_shift + + + + + + + + + + +

    array_shift

    +

    This function removes the first element from the given array and returns it.

    +

    Because of this, all other elements are shifted to the left one place, i.e. the value at index 0 is removed, the value at index 1 moves to index 0, the value at index 2 moves to index 1, etc. The number of elements is reduced by 1, as there is no value to replace the last element with.

    +

    The function works identically to array_pop, but removes and returns the first element instead of the last one.

    +

     Use array_first to get the first element without removing it from the array.

    +

     

    +

    Syntax:

    +

    array_shift(array);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to shift, i.e. to return and remove the first element from
    +

     

    +

    Returns:

    +

    Any (the type of the removed first array element)

    +

     

    +

    Example 1: Basic Use

    +

    var _array = ["A", "B", "C"];
    + repeat(2)
    + {
    +     array_shift(_array);
    + }
    + show_debug_message(_array);

    +

    The above code calls array_shift on the array _array twice. After that, a debug message shows the contents of the array. As the first call to the function removes the value "A" and the second shift removes the value "B", the array will only contain "C" at this point.

    +

     

    +

    Example 2: Queue using array_shift and array_push

    +

    var _queue = [];
    + var _incoming = ["S", "O", "M", "E", " ", "L", "E", "T", "T", "E", "R", "S"];
    + MAX_QUEUE_LENGTH = 4;
    + var _len = array_length(_incoming), i = 0;
    + repeat(_len)
    + {
    +     array_push(_queue, _incoming[i]);
    +     if (array_length(_queue) > MAX_QUEUE_LENGTH)
    +     {
    +         array_shift(_queue);
    +     }
    +     i++;
    + }

    +

    The above code creates a temporary array _queue that acts like a queue using array_shift and array_push. The characters in a second array _incoming are added to the queue array one by one, using a repeat loop. Whenever the length of the queue is greater than 4 (stored in the constant MAX_QUEUE_LENGTH), the first element is removed using array_shift.

    +

     

    +

    Example 3: Rotate an Array

    +

    var _array = ["F", "O", "R", "E", "V", "E", "R"];
    + repeat(10)
    + {
    +     array_push(_array, array_shift(_array));
    +     show_debug_message(_array);
    + }

    +

    In the above example the array _array is "rotated" 10 times. "Rotating" an array means that elements are removed on one end and added back on the other end. The length of the array remains the same. Every iteration, the letters move left; the array is rotated left. A debug message is shown after each iteration to show the contents of the array at that point.

    +

    Using the functions array_pop and array_insert arrays can be rotated right instead.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shuffle.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shuffle.htm new file mode 100644 index 000000000..6c87a007e --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shuffle.htm @@ -0,0 +1,79 @@ + + + + + + array_shuffle + + + + + + + + + + +

    array_shuffle

    +

    This function returns a new array in which the elements of the original array (or a range of it) are randomly reordered.

    +

    When Offset And Length are provided, the returned array will have the same number of elements as are in the range of the original array, given by these values.

    +

     See array_shuffle_ext for the function that changes the original array in place.

    +
    +

    Syntax:

    +

    array_shuffle(array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to shuffle
    offsetReal  The offset, or starting index, in the array to start shuffling. Defaults to 0. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to shuffle. Defaults to (array_length(array) - 1. See: Offset And Length
    +

     

    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    var _array = ["Everyday", "I", "'m", "shuffling"];
    + var _array_shuffled = array_shuffle(_array);
    + show_debug_message(_array_shuffled);

    +

    The above code first creates an array _array with a couple of words in it. It then shuffles the array using array_shuffle and returns the result as a new array, which is stored in _array_shuffled. Finally a debug message shows the contents of the shuffled array.

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shuffle_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shuffle_ext.htm new file mode 100644 index 000000000..74f772f68 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_shuffle_ext.htm @@ -0,0 +1,78 @@ + + + + + + array_shuffle_ext + + + + + + + + + + +

    array_shuffle_ext

    +

    This function shuffles the existing array in place, i.e. it modifies (or mutates) the existing array.

    +
    +

    Syntax:

    +

    array_shuffle_ext(array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to shuffle
    offsetReal  The offset, or starting index, in the array to start shuffling. Defaults to 0. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to shuffle. Defaults to (array_length(array) - 1. See: Offset And Length
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    var _numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    + array_shuffle_ext(_numbers);
    + show_debug_message(_numbers); +

    +

    The above code first creates an array _numbers with the numbers from 1 to 10. It then shuffles the array using array_shuffle_ext. This changes the actual values in the array. Finally the shuffled version is shown in a debug message.

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_union.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_union.htm new file mode 100644 index 000000000..8eb086e22 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_union.htm @@ -0,0 +1,80 @@ + + + + + + array_union + + + + + + + + + + +

    array_union

    +

    This function returns a new array that is the union of all provided arrays. A union refers to all the elements in the provided arrays, with duplicates removed.

    +
    +

    Syntax:

    +

    array_union(array1, array2 [, array3, ... array_n]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    array1ArrayThe first array
    array2ArrayThe second array
    [array3, ..., array_n]Array  Additional arrays
    +

    Returns:

    +

    Array (the union of the provided arrays)

    +

     

    +

    Example:

    +

    a1 = [1, 2, 3, 4, 5];
    + a2 = [3, 4, 5, 6, 7, 8];
    + a3 = [5, 6, 7, 8, 9, 10, 11];
    +
    + a4 = array_union(a1, a2, a3); +

    +

    The above code first creates 3 arrays a1, a2 and a3. It then takes the union of these arrays and stores the result in a new array a4.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_unique.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_unique.htm new file mode 100644 index 000000000..609551392 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_unique.htm @@ -0,0 +1,77 @@ + + + + + + array_unique + + + + + + + + + + +

    array_unique

    +

    This function returns a new array containing the values of the input array (or a range of it) with any duplicate values removed.

    +

     

    +

    Syntax:

    +

    array_unique(array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to use
    offsetReal  The offset, or the starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2 > 1 > 0 instead of 0 > 1 > 2). See: Offset And Length
    +

    Returns:

    +

    Array

    +

     

    +

    Example:

    +

    var _values = ["rock", "paper", "scissors", "rock", "rock", "scissors", "paper", "scissors"];
    + var _values_unique = array_unique(_values);

    +

    The above code first creates a temporary array values.

    +

    It then calls array_unique and stores the result in a temporary variable values_unique. This array contains the three possible values in the array values: "rock", "paper" and "scissors".

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_unique_ext.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_unique_ext.htm new file mode 100644 index 000000000..84bd9270c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/array_unique_ext.htm @@ -0,0 +1,78 @@ + + + + + + array_unique_ext + + + + + + + + + + +

    array_unique_ext

    +

    This function is similar to array_unique, but instead of returning a modified array, it modifies the original array that you passed into the function.

    +

    The function will modify the array, starting at the offset, writing only the unique values it finds in the array, and ignoring duplicates.

    +

    It returns the number of elements written back to the array.

    +
    +

    Syntax:

    +

    array_unique_ext(array, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to use
    offsetReal  The offset, or the starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2 > 1 > 0 instead of 0 > 1 > 2). See: Offset And Length
    +

    Returns:

    +

    Real (the number of valid elements in the array)

    +

     

    +

    Example:

    +

    values = [1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 8];
    + valid_values = array_unique_ext(array);

    +

    The above code first creates an array values with a set of values. It then calls array_unique_ext on the array and assigns the number of valid array elements to a new variable valid_values.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_callable.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_callable.htm new file mode 100644 index 000000000..2be2aa802 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_callable.htm @@ -0,0 +1,79 @@ + + + + + + is_callable + + + + + + + + + + +

    is_callable

    +

    This function returns whether the given argument is callable, i.e. is a method or refers to an index of a function.

    +

    A function index can refer to either a built-in function, a Script Function or a Script Asset.

    +

     To only check if a value is a method, see is_method.

    +

    Syntax:

    +

    is_callable(n);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    nAnyThe value to check
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example:

    +

    function my_function()
    + {
    +     return random(10);
    + }
    + my_method = function()
    + {
    +     return "Hello World!";
    + }
    +
    + show_debug_message(is_callable(my_function));
    + show_debug_message(is_callable(my_method));
    + show_debug_message(is_callable(draw_text)); +

    +

    The above code first defines a function my_function and a method my_method. It then shows three debug messages. Each shows the result of calling is_callable: the first on my_function, the second on my_method and the third on the built-in draw_text. All three debug messages will show 1, as all three are callable.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_handle.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_handle.htm new file mode 100644 index 000000000..24f43e7b0 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_handle.htm @@ -0,0 +1,67 @@ + + + + + + is_handle + + + + + + + + + + + +

    is_handle

    +

    This function checks if the supplied value is a handle. It returns true if it is, otherwise it returns false.

    +

    Read about handles on the page for Data Types.

    +

     

    +

    Syntax:

    +

    is_handle(val);

    + + + + + + + + + + + + + +
    ArgumentTypeDescription
    valAnyThe value to check.
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example:

    +

    if is_handle(a)
    + {
    +     delete(a);
    + }

    +

    The above code checks a variable to see if it is a struct, and if the function returns true, the struct is deleted.

    +

     

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_instanceof.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_instanceof.htm new file mode 100644 index 000000000..334b6a0d2 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/is_instanceof.htm @@ -0,0 +1,73 @@ + + + + + + is_instanceof + + + + + + + + + + +

    is_instanceof

    +

    This function returns whether the given struct is an "instance of" the given constructor. You can use this function to check if the constructor used to create your struct was the same one as you supplied in the second argument, or if it's a child constructor of your given constructor.

    +

    This means that if your struct was created from constructor B, and constructor B is a child of constructor A, calling is_instanceof(struct_of_B, A) will return true.

    +

    This function works by checking the Static Chain of your given struct to see if your given constructor is included anywhere in that chain. See: Static Struct

    +

     If you use static_set to replace the static chain of a struct, it will modify the behaviour of this function on that struct, as it checks the static chain to determine inheritance. Using static_set is not recommended aside from deserialisation cases where an anonymous struct is loaded back as part of a hierarchy.

    +

     

    +

    Syntax:

    +

    is_instanceof(struct, constructor_name);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    structStructThe struct to check (the "instance")
    constructor_nameFunctionThe constructor to check (is the struct an instance of this constructor?)
    +

     

    +

    Returns:

    +

    Boolean

    +

     

    +

    Example:

    +
    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/method_call.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/method_call.htm new file mode 100644 index 000000000..129a1c89b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/method_call.htm @@ -0,0 +1,93 @@ + + + + + + method_call + + + + + + + + + + +

    method_call

    +

    This function calls a method with the arguments taken from an array or a range in an array.

    +

    If the method needs no arguments then an empty argument array [] can be passed.

    +

     This function works similarly to script_execute_ext but works with methods instead.

    +

     

    +

    Syntax:

    +

    method_call(method, array_args, [offset], [num_args]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    methodMethodThe method to call
    array_argsArrayThe array containing the arguments to pass into the method
    offsetReal  The offset, or starting index, in the array. The item at this array index is the first argument for the method. Defaults to 0.
    + Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    num_argsReal  The number of elements to pass as an argument. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    +

     

    +

    Returns:

    +

    Any (the type returned by the method)

    +

     

    +

    Example 1:

    +

    struct_with_a_method = 
    + {
    +     show_message: function(message)
    +     {
    +         show_debug_message("The message is: {0}", message);
    +     }
    + }
    + var _method = struct_with_a_method.show_message;
    + method_call(_method, ["Hello World!"]); +

    +

    The above code first defines a struct struct_with_a_method that has a method show_message. The method is then assigned to a temporary variable _method. Next it is called using method_call with an argument array with 1 item in it: the string "Hello World!". The show_message function calls show_debug_message which outputs "The message is: Hello World!".

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/nameof.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/nameof.htm new file mode 100644 index 000000000..dd57ece1c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/nameof.htm @@ -0,0 +1,78 @@ + + + + + + nameof + + + + + + + + + + +

    nameof

    +

    This function returns the name of the argument you pass to it as a string.

    +

    More precisely, this function returns the name of the identifier that you pass to it; any name to identify something used in your GML code: an asset name, a variable name, a function name, an enum name, ...

    +

    GameMaker resolves the values when Compiling the game, i.e. at compile time.

    +

     You cannot use this function to get the name of Macros or members of Enums; in this case GameMaker respectively returns the name of what the macro refers to or the internal value of the enum member.

    +

     

    +

    Syntax:

    +

    nameof(name);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    nameAnyThe variable of which to get the name
    +

     

    +

    Returns:

    +

    String

    +

     

    +

    Example:

    +

    show_debug_message("About to reveal internal names...");
    +
    + show_debug_message($"The enemy object is called: {nameof(obj_enemy)}");
    + show_debug_message($"{pi} is a special value, it is called {nameof(pi)}.");
    + show_debug_message($"The function to create a ds_list is called: {nameof(ds_list_create)}, or even: {nameof(ds_list_create())}");
    +
    + var _a = 77, _b = 66;
    + var _c = _a + _b;
    + show_debug_message($"The sum of {nameof(_a)} and {nameof(_b)} is {nameof(_c)}, or, using their values: {_a} + {_b} = {_c}"); +

    +

    The code above shows a few examples on how to use the nameof function. The name of various variables and functions in GML is looked up using the function and output in the debug log using show_debug_message.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/ref_create.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/ref_create.htm new file mode 100644 index 000000000..d11b6be1b --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/ref_create.htm @@ -0,0 +1,115 @@ + + + + + + ref_create + + + + + + +

    ref_create

    +

    This function creates a reference to a Variable in a struct or instance.

    +

    You provide the struct or instance that the variable belongs to, or a reference to it, and the name of the variable (as a string), or reference to a variable that stores the name or index.

    +

    For Arrays, an index can be provided as the third argument that tells which index to create a reference to.

    +

    More complex references can be created. For the full list of possibilities, see the examples.

    +

     The value can be changed through the reference in The Debug Overlay.

    +

     You cannot create references to Local Variables, since they exist only temporarily and cannot be referenced.

    +

     

    +

    Syntax:

    +

    ref_create(dbgrefOrStruct, dbgrefOrIndex[, index]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    dbgrefOrStructReference or StructThe struct or instance containing the variable to reference, or a reference to it
    dbgrefOrIndexReference or StringThe name of the variable as a string, or a reference to it
    indexReal  The index in the array, if what's referenced is an array
    +

     

    +

    Returns:

    +

    Reference

    +

     

    +

    Example 1: Basic Reference to an Instance Variable

    +

    text = "This is some text";
    + ref_to_text = ref_create(self, "text");

    +

    The code above first creates an instance variable text in the Create event and then creates a reference to it using ref_create, that's stored in the variable ref_to_text.

    +

     

    +

    Example 2: Basic Reference to an Array Index

    +

    array = [1, 2, 3, 4, 5];
    + ref_to_index = ref_create(self, "array", 2);

    +

    The code above first creates an array array with 5 elements in the instance executing the code. It then creates a reference to index 2 (the third element) using ref_create. The reference is stored in a new instance variable ref_to_index.

    +

     

    +

    Example 3: Complex Reference

    +

    the_struct = {a: "text", b: 485};
    + ref_to_struct = ref_create(self, "the_struct");
    + ref_to_struct_var = ref_create(ref_to_struct, "a");

    +

    The above code first creates a struct the_struct in the instance executing the code that has two variables. It then creates a reference to that struct using ref_create that is then passed as the dbgrefOrStruct parameter to the next call to ref_create. This last call to ref_create creates a reference to the struct's variable a and stores it in a variable ref_to_struct_var. The struct itself is passed to the function indirectly, using the reference stored earlier in the variable ref_to_struct.

    +

     

    +

    Example 4: Complex Array Reference

    +

    array = [3, 4, 1, 7, 8, 2];
    + index = 4;
    + ref_to_array = ref_create(self, "array");
    + ref_to_index = ref_create(self, "index");
    + ref_to_array_at_index = ref_create(ref_to_array, ref_to_index);

    +

    The above code creates a reference to an array array where both the first parameter to ref_create (the array to reference) and the second parameter (serving as the index into the array) are themselves references. This means that if you assign a different value to the variable index later on, the array element indexed by ref_to_array_at_index also changes to the new value set. If you assign an entirely new array to the instance variable arrayref_to_array_at_index will reference the element at the same index in that array.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/static_get.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/static_get.htm new file mode 100644 index 000000000..0c74ecf55 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/static_get.htm @@ -0,0 +1,83 @@ + + + + + + static_get + + + + + + + + + + +

    static_get

    +

    This function returns the static struct for the given function, or undefined if it has no static. The static struct is where all static variables for a function are stored.

    +

    You can also supply a struct, in which case it will give you the static struct for the constructor that was used to create the struct (or it may be a different struct if it was changed using static_set).

    +

    When using constructor inheritance, static structs are chained, i.e. you can get the static struct of a static struct, if the constructor has a parent constructor.

    +

    See: Static Struct

    +

     

    +

    Syntax:

    +

    static_get(struct_or_func_name);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    struct_or_func_nameStruct or FunctionThe struct or function for which to get the static struct
    +

     

    +

    Returns:

    +

    Struct or undefined if no static struct is set

    +

     

    +

    Example:

    +

    function counter() {
    +     static count = 0;
    +     return count ++;
    + }
    +
    + repeat (10) counter()
    +
    + // Get static struct of counter()
    + var _static_counter = static_get(counter);
    +
    + // Both of these read the same variable
    + show_debug_message(counter.count); // 10
    + show_debug_message(_static_counter.count); // 10 +

    +

    The above code creates a function counter() with a static variable. The function is called repeatedly so its static variable's value is increased.

    +

    The static struct for that function is then returned, and stored in a variable (_static_counter). Then it prints the static variable from the function, by first reading it from the function directly (counter.count) and then reading it from the static struct (_static_counter.count). Both print the same value, as they refer to the exact same variable.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/static_set.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/static_set.htm new file mode 100644 index 000000000..0d5c52f85 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/static_set.htm @@ -0,0 +1,100 @@ + + + + + + static_set + + + + + + + + + + +

    static_set

    +

    This function is used to change the static struct of a struct. You supply the struct to modify, and the new static struct to apply to the first struct, which you can get from other structs or functions using static_get.

    +

    This will override the static chain for the struct, which is used to determine which constructor(s) a struct belongs to, using is_instanceof.

    +

     It's not recommended to use this function aside from deserialisation use-cases, where you need to load a struct and apply a constructor to it. See: Changing The Static Struct

    +

     

    +

    Syntax:

    +

    static_set(struct, static_struct);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    structStructThe struct to set the static struct for
    static_structStructThe new static struct to use for the struct
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example 1: Basic Use

    +
    +

     

    +

    Example 2: Assigning a Static Struct to a Pure Data Struct

    +

    function vec2(_x, _y) constructor
    + {
    +     x = _x;
    +     y = _y;
    +     
    +     static add = function(_vecb)
    +     {
    +         x += _vecb.x;
    +         y += _vecb.y;
    +     }
    +     
    +     // ...
    + }
    +
    + var _a = new vec2(10, 10);
    + var _b = {x: 4, y: 9};
    +
    + static_set(_b, static_get(vec2));
    +
    + _b.add(_a);
    +
    + show_debug_message(_b); +

    +

    The code above first defines a constructor function to create vec2 structs. The constructor function assigns the parameters _x and _y to the struct's x and y variables respectively. It also defines a static add function (and possibly many others, indicated by the // ... comment), which can be used by all structs that have this constructor's static struct as their static struct.

    +

    Two struct variables are then defined: _a is created using the vec2 constructor function and gets an (x, y) of (10, 10), _b is created as a basic struct with just two variables: x set to 4 and y set to 9.

    +

    The struct variable _b is then assigned the static struct of vec2 using static_set, this turns _b into a vec2 struct, making the static variables and functions of vec2 available to _b. After that, _a is added to _b by calling the add function on _b. _b is then shown using show_debug_message. This debug output will show { x : 14, y : 19 }.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.htm new file mode 100644 index 000000000..735926d7c --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_foreach.htm @@ -0,0 +1,106 @@ + + + + + + struct_foreach + + + + + + + + + + +

    struct_foreach

    +

    This function calls the provided callback function on each member of the struct.

    +

    The member name and value are available in the callback function, but cannot be modified through it.

    +

     

    +

    Callback Function

    +
    +

    The callback function to pass into this function should take the following arguments: 

    +

    Syntax:

    +

    function(member_name, value);

    +
    + + + + + + + + + + + + + + + + + + +
    Variable NameData TypeDescription
    member_nameStringThe name of the struct member
    valueAnyThe value assigned to the struct member
    +
    +

    This callback function should not return a value. It simply executes the function on all elements in the given range.

    +
    +

     

    +

    Syntax:

    +

    struct_foreach(struct, func);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    structStructThe struct to use
    funcFunction or MethodThe function to execute on each member of the struct
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    var _inventory = {apples: 17, bananas: 261, oranges: 2, lemons: 5};
    + struct_foreach(_inventory, function(_name, _value)
    + {
    +     show_debug_message($"{_name}: {_value}");
    + }); +

    +

    The above code first creates a temporary variable _inventory that contains a mapping of an inventory item to the number of that item held in the inventory. struct_foreach is then called to display all the amounts using a debug message.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.htm new file mode 100644 index 000000000..23cf22340 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_get_from_hash.htm @@ -0,0 +1,74 @@ + + + + + + struct_get_from_hash + + + + + + + + + + +

    struct_get_from_hash

    +

    This function gets the value of a struct member using the hash returned by variable_get_hash.

    +

    Accessing a variable through a hash allows for faster access when using a string, compared to using the struct[$ "string"] syntax.

    +

     

    +

    Syntax:

    +

    struct_get_from_hash(struct, hash);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    structStructThe struct reference to use
    hashRealThe hash of the variable to get (as returned by variable_get_hash)
    +

     

    +

    Returns:

    +

    Any

    +

     

    +

    Example:

    +

    var _the_struct = {a: 77, b: 88, c: 99};
    + var _hash = variable_get_hash("a");
    + var _value = struct_get_from_hash(_the_struct, _hash);

    +

    The above code creates a temporary struct _the_struct with three member variables: a, b and c. It then gets the hash of a variable a. This hash is then used in struct_get_from_hash to retrieve the value of the struct member with the corresponding name. The returned value is assigned to another temporary variable _value.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.htm new file mode 100644 index 000000000..104393500 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/struct_set_from_hash.htm @@ -0,0 +1,82 @@ + + + + + + struct_set_from_hash + + + + + + + + + + +

    struct_set_from_hash

    +

    This function sets the value of the struct member referred to by the given hash, returned by an earlier call to variable_get_hash.

    +

    Accessing a variable through a hash allows for faster access when using a string, compared to using the struct[$ "string"] syntax.

    +

     

    +

    Syntax:

    +

    struct_set_from_hash(struct, hash, val);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    structStructThe struct reference to set
    hashRealThe hash of the variable to set (as returned by variable_get_hash)
    valAnyThe value to assign to the struct variable
    +

     

    +

    Returns:

    +

    N/A

    +

     

    +

    Example:

    +

    point = {x: 200, y: 100};
    + hash_x = variable_get_hash("x");
    + repeat(1000)
    + {
    +     struct_set_from_hash(data, hash_x, random(room_width));
    + }

    +

    The above code first creates a struct point with an x and y variable in it. Next, the hash for the variable name "x" is then retrieved using variable_get_hash. After that, a repeat loop is executed a total of 1000 times. Every iteration of the repeat loop assigns a new random value to the point's x coordinate. This is done using struct_set_from_hash to optimise this operation.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.htm new file mode 100644 index 000000000..1a9035bce --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_clone.htm @@ -0,0 +1,74 @@ + + + + + + variable_clone + + + + + + + + + + +

    variable_clone

    +

    This function clones the value you pass it and returns the new clone.

    +

    It clones nested structs and arrays up to a given depth (128 by default), which you can override by providing the optional depth parameter.

    +

     The built-in Data Structures and Instances are not cloned; for this type of variable the actual value (data structure ID or instance ID, respectively) is written.

    +

     

    +

    Syntax:

    +

    variable_clone(value[, depth]);

    + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    valueAnyThe value to clone
    depthReal  The maximum depth level to clone the variable, in case this is e.g. a nested struct. The default is 128, the maximum possible value.
    +

     

    +

    Returns:

    +

    Any

    +

     

    +

    Example:

    +

    var _the_original = {a: "some text", b: [1, 2, 3, 4, 5], c: 6};
    + var _the_clone = variable_clone(_the_original);

    +

    The above code first defines a temporary struct variable _the_original. A clone is then created from this variable using variable_clone. The new variable is stored in another variable _the_clone.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.htm new file mode 100644 index 000000000..a558a39d1 --- /dev/null +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_get_hash.htm @@ -0,0 +1,69 @@ + + + + + + variable_get_hash + + + + + + + + + + +

    variable_get_hash

    +

    This function returns a hash for the given variable name. This hash can be used with the struct_get_from_hash and struct_set_from_hash functions.

    +

    Accessing a variable through a hash allows for faster access when using a string, compared to using the struct[$ "string"] syntax.

    +

     

    +

    Syntax:

    +

    variable_get_hash(name);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    nameStringThe name of the variable to get the hash from
    +

     

    +

    Returns:

    +

    Real

    +

     

    +

    Example:

    +

    var _the_struct = {a: 77, b: 88, c: 99};
    + var _hash = variable_get_hash("a");
    + var _value = struct_get_from_hash(_the_struct, _hash);

    +

    The above code creates a temporary struct _the_struct with three member variables: a, b and c. It then gets the hash of a variable a. This hash is then used in struct_get_from_hash to retrieve the value of the struct member with the corresponding name. The returned value is assigned to another temporary variable _value.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_exists.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_exists.htm index da2c13628..ebbc4093d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_exists.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_exists.htm @@ -63,9 +63,11 @@
    Copyright YoY \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get.htm index c9c595871..ad49f5d04 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get.htm @@ -65,9 +65,11 @@
    Copyright YoY \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get_names.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get_names.htm index 587323720..c41bf794a 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get_names.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_get_names.htm @@ -60,9 +60,11 @@
    Copyright YoY \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_names_count.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_names_count.htm index 95b0d62af..ddfcab7f2 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_names_count.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_names_count.htm @@ -54,9 +54,11 @@
    Copyright YoY \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_remove.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_remove.htm index 14b112406..b717230df 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_remove.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_remove.htm @@ -62,9 +62,11 @@
    Copyright YoY \ No newline at end of file diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_set.htm b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_set.htm index 4866c9450..73519275d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_set.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Variable_Functions/variable_struct_set.htm @@ -67,9 +67,11 @@
    Copyright YoY \ No newline at end of file diff --git a/Manual/contents/IDE_Navigation/Menus/Version_&_Account_Details.htm b/Manual/contents/IDE_Navigation/Menus/Version_&_Account_Details.htm new file mode 100644 index 000000000..389dcad44 --- /dev/null +++ b/Manual/contents/IDE_Navigation/Menus/Version_&_Account_Details.htm @@ -0,0 +1,52 @@ + + + + + + Version & Account Details + + + + + + + + + + +

    Version & Account Details

    +

    The top-right section of the GameMaker IDE contains details about the current version, a menu for account details and a notifications button.

    +

    +

    This shows you the current IDE and Runtime versions. The Runtime version can be changed from the Runtime Feeds Preferences.

    +

    Account Menu

    +

    This menu contains the following options:

    +
      +
    • GameMaker Account: This takes you to the GameMaker website where you can log into your account and manage it.
    • +
    • Update License: This updates your license details in the IDE, e.g. if you purchased something from your account, use this option to have the IDE reflect your new exports without having to restart it.
    • +
    • Logout: This logs you out of the IDE.
    • +
    • Login: This opens the log-in window so you can log into the IDE.
    • +
    • Opera Account: This opens your Opera account on the Opera website, if you logged into the IDE with an Opera account.
    • +
    • GX.games: This takes you to the GX.games website.
    • +
    +

    Notifications

    +

    The Notification button is highlighted when you have a new notification. This notifies you when a new runtime update is available, and when your license expires.

    +

    Opening the Notification menu allows you to click on the runtime notification, which takes you to the Runtime Feeds Preferences where you can choose a newer runtime version.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm b/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm new file mode 100644 index 000000000..f4c696e74 --- /dev/null +++ b/Manual/contents/Setting_Up_And_Version_Information/IDE_Preferences/General/GXgames_Environments.htm @@ -0,0 +1,40 @@ + + + + + + GX.games Environments + + + + + + + + + + +

    GX.Games Environments Preferences

    +

    Help Prefs

    +

    This section allows you to change the currently selected environment for GX.games. You can choose between the main production environment, and the sandbox environment.

    +

    You can also set a path that contains custom environment JSON files.

    +

     

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/GX_Games_Preferences.htm b/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/GX_Games_Preferences.htm new file mode 100644 index 000000000..b3c68b8e5 --- /dev/null +++ b/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/GX_Games_Preferences.htm @@ -0,0 +1,48 @@ + + + + + + GX.games + + + + + + + + + + +

    GX.games Preferences

    +

    The GX.games preferences have the following options:

    +

    +
      +
    • Emscripten SDK location: This is the location of the Emscripten SDK, required for YYC builds made for GX.games. Read Setting Up For GX.games for information on setting up the SDK.
    • +
    • Default Web Server Port: This lets you change the default port for the GX.games web server. Default value is 51264.
    • +
    • Default Web Server Address: Here you can change the default web server address for the GX.games web server. Default value is 127.0.0.1.
    • +
    • Default Web Server Allowed IPs: Here you can add in any allowed IPs for the web server and they will be set as default for all devices added through the Target Manager.
    • +
    • Default packaging type: This is the package type to create by default: Game or Live Wallpaper. The default Show Dialog displays a dialog before every build which lets you choose between the types.
    • +
    +

     

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/HTML5.htm b/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/HTML5.htm index 517d489dc..80df49f66 100644 --- a/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/HTML5.htm +++ b/Manual/contents/Setting_Up_And_Version_Information/Platform_Preferences/HTML5.htm @@ -4,7 +4,7 @@ HTML5 - + diff --git a/Manual/contents/Settings/Game_Options/GX_Games.htm b/Manual/contents/Settings/Game_Options/GX_Games.htm new file mode 100644 index 000000000..7df8d6a06 --- /dev/null +++ b/Manual/contents/Settings/Game_Options/GX_Games.htm @@ -0,0 +1,110 @@ + + + + + + GX.games + + + + + + + + + + +

    GX.games Game Options

    +

    The GX.games Game Options allow you to modify the properties for your game and mod. The following sections are provided:

    +

    General

    +

    This section displays the options that are used when you select "Upload as Game" when creating an executable for GX.games.

    +

    This window shows your GX.games sign-in status. You can click on the  Refresh icon to log in using your Opera account.

    +

    You then have the following options:

    +
      +
    • Select game: From this list, you can either select an existing game to update, or choose to upload a new game.
    • +
    • Game Name: This is your game's name (title) on GX.games.
      +
      + IMPORTANT In order for the upload to GX.games to succeed, it's important that you only use allowed characters in the game's name (which, by default, is set to your GameMaker project's name, so make sure to either choose a valid project name or change the game's name manually afterwards).
      +
      + If you upload a game with a title that has forbidden characters, you will get this error: Incorrect Data. Check the output
      +
      + The allowed characters are: +
        +
      • a-z, A-Z (with a support of local schemas such as å)
      • +
      • 0-9
      • +
      • whitespace
      • +
      • : - ! ? . , ' & ( )
      • +
      +
    • +
    • Version: This is the version of the game that was last uploaded. You can only change this field before your game has been uploaded to GX.games.
    • +
    • Next Version: This is the version number used for your next GX.games upload. You can only change this after your game has been uploaded to GX.games. You do not need to modify this manually for each upload, as GameMaker will automatically increment the last digit of the version number for you.
    • +
    • Register on GX.games: Click on this button to register a new entry on GX.games. This is only valid when "Select game" is set to "New game".
    • +
    • Select group: Before uploading a new game, you can select the studio that the game will belong to.
    • +
    • Edit Game on Opera: This opens GX.create and takes you to your game's "Game details" page. This is only clickable when you're logged in and your game is uploaded.
    • +
    • Internal Share URL: This opens the private version of your game, only when it has been enabled on GX.create.
    • +
    • Public Share URL: This opens the public version of your game, only when it has been enabled on GX.create.
      +
      + Both of these URLs can be shared with others to allow them to play your game. +
    • +
    +

    Graphics

    +

    Here you can change the following details related to how your game will be displayed:

    +
      +
    • Display cursor: Controls whether the mouse cursor is visible when your game starts. Useful for games that don't require mouse input or use a custom mouse sprite.
    • +
    • Interpolate colours between pixels: Turns on linear interpolation, which basically "smooths" pixels. For crisp pixel graphics, it should be off, but if you have nice alpha blends and smoothed edged graphics it is better left on. This is on by default.
    • +
    • Scaling: Your game can be configured to scale the draw canvas automatically to maintain the aspect ratio within the browser, or you can select to have it run full scale. The full scale option will not full screen the game in the browser, but rather stretch what is drawn to fit the canvas size, as defined by the first room of the game. This is set to keep aspect ratio by default.
    • +
    +

    Finally there is the option to set the size of the texture page. The default (and most compatible) size is 2048x2048, but you can choose from anywhere between 256x256 up to 8192x8192. There is also a button marked Preview which will generate the texture pages for this platform and then open a window so that you can see how they look. This can be very useful if you wish to see how the texture pages are structured and to prevent having texture pages larger (or smaller) than necessary. For more information on texture pages, please see here.

    +

    Mod

    +

    This section displays the options that are used when you select "Upload as Live Wallpaper Mod" when creating an executable for GX.games.

    +

    This window also shows your GX.games sign-in status. You can click on the  Refresh icon to log in using your Opera account.

    +

    You then have the following options:

    +
      +
    • Select Mod: From this list, you can either select an existing mod to update, or choose to upload a new mod.
    • +
    • Mod Name: This is your mod's name (title) on GX.games.
      +
      + IMPORTANT In order for the upload to GX.games to succeed, it's important that you only use allowed characters in the game's name (which, by default, is set to your GameMaker project's name, so make sure to either choose a valid project name or change the game's name manually afterwards).
      +
      + If you upload a game with a title that has forbidden characters, you will get this error: Incorrect Data. Check the output
      +
      + The allowed characters are: +
        +
      • a-z, A-Z (with a support of local schemas such as å)
      • +
      • 0-9
      • +
      • whitespace
      • +
      • : - ! ? . , ' & ( )
      • +
      +
    • +
    • Version: This is the version of the mod that was last uploaded. You can only change this field before your mod has been uploaded to GX.games.
    • +
    • Next Version: This is the version number used for your next GX.games upload. You can only change this after your mod has been uploaded to GX.games. You do not need to modify this manually for each upload, as GameMaker will automatically increment the last digit of the version number for you.
    • +
    • Register on GX.games: Click on this button to register a new entry on GX.games. This is only valid when "Select Mod" is set to "New mod".
    • +
    • Select group: Before uploading a new mod, you can select the studio that the mod will belong to.
    • +
    • Edit Mod on Opera: This opens GX.create and takes you to your mod's details page. This is only clickable when you're logged in and your mod is uploaded.
    • +
    • Internal Share URL: This opens the private version of your mod, only when it has been enabled on GX.create.
    • +
    • Public Share URL: This opens the public version of your mod, only when it has been enabled on GX.create.
      +
      + Both of these URLs can be shared with others to allow them to get your mod. +
    • +
    +

     

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/Settings/Game_Options/HTML5.htm b/Manual/contents/Settings/Game_Options/HTML5.htm index 176e506e6..ef899be0d 100644 --- a/Manual/contents/Settings/Game_Options/HTML5.htm +++ b/Manual/contents/Settings/Game_Options/HTML5.htm @@ -4,7 +4,7 @@ HTML5 - + diff --git a/Manual/contents/Settings/Game_Options/Windows.htm b/Manual/contents/Settings/Game_Options/Windows.htm index 08e0e755c..529bd9309 100644 --- a/Manual/contents/Settings/Game_Options/Windows.htm +++ b/Manual/contents/Settings/Game_Options/Windows.htm @@ -4,7 +4,7 @@ Windows - + diff --git a/Manual/contents/Settings/Game_Options/iOS.htm b/Manual/contents/Settings/Game_Options/iOS.htm index ce3e1894a..83f98b65b 100644 --- a/Manual/contents/Settings/Game_Options/iOS.htm +++ b/Manual/contents/Settings/Game_Options/iOS.htm @@ -4,7 +4,7 @@ iOS - + diff --git a/Manual/contents/Settings/Game_Options/tvOS.htm b/Manual/contents/Settings/Game_Options/tvOS.htm index 03e0b5186..5c41861e7 100644 --- a/Manual/contents/Settings/Game_Options/tvOS.htm +++ b/Manual/contents/Settings/Game_Options/tvOS.htm @@ -4,7 +4,7 @@ tvOS - + diff --git a/Manual/contents/Settings/Texture_Information/Dynamic_Textures.htm b/Manual/contents/Settings/Texture_Information/Dynamic_Textures.htm new file mode 100644 index 000000000..c60f7467e --- /dev/null +++ b/Manual/contents/Settings/Texture_Information/Dynamic_Textures.htm @@ -0,0 +1,83 @@ + + + + + + Dynamic Textures + + + + + + + + + + + +

    Dynamic Textures

    +

    In the Texture Group settings, you can mark a group as "Default" or "Dynamic".

    +

    How Textures Work

    +
    +

    "Default" Groups

    +

    A Default Texture Group is included in your final game's package (WAD file). Any such texture groups are loaded into RAM as soon as the game starts, and pre-fetched into VRAM when required or asked.

    +

    "Dynamic" Groups

    +

    A Dynamic Texture Group is not loaded when the game starts. It's either loaded when required (i.e. when an image from it is drawn) or when you load it manually.

    +

    You load a Dynamic Texture Group into RAM manually by calling texturegroup_load(). By default, this function will also decompress the group and pre-fetch it into VRAM.

    +

    You can disable pre-fetching by setting the function's second argument to false. This will leave you to manually pre-fetch it later, or have it fetched automatically when an image is drawn from it (the latter is not recommended due to it being synchronous).

    +

    You can also unload a texture group using texturegroup_unload(), which will remove it from memory and place it back into disk in its original, compressed form.

    +

     Before a Dynamic Texture Group is loaded, you can't run operations that require reading its contained assets, such as duplicating a sprite (this will trigger the texture group to load but the function will still fail as it can't load immediately). You can however read texture information such as UVs and TPE.

    +

    Dynamic Group Modes

    +

    Using texturegroup_set_mode() you can set the "mode" for Dynamic groups to either "Implicit" (default) or "Explicit". This changes whether Dynamic groups can be loaded automatically.

    +

    This setting is global and can't be applied per-group.

    +

    Implicit

    +

    texturegroup_set_mode(false, ...)

    +

    This is the default setting. This enables automatic loading of Dynamic groups, so when an image from an unloaded Dynamic group is drawn, it will trigger the loading of that Texture Group.
    +
    + This may cause a small freeze as the texture is loaded into VRAM and decompressed, so making use of implicit loading is not recommended.
    +
    + When a Texture Group is triggered implicitly, only the required Texture Page is loaded. For example, if your unloaded Texture Group has 4 Texture Pages, and you attempt to draw something from Texture Page 2, only that page will be loaded, and Texture Pages 1, 3 and 4 will remain on disk. +

    +

    Explicit

    +

    texturegroup_set_mode(true, ...)

    +

    This setting disables automatic loading of Dynamic groups, meaning you have to load them manually. When you try drawing an image from a Texture Group that hasn't been loaded, the image will not draw, and an error will be printed to the output log.
    +
    + You can set a "fallback" sprite in texturegroup_set_mode() which would be drawn in place of a texture that hasn't been loaded. +

    +

    +

    Textures being unloaded at runtime, showing the fallback sprite

    +

    When the fallback sprite is displayed, its whole texture page is drawn, so it's recommended to enable Separate Texture Page for your fallback sprite, preventing unintended graphics from appearing. The texture page for the fallback sprite is automatically loaded even if it's set as a Dynamic page.

    +

    The fallback sprite used in the example above was created as a gradient checkerboard, so you can tell which part of the fallback texture is being drawn at any moment, and what scale it's being drawn at, which may help diagnose texture-related issues.

    +

    +

    Paths and Modding

    +

    In the Texture Groups settings, you can set the path where the Dynamic group will be placed within the final game directory. Without a set path, the textures will be placed at the root of the game's directory.

    +

    If you set the group format to "PNG", the exported texture files will become directly editable, allowing them to be modified by players.

    +

    More Functions

    +

    Here are some more functions relating to Dynamic groups:

    +
      +
    • texturegroup_set_mode(): In addition to setting the mode, you can also enable debugging with this function, which will display information about all Texture Pages on-screen:
      + +
    • +
    • texturegroup_get_status(): This returns the status of a texture group, telling you whether it's loaded, unloaded, currently loading, or fetched into VRAM.
    • +
    +

     

    +

     

    +

     

    + + + + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Code_Editor_Properties/Feather_Directives.htm b/Manual/contents/The_Asset_Editors/Code_Editor_Properties/Feather_Directives.htm new file mode 100644 index 000000000..58bf9c816 --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Code_Editor_Properties/Feather_Directives.htm @@ -0,0 +1,142 @@ + + + + + + + Feather Directives + + + + + + + + + +

    Feather Directives

    +

    Feather Directives are comments that affect how Feather treats your GML Code, including which Feather rules it applies, the Profile it uses and whether strict type validation is applied.

    +

    By default, Feather directives apply to the current script and to the functions declared inside of it, unless you supply a target path.

    +
    +

    See Also (placeholder)

    +
      +
    1. Topic List
    2. +
    +
    +

    General

    +

    A Feather directive has the following syntax: 

    +

    // Feather command parameters [in PATH]

    +

    It is a regular script comment that starts with Feather, followed by the command and its parameters. Optionally, it may take a path to a script, object or group in The Asset Browser to which the directive is applied.

    +

    Ignoring Feather Rules

    +

    Specific feather rules can be ignored using the directive Feather ignore or Feather disable

    +

    // Feather ignore  GM1010
    + // Feather disable GM1010

    +

    For example, consider the following piece of code: 

    +

    // Feather ignore GM1010
    + result = 5 + "5";

    +

    With Strict Type mode enabled, Feather normally shows a "GM1010 - Cannot perform '+' operation between types 'real' and 'string' message. With the directive above, Feather will ignore messages of this type, in that particular script.

    +

    The directive only affects lines after the comment itself, so any statements before the comment will still show warnings.

    +

    Ignoring Once

    +

    The GM message can be ignored only once by adding once:

    +

    // Feather ignore once GM1010

    +

    This command makes Feather ignore the first occurrence of this type of message but not the ones that come after that

    +

    // Feather ignore once GM1010
    + result = 5 + "5";    // ignored
    + result = 6 + "6";    // error

    +

    Restoring

    +

    Finally, you can re-enable the GM message using restore / enable

    +

    // Feather restore GM1010
    + // Feather enable  GM1010

    +

    Profiles

    +

    This directive sets the profile for the script: 

    +

    // Feather use syntax-errors
    +// Feather use type-errors
    +// Feather use all
    +// Feather use none

    +

     This Feather directive corresponds to the Profile preference in the Feather Preferences.

    +

    Type Validation Mode

    +

    This directive sets the type validation mode to use from either strict or relaxed: 

    +

    /// Feather use strict
    +/// Feather use relaxed

    +

     This Feather directive corresponds to the Strict Type mode preference in the Feather Preferences.

    +

    Combined Directives

    +

    You can also set the profile and type validation mode in a single line: 

    +

    /// Feather use all, strict

    +

    The above comment will make Feather look for All errors and use Strict Type mode.

    +

    Path

    +

    Optionally you can provide a path using the in directive to apply a Feather directive to a specific script, object or group in The Asset Browser. This can be placed in the main script of an external library of functions, though you can place it in any other script, e.g. a blank "FeatherConfig" script.

    +

     Having numerous rules using paths may cause performance issues, the exception being paths set specifically to * alone.

    +

    You can use the following special symbols in your paths: 

    +
      +
    • / - When used in the beginning of a path, points to the root of the Asset Browser
    • +
    • . - When used in the beginning of a path, points to the current script's folder
    • +
    • * is a wildcard that matches everything inside the preceding directory
    • +
    +

    This way you can define paths to assets in the Asset Browser, for example:

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    PathApplies To
    /Scripts/*All assets in /Scripts
    /*All assets
    ./*All assets in the current folder and subfolders
    /Foo/Bar/obj_managerobj_manager in the /Foo/Bar folder
    +

    Examples: 

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    DirectiveEffect
    // Feather ignore GM2017 in *Ignores all Naming Rule violations in the whole project
    // Feather ignore GM1064 in ./*Ignores GM1064 in the current folder and all subfolders
    // Feather use type-errors in /Objects/System/*Sets the profile to type-errors in specifically the Objects/System folder
    // Feather use all in /Objects/System/obj_controllerSets the profile to all in obj_controller
    +

     No consistent result is guaranteed if you have two directives that enable and disable a Feather message on the same path.

    +

     

    +

     

    + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Extension_Creation/HTML5_Extensions.htm b/Manual/contents/The_Asset_Editors/Extension_Creation/HTML5_Extensions.htm new file mode 100644 index 000000000..b4c23806d --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Extension_Creation/HTML5_Extensions.htm @@ -0,0 +1,122 @@ + + + + + + HTML5 Code Injection + + + + + + + + + + +

    HTML5 Code Injection

    +

    You can inject custom HTML into your game's index.html file through extensions. This is done by clicking on "HTML5" under "Platform Settings" in an extension's editor:

    +

    +

    Insertion Tags

    +

    In the "Code Injection" window, you can add custom HTML for your index.html file. Such HTML is inserted into different parts of the index.html file by using the following tags:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TagDescription
    GM_HTML5_PreHeadHTML is inserted after the <head> tag
    GM_HTML5_PostHeadHTML is inserted after the </head> tag
    GM_HTML5_PreStyleHTML is inserted inside <head> </head>, but before <style>
    GM_HTML5_PostStyleHTML is inserted inside <head> </head>, but after </style>
    GM_HTML5_PreBodyHTML is inserted before the <body> tag
    GM_HTML5_PostBodyHTML is inserted after the </body> tag
    +

    Here is an example of HTML code injected into some of the above tags:

    +

    +

    Multiple extensions may inject code into the same tag, however the order of their insertions into the final HTML file cannot be guaranteed.

    +

    Variables

    +

    Within your injected HTML5 code, you may use variables that GameMaker provides. You can see such variables in the example above, wrapped inside ${ }.

    +

    You can also read your custom extension options by using the ${YYEXTOPT_HTML5Injection_OPTIONNAME} syntax.

    +

    The following built-in variables can be used with the ${VARIABLE} syntax:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    VariableDescription
    GM_HTML5_BrowserTitleThe title of the browser window
    GM_HTML5_BackgroundColourThe background colour of the page
    GM_HTML5_GameWidthThe width of the game's canvas (in pixels)
    GM_HTML5_GameHeightThe height of the game's canvas (in pixels)
    GM_HTML5_GameFolderThe name of the folder containing the HTML file
    GM_HTML5_GameFilenameThe name of the HTML file
    GM_HTML5_CacheBustA random value used for cache-busting; can be added as a URL parameter in custom links to prevent the browser from getting the cached version of a file
    +

    Template HTML File

    +

    You can get the template index.html file from the runtime directory, under runtime-[version]/html5/index.html. Here you can view the template file to understand where the tags are inserted. You can make a modified copy and use it for your game instead of the default file, by adding it as an Included File and selecting it in the HTML5 Game Options.

    +

    The template HTML file will contain some tags starting with GM_HTML5_Inject*. These are used by GameMaker to inject values from the HTML5 Game Options, and as such can't be used for inserting custom code.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Object_Properties/Async_Events/Audio_Playback_Ended.htm b/Manual/contents/The_Asset_Editors/Object_Properties/Async_Events/Audio_Playback_Ended.htm new file mode 100644 index 000000000..d8693cb64 --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Object_Properties/Async_Events/Audio_Playback_Ended.htm @@ -0,0 +1,66 @@ + + + + + + + Audio Playback Ended + + + + + + + + + +

    Audio Playback Ended

    +

    This event is triggered whenever playback ends for a sound instance played using the audio_play_sound_ functions.

    +

    Playback of a sound ends in the following situations: 

    +
      +
    • The sound reaches its end position. Pausing a sound using audio_pause_sound, changing its track position using audio_sound_set_track_position or looping a section of it by changing the Audio Loop Points postpones the end of playback as the sound doesn't reach the end position this way.
    • +
    • The sound is stopped, through a call to audio_stop_sound or audio_stop_all. I.e. stopping a sound also always means it ends playback.
    • +
    • The sound is forced to stop due to voice stealing: when another sound is played using any of the audio_play_sound_ functions and all channels are used (see audio_channel_num), a channel playing a sound with a lower priority than the new one will be used to play the new sound, i.e. the channel is stolen by the new sound. An Audio Playback Ended event is triggered for the sound that was forced to stop playing.
    • +
    +

    The event will trigger in all objects that have it, for any sound played in the game (even when it's not played by the same object).

    +

    The event returns information in the async_load ds_map. The map contains the following keys in case of an Audio Playback Ended event: 

    +
      +
    • "sound_id" - the Sound Instance ID that ended playback.
    • +
    • "asset_id" - the index of the Sound Asset.
    • +
    • "was_stopped" - this is set to false, unless the sound was stopped manually using the audio_stop_ functions or when it was forced to stop playing.
    • +
    +

     Pausing a sound does not end playback, as playback can still be resumed afterwards.

    +

    Example

    +

    Suppose you play a sound using any of the audio_play_sound_ functions: 

    +

    ins_snd_bgm = audio_play_sound(snd_music, 100, false);

    +

    If you call no other sound functions on this sound, it will play until the end. At that point, the Audio Playback Ended event is triggered for the sound. The async_load ds_map will contain the following values in that case: 

    +
      +
    • "sound_id" - the sound ID returned by audio_play_sound and stored in ins_snd_bgm
    • +
    • "asset_id"snd_music
    • +
    • "was_stopped"false (the sound wasn't stopped or forced to stop)
    • +
    +

    If you stop the sound before it reaches its end, the Audio Playback Ended event is triggered as well. This can be done using any of the following lines of code: 

    +

    // Stop the sound instance
    + audio_stop_sound(ins_snd_bgm);
    +
    + // Stop all instances of the sound asset
    + audio_stop_sound(snd_relaxed);
    +
    + // Stop all sounds that are playing
    + audio_stop_all(); +

    +

    In this case, the sound was stopped through a call to one of the audio_stop_ functions, so instead of being false"was_stopped" will be true here.

    +

    Finally, if you start playing additional sounds with a higher priority while this sound is playing, these will also take up a channel (or a voice). If no free channels are left then ins_snd_bgm may be forced to stop and the Audio Playback Ended event is triggered. In this case, "was_stopped" is also set to true.

    +

     

    +

     

    + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Object_Properties/Wallpaper_Config_Event.htm b/Manual/contents/The_Asset_Editors/Object_Properties/Wallpaper_Config_Event.htm new file mode 100644 index 000000000..07d0d08ce --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Object_Properties/Wallpaper_Config_Event.htm @@ -0,0 +1,55 @@ + + + + + + + Wallpaper Events + + + + + + + + + +

    Wallpaper Events

    +

    There are two events used for making Live Wallpapers.

    +

    +

    Wallpaper Config

    +

    This event runs whenever a setting for the wallpaper is changed in the companion app.

    +

    You get the updated wallpaper settings in the wallpaper_config variable.

    +

    wallpaper_config

    +

    This variable is a struct containing your sections. Each section is a struct containing the options and sections within that section.

    +

    To access an option from this struct, you would use this syntax: 

    +

    wallpaper_config.section_name.option_name

    +

    Or, when using nested sections: 

    +

    wallpaper_config.section1_name.section2_name.option_name

    +

    Here is an example using the same settings defined on the wallpaper_set_config page: 

    +

    var _new_colour = wallpaper_config.colours.blendColor;
    + obj_clock.colour = _new_colour;

    +

    Wallpaper Subscription Data

    +

    This event is triggered when information is received on a metric that you are subscribed to. For details on what is included in this event, see Receiving Metrics.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Particle_System_Properties/Emitter_Properties.htm b/Manual/contents/The_Asset_Editors/Particle_System_Properties/Emitter_Properties.htm new file mode 100644 index 000000000..625dd2481 --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Particle_System_Properties/Emitter_Properties.htm @@ -0,0 +1,130 @@ + + + + + + + Emitter Properties + + + + + + + + + +

    Emitter Properties

    +

    The Emitter Properties are shown in The Inspector when an emitter is selected in The Particle System Editor. Here, the properties of the emitter and its associated particle type can be changed.

    +

    Emitter Settings

    +

    +

    Enabled

    +

    This setting enables or disables the emitter. It corresponds to the visibility setting  in the emitter list shown next to The Canvas.

    +

    When the emitter is disabled, it's paused, meaning that enabling it will continue it from the same state when it was disabled.

    +

    Preview

    +

    This setting enables or disables the preview of the emitter's shape on The Canvas.

    +

    Preview Colour

    +

    This setting changes the colour used for drawing the emitter preview. The colour's alpha can be changed to draw the preview with transparency.

    +

    Mode

    +

    In Stream mode the emitter streams the number of particles set under Particle Count continuously. The emitter creates Particle Count particles every step (or frame).

    +

    In Burst mode the emitter creates the number of particles set under Particle Count exactly once.

    +

     In Burst mode The Particle System Editor will burst the given number of particles only once. You can click the Restart Animation button to make the editor play it again.

    +

    Particle Count

    +

    In case of a positive value this setting determines the number of particles to be created: 

    +
      +
    • Every step when in Stream mode, or at a custom interval set under Interval & Interval units
    • +
    • Once when in Burst mode
    • +
    +

    You can also set a negative value. This means that a particle will be created with a chance of 1 out of "Particle Count", e.g. with the Particle Count set to -10, there is a 1 out of 10 chance that a particle will be created.

    +

    If this value is set to 0 the emitter will not create any particles.

    +

    Delay & Delay units

    +

    These two settings set the delay for an emitter set to Stream mode: 

    +
      +
    • A random value between Min and Max is chosen as the delay. The emitter waits this amount of time before it bursts its first Particle Count particles.
    • +
    • The values for Min and Max are expressed in Delay units: Seconds (the default) or Frames.
    • +
    +

    Interval & Interval units

    +

    These two settings set the interval between consecutive bursts of particles for an emitter set to Stream mode: 

    +
      +
    • A random value ranging from Min to Max is chosen for every subsequent burst of Particle Count particles. The emitter will use the same interval all the time if you set Min and Max to the same value.
    • +
    • The values for Min and Max are expressed in Interval units: Seconds (the default) or Frames.
    • +
    +

    Distribution

    +

    This setting determines the distribution of the particles over the shape, i.e. where they are created.

    +
      +
    • Using a Linear distribution the particles are created randomly all over the shape with no preference for the centre or the edges. The chance of a particle appearing is the same everywhere.
    • +
    • Using a Gaussian distribution there is a greater chance of particles being created closer to the centre of the shape.
    • +
    • Using an Inverse Gaussian distribution there is a greater chance of particles being created near the edges of the shape.
    • +
    +

    See Particle Emitter Distribution Constant.

    +

    Shape

    +

    This setting determines the shape of the particle emitter. The emitter creates particles inside this shape.

    +

    +

    See Particle Emitter Shape Constant.

    +

    Particle Settings

    +

    Library

    +

    +

    The library allows you to store the particle emitters that you create as presets, and also comes with some built-in presets.

    +

    Selecting a preset from the library using "Select Particles" in The Inspector applies this preset to the emitter and links the emitter to it, which is indicated by the highlighted yellow Link/Unlink icon .

    +

    If you link different emitters (which can be in different Particle System assets) to the same preset, then changing the particle properties in any of these emitters will change them in the other emitters as well.

    +

    See: Shared Emitters

    +

    Textures

    +

    +

    The texture is the image or sprite that a particle uses. By default GameMaker includes a selection of textures that you can use for a particle (see Overview of Particle Type Shapes).

    +

    Alternatively, you can also use a custom sprite to be used as the texture for a particle. The Frame setting determines the image index of the sprite to be used, if the sprite has multiple sub-images.

    +

    Colour

    +

    +

    This setting determines the colour of a particle over its lifetime. Every particle created by the emitter starts with the colour on the left, then changes to the colour in the middle and ends with the colour on the right. Every colour includes an alpha channel that affects the transparency of the particle.

    +

    Enabling Additive makes particles created by this emitter drawn using additive blending.

    +

    Life

    +

    +

    This setting determines the lifetime of the particle, expressed in steps. Upon creation, each particle is assigned a random lifetime between the Minimum and Maximum values, and that is how many steps/frames the particle lasts.

    +

    Scale

    +

    +

    This setting determines the X and Y scale of the particles. This scale factor is applied to the particle texture first, before Size.

    +

    Size

    +

    +

    This setting determines the final size of the particles. The size is applied after the scale.

    +

    Increment is the value that gets added every step, e.g. if this value is set to 0.01, the size of every particle will increase by 0.01 every step.

    +

    Every frame, a random value between 0 and the Wiggle value is added to, or subtracted from, the size of the particle. This can be used to add random fluctuations to the particle's size.

    +

    Speed

    +

    +

    This setting determines the speed of the particles in the direction they are moving. Every particle is created with a random speed between Minimum and Maximum.

    +

    Increment is the value that gets added to the particle's speed every step.

    +

    Every frame, a random value between 0 and the Wiggle value is added to, or subtracted from, the speed of the particle. This can be used to add random fluctuations to the particle's speed.

    +

    Gravity

    +

    +

    This setting determines the gravity applied to all particles created by this emitter. You can set the gravity's Force, which is applied in the given Direction.

    +

    Direction

    +

    +

    This setting determines the direction in which the particles move.

    +

    Every particle is created with a random direction between Minimum and Maximum (where both are angles expressed in degrees).

    +

    Increment is the value that gets added to the particle's direction every step.

    +

    Every frame, a random value between 0 and the Wiggle value is added to, or subtracted from, the direction of the particle. This can be used to add random fluctuations to the particle's direction.

    +

    Orientation

    +

    +

    This setting determines the orientation of the particle. As opposed to the direction the particle moves in, the orientation is the rotation of the particle's image (similar to an instance's image_angle).

    +

    Every particle is created with a random direction between Minimum and Maximum (where both are angles expressed in degrees).

    +

    Checking Relative will set each particle's orientation to be relative to its direction. With this enabled, the final angle of a particle's image will be its movement direction + its orientation.

    +

    Increment is the value that gets added to the particle's orientation every step.

    +

    Every frame, a random value between 0 and the Wiggle value is added to, or subtracted from, the orientation of the particle. This can be used to add random fluctuations to the particle's orientation.

    +

    Subparticles

    +

    +

    Here you can assign a preset to be emitted by each particle. A particle can emit a preset at two defined points in time:

    +
      +
    • On Death: You can set the type and count of particles to be created at the end of a particle's lifetime.
    • +
    • On Update: You can set the type and count of particles to be created on each frame while a particle is alive.
    • +
    +

     

    +

     

    + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Particle_Systems.htm b/Manual/contents/The_Asset_Editors/Particle_Systems.htm new file mode 100644 index 000000000..87ec8bbf7 --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Particle_Systems.htm @@ -0,0 +1,150 @@ + + + + + + + The Particle System Editor + + + + + + + + + +

    The Particle System Editor

    +

    The Particle System Editor can be used to create visual particle effects and preview them in real-time, as they would appear in-game.

    +

    Double-clicking on a Particle System asset in The Asset Browser will open this editor:

    +

    A Particle System consists of various emitters, each of which "emits" a particular type of particle. A particle is simply an image that is animated according to its settings, and has a fixed lifespan.

    +

    By creating emitters inside systems and configuring their particle settings, you can create effects ranging from fire, explosions, etc. to complicated effects that use multiple emitters, as shown above.

    +
    +

    Mini TOC (placeholder)

    +
      +
    1. Heading
    2. +
    +
    +

    Creating A Particle System

    +

    These are the basic steps for setting up a Particle System Asset:

    + +

    Using A Particle System

    +

    As briefly described above, a Particle System can be used in your game in three ways:

    +

    Add To Room Editor

    +
    +

    Drag a particle system asset onto The Room Editor canvas with an Asset Layer selected. The entire particle system, including its emitters, will be added as an element to the layer. To preview the particle system in the Room Editor, press the Play Animation button .

    +

    When the game is run, the particle system is instantiated on the layer and starts playing immediately. The layer element added is of type layerelementtype_particlesystem (see layer_get_element_type).

    +

     You cannot get the particle system ID for particle systems that you add this way.

    +
    +

    Add To Sequence Editor

    +
    +

    Drag a particle system asset onto The Sequence Editor canvas. This adds a new sequence track of type seqtracktype_particlesystem to the sequence.

    +

     This adds a single track for the whole particle system. Individual emitters in the particle system cannot be animated separately in a sequence.

    +
    +

    Create At Runtime

    +
    +

    Spawn the particle system in GML Code using one of the built-in functions part_system_create/part_system_create_layer or in GML Visual using Create Particle System.

    +

    Pass the Particle System Asset to the function/action as the optional partsys argument: 

    +

    p_sys = part_system_create(ps_MyBeautifulParticleEffect);

    +

    By passing a value for this optional partsys parameter, GameMaker will initialise the particle system for you according to how you set it up in the Particle System Editor.

    +

    You can use particle_get_info to get the emitters and particle types used in a particle system. You can use this to manually spawn a particle type using part_particles_create.

    +
    +

    The Canvas

    +

    The canvas displays a preview of all particle emitters that you added to the system, and allows you to move and resize emitters.

    +

    Every emitter is shown, including a preview of its region and shape (rectangle, ellipse, diamond or line) in which it emits its particles. This preview can be disabled for each emitter separately.

    +

    Origin, Draw Order & Copy GML

    +

    The Origin and Draw Order as well as the Copy GML to Clipboard button are shown in the top-left corner of the canvas.

    +

    Origin indicates the position on the canvas around which transformations take place, similar to a sprite's origin. If you add a particle system asset to a sequence or to a room asset layer, its X, Y position will correspond to the origin set here.

    +

    The Draw Order determines the order in which particles are drawn (i.e. which particles are drawn on top of others).

    + + + + + + + + + + + + + + + + + + + + +
    Particle Draw Order
    Default (old to new)Reversed (new to old)
    Older particles are drawn first and newer particles are drawn on top of them. Older particles are drawn behind newer ones.Newer particles are drawn first and older particles are drawn on top of them. Newer particles are drawn behind older ones.
    +

    The Copy GML to Clipboard button  copies the GML Code needed to create the particle system at runtime, including its emitters and particle types to the clipboard. You can then paste that code to create a particle system that will look exactly the same. For more information, see Copy GML to Clipboard.

    +

    Toolbox

    +

    The Toolbox is shown in the top-right corner of the canvas.

    +

    +

    It contains the following: 

    +
      +
    • Toggle Grid : This toggles the grid on the canvas. The caret contains more options, such as the grid size, enable/disable snap to grid and the grid colour.
    • +
    • Zoom Controls : Zoom in, reset zoom, zoom out, centre fit.
    • +
    • Canvas Settings : Enable or disable the canvas frame here and set its origin and dimensions (default is 1366x768). You can also set a background image here to use as a reference.
    • +
    +

    Emitters

    +

    You can create emitters inside a particle system. One emitter emits one type of particle.

    +

    An emitter has a region and a shape. Particles are created inside the shape stretched across the emitter's region.

    +

    +

    By default, all emitters in the particle system are listed on the left side of the canvas. Click Add  to add a new one. Click Delete  to delete the selected particle emitter(s).

    +

    Right-clicking on an emitter allows you to delete, cut, copy, duplicate and rename the emitter.

    +

    Click the Eye icon  in the list to disable (pause) the emitter, and the padlock icon to lock it. Locking prevents changes to any of its properties, both on the canvas and in The Inspector.

    +

    Use the Docking menu  to undock/dock the emitter list, or change its position around the canvas.

    +

    Configuring an Emitter

    +

    Particle emitters and the particles they create can be fully configured in The Inspector.

    +

    For details on configuring emitters, see: Emitter Properties

    +

    Shared Emitters

    +

    Emitters that you create can be shared between particle system assets in your GameMaker project. This requires them to be saved in the library as presets.

    +

    +

    GameMaker also comes with some built-in presets you can choose from. You can load a built-in preset into an emitter, make your changes and save it as a new preset. The built-in presets themselves can't be modified, so the preset will be unlinked the moment the emitter's settings are changed.

    +

     Shared emitters are stored per-project. They're only available in the project they're created in, and are not shared among different projects.

    +

    Creating a Preset

    +

    After configuring a particle emitter to your liking, click Save as Preset  under the "Library" panel (seen above) and enter a name for the new preset: 

    +

    Click "Save" to confirm saving the emitter as a new preset.

    +

    The emitter is now linked to the preset. Instead of "Select Particles" (or "Custom Particles" for an emitter after unlinking), the name of the new preset is now shown under the "Library" panel. The Link/Unlink button  is also highlighted, indicating that this emitter's properties are linked to the library preset (the properties under all panels that show the yellow chain icon on the right are linked to the preset).

    +

    Linking an Emitter to a Preset

    +

    Emitters in a particle system can be linked to a previously created emitter preset in the library. To do this, click "Select Particles" under the "Library" panel and select the preset you want to use for this emitter.

    +

    Doing this will override your emitter's settings with the selected preset. Click "OK" when asked for confirmation: 

    +

    +

    As with creating a preset, the Link/Unlink button  becomes highlighted to indicate that this emitter's properties are linked to the library preset.

    +

    Changing Linked Emitters' Properties

    +

    When you create an emitter preset, the "Emitter Settings" (such as the distribution, shape, region) are initially saved. However, if you change these emitter settings after creating the preset, the new settings will not be saved to the preset.

    +

    On the other hand, the rest of the emitter properties (such as textures, colour, life, scale, etc.) are saved to the preset whenever they are changed.

    +

    When a preset is modified, that change is applied to all emitters that are linked to the preset, even if they are in different particle system assets.

    +

    Unlinking an Emitter from a Preset

    +

    Click the Link/Unlink button  to unlink an emitter from a preset. The emitter keeps the properties it got from the preset, but these can now be changed independently. Instead of being stored in the preset, they are now stored in the emitter itself.

    +

    In this case, the Preset shows "Custom Particles" to indicate they are specific to this emitter.

    +

     

    +

     

    + + + \ No newline at end of file diff --git a/Manual/contents/The_Asset_Editors/Sprite_Properties/Sprite_Strips.htm b/Manual/contents/The_Asset_Editors/Sprite_Properties/Sprite_Strips.htm new file mode 100644 index 000000000..460ab720e --- /dev/null +++ b/Manual/contents/The_Asset_Editors/Sprite_Properties/Sprite_Strips.htm @@ -0,0 +1,48 @@ + + + + + + Strip Images + + + + + + + + + + +

    Strip Images

    +

    You can use "strip images" to easily import animated sprites into GameMaker.

    +

    A strip image contains multiple frames, laid out horizontally, starting from the left. The name of a strip image file must end with "_stripN", where "N" is the number of frames in the animation.

    +

    The above strip image contains 5 frames. Its filename is PlayerSprite_strip5.png, indicating it has 5 frames, which GameMaker uses to divide it into separate sub-images.

    +

    You can save this image and drag it into GameMaker right now, and it will be imported as an animation:

    +

    You can import a strip image via the "Import" button in the Sprite Editor, by dragging it into the IDE, or loading it at runtime with sprite_add().

    +

    The width of the final sprite will be equal to the total width of the strip image divided by the number of frames in its filename. For example, a 250px-wide strip with 5 frames will result in a 50px-wide image.

    +

    Fonts

    +

    You can create a strip image to be used as a font, where each character is a frame in the strip image.

    +

    Such a strip image can be loaded at runtime using font_add_sprite().

    +

    Saving Strip Images

    +

    You can save a sprite as a strip image file at runtime using sprite_save_strip(). This sprite may have previously been loaded via the IDE, at runtime with sprite_add(), or built from a surface.

    +

     

    +

     

    + + + + + \ No newline at end of file diff --git a/Manual/contents/assets/Images/Asset_Editors/Async_AudioPlaybackEnded.png b/Manual/contents/assets/Images/Asset_Editors/Async_AudioPlaybackEnded.png new file mode 100644 index 000000000..f552e9c97 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Async_AudioPlaybackEnded.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_Extensions_HTML5.png b/Manual/contents/assets/Images/Asset_Editors/Editor_Extensions_HTML5.png new file mode 100644 index 000000000..e11451b44 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_Extensions_HTML5.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_Extensions_HTML5_Example.png b/Manual/contents/assets/Images/Asset_Editors/Editor_Extensions_HTML5_Example.png new file mode 100644 index 000000000..88efb725a Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_Extensions_HTML5_Example.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_Fonts_Inspector_GlyphSelector.png b/Manual/contents/assets/Images/Asset_Editors/Editor_Fonts_Inspector_GlyphSelector.png new file mode 100644 index 000000000..89e6cc64a Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_Fonts_Inspector_GlyphSelector.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_Fonts_Inspector_SDF.png b/Manual/contents/assets/Images/Asset_Editors/Editor_Fonts_Inspector_SDF.png new file mode 100644 index 000000000..89166fda0 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_Fonts_Inspector_SDF.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_Objects_WallpaperConfigEvent.png b/Manual/contents/assets/Images/Asset_Editors/Editor_Objects_WallpaperConfigEvent.png new file mode 100644 index 000000000..7b8a522db Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_Objects_WallpaperConfigEvent.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystem_SettingsEmitter.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystem_SettingsEmitter.png new file mode 100644 index 000000000..cfa597727 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystem_SettingsEmitter.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystem_SettingsTextures.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystem_SettingsTextures.png new file mode 100644 index 000000000..57e2a06a4 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystem_SettingsTextures.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems.png new file mode 100644 index 000000000..17630e019 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_ApplyPresetPrompt.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_ApplyPresetPrompt.png new file mode 100644 index 000000000..de2bdd135 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_ApplyPresetPrompt.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_DrawOrderOrigin.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_DrawOrderOrigin.png new file mode 100644 index 000000000..46576d604 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_DrawOrderOrigin.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_EmitterList.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_EmitterList.png new file mode 100644 index 000000000..4c6b191cc Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_EmitterList.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_EmitterPropertiesShape.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_EmitterPropertiesShape.png new file mode 100644 index 000000000..9ec98b4a5 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_EmitterPropertiesShape.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_Library.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_Library.png new file mode 100644 index 000000000..9da60ddb7 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_Library.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_NewPresetPrompt.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_NewPresetPrompt.png new file mode 100644 index 000000000..0425b12cb Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_NewPresetPrompt.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsColour.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsColour.png new file mode 100644 index 000000000..884019801 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsColour.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsDirection.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsDirection.png new file mode 100644 index 000000000..fdfc7faf2 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsDirection.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsGravity.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsGravity.png new file mode 100644 index 000000000..59877d3ea Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsGravity.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsLife.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsLife.png new file mode 100644 index 000000000..e78680fc4 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsLife.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsOrientation.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsOrientation.png new file mode 100644 index 000000000..5847cad36 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsOrientation.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsScale.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsScale.png new file mode 100644 index 000000000..43a6db5d6 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsScale.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSize.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSize.png new file mode 100644 index 000000000..778a05294 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSize.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSpeed.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSpeed.png new file mode 100644 index 000000000..56ee8caea Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSpeed.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSubparticles.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSubparticles.png new file mode 100644 index 000000000..3508963e3 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_SettingsSubparticles.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_Toolbox.png b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_Toolbox.png new file mode 100644 index 000000000..92072d73e Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Editor_ParticleSystems_Toolbox.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/blend.png b/Manual/contents/assets/Images/Asset_Editors/FXs/blend.png new file mode 100644 index 000000000..529034519 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/blend.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/blend_ext.png b/Manual/contents/assets/Images/Asset_Editors/FXs/blend_ext.png new file mode 100644 index 000000000..8c94cd489 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/blend_ext.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/blocks_background.png b/Manual/contents/assets/Images/Asset_Editors/FXs/blocks_background.png new file mode 100644 index 000000000..06e4414c2 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/blocks_background.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/clouds.mp4 b/Manual/contents/assets/Images/Asset_Editors/FXs/clouds.mp4 new file mode 100644 index 000000000..0fb0867c7 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/clouds.mp4 differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/glow.png b/Manual/contents/assets/Images/Asset_Editors/FXs/glow.png new file mode 100644 index 000000000..fbfcdf32c Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/glow.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/hard_drop_shadow.png b/Manual/contents/assets/Images/Asset_Editors/FXs/hard_drop_shadow.png new file mode 100644 index 000000000..51b890315 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/hard_drop_shadow.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/hue.png b/Manual/contents/assets/Images/Asset_Editors/FXs/hue.png new file mode 100644 index 000000000..8bba9f5ce Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/hue.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/mask.png b/Manual/contents/assets/Images/Asset_Editors/FXs/mask.png new file mode 100644 index 000000000..6c1ecf2ce Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/mask.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/old_film.mp4 b/Manual/contents/assets/Images/Asset_Editors/FXs/old_film.mp4 new file mode 100644 index 000000000..d3efd70c0 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/old_film.mp4 differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/panorama.mp4 b/Manual/contents/assets/Images/Asset_Editors/FXs/panorama.mp4 new file mode 100644 index 000000000..87b4d7e1e Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/panorama.mp4 differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/parallax.mp4 b/Manual/contents/assets/Images/Asset_Editors/FXs/parallax.mp4 new file mode 100644 index 000000000..4b52720af Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/parallax.mp4 differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/recur_blur.png b/Manual/contents/assets/Images/Asset_Editors/FXs/recur_blur.png new file mode 100644 index 000000000..0b9c30c23 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/recur_blur.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/FXs/ripples.mp4 b/Manual/contents/assets/Images/Asset_Editors/FXs/ripples.mp4 new file mode 100644 index 000000000..666c6b883 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/FXs/ripples.mp4 differ diff --git a/Manual/contents/assets/Images/Asset_Editors/JSDoc_Feather_Generate.png b/Manual/contents/assets/Images/Asset_Editors/JSDoc_Feather_Generate.png new file mode 100644 index 000000000..5104b9694 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/JSDoc_Feather_Generate.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/PlayerSprite_strip5.png b/Manual/contents/assets/Images/Asset_Editors/PlayerSprite_strip5.png new file mode 100644 index 000000000..07b8c35f8 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/PlayerSprite_strip5.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextInspectorSDFMustBeEnabled.png b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextInspectorSDFMustBeEnabled.png new file mode 100644 index 000000000..3bc1f02df Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextInspectorSDFMustBeEnabled.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextInspectorSDFParams.png b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextInspectorSDFParams.png new file mode 100644 index 000000000..df3e6fff5 Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextInspectorSDFParams.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextSDFParameters.png b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextSDFParameters.png new file mode 100644 index 000000000..9781bb2fb Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextSDFParameters.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextSDFThickness.png b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextSDFThickness.png new file mode 100644 index 000000000..6e00eac6e Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Sequences_Text/SeqTextSDFThickness.png differ diff --git a/Manual/contents/assets/Images/Asset_Editors/Sprite_Strip_Imported.png b/Manual/contents/assets/Images/Asset_Editors/Sprite_Strip_Imported.png new file mode 100644 index 000000000..d49f0c7ac Binary files /dev/null and b/Manual/contents/assets/Images/Asset_Editors/Sprite_Strip_Imported.png differ diff --git a/Manual/contents/assets/Images/IDE_Input/Account_Menu.png b/Manual/contents/assets/Images/IDE_Input/Account_Menu.png new file mode 100644 index 000000000..8b6ffbd35 Binary files /dev/null and b/Manual/contents/assets/Images/IDE_Input/Account_Menu.png differ diff --git a/Manual/contents/assets/Images/IDE_Input/Help_Menu_Bug_Report_Packaging_Message.png b/Manual/contents/assets/Images/IDE_Input/Help_Menu_Bug_Report_Packaging_Message.png new file mode 100644 index 000000000..244a5a963 Binary files /dev/null and b/Manual/contents/assets/Images/IDE_Input/Help_Menu_Bug_Report_Packaging_Message.png differ diff --git a/Manual/contents/assets/Images/IDE_Input/Help_Menu_Report_Bug_Anonymous.png b/Manual/contents/assets/Images/IDE_Input/Help_Menu_Report_Bug_Anonymous.png new file mode 100644 index 000000000..9cf50c77f Binary files /dev/null and b/Manual/contents/assets/Images/IDE_Input/Help_Menu_Report_Bug_Anonymous.png differ diff --git a/Manual/contents/assets/Images/IDE_Input/Help_Menu_Report_Bug_Window.png b/Manual/contents/assets/Images/IDE_Input/Help_Menu_Report_Bug_Window.png new file mode 100644 index 000000000..e57d74cf1 Binary files /dev/null and b/Manual/contents/assets/Images/IDE_Input/Help_Menu_Report_Bug_Window.png differ diff --git a/Manual/contents/assets/Images/IDE_Input/Notification_Example.png b/Manual/contents/assets/Images/IDE_Input/Notification_Example.png new file mode 100644 index 000000000..a3a229d3e Binary files /dev/null and b/Manual/contents/assets/Images/IDE_Input/Notification_Example.png differ diff --git a/Manual/contents/assets/Images/IDE_Input/Version_Menu.png b/Manual/contents/assets/Images/IDE_Input/Version_Menu.png new file mode 100644 index 000000000..c8558ca4e Binary files /dev/null and b/Manual/contents/assets/Images/IDE_Input/Version_Menu.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_AccountMenu.png b/Manual/contents/assets/Images/Icons/Icon_AccountMenu.png new file mode 100644 index 000000000..7d107078e Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_AccountMenu.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_AddParticleEmitter.png b/Manual/contents/assets/Images/Icons/Icon_AddParticleEmitter.png new file mode 100644 index 000000000..8c1a1c077 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_AddParticleEmitter.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_AddVisualItem.png b/Manual/contents/assets/Images/Icons/Icon_AddVisualItem.png new file mode 100644 index 000000000..042704ec6 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_AddVisualItem.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_CompileAndLaunch.png b/Manual/contents/assets/Images/Icons/Icon_CompileAndLaunch.png new file mode 100644 index 000000000..c095c1bae Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_CompileAndLaunch.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_DeleteParticleEmitter.png b/Manual/contents/assets/Images/Icons/Icon_DeleteParticleEmitter.png new file mode 100644 index 000000000..b1ae69f97 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_DeleteParticleEmitter.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_EmitterDock.png b/Manual/contents/assets/Images/Icons/Icon_EmitterDock.png new file mode 100644 index 000000000..32be69927 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_EmitterDock.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_GML_To_Clipboard.png b/Manual/contents/assets/Images/Icons/Icon_GML_To_Clipboard.png new file mode 100644 index 000000000..fcdf35c98 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_GML_To_Clipboard.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_Link_Unlink_Emitter.png b/Manual/contents/assets/Images/Icons/Icon_Link_Unlink_Emitter.png new file mode 100644 index 000000000..861e22087 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_Link_Unlink_Emitter.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_Link_Unlink_Highlighted.png b/Manual/contents/assets/Images/Icons/Icon_Link_Unlink_Highlighted.png new file mode 100644 index 000000000..f5a73977a Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_Link_Unlink_Highlighted.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_ParticleSystem.png b/Manual/contents/assets/Images/Icons/Icon_ParticleSystem.png new file mode 100644 index 000000000..81545e6d4 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_ParticleSystem.png differ diff --git a/Manual/contents/assets/Images/Icons/Icon_ParticleSystem_SavePreset.png b/Manual/contents/assets/Images/Icons/Icon_ParticleSystem_SavePreset.png new file mode 100644 index 000000000..f190933e4 Binary files /dev/null and b/Manual/contents/assets/Images/Icons/Icon_ParticleSystem_SavePreset.png differ diff --git a/Manual/contents/assets/Images/Introduction/QS_GX.Games_Compile_Options.png b/Manual/contents/assets/Images/Introduction/QS_GX.Games_Compile_Options.png new file mode 100644 index 000000000..acc0a77e2 Binary files /dev/null and b/Manual/contents/assets/Images/Introduction/QS_GX.Games_Compile_Options.png differ diff --git a/Manual/contents/assets/Images/QS_Guide/QS_SignIn.png b/Manual/contents/assets/Images/QS_Guide/QS_SignIn.png new file mode 100644 index 000000000..c44cbce55 Binary files /dev/null and b/Manual/contents/assets/Images/QS_Guide/QS_SignIn.png differ diff --git a/Manual/contents/assets/Images/QS_Guide/QS_sigin_legacy.png b/Manual/contents/assets/Images/QS_Guide/QS_sigin_legacy.png new file mode 100644 index 000000000..9d90b9aa3 Binary files /dev/null and b/Manual/contents/assets/Images/QS_Guide/QS_sigin_legacy.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Additional_Information/GM_Macros_Example.png b/Manual/contents/assets/Images/Scripting_Reference/Additional_Information/GM_Macros_Example.png new file mode 100644 index 000000000..a6c3af2f8 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Additional_Information/GM_Macros_Example.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_End.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_End.png new file mode 100644 index 000000000..f9b7658b6 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_End.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_Start.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_Start.png new file mode 100644 index 000000000..bb91030d0 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_Start.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_State.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_State.png new file mode 100644 index 000000000..5086c1edb Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Get_Audio_Loop_State.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_End.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_End.png new file mode 100644 index 000000000..2552797b0 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_End.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_Start.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_Start.png new file mode 100644 index 000000000..22a0ccad3 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_Start.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_State.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_State.png new file mode 100644 index 000000000..f61583f43 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/a_Audio_Set_Audio_Loop_State.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/e_Audio_Loop_Getters.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/e_Audio_Loop_Getters.png new file mode 100644 index 000000000..53cb00130 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/e_Audio_Loop_Getters.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/e_Audio_Loop_Setters.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/e_Audio_Loop_Setters.png new file mode 100644 index 000000000..b4c926024 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/e_Audio_Loop_Setters.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_End.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_End.png new file mode 100644 index 000000000..666a15769 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_End.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_Start.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_Start.png new file mode 100644 index 000000000..a50b7b0ef Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_Start.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_State.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_State.png new file mode 100644 index 000000000..a31325fba Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Get_Audio_Loop_State.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_End.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_End.png new file mode 100644 index 000000000..ac19c8b12 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_End.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_Start.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_Start.png new file mode 100644 index 000000000..a24c5a5fc Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_Start.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_State.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_State.png new file mode 100644 index 000000000..9afab35f9 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Audio/i_Audio_Set_Audio_Loop_State.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/a_Movement_Add_Motion.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/a_Movement_Add_Motion.png new file mode 100644 index 000000000..9e6a28b0d Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/a_Movement_Add_Motion.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/a_Movement_MovingClyde.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/a_Movement_MovingClyde.png new file mode 100644 index 000000000..55e8bcc2b Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/a_Movement_MovingClyde.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/e_Movement_Add_Motion.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/e_Movement_Add_Motion.png new file mode 100644 index 000000000..b40084a5b Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/e_Movement_Add_Motion.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/e_Movement_MovingClyde.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/e_Movement_MovingClyde.png new file mode 100644 index 000000000..eddad71b3 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/e_Movement_MovingClyde.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/i_Movement_Add_Motion.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/i_Movement_Add_Motion.png new file mode 100644 index 000000000..8a15af73f Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/i_Movement_Add_Motion.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/i_Movement_MovingClyde.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/i_Movement_MovingClyde.png new file mode 100644 index 000000000..7a62c8f03 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Movement/i_Movement_MovingClyde.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Get_Player_Prefs.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Get_Player_Prefs.png new file mode 100644 index 000000000..c9eb8d7f4 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Get_Player_Prefs.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Set_Player_Prefs.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Set_Player_Prefs.png new file mode 100644 index 000000000..4b7eab29d Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Set_Player_Prefs.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Use_Player_Prefs.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Use_Player_Prefs.png new file mode 100644 index 000000000..faf4581f0 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Action_Use_Player_Prefs.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Get_Player_Prefs.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Get_Player_Prefs.png new file mode 100644 index 000000000..4cfb513c4 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Get_Player_Prefs.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Set_Player_Prefs.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Set_Player_Prefs.png new file mode 100644 index 000000000..8b0e1a5a2 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Set_Player_Prefs.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Use_Player_Prefs.png b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Use_Player_Prefs.png new file mode 100644 index 000000000..9d86458d0 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/Example_Use_Player_Prefs.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_GetPlayerPrfs.jpg b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_GetPlayerPrfs.jpg new file mode 100644 index 000000000..294fd867a Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_GetPlayerPrfs.jpg differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_SetPlayerPrefs.jpg b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_SetPlayerPrefs.jpg new file mode 100644 index 000000000..434604723 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_SetPlayerPrefs.jpg differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_UsePlayerPrefs.jpg b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_UsePlayerPrefs.jpg new file mode 100644 index 000000000..877f06774 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/Drag_And_Drop/Reference/Rollback/i_UsePlayerPrefs.jpg differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Arrays/Array_Functions_Offset_Length.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Arrays/Array_Functions_Offset_Length.png new file mode 100644 index 000000000..9b067b12a Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Arrays/Array_Functions_Offset_Length.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Arrays/Array_Functions_Offset_Length2.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Arrays/Array_Functions_Offset_Length2.png new file mode 100644 index 000000000..51d0aec3e Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Arrays/Array_Functions_Offset_Length2.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioEQExample.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioEQExample.png new file mode 100644 index 000000000..7093d6f5c Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioEQExample.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.InvSawtooth.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.InvSawtooth.png new file mode 100644 index 000000000..199b31c34 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.InvSawtooth.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Sawtooth.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Sawtooth.png new file mode 100644 index 000000000..87a94f399 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Sawtooth.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Sine.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Sine.png new file mode 100644 index 000000000..e192629f9 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Sine.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Square.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Square.png new file mode 100644 index 000000000..6ea7fb19c Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Square.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Triangle.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Triangle.png new file mode 100644 index 000000000..5234f6274 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/AudioLFOType.Triangle.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/Audio_Asset_Gain_IDE.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/Audio_Asset_Gain_IDE.png new file mode 100644 index 000000000..c52849fb1 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/Audio_Asset_Gain_IDE.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/Audio_Overview.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/Audio_Overview.png new file mode 100644 index 000000000..abbb05ba7 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/Audio_Overview.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/audio_overview2.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/audio_overview2.png new file mode 100644 index 000000000..dcc36c57c Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Audio/audio_overview2.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_copy_stride_schematic.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_copy_stride_schematic.png new file mode 100644 index 000000000..e9f62fdba Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_copy_stride_schematic.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_copy_stride_stride.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_copy_stride_stride.png new file mode 100644 index 000000000..0afc67234 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_copy_stride_stride.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_transfer_overview.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_transfer_overview.png new file mode 100644 index 000000000..01280e099 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Buffers/buffer_transfer_overview.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_1.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_1.png new file mode 100644 index 000000000..f3ad3373c Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_1.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_audio.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_audio.png new file mode 100644 index 000000000..2416e0c65 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_audio.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_bar.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_bar.png new file mode 100644 index 000000000..430dd08f5 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_bar.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_colour_control.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_colour_control.png new file mode 100644 index 000000000..8b2d55d87 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_colour_control.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_console.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_console.png new file mode 100644 index 000000000..4fe9eca25 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_console.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_console_autocomplete.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_console_autocomplete.png new file mode 100644 index 000000000..f9bb2820e Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_console_autocomplete.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_custom_debug_view.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_custom_debug_view.png new file mode 100644 index 000000000..7a0960037 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_custom_debug_view.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_custom_views.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_custom_views.png new file mode 100644 index 000000000..f0fe61909 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_custom_views.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_fps.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_fps.png new file mode 100644 index 000000000..1124fdc9b Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_fps.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_graph_1.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_graph_1.png new file mode 100644 index 000000000..6d075fff4 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_graph_1.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_graph_2.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_graph_2.png new file mode 100644 index 000000000..d98329d07 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Debug/debug_overlay_graph_2.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/particles_newtoold.gif b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/particles_newtoold.gif new file mode 100644 index 000000000..766edcccc Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/particles_newtoold.gif differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/particles_oldtonew.gif b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/particles_oldtonew.gif new file mode 100644 index 000000000..a09c98575 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/particles_oldtonew.gif differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x1_nosdf.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x1_nosdf.png new file mode 100644 index 000000000..ef44135de Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x1_nosdf.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x1_sdf.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x1_sdf.png new file mode 100644 index 000000000..ef44135de Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x1_sdf.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x4_nosdf.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x4_nosdf.png new file mode 100644 index 000000000..aa405d517 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x4_nosdf.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x4_sdf.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x4_sdf.png new file mode 100644 index 000000000..e2b13f6c8 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Drawing/text_render_x4_sdf.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Fonts/font_effects.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Fonts/font_effects.png new file mode 100644 index 000000000..94c639c76 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Fonts/font_effects.png differ diff --git a/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Fonts/font_multi_effects.png b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Fonts/font_multi_effects.png new file mode 100644 index 000000000..fc9509af9 Binary files /dev/null and b/Manual/contents/assets/Images/Scripting_Reference/GML/Reference/Fonts/font_multi_effects.png differ diff --git a/Manual/contents/assets/Images/Settings/Game_Options/Opera_GX_Mod_Options.png b/Manual/contents/assets/Images/Settings/Game_Options/Opera_GX_Mod_Options.png new file mode 100644 index 000000000..b896c8314 Binary files /dev/null and b/Manual/contents/assets/Images/Settings/Game_Options/Opera_GX_Mod_Options.png differ diff --git a/Manual/contents/assets/Images/Settings/Included_Files_RMBMenu.png b/Manual/contents/assets/Images/Settings/Included_Files_RMBMenu.png new file mode 100644 index 000000000..952d23df7 Binary files /dev/null and b/Manual/contents/assets/Images/Settings/Included_Files_RMBMenu.png differ diff --git a/Manual/contents/assets/Images/Settings/Texture_Groups_Debug_Info.png b/Manual/contents/assets/Images/Settings/Texture_Groups_Debug_Info.png new file mode 100644 index 000000000..748287966 Binary files /dev/null and b/Manual/contents/assets/Images/Settings/Texture_Groups_Debug_Info.png differ diff --git a/Manual/contents/assets/Images/Settings/Texture_Groups_Dynamic_Option.png b/Manual/contents/assets/Images/Settings/Texture_Groups_Dynamic_Option.png new file mode 100644 index 000000000..6ac230920 Binary files /dev/null and b/Manual/contents/assets/Images/Settings/Texture_Groups_Dynamic_Option.png differ diff --git a/Manual/contents/assets/Images/Settings/Texture_Groups_Fallbacktexture.png b/Manual/contents/assets/Images/Settings/Texture_Groups_Fallbacktexture.png new file mode 100644 index 000000000..6450c45b1 Binary files /dev/null and b/Manual/contents/assets/Images/Settings/Texture_Groups_Fallbacktexture.png differ diff --git a/Manual/contents/assets/Images/Settings/Texture_Groups_Path_Field.png b/Manual/contents/assets/Images/Settings/Texture_Groups_Path_Field.png new file mode 100644 index 000000000..89643adc1 Binary files /dev/null and b/Manual/contents/assets/Images/Settings/Texture_Groups_Path_Field.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Platform_Preferences/GX_Games_Prefs.png b/Manual/contents/assets/Images/Setup_And_Version/Platform_Preferences/GX_Games_Prefs.png new file mode 100644 index 000000000..2b9848cd0 Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Platform_Preferences/GX_Games_Prefs.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Feather/FeatherPrefs_Base.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Feather/FeatherPrefs_Base.png index f8021572a..c9d8a3de8 100644 Binary files a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Feather/FeatherPrefs_Base.png and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Feather/FeatherPrefs_Base.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/General_GXGamesEnvironments.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/General_GXGamesEnvironments.png new file mode 100644 index 000000000..45a1e7f0b Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/General_GXGamesEnvironments.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Install_Incomplete.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Install_Incomplete.png new file mode 100644 index 000000000..1eb1ffb5d Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Install_Incomplete.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Not_Installed.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Not_Installed.png new file mode 100644 index 000000000..96a78d6f6 Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Not_Installed.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Not_Installed_YYC.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Not_Installed_YYC.png new file mode 100644 index 000000000..684694370 Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Module_Not_Installed_YYC.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_All_Windows.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_All_Windows.png new file mode 100644 index 000000000..172ae368d Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_All_Windows.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Default_Windows.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Default_Windows.png new file mode 100644 index 000000000..6eaf95b17 Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Default_Windows.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Modify.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Modify.png new file mode 100644 index 000000000..72c6f4a1a Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Modify.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Required_Only_Windows.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Required_Only_Windows.png new file mode 100644 index 000000000..510086e76 Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Modules_Required_Only_Windows.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Prefs_DNS_alternative.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Prefs_DNS_alternative.png new file mode 100644 index 000000000..c35783a62 Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Prefs_DNS_alternative.png differ diff --git a/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Prefs_DNS_test_failed.png b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Prefs_DNS_test_failed.png new file mode 100644 index 000000000..688b59dea Binary files /dev/null and b/Manual/contents/assets/Images/Setup_And_Version/Preferences/Runtime_Prefs_DNS_test_failed.png differ diff --git a/Manual/contents/assets/Videos/Runner/part_system_global_space_disabled.mp4 b/Manual/contents/assets/Videos/Runner/part_system_global_space_disabled.mp4 new file mode 100644 index 000000000..238fc0355 Binary files /dev/null and b/Manual/contents/assets/Videos/Runner/part_system_global_space_disabled.mp4 differ diff --git a/Manual/contents/assets/Videos/Runner/part_system_global_space_enabled.mp4 b/Manual/contents/assets/Videos/Runner/part_system_global_space_enabled.mp4 new file mode 100644 index 000000000..7c4b3aad8 Binary files /dev/null and b/Manual/contents/assets/Videos/Runner/part_system_global_space_enabled.mp4 differ diff --git a/Manual/contents/assets/Videos/Runner/texture_loading_unloading.mp4 b/Manual/contents/assets/Videos/Runner/texture_loading_unloading.mp4 new file mode 100644 index 000000000..14b9a1b21 Binary files /dev/null and b/Manual/contents/assets/Videos/Runner/texture_loading_unloading.mp4 differ diff --git a/Manual/contents/assets/css/CSS_Images/bug-report-final.png b/Manual/contents/assets/css/CSS_Images/bug-report-final.png new file mode 100644 index 000000000..1165223c0 Binary files /dev/null and b/Manual/contents/assets/css/CSS_Images/bug-report-final.png differ diff --git a/Manual/contents/assets/css/CSS_Images/bug-report-final.svg b/Manual/contents/assets/css/CSS_Images/bug-report-final.svg new file mode 100644 index 000000000..d9af18f90 --- /dev/null +++ b/Manual/contents/assets/css/CSS_Images/bug-report-final.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/Manual/contents/assets/scripts/gml.js b/Manual/contents/assets/scripts/gml.js index 491433502..9d43649a4 100644 --- a/Manual/contents/assets/scripts/gml.js +++ b/Manual/contents/assets/scripts/gml.js @@ -243,6 +243,7 @@ export default function(hljs) { "buffer_base64_decode_ext", "buffer_base64_encode", "buffer_copy", + "buffer_copy_stride", "buffer_copy_from_vertex_buffer", "buffer_create", "buffer_create_from_vertex_buffer", diff --git a/Manual/contents/assets/snippets/Asset_Type_Constants.hts b/Manual/contents/assets/snippets/Asset_Type_Constants.hts new file mode 100644 index 000000000..446850ed3 --- /dev/null +++ b/Manual/contents/assets/snippets/Asset_Type_Constants.hts @@ -0,0 +1,78 @@ + + + + + + + + Asset_Type_Constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Asset Type Constant
    ConstantDescription
    asset_objectThe given name refers to an object.
    asset_spriteThe given name refers to a sprite.
    asset_soundThe given name refers to a sound.
    asset_roomThe given name refers to a room.
    asset_tilesThe given name refers to a tile set.
    asset_pathThe given name refers to a path.
    asset_scriptThe given name refers to a script.
    asset_fontThe given name refers to a font.
    asset_timelineThe given name refers to a time line.
    asset_shaderThe given name refers to a shader.
    asset_animationcurveThe given name refers to an Animation Curve.
    asset_sequenceThe given name refers to a Sequence.
    asset_particlesystemThe given name refers to a Particle System.
    asset_unknownThe given name refers to an asset that either does not exist, or is not one of the above listed.
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Collision_instance_return_desc.hts b/Manual/contents/assets/snippets/Collision_instance_return_desc.hts new file mode 100644 index 000000000..c99238dfb --- /dev/null +++ b/Manual/contents/assets/snippets/Collision_instance_return_desc.hts @@ -0,0 +1,9 @@ + + + + + + + Collision_instance_return_desc + +

    This function will return the unique id of the instance being collided with, or the Tile Map Element ID of the tile map found. If no collisions are found, noone is returned.

    \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Collisions_function_accepted_arguments.hts b/Manual/contents/assets/snippets/Collisions_function_accepted_arguments.hts new file mode 100644 index 000000000..49f4a9ca5 --- /dev/null +++ b/Manual/contents/assets/snippets/Collisions_function_accepted_arguments.hts @@ -0,0 +1,20 @@ + + + + + + + + Collisions_function_accepted_arguments + + + +

    In addition to objects and instances, the function also accepts:

    +
      +
    • The special keywords all and other
    • +
    • Tile Map Element ID
    • +
    • An array containing a combination of objects, instances, Tile Maps and the keywords all/other
    • +
    +

    Passing an array allows you to check for collisions against multiple objects and/or Tile Maps in one call.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Custom_templates_note.hts b/Manual/contents/assets/snippets/Custom_templates_note.hts new file mode 100644 index 000000000..eaf69b4b3 --- /dev/null +++ b/Manual/contents/assets/snippets/Custom_templates_note.hts @@ -0,0 +1,9 @@ + + + + + + + Custom_templates_note + +

    Any templates you create will be tied to the account you are logged in with. If you later log in through a different account, you won't be able to access the same custom templates.

    \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Example_Audio_Loop_Getters.hts b/Manual/contents/assets/snippets/Example_Audio_Loop_Getters.hts new file mode 100644 index 000000000..cec1e37f3 --- /dev/null +++ b/Manual/contents/assets/snippets/Example_Audio_Loop_Getters.hts @@ -0,0 +1,19 @@ + + + + + + + + Example_Audio_Loop_Getters + + + +

    Set Audio Pitch ActionThe above action block code first checks if the Space key (vk_space) is pressed. If it is, and no instance of the existing sound asset snd_Loop is playing yet, it is played using the Play Audio action. It is played looped (Loop checked) and the sound instance's ID is stored in an instance variable ins_snd_loop.

    +

    Next all properties of the playing sound related to audio looping are stored in instance variables: looping, loop_start and loop_end.

    +

    Finally the Show Debug Message action is used to output the values of each of these variables. If loop start and end of the sound asset haven't been changed, it will output: 

    +

    1
    + 0
    + 0

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Example_Audio_Loop_Setters.hts b/Manual/contents/assets/snippets/Example_Audio_Loop_Setters.hts new file mode 100644 index 000000000..924390d62 --- /dev/null +++ b/Manual/contents/assets/snippets/Example_Audio_Loop_Setters.hts @@ -0,0 +1,16 @@ + + + + + + + + Example_Audio_Loop_Setters + + + +

    Set Audio Loop Start ExampleThe above action block code plays a sound looped upon first pressing the Space key (vk_space) and turns off looping of the sound the second time the key is pressed. If the sound reaches the end of the track, another press of the Space key plays another instance of the snd_Loop Sound Asset looped.

    +

    The first action block checks for a key press of the Space key. The next block checks if any instances of the sound asset snd_Loop are playing. If not (indicated by the Not checkbox checked), the loop start and end position (Offset) are first set for the snd_Loop asset. The loop start offset is set to 3 seconds, the end offset to 8 seconds. A new instance of the sound is then played looped (Loop checked) using the Play Audio action and its ID stored in an instance variable ins_snd_loop (Target) of the calling instance.

    +

    When Space is pressed again, the If Audio Is Playing block returns true and the part under the Else block is executed. Set Audio Loop State turns off looping for the playing sound ins_snd_loop so it will continue playing to the end when it reaches the loop end position.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Example_Mouse_Lock.hts b/Manual/contents/assets/snippets/Example_Mouse_Lock.hts new file mode 100644 index 000000000..ee61d675e --- /dev/null +++ b/Manual/contents/assets/snippets/Example_Mouse_Lock.hts @@ -0,0 +1,25 @@ + + + + + + + Example_Mouse_Lock + + + +

     Step Event

    +

    if (window_mouse_get_locked())
    + {
    +     x += window_mouse_get_delta_x();
    +     y += window_mouse_get_delta_y();
    + }

    +

    Global Left Pressed Event

    +

    window_mouse_set_locked(true);

    +

    Global Left Released Event

    +

    window_mouse_set_locked(false);

    +

    The above code adds the change in mouse position to the instance's position while the left mouse button is held down.

    +

    In the Global Left Pressed and Global Left Released events, the mouse is set to locked and unlocked respectively, using window_mouse_set_locked.

    +

    In the Step event, the locked state of the mouse is checked using window_mouse_get_locked. If it is locked, the delta x (window_mouse_get_delta_x) and y (window_mouse_get_delta_y) are added to the instance's x and y.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Example_Particle_Emitter_Delay_Interval.hts b/Manual/contents/assets/snippets/Example_Particle_Emitter_Delay_Interval.hts new file mode 100644 index 000000000..60be518df --- /dev/null +++ b/Manual/contents/assets/snippets/Example_Particle_Emitter_Delay_Interval.hts @@ -0,0 +1,34 @@ + + + + + + + + Example_Particle_Emitter_Delay_Interval + + + +

    Create Event

    +

    ps = part_system_create();
    + part_system_position(ps, x, y);
    +
    +
    + pe = part_emitter_create(ps);
    + part_emitter_region(ps, pe, 100, 200, 100, 200, ps_shape_ellipse, ps_distr_linear);
    + part_emitter_delay(ps, pe, 1, 1, time_source_units_seconds);
    + part_emitter_interval(ps, pe, 0.4, 1.1, time_source_units_seconds);
    +
    + pt = part_type_create();
    +
    + part_emitter_stream(ps, pe, pt, 20); +

    +

    Cleanup Event

    +

    part_emitter_destroy(pe);
    + part_system_destroy(ps);
    + part_type_destroy(pt);

    +

    The code above sets up a particle system ps with a single emitter pe in the Create event. The emitter is configured to emit particles in a circle shape of 100x100 pixels and to wait for 1 second to start streaming (using part_emitter_delay) after being "turned on" with part_emitter_stream. Using part_emitter_interval it is configured to keep emitting particles every 0.4 to 1.1 seconds (i.e. the interval between two "bursts" in stream mode is at least 0.4 seconds and at most 1.1 seconds.

    +

    A new particle type pt is then created and the emitter set to create 20 of them at a time using part_emitter_stream.

    +

    Finally, since they're dynamic resources, the particle emitter, the system and the type are all destroyed in the Cleanup event.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Example_wallpaper_set_subscriptions.hts b/Manual/contents/assets/snippets/Example_wallpaper_set_subscriptions.hts new file mode 100644 index 000000000..8a44dc48b --- /dev/null +++ b/Manual/contents/assets/snippets/Example_wallpaper_set_subscriptions.hts @@ -0,0 +1,48 @@ + + + + + + + + Example_wallpaper_set_subscriptions + + + +

    // Create Event
    + wallpaper_set_subscriptions(["desktop_mouse", "cpu"]);
    +
    +
    + // Wallpaper Subscription Data Event
    + var _info = wallpaper_subscription_data;
    + var _cpus = _info.cpu.devices;
    +
    + file = file_text_open_append("sysinfo.txt");
    + file_text_writeln(file);
    + file_text_write_string(file, string(date_current_datetime()));
    + file_text_write_string(file, $"\nCPU count: {_info.cpu.num_devices}");
    +
    + array_foreach(_cpus, function(_cpu, _num)
    + {
    +     if (!struct_exists(_cpu, "usage_pct")) return;
    +     var _str = $"\nCPU {_num} load: {_cpu.usage_pct}%";
    +     file_text_write_string(file, _str);
    + });
    +
    + file_text_close(file); +

    +

    The first line, run in the Create event, enables mouse input and subscribes to CPU metrics.

    +

    In the Wallpaper Subscription Data event, it gets the devices array for the CPU, and opens a text file to write metrics to.

    +

    In that file, it writes the current datetime, CPU count, and then proceeds to write the load percentage of each CPU device in the array.

    +

    This code generates the following text in the sysinfo.txt file, found in the working directory:

    +

    45245.33
    + CPU count: 1
    + CPU 0 load: 3%
    + 45245.33
    + CPU count: 1
    + CPU 0 load: 3%
    + 45245.33
    + CPU count: 1
    + CPU 0 load: 3%

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/FX_Limitations.hts b/Manual/contents/assets/snippets/FX_Limitations.hts new file mode 100644 index 000000000..b1687dbc7 --- /dev/null +++ b/Manual/contents/assets/snippets/FX_Limitations.hts @@ -0,0 +1,19 @@ + + + + + + + + FX_Limitations + + + +

    Limitations

    +

    There are some limitations to keep in mind when using filters/effects:

    +
      +
    • Filters/effects will not work when the application surface is disabled. It's enabled by default, and you shouldn't usually require disabling it, however you may do so to gain performance on mobile devices. In such cases you wouldn't be able to use filters/effects as they require the surface texture for shader manipulations.
    • +
    • Filters/effects that take a texture image, require that image to be on a separate texture page. You can set this through the sprite editor.
    • +
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/HTML5_Not_Available.hts b/Manual/contents/assets/snippets/HTML5_Not_Available.hts new file mode 100644 index 000000000..1cdf7fea1 --- /dev/null +++ b/Manual/contents/assets/snippets/HTML5_Not_Available.hts @@ -0,0 +1,13 @@ + + + + + + + Note_Not_Available_On_HTML5 + + + +

     This functionality is not available for the HTML5 target platform.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/How_Textures_Work.hts b/Manual/contents/assets/snippets/How_Textures_Work.hts new file mode 100644 index 000000000..5e67d8e88 --- /dev/null +++ b/Manual/contents/assets/snippets/How_Textures_Work.hts @@ -0,0 +1,18 @@ + + + + + + + + How_Textures_Work + + + +

    A Texture Group is loaded into RAM when the game starts, unless it's a Dynamic Texture Group, which is loaded later.

    +

    While in the RAM, the Texture Group stays compressed, as it was on disk.

    +

    When an image from a Texture Group is drawn, or one of the pre-fetch functions is run, then the Texture Group is decompressed and loaded into VRAM (video memory).

    +

     Texture decompression is asynchronous on all platforms except GX.games, which might cause stutters as textures are decompressed in-game. To avoid this, ensure your textures are prefetched during loading screens or another inactive parts of your game.

    +

    You can flush a Texture Group to remove it from VRAM (this doesn't remove them from RAM).

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Mouse_Coordinates_Update_Frequency.hts b/Manual/contents/assets/snippets/Mouse_Coordinates_Update_Frequency.hts new file mode 100644 index 000000000..7ed99ed71 --- /dev/null +++ b/Manual/contents/assets/snippets/Mouse_Coordinates_Update_Frequency.hts @@ -0,0 +1,16 @@ + + + + + + + + Mouse_Coordinates_Update_Frequency + + + +

    Mouse coordinates are updated every frame, however some platforms (such as macOS) use an event handler for capturing mouse position.

    +

    This means there may be frames where the mouse moved, but its position remained unchanged -- which would mean that there was no mouse event between the current and previous frame.

    +

    Due to this, you may encounter frames where the mouse coordinates are the same as the previous frame, depending on the platform.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Networking_dont_mix_raw_reg.hts b/Manual/contents/assets/snippets/Networking_dont_mix_raw_reg.hts new file mode 100644 index 000000000..3d59ff466 --- /dev/null +++ b/Manual/contents/assets/snippets/Networking_dont_mix_raw_reg.hts @@ -0,0 +1,9 @@ + + + + + + + Networking_dont_mix_raw_reg + +

    You must not mix the use of regular and raw functions in your game, as doing so will cause issues. This means for a connection made with network_connect, you must use network_send_packet, and for network_connect_raw, use network_send_raw.

    \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Action_Only_For_Draw_Events.hts b/Manual/contents/assets/snippets/Note_Action_Only_For_Draw_Events.hts new file mode 100644 index 000000000..7e82f3bd4 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Action_Only_For_Draw_Events.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Action_Only_For_Draw_Events + + + +

     This action is only for use in the various Draw Events, and will not draw anything if used elsewhere.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Buffer_Copy_NoSame.hts b/Manual/contents/assets/snippets/Note_Buffer_Copy_NoSame.hts new file mode 100644 index 000000000..eed3addbb --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Buffer_Copy_NoSame.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Buffer_Copy_NoSame + + + +

     You cannot copy to the same buffer.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Buffer_Delete_Dynamic.hts b/Manual/contents/assets/snippets/Note_Buffer_Delete_Dynamic.hts new file mode 100644 index 000000000..8ba7a9d48 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Buffer_Delete_Dynamic.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Buffer_Delete_Dynamic + + + +

     It's important that you remove any dynamically created resources like this from memory when you no longer need them to prevent memory leaks, so when you are finished with the buffer that you have created you should free it up again using buffer_delete.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Call_From_Instance_Scope.hts b/Manual/contents/assets/snippets/Note_Call_From_Instance_Scope.hts new file mode 100644 index 000000000..88cd6cadb --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Call_From_Instance_Scope.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Warning_Call_Function_From_Instance_Scope + + + +

     This function should be called from the scope of an instance. An error will be thrown if it's not.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_DS_Destroy_When_No_Longer_Needed.hts b/Manual/contents/assets/snippets/Note_DS_Destroy_When_No_Longer_Needed.hts new file mode 100644 index 000000000..71aaa40b6 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_DS_Destroy_When_No_Longer_Needed.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_DS_Destroy_When_No_Longer_Needed + + + +

     As with all dynamic resources, data structures take up memory and so should always be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_DS_Use_ds_exists_To_Check_For_Existence.hts b/Manual/contents/assets/snippets/Note_DS_Use_ds_exists_To_Check_For_Existence.hts new file mode 100644 index 000000000..f9219cf53 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_DS_Use_ds_exists_To_Check_For_Existence.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_DS_Use_ds_exists_To_Check_For_Existence + + + +

     If you need to check if a data structure exists, you can use the ds_exists function.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_DS_Write_Output_Is_Not_Human_Readable.hts b/Manual/contents/assets/snippets/Note_DS_Write_Output_Is_Not_Human_Readable.hts new file mode 100644 index 000000000..790fe9123 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_DS_Write_Output_Is_Not_Human_Readable.hts @@ -0,0 +1,13 @@ + + + + + + + Note_DS_Write_Output_Is_Not_Human_Readable + + + +

     The returned string is not a human readable string, but rather a dump of the contents of the data structure.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Deactivate_On_Room_Start_Create_Event.hts b/Manual/contents/assets/snippets/Note_Deactivate_On_Room_Start_Create_Event.hts new file mode 100644 index 000000000..d7007cddb --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Deactivate_On_Room_Start_Create_Event.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Deactivate_On_Room_Start_Create_Event + + + +

     If you deactivate an instance on room start (i.e. from the Room Creation Code, or from an instance Create event of an instance within the room) all instances that are placed within the room from The Room Editor will still run their Create event before being deactivated.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Debug_Control_Single_Column.hts b/Manual/contents/assets/snippets/Note_Debug_Control_Single_Column.hts new file mode 100644 index 000000000..9191ca8ce --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Debug_Control_Single_Column.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Debug_Control_Single_Column + + + +

     This control takes up a single column and can be shown on the same line with another single-column control using dbg_same_line.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Debug_Control_Two_Columns.hts b/Manual/contents/assets/snippets/Note_Debug_Control_Two_Columns.hts new file mode 100644 index 000000000..c54d316bb --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Debug_Control_Two_Columns.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Debug_Control_Two_Columns + + + +

     This debug control spans two columns.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_File_Handling_Limitations.hts b/Manual/contents/assets/snippets/Note_File_Handling_Limitations.hts new file mode 100644 index 000000000..066a6af6b --- /dev/null +++ b/Manual/contents/assets/snippets/Note_File_Handling_Limitations.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_File_Handling_Limitations + + + +

     Depending on the target platform that is chosen you are limited as to where you can save and load files from. See The File System for more information.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Function_Triggers_Audio_Playback_Ended.hts b/Manual/contents/assets/snippets/Note_Function_Triggers_Audio_Playback_Ended.hts new file mode 100644 index 000000000..825e9d3ed --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Function_Triggers_Audio_Playback_Ended.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Function_Triggers_Audio_Playback_Ended + + + +

     This function triggers an Audio Playback Ended Async Event for every sound instance that is affected by it.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_GIF_Save_Closes_Handle.hts b/Manual/contents/assets/snippets/Note_GIF_Save_Closes_Handle.hts new file mode 100644 index 000000000..4a572012c --- /dev/null +++ b/Manual/contents/assets/snippets/Note_GIF_Save_Closes_Handle.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_GIF_Save_Closes_Handle + + + +

     This function closes the handle to the GIF image. This means that after saving you cannot use this GIF ID again and you'll need to open a new GIF using gif_open.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_GM_Managed_Structs.hts b/Manual/contents/assets/snippets/Note_GM_Managed_Structs.hts new file mode 100644 index 000000000..a238b8c4d --- /dev/null +++ b/Manual/contents/assets/snippets/Note_GM_Managed_Structs.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_GM_Managed_Structs + + + +

     This is a built-in struct, and as such GameMaker has more control over its contents. This means access to its members is limited and some values may change automatically if invalid values were assigned. You may also have to create and destroy this struct through built-in functions provided by GameMaker instead of the new and delete operators.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Gain_Linear_dB.hts b/Manual/contents/assets/snippets/Note_Gain_Linear_dB.hts new file mode 100644 index 000000000..166a51b2c --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Gain_Linear_dB.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Gain_Linear_dB + + + +

     Use db_to_lin and lin_to_db to convert back and forth between linear gains and gains expressed in decibels (dB).

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_HTML5_Only.hts b/Manual/contents/assets/snippets/Note_HTML5_Only.hts new file mode 100644 index 000000000..19343eeef --- /dev/null +++ b/Manual/contents/assets/snippets/Note_HTML5_Only.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_HTML5_Only + + + +

     This function is for HTML5 only.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_HTML5_Web_Audio.hts b/Manual/contents/assets/snippets/Note_HTML5_Web_Audio.hts new file mode 100644 index 000000000..42f3ac971 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_HTML5_Web_Audio.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_HTML5_Web_Audio + + + +

    When using audio on the HTML5 target, you should be aware that not all browsers support Web Audio and so may not play any sound for your project when run. You can get a general idea of Web Audio support from the following link: Can I Use Web Audio?.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Important_Floating_Point_Precision.hts b/Manual/contents/assets/snippets/Note_Important_Floating_Point_Precision.hts new file mode 100644 index 000000000..50257dc18 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Important_Floating_Point_Precision.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Important_Floating_Point_Precision + + + +

     Due to floating point precision issues, checking to see if two values are exactly equal may return false, since one may be exactly 1, while the other may be 1.00000000000001. This can be avoided by using the Decimal To Integer action before checking or using the "greater than" or "less than" expressions.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Load_Save_Game_Legacy.hts b/Manual/contents/assets/snippets/Note_Load_Save_Game_Legacy.hts new file mode 100644 index 000000000..e292afa0e --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Load_Save_Game_Legacy.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Load_Save_Game_Legacy + + + +

     For a more comprehensive approach to loading and saving your game data, see the File Actions and Buffer Actions.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Networking_TCP_like.hts b/Manual/contents/assets/snippets/Note_Networking_TCP_like.hts new file mode 100644 index 000000000..e6e221c84 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Networking_TCP_like.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Networking_TCP_like + + + +

     This function uses a TCP-like socket (i.e. network_socket_tcp). It may work with other socket types as well, but this isn't guaranteed.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Networking_UDP_like.hts b/Manual/contents/assets/snippets/Note_Networking_UDP_like.hts new file mode 100644 index 000000000..8a26f5a18 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Networking_UDP_like.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Networking_UDP_like + + + +

     This function uses a UDP-like socket (i.e. network_socket_udp). It may work with other socket types as well, but this isn't guaranteed.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Particle_Property_Can_Be_Changed.hts b/Manual/contents/assets/snippets/Note_Particle_Property_Can_Be_Changed.hts new file mode 100644 index 000000000..6208af87b --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Particle_Property_Can_Be_Changed.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Particle_Property_Can_Be_Changed + + + +

     The *_incr and *_wiggle parameters of this particle type property affect existing particles of the given particle type.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Particle_Timer_Paused_For_Disabled_Emitter.hts b/Manual/contents/assets/snippets/Note_Particle_Timer_Paused_For_Disabled_Emitter.hts new file mode 100644 index 000000000..6b64c4872 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Particle_Timer_Paused_For_Disabled_Emitter.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Particle_Timer_Paused_For_Disabled_Emitter + + + +

     The countdown timer is paused when the emitter is disabled using part_emitter_enable.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Physics_Instance_Needs_To_Be_Reactivated.hts b/Manual/contents/assets/snippets/Note_Physics_Instance_Needs_To_Be_Reactivated.hts new file mode 100644 index 000000000..d203856f2 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Physics_Instance_Needs_To_Be_Reactivated.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Physics_Instance_Needs_To_Be_Reactivated + + + +

     To make the physics engine use the new value in all cases, you'll need to deactivate and reactivate the physics instance using phy_active. See Updating Existing Contacts.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Priority_queue_empty_return.hts b/Manual/contents/assets/snippets/Note_Priority_queue_empty_return.hts new file mode 100644 index 000000000..cb7410646 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Priority_queue_empty_return.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Priority_queue_empty_return + + + +

     If the priority queue is empty, this function will return undefined.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Regular_Mouse_Functions.hts b/Manual/contents/assets/snippets/Note_Regular_Mouse_Functions.hts new file mode 100644 index 000000000..953680c00 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Regular_Mouse_Functions.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Regular_Mouse_Functions + + + +

    For regular mouse functions see the section on Mouse Input.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Room_Order_Dynamically_Added.hts b/Manual/contents/assets/snippets/Note_Room_Order_Dynamically_Added.hts new file mode 100644 index 000000000..4e2a1ff26 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Room_Order_Dynamically_Added.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Room_Order_Dynamically_Added + + + +

     New rooms are not part of usual room ordering, so they do not have a "previous" or "next" room (meaning that the functions room_next and room_previous will not work). To jump from the added room to another, you must use the index of the room itself.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_See_Template_Strings.hts b/Manual/contents/assets/snippets/Note_See_Template_Strings.hts new file mode 100644 index 000000000..32578f14d --- /dev/null +++ b/Manual/contents/assets/snippets/Note_See_Template_Strings.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_See_Template_Strings + + + +

     You can also use Template Strings to insert variables and expressions into strings.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Selected_Layer_Must_Be_Tile_Map_Layer.hts b/Manual/contents/assets/snippets/Note_Selected_Layer_Must_Be_Tile_Map_Layer.hts new file mode 100644 index 000000000..0598c2bb2 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Selected_Layer_Must_Be_Tile_Map_Layer.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Selected_Layer_Must_Be_Tile_Map_Layer + + + +

     The layer selected must have been defined as a Tile Map Layer in The Room Editor, otherwise you may get errors.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Set_Uniforms_After_Shader_Set.hts b/Manual/contents/assets/snippets/Note_Set_Uniforms_After_Shader_Set.hts new file mode 100644 index 000000000..33bbfcc8e --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Set_Uniforms_After_Shader_Set.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Set_Uniforms_After_Shader_Set + + + +

     All uniforms must be set after calling the function shader_set and before calling shader_reset.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Shape_Shader_Attributes_Are_Different.hts b/Manual/contents/assets/snippets/Note_Shape_Shader_Attributes_Are_Different.hts new file mode 100644 index 000000000..cd8ed0d04 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Shape_Shader_Attributes_Are_Different.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Shape_Shader_Attributes_Are_Different + + + +

     If you want to draw a shape using a shader, you should be aware that most shaders expect the following inputs: vertex, texture, colour. However, when using this function, only vertex and colour data are being passed in, and so the shader may not draw anything (or draw something but not correctly). If you need to draw shapes in this way then the shader should be customised with this in mind.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Sound_Editor_Volume_Is_Asset_Gain.hts b/Manual/contents/assets/snippets/Note_Sound_Editor_Volume_Is_Asset_Gain.hts new file mode 100644 index 000000000..9742a4c49 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Sound_Editor_Volume_Is_Asset_Gain.hts @@ -0,0 +1,15 @@ + + + + + + + + Note_Sound_Editor_Volume_Is_Asset_Gain + + + +

    The default asset-level gain is the value of the "Volume" slider in The Sound Editor

    +

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Sprite_Prefetch_To_Avoid_Performance_Hit.hts b/Manual/contents/assets/snippets/Note_Sprite_Prefetch_To_Avoid_Performance_Hit.hts new file mode 100644 index 000000000..10acc6c6e --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Sprite_Prefetch_To_Avoid_Performance_Hit.hts @@ -0,0 +1,16 @@ + + + + + + + + Note_Sprite_Prefetch_To_Avoid_Performance_Hit + + + +

     There is a performance hit as the texture is uploaded to texture memory on most devices, so it's recommended that you call Note_Sprite_Prefetch_To_Avoid_Performance_Hit + on any required graphics at the start of a level to avoid any stalls. +

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_String_Indices_Start_At_1.hts b/Manual/contents/assets/snippets/Note_String_Indices_Start_At_1.hts new file mode 100644 index 000000000..cea228547 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_String_Indices_Start_At_1.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_String_Indices_Start_At_1 + + + +

     In GameMaker, string positions start at 1 (meaning they are one-based), compared to other data types in GameMaker, which are all zero-based (starting at 0). So the first character in a string has a position of 1, the second character a position of 2, and so on. The last character is string_length(string).

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Surface_Check_If_Exists.hts b/Manual/contents/assets/snippets/Note_Surface_Check_If_Exists.hts new file mode 100644 index 000000000..5d579abfb --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Surface_Check_If_Exists.hts @@ -0,0 +1,16 @@ + + + + + + + + Note_Surface_Check_If_Exists + + + +

     When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should ALWAYS check that a surface exists using surface_exists + before referencing them directly. +

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Surface_Function_Silently_Fails.hts b/Manual/contents/assets/snippets/Note_Surface_Function_Silently_Fails.hts new file mode 100644 index 000000000..8e11c5793 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Surface_Function_Silently_Fails.hts @@ -0,0 +1,13 @@ + + + + + + + Note_Surface_Function_Silently_Fails + + + +

     If you have not previously set a render target with the function surface_set_target, using this function will silently (i.e. without any error messages) end all further code execution for the event.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Tip_Map_Key_Can_Be_Any.hts b/Manual/contents/assets/snippets/Note_Tip_Map_Key_Can_Be_Any.hts new file mode 100644 index 000000000..e3287df70 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Tip_Map_Key_Can_Be_Any.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Tip_Map_Key_Can_Be_Any + + + +

     The key isn't limited to strings and can be of any type, including a struct.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Triggers_Audio_Playback_Event.hts b/Manual/contents/assets/snippets/Note_Triggers_Audio_Playback_Event.hts new file mode 100644 index 000000000..aa88e1d99 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Triggers_Audio_Playback_Event.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Triggers_Audio_Playback_Event + + + +

     An Audio Playback Ended event is triggered for the sound when it stops playing.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Unicode_missing_glyph_replacement.hts b/Manual/contents/assets/snippets/Note_Unicode_missing_glyph_replacement.hts new file mode 100644 index 000000000..7b2426ee9 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Unicode_missing_glyph_replacement.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Unicode_missing_glyph_replacement + + + +

     The Unicode character 9647 (▯) is used to substitute any missing glyphs that you may have in your designated font when rendering it in the draw event. So if your font doesn't have, for example, the ° symbol, then writing 90° will actually produce 90▯.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Use_Effect_Create_Layer_Depth_Functions.hts b/Manual/contents/assets/snippets/Note_Use_Effect_Create_Layer_Depth_Functions.hts new file mode 100644 index 000000000..51bd4e902 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Use_Effect_Create_Layer_Depth_Functions.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Use_Effect_Create_Layer_Depth_Functions + + + +

     This function is deprecated. To create a particle effect at any depth or layer, you can use effect_create_depth or effect_create_layer instead.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Warning_DS_MP_Grid_Sizes_Must_Match.hts b/Manual/contents/assets/snippets/Note_Warning_DS_MP_Grid_Sizes_Must_Match.hts new file mode 100644 index 000000000..463546a0f --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Warning_DS_MP_Grid_Sizes_Must_Match.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Warning_DS_MP_Grid_Sizes_Must_Match + + + +

     The DS grid and MP grid must have the same width and height. If the grids' dimensions don't match, the conversion will fail and an error "Error, grid sizes do not match" is thrown.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Warning_Deactivating_Physics_Instances.hts b/Manual/contents/assets/snippets/Note_Warning_Deactivating_Physics_Instances.hts new file mode 100644 index 000000000..c0748729f --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Warning_Deactivating_Physics_Instances.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Warning_Deactivating_Physics_Instances + + + +

     Deactivating instances that have physics enabled will NOT stop their fixtures from interacting within the physics simulation. For that you should set their phy_active variable to true or false as you activate/deactivate the instances.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Warning_GM_FileSystem_Sandboxed.hts b/Manual/contents/assets/snippets/Note_Warning_GM_FileSystem_Sandboxed.hts new file mode 100644 index 000000000..22394cd63 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Warning_GM_FileSystem_Sandboxed.hts @@ -0,0 +1,13 @@ + + + + + + + Note_Warning_GM_FileSystem_Sandboxed + + + +

     This function may not work as you expect due to GameMaker being sandboxed! Please see the section on The File System for more information.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Windows_MacOS_Linux_Only.hts b/Manual/contents/assets/snippets/Note_Windows_MacOS_Linux_Only.hts new file mode 100644 index 000000000..768c9e230 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Windows_MacOS_Linux_Only.hts @@ -0,0 +1,13 @@ + + + + + + + Note_Windows_MacOS_Linux_Only + + + +

     This function is only available on the Windows, macOS and Linux platforms.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_Windows_Only_Function.hts b/Manual/contents/assets/snippets/Note_Windows_Only_Function.hts new file mode 100644 index 000000000..fb4cbfb87 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_Windows_Only_Function.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Windows_Only_Function + + + +

     This function only works on Windows.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_display_result_not_reliable_before_draw.hts b/Manual/contents/assets/snippets/Note_display_result_not_reliable_before_draw.hts new file mode 100644 index 000000000..b9b55f10b --- /dev/null +++ b/Manual/contents/assets/snippets/Note_display_result_not_reliable_before_draw.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_display_result_not_reliable_before_draw + + + +

     When your application_surface is larger than the display's size (roughly), and you call this function before the current room's initialisation has finished, e.g. in a global script, a room's Creation Code or an instance's Create event, the value returned may not be accurate. For accurate results in such cases, call this in a Draw event.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_important_CocoaPods.hts b/Manual/contents/assets/snippets/Note_important_CocoaPods.hts new file mode 100644 index 000000000..13d02f1cb --- /dev/null +++ b/Manual/contents/assets/snippets/Note_important_CocoaPods.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_important_CocoaPods + + + +

     The CocoaPods checkbox can be found in GameMaker versions 2022.11 and higher. Older versions and LTS releases show two buttons instead; Podfile and Podfile.lock, to generate the respective files. Check the iOS and tvOS: Using Cocoa Pods guide for more information.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_layer_depth_range.hts b/Manual/contents/assets/snippets/Note_layer_depth_range.hts new file mode 100644 index 000000000..430be8d34 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_layer_depth_range.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_layer_depth_range + + + +

     There is a minimum and maximum layer depth of -16000 to 16000. Anything placed on a layer outside that range will not be drawn although all events will still run as normal for anything on the layer.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_randomise.hts b/Manual/contents/assets/snippets/Note_randomise.hts new file mode 100644 index 000000000..bef3eef38 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_randomise.hts @@ -0,0 +1,15 @@ + + + + + + + + Note_randomise + + + + +

     This function will return the same value every time the game is run afresh due to the fact that GameMaker generates the same initial random seed every time to make debugging code a far easier task. To avoid this behaviour use randomise at the start of your game.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_randomise_shuffle.hts b/Manual/contents/assets/snippets/Note_randomise_shuffle.hts new file mode 100644 index 000000000..3218c804b --- /dev/null +++ b/Manual/contents/assets/snippets/Note_randomise_shuffle.hts @@ -0,0 +1,15 @@ + + + + + + + + Note_randomise_shuffle + + + + +

     This function will shuffle the items to the same positions every time the game is run afresh due to the fact that GameMaker generates the same initial random seed every time to make debugging code a far easier task. To avoid this behaviour use randomise at the start of your game. This is only true when testing and debugging the game, as the final executable package will not show this behaviour and will be random every play.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_surface_only_rgba8unorm.hts b/Manual/contents/assets/snippets/Note_surface_only_rgba8unorm.hts new file mode 100644 index 000000000..47bca4078 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_surface_only_rgba8unorm.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_surface_only_rgba8unorm + + + +

     This function will only work with surfaces that use the surface_rgba8unorm (default) surface format.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_tip_use_nullish_with_accessors.hts b/Manual/contents/assets/snippets/Note_tip_use_nullish_with_accessors.hts new file mode 100644 index 000000000..2373e397b --- /dev/null +++ b/Manual/contents/assets/snippets/Note_tip_use_nullish_with_accessors.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_tip_use_nullish_with_accessors + + + +

     In case a value returned by the accessor is (or might be) undefined you might want to provide a "default" value to be used instead. A clean, shorthand way to do this is the nullish operator.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_tip_use_particle_system_editor.hts b/Manual/contents/assets/snippets/Note_tip_use_particle_system_editor.hts new file mode 100644 index 000000000..ecb02f689 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_tip_use_particle_system_editor.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_Tip_Use_Particle_System_Editor + + + +

     If you prefer a more visual approach to creating particles and don't need the extensive functionality that GML Code offers, you can also create a Particle System Asset using The Particle System Editor. Additionally, you can generate the GML Code for it using the editor's Copy GML to Clipboard .

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Note_whitespace_characters.hts b/Manual/contents/assets/snippets/Note_whitespace_characters.hts new file mode 100644 index 000000000..2fb5d9f73 --- /dev/null +++ b/Manual/contents/assets/snippets/Note_whitespace_characters.hts @@ -0,0 +1,14 @@ + + + + + + + + Note_whitespace_characters + + + +

     The following characters are white-space characters: space (" "), tab ("\t"), carriage return ("\r"), newline ("\n"), form feed ("\f") and vertical tab ("\v"). See White-space Characters for the full list, including Unicode characters.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Sequence_headdir_constants.hts b/Manual/contents/assets/snippets/Sequence_headdir_constants.hts new file mode 100644 index 000000000..dfcb88b2a --- /dev/null +++ b/Manual/contents/assets/snippets/Sequence_headdir_constants.hts @@ -0,0 +1,33 @@ + + + + + + + + Sequence_headdir_constants + + + + + + + + + + + + + + + + + + + + + + +
    Sequence Direction Constant
    ConstantDescriptionValue
    seqdir_rightThe sequence will play frames in an incremental order from left to right1
    seqdir_leftThe sequence will play frames in a decremental order from right to left-1
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Skeleton_attachment_exists_before_create.hts b/Manual/contents/assets/snippets/Skeleton_attachment_exists_before_create.hts new file mode 100644 index 000000000..0baec835c --- /dev/null +++ b/Manual/contents/assets/snippets/Skeleton_attachment_exists_before_create.hts @@ -0,0 +1,14 @@ + + + + + + + + Skeleton_attachment_exists_before_create + + + +

     In case there is a possibility that an attachment with the given name already exists you can check this using skeleton_attachment_exists, as trying to create an attachment with an existing name will throw an error.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/String_conversion_rules.hts b/Manual/contents/assets/snippets/String_conversion_rules.hts new file mode 100644 index 000000000..4ea5a6f5b --- /dev/null +++ b/Manual/contents/assets/snippets/String_conversion_rules.hts @@ -0,0 +1,16 @@ + + + + + + + + String_conversion_rules + + + +

    Values of type Real that are an integer will have no decimal places in the string. Values of type Real that have a fractional part will have two decimal places in the string. If you need more decimal places in the output string you can use the function string_format.

    +

    Values of type Struct or Instance will be converted to a string using that struct's or instance's toString() Method if one exists, or converted to a string implicitly.

    +

    Values of type Array will be converted to a string of the format [element1, element2, element3, element4, element5], i.e. the concatenation of all elements in the array. If any of the elements in the array is a struct or an instance then its toString() Method will be called to convert it to a string.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Syntax_Callback_function.hts b/Manual/contents/assets/snippets/Syntax_Callback_function.hts new file mode 100644 index 000000000..e1242d3eb --- /dev/null +++ b/Manual/contents/assets/snippets/Syntax_Callback_function.hts @@ -0,0 +1,44 @@ + + + + + + + Syntax_Callback_function + +

    Syntax:

    +

    array_foreach(array, function, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to use
    functionFunctionThe callback function to run on each element
    offsetRealOPTIONAL The offset, or starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthRealOPTIONAL The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Syntax_predicate_general.hts b/Manual/contents/assets/snippets/Syntax_predicate_general.hts new file mode 100644 index 000000000..9a1c15100 --- /dev/null +++ b/Manual/contents/assets/snippets/Syntax_predicate_general.hts @@ -0,0 +1,40 @@ + + + + + + + + Syntax_predicate_general + + + +

    Predicate Function

    +
    +

    This function takes a Predicate Function that operates on the given array. The predicate function is passed the following arguments:

    +

    Syntax:

    +

    function(element, index);

    + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    elementAnyThe current array element's value
    indexRealThe current array index
    +

    The predicate function should return a Boolean, which affects how the original function modifies or reads the array.

    +

    See information and examples on Predicate Function.

    +
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Syntax_signature_element_index.hts b/Manual/contents/assets/snippets/Syntax_signature_element_index.hts new file mode 100644 index 000000000..47f982e6d --- /dev/null +++ b/Manual/contents/assets/snippets/Syntax_signature_element_index.hts @@ -0,0 +1,49 @@ + + + + + + + + Syntax_signature_element_index + + + +

    Syntax:

    +

    Syntax_signature_element_index(array, function, [offset], [length]);

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentTypeDescription
    arrayArrayThe array to use
    functionFunctionThe Predicate Function to run on each element
    offsetReal  The offset, or starting index, in the array. Setting a negative value will count from the end of the array. The starting index will then be array_length(array) + offset. See: Offset And Length
    lengthReal  The number of elements to traverse. A negative value will traverse the array backwards (i.e. in descending order of indices, e.g. 2, 1, 0 instead of 2, 3, 4). See: Offset And Length
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Syntax_signature_element_index_returns_bool.hts b/Manual/contents/assets/snippets/Syntax_signature_element_index_returns_bool.hts new file mode 100644 index 000000000..39d15a745 --- /dev/null +++ b/Manual/contents/assets/snippets/Syntax_signature_element_index_returns_bool.hts @@ -0,0 +1,14 @@ + + + + + + + + Syntax_signature_element_index_returns_bool + + + +
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Syntax_signature_element_returns_any.hts b/Manual/contents/assets/snippets/Syntax_signature_element_returns_any.hts new file mode 100644 index 000000000..485f7e66d --- /dev/null +++ b/Manual/contents/assets/snippets/Syntax_signature_element_returns_any.hts @@ -0,0 +1,14 @@ + + + + + + + + Syntax_signature_element_returns_any + + + +
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Table_Buffer_Type_Constant.hts b/Manual/contents/assets/snippets/Table_Buffer_Type_Constant.hts new file mode 100644 index 000000000..d42b8d8c0 --- /dev/null +++ b/Manual/contents/assets/snippets/Table_Buffer_Type_Constant.hts @@ -0,0 +1,44 @@ + + + + + + + + Table_Buffer_Type_Constant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Buffer Type Constant
    ConstantDescription
    buffer_fixedA buffer of fixed size.
    buffer_growA buffer that will "grow" dynamically as data is added
    buffer_wrapA buffer where the data will "wrap". When the data being added reaches the limit of the buffer size, the overwrite will be placed back at the start of the buffer, and further writing will continue from that point.
    buffer_fastA special "stripped" buffer that is extremely fast to read/write to. Can only be used with buffer_u8 data types, and must be 1 byte aligned.
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Table_Display_Timing_Method_Constant.hts b/Manual/contents/assets/snippets/Table_Display_Timing_Method_Constant.hts new file mode 100644 index 000000000..deee49293 --- /dev/null +++ b/Manual/contents/assets/snippets/Table_Display_Timing_Method_Constant.hts @@ -0,0 +1,40 @@ + + + + + + + + Table_Display_Timing_Method_Constant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Display Timing Method Constant
    ConstantDescription
    tm_sleepThe sleep margin value is the main timing method
    tm_countvsyncsVsync timing is the main timing method (default for all supported platforms)
    tm_systemtimingSystem timing is the main timing method
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Table_Effect_Type_Constant.hts b/Manual/contents/assets/snippets/Table_Effect_Type_Constant.hts new file mode 100644 index 000000000..d4788c12e --- /dev/null +++ b/Manual/contents/assets/snippets/Table_Effect_Type_Constant.hts @@ -0,0 +1,82 @@ + + + + + + + + Table_Effect_Type_Constant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ConstantExampleDescription
    ef_cloudcloud effect exampleAn effect that creates random cloud particles of varying sizes
    ef_ellipseellipse effect exampleAn effect that creates expanding ellipses
    ef_explosionexplosion effect exampleAn effect that creates expanding fading explosions
    ef_fireworkfirework effect exampleAn effect that creates multiple small particles to generate a firework explosion
    ef_flareflare effect exampleAn effect that generates a brilliant point that flares up and fades out
    ef_rainrain effect exampleAn effect that generates rain particles coming down from the top of the screen
    ef_ringcircle effect exampleAn effect that generates expanding and fading circles
    ef_smokesmoke effect exampleAn effect that generates little puffs of smoke
    ef_smokeuprising smoke effect exampleAn effect that creates a smoke plume that rises up the screen
    ef_snowsnow effect exampleAn effect that generates multiple snow particles falling down the screen
    ef_sparkspark effect exampleAn effect that generates a small spark
    ef_starstar effect exampleAn effect that generates star particles
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Tag_deprecated.hts b/Manual/contents/assets/snippets/Tag_deprecated.hts new file mode 100644 index 000000000..1b9f08e28 --- /dev/null +++ b/Manual/contents/assets/snippets/Tag_deprecated.hts @@ -0,0 +1,14 @@ + + + + + + + + Tag_obsolete + + + +

    DEPRECATED

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/Tag_obsolete.hts b/Manual/contents/assets/snippets/Tag_obsolete.hts new file mode 100644 index 000000000..5526fcb5b --- /dev/null +++ b/Manual/contents/assets/snippets/Tag_obsolete.hts @@ -0,0 +1,14 @@ + + + + + + + + Tag_obsolete + + + +

    OBSOLETE

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/audio_play_sound_last_arguments.hts b/Manual/contents/assets/snippets/audio_play_sound_last_arguments.hts index 566016fc6..171273f89 100644 --- a/Manual/contents/assets/snippets/audio_play_sound_last_arguments.hts +++ b/Manual/contents/assets/snippets/audio_play_sound_last_arguments.hts @@ -3,7 +3,7 @@ - + audio_play_sound_last_arguments diff --git a/Manual/contents/assets/snippets/buffer_data_type_constants.hts b/Manual/contents/assets/snippets/buffer_data_type_constants.hts new file mode 100644 index 000000000..3e89d2d77 --- /dev/null +++ b/Manual/contents/assets/snippets/buffer_data_type_constants.hts @@ -0,0 +1,74 @@ + + + + + + + + buffer_data_type_constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Buffer Data Type Constant
    ConstantDescription
    buffer_u8An unsigned, 8bit integer. This is a positive value from 0 to 255.
    buffer_s8A signed, 8bit integer. This can be a positive or negative value from -128 to 127 (0 is classed as positive).
    buffer_u16An unsigned, 16bit integer. This is a positive value from 0 - 65,535.
    buffer_s16A signed, 16bit integer. This can be a positive or negative value from -32,768 to 32,767 (0 is classed as positive).
    buffer_u32An unsigned, 32bit integer. This is a positive value from 0 to 4,294,967,295.
    buffer_s32A signed, 32bit integer. This can be a positive or negative value from -2,147,483,648 to 2,147,483,647 (0 is classed as positive).
    buffer_u64An unsigned 64bit integer. This is a positive value from 0 to 18,446,744,073,709,551,615.
    buffer_f16A 16bit float. This can be a positive or negative value within the range of +/- 65504.
    buffer_f32A 32bit float. This can be a positive or negative value within the range of +/-16777216.
    buffer_f64A 64bit float.
    buffer_boolA boolean value, can only be either 1 or 0 (true or false). It is stored in a single byte (8bit)
    buffer_stringA string of any size, including a final null terminating character
    buffer_textA string of any size, without the final null terminating character
    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/function_mutable.hts b/Manual/contents/assets/snippets/function_mutable.hts new file mode 100644 index 000000000..e89d24f8c --- /dev/null +++ b/Manual/contents/assets/snippets/function_mutable.hts @@ -0,0 +1,14 @@ + + + + + + + + function_mutable + + + +

     This function mutates the input array, i.e. changes it directly. Existing array elements in the range given by the offset and length parameter might be overwritten. For performance reasons the array is not resized and the new number of valid elements is returned instead.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/function_order_not_ensured.hts b/Manual/contents/assets/snippets/function_order_not_ensured.hts new file mode 100644 index 000000000..c1f7e7635 --- /dev/null +++ b/Manual/contents/assets/snippets/function_order_not_ensured.hts @@ -0,0 +1,14 @@ + + + + + + + + function_order_not_ensured + + + +

     The order of elements in the new array is not ensured. If you need to sort the array you will need to do so afterwards.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/iOS_14_IP_Multicast_Permissions.hts b/Manual/contents/assets/snippets/iOS_14_IP_Multicast_Permissions.hts index 329f0dcd9..92c9994ab 100644 --- a/Manual/contents/assets/snippets/iOS_14_IP_Multicast_Permissions.hts +++ b/Manual/contents/assets/snippets/iOS_14_IP_Multicast_Permissions.hts @@ -3,14 +3,13 @@ - + iOS_14_IP_Multicast_Permissions -

     iOS 14 and later require that you request the multicast entitlement (com.apple.developer.networking.multicast) and enable it in order to send and receive multicasts and broadcasts.
    - Moreover, iOS 14 does not show the consent modal dialog to the user until a packet is first sent. So the alert will not be shown if the UDP socket only receives.
    - A way to work around this is to send an empty "dummy" packet so that the consent modal is triggered.

    +

     iOS 14 and later require that you request the multicast entitlement (com.apple.developer.networking.multicast) and enable it in order to send and receive multicasts and broadcasts. To make GameMaker add this entitlement you should enable broadcast networking in the iOS Game Options / tvOS Game Options (not doing this will throw an error).
    + Moreover, iOS 14 does not show the consent modal dialog to the user until a packet is first sent. So the alert will not be shown if the UDP socket only receives. A way to work around this is to send an empty "dummy" packet so that the consent modal is triggered.

    \ No newline at end of file diff --git a/Manual/contents/assets/snippets/is_instanceof_example.hts b/Manual/contents/assets/snippets/is_instanceof_example.hts new file mode 100644 index 000000000..82282c43f --- /dev/null +++ b/Manual/contents/assets/snippets/is_instanceof_example.hts @@ -0,0 +1,33 @@ + + + + + + + + is_instanceof_example + + + +

    function item() constructor {}
    +
    + function potion() : item() constructor {}
    +
    + function enemy() constructor {}
    +
    + var _potion = new potion();
    +
    + show_debug_message(is_instanceof(_potion, potion)); // true (1)
    + show_debug_message(is_instanceof(_potion, item)); // true (1)
    + show_debug_message(is_instanceof(_potion, enemy)); // false (0) +

    +

    The above code shows three constructors: item, potion which is a child of item, and enemy, which is a separate constructor.

    +

    It creates a struct from the potion constructor. Using is_instanceof(), we can check that the new struct:

    +
      +
    • is a potion
    • +
    • is an item
    • +
    • is not an enemy
    • +
    +

    This way you can check whether a struct "is" something, as a potion is an item, so it returns true for both constructors. However if wouldn't be true the other way around: an item is not a potion.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/network_socket_types_server.hts b/Manual/contents/assets/snippets/network_socket_types_server.hts new file mode 100644 index 000000000..89b79725a --- /dev/null +++ b/Manual/contents/assets/snippets/network_socket_types_server.hts @@ -0,0 +1,41 @@ + + + + + + + + network_socket_types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Socket Type Constant
    ConstantDescription
    network_socket_tcpCreate a socket using TCP.
    network_socket_udpCreate a socket using UDP.
    network_socket_wsCreate a WebSocket using TCP. (NOTE: Use Async functions for connecting through WebSockets)
    +

    NOTE Secure WebSockets are not supported when creating a server, only as a client.

    + + \ No newline at end of file diff --git a/Manual/contents/assets/snippets/static_set_example.hts b/Manual/contents/assets/snippets/static_set_example.hts new file mode 100644 index 000000000..4ceb04ce9 --- /dev/null +++ b/Manual/contents/assets/snippets/static_set_example.hts @@ -0,0 +1,24 @@ + + + + + + + + static_set_example + + + +

    var _potion = json_parse(_json_string);
    +
    + show_debug_message(is_instanceof(_potion, potion)); // false (0)
    +
    + var _static_potion = static_get(potion);
    + static_set(_potion, _static_potion);
    +
    + show_debug_message(is_instanceof(_potion, potion)); // true (1) +

    +

    In the code above, upon loading the potion struct from a JSON string, it's only created as a simple struct and doesn't belong to a constructor, nor does it have any static variables.

    +

    After applying the static struct for potion to it (which is a constructor), it becomes an instance of potion (as tested with is_instanceof()) and also gets any static variables and static methods contained in the potion constructor.

    + + \ No newline at end of file diff --git a/Manual/create_page.bat b/Manual/create_page.bat new file mode 100644 index 000000000..fb4a77857 --- /dev/null +++ b/Manual/create_page.bat @@ -0,0 +1,110 @@ +@ECHO OFF +SetLocal EnableDelayedExpansion + +rem directory +SET "PScommand="POWERSHELL Add-Type -AssemblyName System.Windows.Forms; $FolderBrowse = New-Object System.Windows.Forms.OpenFileDialog -Property @{ValidateNames = $false;CheckFileExists = $false;RestoreDirectory = $true;FileName = 'Selected Folder';};$null = $FolderBrowse.ShowDialog();$FolderName = Split-Path -Path $FolderBrowse.FileName;Write-Output $FolderName"" +FOR /F "usebackq tokens=*" %%Q in (`%PScommand%`) DO ( + set destination=%%Q +) + +rem echo Destination is %destination% + +rem type of file +echo Choose which type of file you want to create. +echo ============= +echo 1) Normal (default) +echo 2) GML Code keyword page +echo 3) GML Visual action page +set /p file_type=Type option (1/2/3): +if "%file_type%"=="1" goto option_normal +if "%file_type%"=="2" goto option_code +if "%file_type%"=="3" goto option_visual + +goto option_normal + +:option_normal +set file_name=Template_Normal_Page +goto continue + +:option_code +set /p keyword_type=Are you adding (1) Functions, (2) Constants or (3) Global Variables? +if "%keyword_type%"=="1" set insert_keyword_before=" "abs"," +if "%keyword_type%"=="2" set insert_keyword_before=" "ANSI_CHARSET"," +if "%keyword_type%"=="3" set insert_keyword_before=" "argument_relative"," + +set file_name=Template_Code_Page +goto continue + +:option_visual +set file_name=Template_Visual_Page +goto continue + +:continue +set source_file=%~dp0%_page_generation\ +set source_file=%source_file%%file_name%.htm +rem echo Will copy file %source_file% to %destination% + +rem number of files +echo ============= +echo ============= +echo How many files do you want to create? +set /p number_of_files=Number of files: + +rem copy files +set dest_file=%destination%\%file_name%.htm +set gml_js_file=%~dp0%contents\assets\scripts\gml.js +FOR /L %%X IN (1, 1, %number_of_files%) DO ( + rem copy file + set new_name=!file_name!%%X + echo Copying %file_name% to destination + copy "%source_file%" "%destination%" /-y + + rem ask for title + set /p custom_new_name="Enter name for file %%X (Optional): " + if NOT "!custom_new_name!"=="" set new_name=!custom_new_name! + + rem insert titles + echo Renaming it to !new_name! + set old_title="INSERT_TITLE" + set new_title="!new_name!" + call "_page_generation\replace_text.bat" !old_title! !new_title! "%dest_file%">"%dest_file%.txt" + + rem insert keywords and tags + echo Inserting metadata + call "_page_generation\replace_text.bat" "Insert Keywords" !new_name! "%dest_file%.txt">"%dest_file%" + call "_page_generation\replace_text.bat" "Insert Tags" !new_name! "%dest_file%">"%dest_file%.txt" + call "_page_generation\replace_text.bat" "INSERT_INDEX" !new_name! "%dest_file%.txt">"%dest_file%" + call "_page_generation\replace_text.bat" "INSERT_KEYWORDS" !new_name! "%dest_file%">"%dest_file%.txt" + + rem insert css and mainscript + echo Inserting CSS and JS + set path_css=assets/css/default.css + set path_js=assets/scripts/main_script.js + set path_css_old=!path_css! + set path_js_old=!path_js! + set path_prepend="../" + + set found_contents=0 + for %%a in ("%destination:\=" "%") do ( + if !found_contents!==1 set path_css=../!path_css! & set path_js=../!path_js! + if %%a=="contents" set found_contents=1 + ) + + call "_page_generation\replace_text.bat" !path_js_old! !path_js! "%dest_file%.txt">"%dest_file%" + call "_page_generation\replace_text.bat" !path_css_old! !path_css! "%dest_file%">"%dest_file%.txt" + + rem remove other file + del "%dest_file%" + + rem rename file + rename "%dest_file%.txt" "!new_name!.htm" + + rem insert into gml.js + set line_to_insert=" "!new_name!"," + if %file_type%==2 echo Inserting keyword into gml.js & call "_page_generation\insert_text.bat" %gml_js_file% %gml_js_file%.txt %insert_keyword_before% !line_to_insert! & del %gml_js_file% & rename %gml_js_file%.txt gml.js + +) + +echo Page(s) created +PAUSE +EXIT /B \ No newline at end of file diff --git a/Manual/publish/presets/PDF English.preset b/Manual/publish/presets/PDF English.preset new file mode 100644 index 000000000..87f02632e --- /dev/null +++ b/Manual/publish/presets/PDF English.preset @@ -0,0 +1,72 @@ + + + + + ../expressions/StableManual.expn + StableManual + + + ../../toc/Default.toc + Default + + + + en_UK + 2057 + English (UK) + + + false + true + true + + GameMaker Manual + pdf + I:/YYG Stuff/Outputs/ManualStablePDF/ + PDF English + GameMaker_Manual.pdf + + false + + + + false + + + + true + true + + true + true + true + true + + 1 column + Single Page Scrolling + + false + YoYo Games Ltd. + true + false + + + true + + + Title + GameMaker Manual + + + Author + Gurpreet S. Matharoo, Mark Alexander, Bart Teunis + + + Subject + GameMaker Documentation + + + list + \ No newline at end of file diff --git a/Manual/publish/presets/PDF TEST.preset b/Manual/publish/presets/PDF TEST.preset index e075a1fc9..dbab10812 100644 --- a/Manual/publish/presets/PDF TEST.preset +++ b/Manual/publish/presets/PDF TEST.preset @@ -6,10 +6,6 @@ ../../toc/Default.toc - - pdf - ../../contents/assets/masterpages/pdf.htt - false true @@ -33,18 +29,13 @@ true true - - 15mm - 15mm - 15mm - 15mm - - false true - true - true - true true true + false + + true \ No newline at end of file diff --git a/Manual/publish/presets/PDF.preset b/Manual/publish/presets/PDF.preset index fb4c746e9..42987ec7a 100644 --- a/Manual/publish/presets/PDF.preset +++ b/Manual/publish/presets/PDF.preset @@ -5,9 +5,6 @@ ../../toc/Default.toc Default - - ../../contents/assets/masterpages/pdf.htt - true @@ -27,20 +24,15 @@ Blank Project false - - 15mm - 15mm - 15mm - 15mm - - false true - true - true - true true true + false C:/Users/Kai/Documents/My RoboHelp Projects/outputs/GMS2 Manual/PDF true + + true \ No newline at end of file diff --git a/Manual/publish/skins/Charcoal_Grey/Icon_Debug.png b/Manual/publish/skins/Charcoal_Grey/Icon_Debug.png new file mode 100644 index 000000000..1c0541723 Binary files /dev/null and b/Manual/publish/skins/Charcoal_Grey/Icon_Debug.png differ diff --git a/Manual/publish/skins/Charcoal_Grey/bug-report-final.png b/Manual/publish/skins/Charcoal_Grey/bug-report-final.png new file mode 100644 index 000000000..1165223c0 Binary files /dev/null and b/Manual/publish/skins/Charcoal_Grey/bug-report-final.png differ diff --git a/Manual/publish/skins/Charcoal_Grey/bug-report-final.svg b/Manual/publish/skins/Charcoal_Grey/bug-report-final.svg new file mode 100644 index 000000000..d9af18f90 --- /dev/null +++ b/Manual/publish/skins/Charcoal_Grey/bug-report-final.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/Manual/publish/skins/Charcoal_Grey/html5.skn b/Manual/publish/skins/Charcoal_Grey/html5.skn index a52afc2f2..089fae54d 100644 --- a/Manual/publish/skins/Charcoal_Grey/html5.skn +++ b/Manual/publish/skins/Charcoal_Grey/html5.skn @@ -157,5 +157,5 @@ false - 2020.8.0 + 2022.0.0 \ No newline at end of file diff --git a/Manual/publish/skins/Coffee/html5.skn b/Manual/publish/skins/Coffee/html5.skn index 84e1fa210..6e8b38252 100644 --- a/Manual/publish/skins/Coffee/html5.skn +++ b/Manual/publish/skins/Coffee/html5.skn @@ -153,5 +153,5 @@ - 2020.8.0 + 2022.0.0 \ No newline at end of file diff --git a/Manual/publish/templates/PDF English/Common.plt b/Manual/publish/templates/PDF English/Common.plt new file mode 100644 index 000000000..439a91bb4 --- /dev/null +++ b/Manual/publish/templates/PDF English/Common.plt @@ -0,0 +1,14 @@ + + + + + Common Page Layout + +
    +
      + + + + +
    +
    \ No newline at end of file diff --git a/Manual/publish/templates/PDF English/default.css b/Manual/publish/templates/PDF English/default.css new file mode 100644 index 000000000..8610427a7 --- /dev/null +++ b/Manual/publish/templates/PDF English/default.css @@ -0,0 +1,1047 @@ +/*Created with Adobe RoboHelp 2019.*/ +/* -------------------------------------------------------- BODY */ +@font-face { + font-family: 'open_sansbold'; + src: url('../fonts/opensans-bold-webfont.woff2') format('woff2'), url('../fonts/opensans-bold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansbold_italic'; + src: url('../fonts/opensans-bolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-bolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansextrabold'; + src: url('../fonts/opensans-extrabold-webfont.woff2') format('woff2'), url('../fonts/opensans-extrabold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansextrabold_italic'; + src: url('../fonts/opensans-extrabolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-extrabolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansitalic'; + src: url('../fonts/opensans-italic-webfont.woff2') format('woff2'), url('../fonts/opensans-italic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanslight'; + src: url('../fonts/opensans-light-webfont.woff2') format('woff2'), url('../fonts/opensans-light-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanslight_italic'; + src: url('../fonts/opensans-lightitalic-webfont.woff2') format('woff2'), url('../fonts/opensans-lightitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal +} +@font-face { + font-family: 'open_sansregular'; + src: url('../fonts/opensans-regular-webfont.woff2') format('woff2'), url('../fonts/opensans-regular-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanssemibold'; + src: url('../fonts/opensans-semibold-webfont.woff2') format('woff2'), url('../fonts/opensans-semibold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanssemibold_italic'; + src: url('../fonts/opensans-semibolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-semibolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +body { + font-family: 'open_sansregular'; + background: #282828; + color: #cfcfcf; + font-size: 18px; + margin: 8px 0 0 0; + line-height: 1.5; +} +/* -------------------------------------------------------- HEADERS */ +h1 { + font-size: 20pt; + font-family: 'open_sansbold'; + background-image: url('CSS_Images/Header_Bar_Front.png'), url('CSS_Images/Header_Bar_Back.gif'); + margin: 0 0 0.5em 0; + padding: 0 0 0 0.5em; + line-height: 40px; + background-position: left, left; + background-repeat: no-repeat, repeat; + border-radius: 0.5em 0.5em 0 0; + color: #FFFFFF; + box-shadow: 0px 0px 5px #181818; +} +@media screen and (max-width:600px){ + h1 { + background-repeat: repeat, repeat; + } +} +h2 { + background-image: url('CSS_Images/H2_underline.png'); + background-repeat: no-repeat, repeat; + background-position: left 20px top 44px; + font-family: 'open_sansbold'; + font-size: 18pt; + padding-left: 20px; + padding-top: 10px; + margin-top: 2em; + margin-bottom: 10px; +} +h1 + h2 { + margin-top: 0px; +} +h3 { + font-family: 'open_sansbold'; + padding-left: 20px; + font-weight: bold; + font-size: 16pt; + margin-top: 32px; + margin-bottom: 10px; + color: #dedede; +} +h4 { + font-weight: bold; + font-size: 12.0pt; + background: #181818; + color: #cfcfcf; + margin-left: 45px; + margin-right: 10px; + text-justify: none; + text-align: left; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + margin-top: 10px; + margin-bottom: -20px; + border-width: 5px; + border-style: solid; + border-color: #282828; + width: auto; + display: inline-block; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; +} +h5 { + color: #181818; + text-align: center; + font-size: 0.75em; + font-weight: bold; + background: #039e5c; + border-radius: 0 0 1em 1em; + padding-top: 0.5em; + padding-right: 0.5em; + padding-bottom: 0.5em; + padding-left: 0.5em; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; +} +h6 { + font-weight: bold; + font-size: 8.0pt; +} +.topic-header { + z-index: 1 !important; +} +/* -------------------------------------------------------- PARAGRAPHS */ +p, +ul, +ol { + margin: 0; + padding: 0.5em 1em; + background: #282828; + text-align: justify; + text-justify: inter-word; + font-family: 'open_sansregular'; + line-height: 1.5; +} +p.dropspot { + margin: 0; + background: #282828; + text-align: justify; + text-justify: inter-word; + padding-top: 0.5em; + padding-right: 1em; + padding-bottom: 0.5em; + padding-left: 3em; +} +.droptext { + padding-left: 1em; +} +p.code_heading { + font-weight: bold; + font-size: 12.0pt; + background: #018d4b; + color: #dfdfdf; + margin-left: 45px; + margin-right: 10px; + text-justify: none; + text-align: left; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + margin-top: 10px; + margin-bottom: -20px; + border-width: 5px; + border-style: solid; + border-color: #282828; + width: auto; + display: inline-block; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; +} +p.code, +p.code_plain, +pre { + font-family: menlo, consolas, monospace; + background: #181818; + color: #cfcfcf; + margin-left: 50px; + margin-right: 50px; + text-justify: none; + text-align: left; + border-radius: 10px; + padding-top: 20px; + padding-right: 20px; + padding-bottom: 20px; + padding-left: 20px; + margin-top: 1em; + margin-bottom: 15px; + font-size: 14px; + line-height: 1.25; + overflow-wrap: break-word; +} +h4 + p.code, +h4 + p.code_plain, +p.code_heading + p.code, +p.code_heading + p.code_plain +{ + margin-top: 1px; +} +p.code + p.code_heading, +p.code_plain + p.code_heading { + margin-top: -10px; +} +p.note, div.note { + margin-left: 30px; + margin-top: 20px; + margin-bottom: 20px; + padding-top: 10px; + padding-bottom: 10px; + font-size: 17px; + margin-right: 30px; + background-color: #343434; + border-radius: 8px; +} +div.note p, div.note ul { + background-color: #343434 !important; +} +div.note ul { + padding-left: 56px; +} +div.note { + padding-top: 4px; +} +p.note_heading { + margin-left: 30px; + margin-top: 20px; + margin-bottom: -20px; + padding: 8px; + padding-left: 12px; + padding-right: 12px; + font-size: 17px; + width: max-content; + background-color: #018d4b; + color: #efefef; + border-radius: 8px; + font-weight: 800; + font-style: italic; +} +p.note_heading + p.note { + margin-bottom: 40px; + padding-top: 16px; +} +.droptext p.note { + margin-left: 50px; +} +span.inline { + font-family: menlo, consolas, monospace; + font-weight: 700; + font-size: 17px; +} +span.inline2, span.inline3_func { + font-family: menlo, consolas, monospace; + background: #181818; + color: #cfcfcf; + text-justify: none; + text-align: left; + border-radius: 10px; + padding: 4px; + padding-left: 4px; + padding-right: 4px; + margin-left: 2px; + margin-right: 2px; + font-size: 15px; + line-height: 1.25; + position: relative; + bottom: 2px; +} +span.inline3_func > a::after, span.inline3_func > span::after { + content: "()"; +} +a span.inline2 { + color: #04de80; +} +td span.inline2, td span.inline3_func { + background: #282828; +} +tt { + font-family: menlo, consolas, monospace; + font-weight: bold; + font-size: 17px; +} +/* -------------------------------------------------------- HORIZONTAL RULERS */ +hr { + margin-left: 20px; + margin-right: 20px; + border: 1px solid #555; +} +.droptext hr { + margin-left: 52px; + margin-right: 20px; + border: 1px solid #555; +} +ul hr { + margin-left: 0px; + margin-right: 0px; + border: 1px solid #444; +} +/* -------------------------------------------------------- TAGS */ +span.important, +span.note, +span.optional, +span.tip, +span.warning { + background-color: #d65827; + padding: 3px; + border-radius: 4px; + font-weight: bold; + color: white; + font-size: 15px; + margin-right: 2px; + box-shadow: 0px 2px 1px #282828; +} +span.note { + background-color: #2966B6; +} +span.optional { + background-color: #a77000; + color: white; +} +span.tip { + background-color: #118822; +} +span.warning { + background-color: #882233; +} +a span.warning { + color: #34eea0; + text-decoration: underline; +} +/* -------------------------------------------------------- LINKS */ +a { + text-decoration: none; +} +a:link, +a:visited { + font-weight: bold; + color: #04de80; +} +th a:link, +th a:visited { + font-weight: bold; + color: #eeeeee; + text-decoration: underline; +} +a[data-rhwidget="HyperlinkPopover"] { + font-weight: 550; +} +a.nocolour:link, +a.nocolour:visited { + font-weight: bold; +} +a:hover, +a:active { + color: #ffffff; +} +a.expandspot { + color: #79D779; + cursor: pointer; + text-decoration: underline; + font-size: 22px; + font-weight: bold; + line-height: 1.5; + margin-left: 20px; +} +span.expandtext { + font-style: italic; + font-weight: normal; + text-align: justify; + margin-left: 20px; + line-height: 1.5; +} +span.dropspotnote { + font-style: italic; + font-weight: normal; + text-align: justify; + margin-left: 20px; + line-height: 1.5; + font-size: 17px; +} +a.dropspot { + cursor: pointer; + color: #79D779; + font-family: 'open_sanssemibold'; + text-decoration: underline; + letter-spacing: 1px; + font-weight: bold; + font-size: 22px; + margin-left: 20px; +} +a.glossterm { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; +} +h1 a.glossterm:before { + content:"("; +} +h1 a.glossterm:after { + content:")"; +} +h1 a.glossterm { + margin-left: 0.2em; + font-size: 18px; + text-decoration: none; + cursor: pointer; + font-weight: bold; + font-style: italic; + color: #F2AF4B; +} +a.tooltip { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; +} +span.glosstext { + font-style: italic; + font-weight: normal; + color: #0000ff; +} +span.glossextra { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; + font-style: italic; +} +a[href^="https://"], +a[href^="http://"] { + background: url('../Images/Icons/Icon_External_Link.png') center right no-repeat; + background-size: 9px; + background-position: right 0px top 6px; + padding-right: 13px; +} +/* -------------------------------------------------------- LISTS */ +ul { + margin-top: -20px; + margin-bottom: 10px; + padding-left: 80px; +} +ol { + margin-top: -12px; + margin-bottom: 10px; + padding-left: 80px; +} +ul li { + margin-top: 20px; + margin-bottom: -5px; +} +ol li { + margin-top: 20px; + margin-bottom: -5px; + counter-increment: list; + list-style-type: none; + position: relative; +} +ol li::before { + color: #04de80; + content: counter(list) "."; + left: -32px; + position: absolute; + text-align: right; + width: 26px; +} +ul.colour { + list-style: none; +} +ul.colour li { + margin-top: 22px; +} +ul.colour li li { + list-style: none; +} +ul.colour li::before { + content: "\2022"; + color: #04de80; + font-weight: bold; + display: inline-block; + width: 1em; + margin-left: -1em; + height: 1.5em; +} +ul.dropspotlist { + list-style: none; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 120px; + counter-reset: item1; +} +ul.dropspotlist li::before { + content: "\2022"; + color: #04de80; + font-weight: bold; + display: inline-block; + width: 1em; + margin-left: -1em; + height: 1.5em; +} +ul.dropspotlist li { + margin-top: 22px; +} +ul.dropspotlist li li { + list-style: none; + margin-top: 10px; +} +/* -------------------------------------------------------- IMAGES */ +img.center { + display: block; + margin-top: 5px; + max-width: 90%; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + position: relative; +} +img.center_shadow, img.left_shadow, img.right_shadow { + display: block; + margin-top: 5px; + max-width: 70%; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + position: relative; + box-shadow: 4px 4px 10px 2px #000; +} +img.left_shadow, img.right_shadow { + display: block; + position: relative; + max-width: auto; + width: auto; + margin-left: 20px; + margin-right: 40px; +} +img.left_shadow { + float: left; +} +img.right_shadow { + float: right; +} +img.icon { + vertical-align: middle; +} +img.icon_small { + vertical-align: middle; + max-height: 24px; +} +img.invisible { + display: none; + position: relative; +} +iframe.center { + display: block; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 400px; + max-width: 800px; + border-radius: 0.5em; +} +figcaption { + font-size: 15px; + font-style: italic; + text-align: center; + margin-top: -15px; +} +div.image_columns { + display: flex; + gap: 10px; + flex-direction: row; + align-items: center; + justify-content: center; + margin-bottom: 18px; +} +div.image_columns img, +div.image_columns figure img { + max-height: 500px; +} +div.image_columns figure figcaption { + font-size: 16px; + font-style: normal; + text-align: center; + margin-top: 0px; +} +/* -------------------------------------------------------- VIDEOS */ +video.center { + display: block; + margin-top: 20px; + max-width: 90%; + margin-bottom: 40px; + margin-left: auto; + margin-right: auto; + position: relative; +} +p.video_subtitle { + font-size: 15px; + font-style: italic; + text-align: center; + margin-bottom: 16px; + margin-top: -40px; +} +/* -------------------------------------------------------- DIVS */ +div.banner { + background-color: #000000; + border-width: 3px; + border-style: solid; + border-color: #000000; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-left: 10px; + margin-bottom: 10px; +} +div.clear { + clear: both; + background: #444444; + padding: 10px; + border-radius: 0.5em 0.5em 0 0; + + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: flex-start; +} +div.clear a { + font-weight: normal; +} +div.clear:nth-child(1) { + +} +div.clear:nth-child(2) { + +} +div.dropspotnote { + margin-left: 85px; + margin-top: 20px; + margin-bottom: 20px; + padding: 8px; + padding-top: 10px; + padding-bottom: 10px; + font-size: 17px; + margin-right: 30px; + background-color: #343434; + border-radius: 8px; +} +div.snippet_quote { + margin-left: 30px; + font-style: italic; + color: #CCC; +} +/* -------------------------------------------------------- TABLES */ +table { + border: solid #026b3e 2px; + border-collapse: separate; + border-spacing: px; + background: #333333; + width: 80%; + margin-top: 1em; + margin-bottom: 1em; + margin-left: auto; + margin-right: auto; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} +th { + color: #efefef; + background: #039e5c; + border-style: none !important; + text-align: center; +} +td { + border-spacing: 2px; + border: solid #333333 1px; + padding: 10px 10px; +} +tr { + border-spacing: 2px; + border: solid #039e5c 1px; + border-spacing: 2px; + background: #555555; +} +table.icons { + padding-left: 25px; + border: 0px; + border-collapse: separate; + border-spacing: 10px; + width: 100%; + margin-left: auto; + margin-right: auto; + background: #282828; + box-shadow: 0px 0px 0px #282828; +} +table.dnd { + padding-left: 25px; + border: 0px; + border-collapse: separate; + border-spacing: 20px; + width: 50%; + background: #282828; + box-shadow: 0px 0px 0px #282828; + float: left; +} +caption { + color: #efefef; + background: #039e5c; + border: solid #333333 1px; + text-align: center; + font-weight: bold; +} +td.icons { + background: #282828; + width: 50px; + border: 0px; +} +td.dnd_icons { + background: #282828; + border: 0px; +} +td.text { + background: #282828; + border: 0px; +} +td.dnd { + background: #282828; + border: 0px; + width: 200px; +} +tr:nth-child(odd) { + background: #4d4d4d; + width: 80%; +} +table.dnd td:nth-child(odd) { + content: "200px"; +} +/* -------------------------------------------------------- POP UP */ +.rh-popover { + min-width: 1000px; + border: 0.125rem solid #4e4e4e; +} +/* -------------------------------------------------------- EXTRAS */ +.body-scroll { + display: block; + position: absolute; + top: 70px; + bottom: 72px; + left: 0; + width: 100%; + margin-left: auto; + margin-right: auto; + overflow-y: auto; +} +.footer { + position: relative; + bottom: 0; + width: 100%; + height: 70px; + left: 0; +} +.buttons { + position: relative; + width: 100%; +} +/* -------------------------------------------------------- EXAMPLE CANVAS RELATED */ +canvas.gml_reference_example { + display: block; + margin-left: auto; + margin-right: auto; + border: 2px solid #444; + border-radius: 16px; + background-color: #222; +} +p.canvas_subtitle { + font-size: 15px; + font-style: italic; + text-align: center; + margin-bottom: 16px; + margin-top: -8px; +} +/* -------------------------------------------------------- MINI TOC */ +.minitoc { + background-color: #444; + border-radius: 16px; + margin: 30px; + padding-top: 8px; + padding-bottom: 8px; +} +a.minitoc-caption { + text-decoration: none; + color: initial; + font-weight: bold; + font-size: 12pt; +} +p.minitoc-caption { + background-color: #444; + font-weight: bold; + font-size: 14pt; + border-radius: 16px; +} +ol.minitoc-list { + list-style: none; + background-color: #444; + padding-left: 40px !important; +} +ol.minitoc-list ol { + background-color: #444; + list-style: none; +} +a.minitoc-list-item {} +div.seealso { + background-color: #444; + border-radius: 16px; + margin: 30px; + padding-top: 8px; + padding-bottom: 8px; +} +p.seealso-caption { + background-color: #444; + font-weight: bold; + font-size: 14pt; + border-radius: 16px; +} +ol.seealso-list { + background-color: #444; + padding-left: 40px !important; +} +a.seealso-list-item { + padding-left: 0px; +} +p.reltopics-caption { + font-weight: bold; + font-size: 12pt; +} +ol.reltopics-list { + padding-left: 0; + margin-left: 0; + list-style: none; +} +a.reltopics-list-item {} +ul.Disc { + list-style-type: disc; +} +ul.dropspotlist>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 120px; + position: relative; +} +ul.dropspotlist>li:before { + counter-increment: item1; + content: counter(item1, disc); + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + width: var(--prefix-size); + overflow: hidden; + margin-right: var(--prefix-gap); +} +ol.AlphaNumeric { + list-style: decimal; +} +ol.AlphaNumeric>li>ol { + list-style: lower-alpha; +} +ol.AlphaNumeric>li>ol>li>ol { + list-style: lower-roman; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item4; + list-style: none; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li:before { + counter-increment: item4; + content: "("counter(item4, decimal)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol { + list-style: none; + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item5; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li:before { + counter-increment: item5; + content: "("counter(item5, lower-alpha)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol { + list-style: none; + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item6; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol>li:before { + counter-increment: item6; + content: "("counter(item6, lower-roman)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.RoundSquare { + list-style: disc; +} +ol.RoundSquare>li>ol { + list-style: square; +} +ol.RoundSquare>li>ol>li>ol { + list-style: circle; +} +ol.RoundSquare>li>ol>li>ol>li>ol { + list-style: disc; +} +ol.RoundSquare>li>ol>li>ol>li>ol>li>ol { + list-style: square; +} +ol.RoundSquare>li>ol>li>ol>li>ol>li>ol>li>ol { + list-style: circle; +} +ol.Decimal { + list-style-type: decimal; +} +p { + margin: 0; + padding: 0.5em 1em; + background: #282828; + text-align: justify; + text-justify: inter-word; + font-family: 'open_sansregular'; + line-height: 1.5; +} +/* hightlight.js (GML)*/ pre code.hljs{display:block;overflow-x:auto;padding:1em;}code.hljs{padding:3px 5px;}.hljs{background:#222;color:silver;}.hljs-keyword{color:#ffb871;font-weight:700;}.hljs-built_in{color:#ffb871;}.hljs-literal{color:#ff8080;}.hljs-symbol{color:#58e55a;}.hljs-comment{color:#5b995b;}.hljs-string{color:#ff0;}.hljs-number{color:#ff8080;}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-code,.hljs-deletion,.hljs-doctag,.hljs-function,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-name,.hljs-quote,.hljs-regexp,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:silver;}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:700;}:root { + --hdrevenrows-theme-color: #ed7d31; + --hdrevenrows-row-color: rgba(237, 125, 49, 0.25); + --hdrevenrows-brdr-color: rgba(237, 125, 49, 0.5); +}table.hdrevenrows { + border-collapse: collapse; +}table.hdrevenrows td { + border-width: 1px; + border-style: solid; + border-color: var(--hdrevenrows-brdr-color); + padding-top: 2px; + padding-bottom: 2px; + padding-left: 4px; + padding-right: 4px; +}table.hdrevenrows tr:first-child td { + background-color: var(--hdrevenrows-theme-color); + color: #FFFFFF; +}table.hdrevenrows tr:nth-child(even) td { + background-color: var(--hdrevenrows-row-color); +} \ No newline at end of file diff --git a/Manual/publish/templates/PDF English/layout.css b/Manual/publish/templates/PDF English/layout.css new file mode 100644 index 000000000..a98d8d2a9 --- /dev/null +++ b/Manual/publish/templates/PDF English/layout.css @@ -0,0 +1,200 @@ +/*Created with Adobe RoboHelp*/ +body { + font-family: Calibri; + font-size: 11 pt; +} +a { + text-decoration: underline; +} +/*Chapter Styling*/ +.chapter-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.chapter-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.chapter-body {} +/* +.topic-body {} +*/ +/*TOC Styling*/ +.toc-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.toc-footer { + font-weight: bold; + font-size: 11pt; + color: #888888; + text-align: center; +} +.toc-body {} +.toc-title { + font-size: 21pt; + font-weight: bold; + margin-top: 24pt; + margin-bottom: 24pt; +} +.toc-level-1 { + font-size: 15pt; + text-decoration: none; + font-weight: bold; +} +/* +.toc-level-1::after { + content: leader(solid) " "target-counter(attr(href url), page) !important; +} +*/ +.toc-level-2 { + font-size: 14pt; + text-decoration: none; + font-weight: bold; +} +.toc-level-3 { + font-size: 13pt; + text-decoration: none; +} +.toc-level-4 { + font-size: 12pt; + text-decoration: none; +} +.toc-level-5 { + font-size: 11pt; + text-decoration: none; +} +.toc-level-6 { + font-size: 11pt; + text-decoration: none; +} +/*Chapter TOC Styling*/ +.chaptoc-body {} +.chaptoc-level-1 { + font-size: 12pt; + text-decoration: none; +} +.chaptoc-level-2 { + font-size: 12pt; + text-decoration: none; +} +.chaptoc-level-3 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-4 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-5 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-6 { + font-size: 11pt; + text-decoration: none; +} +/*List of Figures Styling*/ +.lof-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.lof-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.lof-body {} +.lof-title {} +.lof-level-1 { + text-decoration: none; +} +/*List of Tables styling*/ +.lot-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.lot-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.lot-body {} +.lot-title {} +.lot-level-1 { + text-decoration: none; +} +/*Index Styling*/ +.idx-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.idx-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.idx-body { + column-count: 2; + column-fill: balance; +} +.idx-title { + column-span: all; +} +.idx-keyword-group { + font-weight: bold; + font-size: 12pt; + margin-top: 16pt; +} +.idx-keyword-group:first-of-type { + margin-top: 0pt; +} +.idx-unit {} +.idx-keyword {} +.idx-name {} +.idx-link { + text-decoration: none; +} +.idx-child { + padding-left: 10pt; +} +/*Glossary Styling*/ +.glo-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.glo-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.glo-body {} +.glo-title {} +.glo-unit {} +.glo-term { + font-weight: bold; + margin-top: 16pt; +} +.glo-definition {} +/*Footnote Styling*/ +.fn { + float: footnote; +} +.fn::footnote-call { + content: counter(footnote, decimal); +} +.fn::footnote-marker { + content: counter(footnote, decimal); +} \ No newline at end of file diff --git a/Manual/publish/templates/PDF English/pdf.css b/Manual/publish/templates/PDF English/pdf.css new file mode 100644 index 000000000..c826b3e4d --- /dev/null +++ b/Manual/publish/templates/PDF English/pdf.css @@ -0,0 +1,61 @@ +/*Created with Adobe RoboHelp 2019*/ +/*TOC Styling*/ +body.pdf-toc-body {} +.toc-title { + color: #FFFFFF; +} +p.pdf-toc { + color: #FFFFFF +} +a.pdf-toc-link { + color: #FFFFFF +} +a.pdf-toc-link:after {} +span.pdf-toc-page-no {} +p.pdf-toc-level1 { + color: #FFFFFF +} +a.pdf-toc-link-level1 { + color: #FFFFFF +} +span.pdf-toc-page-no-level1 {} +p.pdf-toc-level2 { + color: #FFFFFF +} +a.pdf-toc-link-level2 { + color: #FFFFFF +} +span.pdf-toc-page-no-level2 {} +p.pdf-toc-level3 { + color: #FFFFFF +} +p.pdf-toc-level4 { + color: #FFFFFF +} +p.pdf-toc-level5 { + color: #FFFFFF +} +p.pdf-toc-level6 { + color: #FFFFFF +} +/*Index Styling*/ +body.pdf-idx-body {} +h1.pdf-idx-title { + color: #FFFFFF +} +div.pdf-idx-unit {} +p.pdf-idx-keyword { + color: #FFFFFF +} +div.pdf-idx-topics {} +p.pdf-idx-topic { + color: #FFFFFF +} +a.pdf-idx-link {} +div.pdf-idx-child {} +/*Glossary Styling*/ +body.pdf-glo-body {} +h1.pdf-glo-title {} +div.pdf-glo-unit {} +p.pdf-glo-term {} +p.pdf-glo-definition {} \ No newline at end of file diff --git a/Manual/publish/templates/PDF English/pdf.plt b/Manual/publish/templates/PDF English/pdf.plt new file mode 100644 index 000000000..6a3ebebfc --- /dev/null +++ b/Manual/publish/templates/PDF English/pdf.plt @@ -0,0 +1,17 @@ + + + + + pdf + + + +
    +
    + + + + +
    +

    GMS2 Manual                                                                                                        Page 1 of 1

    +
    \ No newline at end of file diff --git a/Manual/publish/templates/PDF English/pdf.tpl b/Manual/publish/templates/PDF English/pdf.tpl new file mode 100644 index 000000000..6a6125481 --- /dev/null +++ b/Manual/publish/templates/PDF English/pdf.tpl @@ -0,0 +1,30 @@ + + + pdf + PDF English + 2022.0.0 + Common + + + + + + Continued on page %page-num% + Continued from page %page-num% + true + false + dotted + false + true + 4 + false + true + false + false + true + false + false + false + false + RGB + \ No newline at end of file diff --git a/Manual/publish/templates/PDF TEST/default.css b/Manual/publish/templates/PDF TEST/default.css new file mode 100644 index 000000000..dfe587f64 --- /dev/null +++ b/Manual/publish/templates/PDF TEST/default.css @@ -0,0 +1,984 @@ +/*Created with Adobe RoboHelp 2019.*/ +/* -------------------------------------------------------- BODY */ +@font-face { + font-family: 'open_sansbold'; + src: url('../fonts/opensans-bold-webfont.woff2') format('woff2'), url('../fonts/opensans-bold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansbold_italic'; + src: url('../fonts/opensans-bolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-bolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansextrabold'; + src: url('../fonts/opensans-extrabold-webfont.woff2') format('woff2'), url('../fonts/opensans-extrabold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansextrabold_italic'; + src: url('../fonts/opensans-extrabolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-extrabolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansitalic'; + src: url('../fonts/opensans-italic-webfont.woff2') format('woff2'), url('../fonts/opensans-italic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanslight'; + src: url('../fonts/opensans-light-webfont.woff2') format('woff2'), url('../fonts/opensans-light-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanslight_italic'; + src: url('../fonts/opensans-lightitalic-webfont.woff2') format('woff2'), url('../fonts/opensans-lightitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal +} +@font-face { + font-family: 'open_sansregular'; + src: url('../fonts/opensans-regular-webfont.woff2') format('woff2'), url('../fonts/opensans-regular-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanssemibold'; + src: url('../fonts/opensans-semibold-webfont.woff2') format('woff2'), url('../fonts/opensans-semibold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanssemibold_italic'; + src: url('../fonts/opensans-semibolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-semibolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +body { + font-family: 'open_sansregular'; + background: #282828; + color: #cfcfcf; + font-size: 18px; + margin: 8px 0 0 0; + line-height: 1.5; +} +/* -------------------------------------------------------- HEADERS */ +h1 { + font-size: 20pt; + font-family: 'open_sansbold'; + background-image: url('CSS_Images/Header_Bar_Front.png'), url('CSS_Images/Header_Bar_Back.gif'); + margin: 0 0 0.5em 0; + padding: 0 0 0 0.5em; + line-height: 40px; + background-position: left, left; + background-repeat: no-repeat, repeat; + border-radius: 0.5em 0.5em 0 0; + color: #FFFFFF; + box-shadow: 0px 0px 5px #181818; +} +@media screen and (max-width:600px){ + h1 { + background-repeat: repeat, repeat; + } +} +h2 { + background-image: url('CSS_Images/H2_underline.png'); + background-repeat: no-repeat, repeat; + background-position: left 20px top 44px; + font-family: 'open_sansbold'; + font-size: 18pt; + padding-left: 20px; + padding-top: 10px; + margin-top: 2em; + margin-bottom: 10px; +} +h1 + h2 { + margin-top: 0px; +} +h3 { + font-family: 'open_sansbold'; + padding-left: 20px; + font-weight: bold; + font-size: 16pt; + margin-top: 32px; + margin-bottom: 10px; + color: #dedede; +} +h4 { + font-weight: bold; + font-size: 12.0pt; + background: #181818; + color: #cfcfcf; + margin-left: 45px; + margin-right: 10px; + text-justify: none; + text-align: left; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + margin-top: 10px; + margin-bottom: -20px; + border-width: 5px; + border-style: solid; + border-color: #282828; + width: auto; + display: inline-block; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; +} +h5 { + color: #181818; + text-align: center; + font-size: 0.75em; + font-weight: bold; + background: #039e5c; + border-radius: 0 0 1em 1em; + padding-top: 0.5em; + padding-right: 0.5em; + padding-bottom: 0.5em; + padding-left: 0.5em; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; +} +h6 { + font-weight: bold; + font-size: 8.0pt; +} +/* -------------------------------------------------------- PARAGRAPHS */ +p, +ul, +ol { + margin: 0; + padding: 0.5em 1em; + background: #282828; + text-align: justify; + text-justify: inter-word; + font-family: 'open_sansregular'; + line-height: 1.5; +} +p.dropspot { + margin: 0; + background: #282828; + text-align: justify; + text-justify: inter-word; + padding-top: 0.5em; + padding-right: 1em; + padding-bottom: 0.5em; + padding-left: 3em; +} +.droptext { + padding-left: 1em; +} +p.code_heading { + font-weight: bold; + font-size: 12.0pt; + background: #018d4b; + color: #dfdfdf; + margin-left: 45px; + margin-right: 10px; + text-justify: none; + text-align: left; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + margin-top: 10px; + margin-bottom: -20px; + border-width: 5px; + border-style: solid; + border-color: #282828; + width: auto; + display: inline-block; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; +} +p.code, +p.code_plain, +pre { + font-family: menlo, consolas, monospace; + background: #181818; + color: #cfcfcf; + margin-left: 50px; + margin-right: 50px; + text-justify: none; + text-align: left; + border-radius: 10px; + padding-top: 20px; + padding-right: 20px; + padding-bottom: 20px; + padding-left: 20px; + margin-top: 1em; + margin-bottom: 15px; + font-size: 14px; + line-height: 1.25; + overflow-wrap: break-word; +} +h4 + p.code, +h4 + p.code_plain, +p.code_heading + p.code, +p.code_heading + p.code_plain +{ + margin-top: 1px; +} +p.code + p.code_heading, +p.code_plain + p.code_heading { + margin-top: -10px; +} +p.note { + margin-left: 30px; + margin-top: 20px; + margin-bottom: 20px; + padding-top: 10px; + padding-bottom: 10px; + font-size: 17px; + margin-right: 30px; + background-color: #343434; + border-radius: 8px; +} +p.note_heading { + margin-left: 30px; + margin-top: 20px; + margin-bottom: -20px; + padding: 8px; + padding-left: 12px; + padding-right: 12px; + font-size: 17px; + width: max-content; + background-color: #018d4b; + color: #efefef; + border-radius: 8px; + font-weight: 800; + font-style: italic; +} +p.note_heading + p.note { + margin-bottom: 40px; + padding-top: 16px; +} +.droptext p.note { + margin-left: 50px; +} +span.inline { + font-family: menlo, consolas, monospace; + font-weight: 700; + font-size: 17px; +} +span.inline2 { + font-family: menlo, consolas, monospace; + background: #181818; + color: #cfcfcf; + text-justify: none; + text-align: left; + border-radius: 10px; + padding: 4px; + padding-left: 4px; + padding-right: 4px; + margin-left: 2px; + margin-right: 2px; + font-size: 15px; + line-height: 1.25; + position: relative; + bottom: 2px; +} +td span.inline2 { + background: #282828; +} +tt { + font-family: menlo, consolas, monospace; + font-weight: bold; + font-size: 17px; +} +/* -------------------------------------------------------- HORIZONTAL RULERS */ +hr { + margin-left: 20px; + margin-right: 20px; + border: 1px solid #555; +} +.droptext hr { + margin-left: 52px; + margin-right: 20px; + border: 1px solid #555; +} +ul hr { + margin-left: 0px; + margin-right: 0px; + border: 1px solid #444; +} +/* -------------------------------------------------------- TAGS */ +span.important, +span.note, +span.optional, +span.tip, +span.warning { + background-color: #d65827; + padding: 3px; + border-radius: 4px; + font-weight: bold; + color: white; + font-size: 15px; + margin-right: 2px; + box-shadow: 0px 2px 1px #282828; +} +span.note { + background-color: #2966B6; +} +span.optional { + background-color: #a77000; + color: white; +} +span.tip { + background-color: #118822; +} +span.warning { + background-color: #882233; +} +/* -------------------------------------------------------- LINKS */ +a { + text-decoration: none; +} +a:link, +a:visited { + font-weight: bold; + color: #04de80; +} +th a:link, +th a:visited { + font-weight: bold; + color: #eeeeee; + text-decoration: underline; +} +a[data-rhwidget="HyperlinkPopover"] { + font-weight: 550; +} +a.nocolour:link, +a.nocolour:visited { + font-weight: bold; +} +a:hover, +a:active { + color: #ffffff; +} +a.expandspot { + color: #79D779; + cursor: pointer; + text-decoration: underline; + font-size: 22px; + font-weight: bold; + line-height: 1.5; + margin-left: 20px; +} +span.expandtext { + font-style: italic; + font-weight: normal; + text-align: justify; + margin-left: 20px; + line-height: 1.5; +} +span.dropspotnote { + font-style: italic; + font-weight: normal; + text-align: justify; + margin-left: 20px; + line-height: 1.5; + font-size: 17px; +} +a.dropspot { + cursor: pointer; + color: #79D779; + font-family: 'open_sanssemibold'; + text-decoration: underline; + letter-spacing: 1px; + font-weight: bold; + font-size: 22px; + margin-left: 20px; +} +a.glossterm { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; +} +h1 a.glossterm:before { + content:"("; +} +h1 a.glossterm:after { + content:")"; +} +h1 a.glossterm { + margin-left: 0.2em; + font-size: 18px; + text-decoration: none; + cursor: pointer; + font-weight: bold; + font-style: italic; + color: #F2AF4B; +} +a.tooltip { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; +} +span.glosstext { + font-style: italic; + font-weight: normal; + color: #0000ff; +} +span.glossextra { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; + font-style: italic; +} +a[href^="https://"], +a[href^="http://"] { + background: url('../Images/Icons/Icon_External_Link.png') center right no-repeat; + background-size: 9px; + background-position: right 0px top 6px; + padding-right: 13px; +} +/* -------------------------------------------------------- LISTS */ +ul { + margin-top: -20px; + margin-bottom: 10px; + padding-left: 80px; +} +ol { + margin-top: -12px; + margin-bottom: 10px; + padding-left: 80px; +} +ul li { + margin-top: 20px; + margin-bottom: -5px; +} +ol li { + margin-top: 20px; + margin-bottom: -5px; + counter-increment: list; + list-style-type: none; + position: relative; +} +ol li::before { + color: #04de80; + content: counter(list) "."; + left: -32px; + position: absolute; + text-align: right; + width: 26px; +} +ul.colour { + list-style: none; +} +ul.colour li { + margin-top: 22px; +} +ul.colour li li { + list-style: none; +} +ul.colour li::before { + content: "\2022"; + color: #04de80; + font-weight: bold; + display: inline-block; + width: 1em; + margin-left: -1em; + height: 1.5em; +} +ul.dropspotlist { + list-style: none; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 120px; + counter-reset: item1; +} +ul.dropspotlist li::before { + content: "\2022"; + color: #04de80; + font-weight: bold; + display: inline-block; + width: 1em; + margin-left: -1em; + height: 1.5em; +} +ul.dropspotlist li { + margin-top: 22px; +} +ul.dropspotlist li li { + list-style: none; + margin-top: 10px; +} +/* -------------------------------------------------------- IMAGES */ +img.center { + display: block; + margin-top: 5px; + max-width: 90%; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + position: relative; +} +img.center_shadow, img.left_shadow, img.right_shadow { + display: block; + margin-top: 5px; + max-width: 70%; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + position: relative; + box-shadow: 4px 4px 10px 2px #000; +} +img.left_shadow, img.right_shadow { + display: block; + position: relative; + max-width: auto; + width: auto; + margin-left: 20px; + margin-right: 40px; +} +img.left_shadow { + float: left; +} +img.right_shadow { + float: right; +} +img.icon { + vertical-align: middle; +} +img.icon_small { + vertical-align: middle; + max-height: 24px; +} +img.invisible { + display: none; + position: relative; +} +iframe.center { + display: block; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 400px; + max-width: 800px; + border-radius: 0.5em; +} +figcaption { + font-size: 15px; + font-style: italic; + text-align: center; + margin-top: -15px; +} +div.image_columns { + display: flex; + gap: 10px; + flex-direction: row; + align-items: center; + justify-content: center; + margin-bottom: 18px; +} +div.image_columns img, +div.image_columns figure img { + max-height: 500px; +} +div.image_columns figure figcaption { + font-size: 16px; + font-style: normal; + text-align: center; + margin-top: 0px; +} +/* -------------------------------------------------------- VIDEOS */ +video.center { + display: block; + margin-top: 20px; + max-width: 90%; + margin-bottom: 40px; + margin-left: auto; + margin-right: auto; + position: relative; +} +p.video_subtitle { + font-size: 15px; + font-style: italic; + text-align: center; + margin-bottom: 16px; + margin-top: -40px; +} +/* -------------------------------------------------------- DIVS */ +div.banner { + background-color: #000000; + border-width: 3px; + border-style: solid; + border-color: #000000; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-left: 10px; + margin-bottom: 10px; +} +div.clear { + clear: both; + background: #444444; + padding: 10px; + border-radius: 0.5em 0.5em 0 0; + + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: flex-start; +} +div.clear a { + font-weight: normal; +} +div.clear:nth-child(1) { + +} +div.clear:nth-child(2) { + +} +div.dropspotnote { + font-style: italic; + margin-left: 85px; + padding-top: 20px; + padding-bottom: 20px; + font-size: 16px; +} +div.snippet_quote { + margin-left: 30px; + font-style: italic; + color: #CCC; +} +/* -------------------------------------------------------- TABLES */ +table { + border: solid #026b3e 2px; + border-collapse: separate; + border-spacing: px; + background: #333333; + width: 80%; + margin-top: 1em; + margin-bottom: 1em; + margin-left: auto; + margin-right: auto; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} +th { + color: #efefef; + background: #039e5c; + border-style: none !important; + text-align: center; +} +td { + border-spacing: 2px; + border: solid #333333 1px; + padding: 10px 10px; +} +tr { + border-spacing: 2px; + border: solid #039e5c 1px; + border-spacing: 2px; + background: #555555; +} +table.icons { + padding-left: 25px; + border: 0px; + border-collapse: separate; + border-spacing: 10px; + width: 100%; + margin-left: auto; + margin-right: auto; + background: #282828; + box-shadow: 0px 0px 0px #282828; +} +table.dnd { + padding-left: 25px; + border: 0px; + border-collapse: separate; + border-spacing: 20px; + width: 50%; + background: #282828; + box-shadow: 0px 0px 0px #282828; + float: left; +} +td.icons { + background: #282828; + width: 50px; + border: 0px; +} +td.dnd_icons { + background: #282828; + border: 0px; +} +td.text { + background: #282828; + border: 0px; +} +td.dnd { + background: #282828; + border: 0px; + width: 200px; +} +tr:nth-child(odd) { + background: #4d4d4d; + width: 80%; +} +table.dnd td:nth-child(odd) { + content: "200px"; +} +/* -------------------------------------------------------- POP UP */ +.rh-popover { + min-width: 1000px; + border: 0.125rem solid #4e4e4e; +} +/* -------------------------------------------------------- EXTRAS */ +.body-scroll { + display: block; + position: absolute; + top: 70px; + bottom: 72px; + left: 0; + width: 100%; + margin-left: auto; + margin-right: auto; + overflow-y: auto; +} +.footer { + position: relative; + bottom: 0; + width: 100%; + height: 70px; + left: 0; +} +.buttons { + position: relative; + width: 100%; +} +/* -------------------------------------------------------- EXAMPLE CANVAS RELATED */ +canvas.gml_reference_example { + display: block; + margin-left: auto; + margin-right: auto; + border: 2px solid #444; + border-radius: 16px; + background-color: #222; +} +p.canvas_subtitle { + font-size: 15px; + font-style: italic; + text-align: center; + margin-bottom: 16px; + margin-top: -8px; +} +/* -------------------------------------------------------- MINI TOC */ +a.minitoc-caption { + text-decoration: none; + color: initial; + font-weight: bold; + font-size: 12pt; +} +p.minitoc-caption { + font-weight: bold; + font-size: 12pt; +} +ol.minitoc-list { + padding-left: 0; + margin-left: 0; + list-style: none; +} +ol.minitoc-list ol { + list-style: none; +} +a.minitoc-list-item {} +div.seealso { + background-color: #444; + border-radius: 16px; + margin: 30px; + padding-top: 8px; + padding-bottom: 8px; +} +p.seealso-caption { + background-color: #444; + font-weight: bold; + font-size: 14pt; + border-radius: 16px; +} +ol.seealso-list { + background-color: #444; + padding-left: 20px; +} +a.seealso-list-item { + padding-left: 20px; +} +p.reltopics-caption { + font-weight: bold; + font-size: 12pt; +} +ol.reltopics-list { + padding-left: 0; + margin-left: 0; + list-style: none; +} +a.reltopics-list-item {} +ul.Disc { + list-style-type: disc; +} +ul.dropspotlist>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 120px; + position: relative; +} +ul.dropspotlist>li:before { + counter-increment: item1; + content: counter(item1, disc); + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + width: var(--prefix-size); + overflow: hidden; + margin-right: var(--prefix-gap); +} +ol.AlphaNumeric { + list-style: decimal; +} +ol.AlphaNumeric>li>ol { + list-style: lower-alpha; +} +ol.AlphaNumeric>li>ol>li>ol { + list-style: lower-roman; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item4; + list-style: none; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li:before { + counter-increment: item4; + content: "("counter(item4, decimal)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol { + list-style: none; + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item5; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li:before { + counter-increment: item5; + content: "("counter(item5, lower-alpha)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol { + list-style: none; + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item6; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol>li:before { + counter-increment: item6; + content: "("counter(item6, lower-roman)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.RoundSquare { + list-style: disc; +} +ol.RoundSquare>li>ol { + list-style: square; +} +ol.RoundSquare>li>ol>li>ol { + list-style: circle; +} +ol.RoundSquare>li>ol>li>ol>li>ol { + list-style: disc; +} +ol.RoundSquare>li>ol>li>ol>li>ol>li>ol { + list-style: square; +} +ol.RoundSquare>li>ol>li>ol>li>ol>li>ol>li>ol { + list-style: circle; +} +ol.Decimal { + list-style-type: decimal; +} +p { + margin: 0; + padding: 0.5em 1em; + background: #282828; + text-align: justify; + text-justify: inter-word; + font-family: 'open_sansregular'; + line-height: 1.5; +} +/* hightlight.js (GML)*/ pre code.hljs{display:block;overflow-x:auto;padding:1em;}code.hljs{padding:3px 5px;}.hljs{background:#222;color:silver;}.hljs-keyword{color:#ffb871;font-weight:700;}.hljs-built_in{color:#ffb871;}.hljs-literal{color:#ff8080;}.hljs-symbol{color:#58e55a;}.hljs-comment{color:#5b995b;}.hljs-string{color:#ff0;}.hljs-number{color:#ff8080;}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-code,.hljs-deletion,.hljs-doctag,.hljs-function,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-name,.hljs-quote,.hljs-regexp,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:silver;}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:700;} \ No newline at end of file diff --git a/Manual/publish/templates/PDF TEST/layout.css b/Manual/publish/templates/PDF TEST/layout.css new file mode 100644 index 000000000..a98d8d2a9 --- /dev/null +++ b/Manual/publish/templates/PDF TEST/layout.css @@ -0,0 +1,200 @@ +/*Created with Adobe RoboHelp*/ +body { + font-family: Calibri; + font-size: 11 pt; +} +a { + text-decoration: underline; +} +/*Chapter Styling*/ +.chapter-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.chapter-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.chapter-body {} +/* +.topic-body {} +*/ +/*TOC Styling*/ +.toc-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.toc-footer { + font-weight: bold; + font-size: 11pt; + color: #888888; + text-align: center; +} +.toc-body {} +.toc-title { + font-size: 21pt; + font-weight: bold; + margin-top: 24pt; + margin-bottom: 24pt; +} +.toc-level-1 { + font-size: 15pt; + text-decoration: none; + font-weight: bold; +} +/* +.toc-level-1::after { + content: leader(solid) " "target-counter(attr(href url), page) !important; +} +*/ +.toc-level-2 { + font-size: 14pt; + text-decoration: none; + font-weight: bold; +} +.toc-level-3 { + font-size: 13pt; + text-decoration: none; +} +.toc-level-4 { + font-size: 12pt; + text-decoration: none; +} +.toc-level-5 { + font-size: 11pt; + text-decoration: none; +} +.toc-level-6 { + font-size: 11pt; + text-decoration: none; +} +/*Chapter TOC Styling*/ +.chaptoc-body {} +.chaptoc-level-1 { + font-size: 12pt; + text-decoration: none; +} +.chaptoc-level-2 { + font-size: 12pt; + text-decoration: none; +} +.chaptoc-level-3 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-4 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-5 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-6 { + font-size: 11pt; + text-decoration: none; +} +/*List of Figures Styling*/ +.lof-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.lof-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.lof-body {} +.lof-title {} +.lof-level-1 { + text-decoration: none; +} +/*List of Tables styling*/ +.lot-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.lot-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.lot-body {} +.lot-title {} +.lot-level-1 { + text-decoration: none; +} +/*Index Styling*/ +.idx-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.idx-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.idx-body { + column-count: 2; + column-fill: balance; +} +.idx-title { + column-span: all; +} +.idx-keyword-group { + font-weight: bold; + font-size: 12pt; + margin-top: 16pt; +} +.idx-keyword-group:first-of-type { + margin-top: 0pt; +} +.idx-unit {} +.idx-keyword {} +.idx-name {} +.idx-link { + text-decoration: none; +} +.idx-child { + padding-left: 10pt; +} +/*Glossary Styling*/ +.glo-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.glo-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.glo-body {} +.glo-title {} +.glo-unit {} +.glo-term { + font-weight: bold; + margin-top: 16pt; +} +.glo-definition {} +/*Footnote Styling*/ +.fn { + float: footnote; +} +.fn::footnote-call { + content: counter(footnote, decimal); +} +.fn::footnote-marker { + content: counter(footnote, decimal); +} \ No newline at end of file diff --git a/Manual/publish/templates/PDF TEST/pdf.css b/Manual/publish/templates/PDF TEST/pdf.css new file mode 100644 index 000000000..c826b3e4d --- /dev/null +++ b/Manual/publish/templates/PDF TEST/pdf.css @@ -0,0 +1,61 @@ +/*Created with Adobe RoboHelp 2019*/ +/*TOC Styling*/ +body.pdf-toc-body {} +.toc-title { + color: #FFFFFF; +} +p.pdf-toc { + color: #FFFFFF +} +a.pdf-toc-link { + color: #FFFFFF +} +a.pdf-toc-link:after {} +span.pdf-toc-page-no {} +p.pdf-toc-level1 { + color: #FFFFFF +} +a.pdf-toc-link-level1 { + color: #FFFFFF +} +span.pdf-toc-page-no-level1 {} +p.pdf-toc-level2 { + color: #FFFFFF +} +a.pdf-toc-link-level2 { + color: #FFFFFF +} +span.pdf-toc-page-no-level2 {} +p.pdf-toc-level3 { + color: #FFFFFF +} +p.pdf-toc-level4 { + color: #FFFFFF +} +p.pdf-toc-level5 { + color: #FFFFFF +} +p.pdf-toc-level6 { + color: #FFFFFF +} +/*Index Styling*/ +body.pdf-idx-body {} +h1.pdf-idx-title { + color: #FFFFFF +} +div.pdf-idx-unit {} +p.pdf-idx-keyword { + color: #FFFFFF +} +div.pdf-idx-topics {} +p.pdf-idx-topic { + color: #FFFFFF +} +a.pdf-idx-link {} +div.pdf-idx-child {} +/*Glossary Styling*/ +body.pdf-glo-body {} +h1.pdf-glo-title {} +div.pdf-glo-unit {} +p.pdf-glo-term {} +p.pdf-glo-definition {} \ No newline at end of file diff --git a/Manual/publish/templates/PDF TEST/pdf.plt b/Manual/publish/templates/PDF TEST/pdf.plt new file mode 100644 index 000000000..e91065f9c --- /dev/null +++ b/Manual/publish/templates/PDF TEST/pdf.plt @@ -0,0 +1,21 @@ + + + + + pdf + + + +
    +

    +
    + + + + +
    +

    Blank Project1                                                                                                        Page 1 of + 1 + +

    +
    \ No newline at end of file diff --git a/Manual/publish/templates/PDF TEST/pdf.tpl b/Manual/publish/templates/PDF TEST/pdf.tpl new file mode 100644 index 000000000..66e866330 --- /dev/null +++ b/Manual/publish/templates/PDF TEST/pdf.tpl @@ -0,0 +1,30 @@ + + + pdf + PDF TEST + 2022.0.0 + pdf + + + + + + Continued on page %page-num% + Continued from page %page-num% + true + false + dotted + false + true + 4 + true + true + false + false + true + false + false + false + false + RGB + \ No newline at end of file diff --git a/Manual/publish/templates/PDF/default.css b/Manual/publish/templates/PDF/default.css new file mode 100644 index 000000000..dfe587f64 --- /dev/null +++ b/Manual/publish/templates/PDF/default.css @@ -0,0 +1,984 @@ +/*Created with Adobe RoboHelp 2019.*/ +/* -------------------------------------------------------- BODY */ +@font-face { + font-family: 'open_sansbold'; + src: url('../fonts/opensans-bold-webfont.woff2') format('woff2'), url('../fonts/opensans-bold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansbold_italic'; + src: url('../fonts/opensans-bolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-bolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansextrabold'; + src: url('../fonts/opensans-extrabold-webfont.woff2') format('woff2'), url('../fonts/opensans-extrabold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansextrabold_italic'; + src: url('../fonts/opensans-extrabolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-extrabolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sansitalic'; + src: url('../fonts/opensans-italic-webfont.woff2') format('woff2'), url('../fonts/opensans-italic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanslight'; + src: url('../fonts/opensans-light-webfont.woff2') format('woff2'), url('../fonts/opensans-light-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanslight_italic'; + src: url('../fonts/opensans-lightitalic-webfont.woff2') format('woff2'), url('../fonts/opensans-lightitalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal +} +@font-face { + font-family: 'open_sansregular'; + src: url('../fonts/opensans-regular-webfont.woff2') format('woff2'), url('../fonts/opensans-regular-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanssemibold'; + src: url('../fonts/opensans-semibold-webfont.woff2') format('woff2'), url('../fonts/opensans-semibold-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'open_sanssemibold_italic'; + src: url('../fonts/opensans-semibolditalic-webfont.woff2') format('woff2'), url('../fonts/opensans-semibolditalic-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +body { + font-family: 'open_sansregular'; + background: #282828; + color: #cfcfcf; + font-size: 18px; + margin: 8px 0 0 0; + line-height: 1.5; +} +/* -------------------------------------------------------- HEADERS */ +h1 { + font-size: 20pt; + font-family: 'open_sansbold'; + background-image: url('CSS_Images/Header_Bar_Front.png'), url('CSS_Images/Header_Bar_Back.gif'); + margin: 0 0 0.5em 0; + padding: 0 0 0 0.5em; + line-height: 40px; + background-position: left, left; + background-repeat: no-repeat, repeat; + border-radius: 0.5em 0.5em 0 0; + color: #FFFFFF; + box-shadow: 0px 0px 5px #181818; +} +@media screen and (max-width:600px){ + h1 { + background-repeat: repeat, repeat; + } +} +h2 { + background-image: url('CSS_Images/H2_underline.png'); + background-repeat: no-repeat, repeat; + background-position: left 20px top 44px; + font-family: 'open_sansbold'; + font-size: 18pt; + padding-left: 20px; + padding-top: 10px; + margin-top: 2em; + margin-bottom: 10px; +} +h1 + h2 { + margin-top: 0px; +} +h3 { + font-family: 'open_sansbold'; + padding-left: 20px; + font-weight: bold; + font-size: 16pt; + margin-top: 32px; + margin-bottom: 10px; + color: #dedede; +} +h4 { + font-weight: bold; + font-size: 12.0pt; + background: #181818; + color: #cfcfcf; + margin-left: 45px; + margin-right: 10px; + text-justify: none; + text-align: left; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + margin-top: 10px; + margin-bottom: -20px; + border-width: 5px; + border-style: solid; + border-color: #282828; + width: auto; + display: inline-block; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; +} +h5 { + color: #181818; + text-align: center; + font-size: 0.75em; + font-weight: bold; + background: #039e5c; + border-radius: 0 0 1em 1em; + padding-top: 0.5em; + padding-right: 0.5em; + padding-bottom: 0.5em; + padding-left: 0.5em; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; +} +h6 { + font-weight: bold; + font-size: 8.0pt; +} +/* -------------------------------------------------------- PARAGRAPHS */ +p, +ul, +ol { + margin: 0; + padding: 0.5em 1em; + background: #282828; + text-align: justify; + text-justify: inter-word; + font-family: 'open_sansregular'; + line-height: 1.5; +} +p.dropspot { + margin: 0; + background: #282828; + text-align: justify; + text-justify: inter-word; + padding-top: 0.5em; + padding-right: 1em; + padding-bottom: 0.5em; + padding-left: 3em; +} +.droptext { + padding-left: 1em; +} +p.code_heading { + font-weight: bold; + font-size: 12.0pt; + background: #018d4b; + color: #dfdfdf; + margin-left: 45px; + margin-right: 10px; + text-justify: none; + text-align: left; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; + margin-top: 10px; + margin-bottom: -20px; + border-width: 5px; + border-style: solid; + border-color: #282828; + width: auto; + display: inline-block; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + border-bottom-left-radius: 15px; +} +p.code, +p.code_plain, +pre { + font-family: menlo, consolas, monospace; + background: #181818; + color: #cfcfcf; + margin-left: 50px; + margin-right: 50px; + text-justify: none; + text-align: left; + border-radius: 10px; + padding-top: 20px; + padding-right: 20px; + padding-bottom: 20px; + padding-left: 20px; + margin-top: 1em; + margin-bottom: 15px; + font-size: 14px; + line-height: 1.25; + overflow-wrap: break-word; +} +h4 + p.code, +h4 + p.code_plain, +p.code_heading + p.code, +p.code_heading + p.code_plain +{ + margin-top: 1px; +} +p.code + p.code_heading, +p.code_plain + p.code_heading { + margin-top: -10px; +} +p.note { + margin-left: 30px; + margin-top: 20px; + margin-bottom: 20px; + padding-top: 10px; + padding-bottom: 10px; + font-size: 17px; + margin-right: 30px; + background-color: #343434; + border-radius: 8px; +} +p.note_heading { + margin-left: 30px; + margin-top: 20px; + margin-bottom: -20px; + padding: 8px; + padding-left: 12px; + padding-right: 12px; + font-size: 17px; + width: max-content; + background-color: #018d4b; + color: #efefef; + border-radius: 8px; + font-weight: 800; + font-style: italic; +} +p.note_heading + p.note { + margin-bottom: 40px; + padding-top: 16px; +} +.droptext p.note { + margin-left: 50px; +} +span.inline { + font-family: menlo, consolas, monospace; + font-weight: 700; + font-size: 17px; +} +span.inline2 { + font-family: menlo, consolas, monospace; + background: #181818; + color: #cfcfcf; + text-justify: none; + text-align: left; + border-radius: 10px; + padding: 4px; + padding-left: 4px; + padding-right: 4px; + margin-left: 2px; + margin-right: 2px; + font-size: 15px; + line-height: 1.25; + position: relative; + bottom: 2px; +} +td span.inline2 { + background: #282828; +} +tt { + font-family: menlo, consolas, monospace; + font-weight: bold; + font-size: 17px; +} +/* -------------------------------------------------------- HORIZONTAL RULERS */ +hr { + margin-left: 20px; + margin-right: 20px; + border: 1px solid #555; +} +.droptext hr { + margin-left: 52px; + margin-right: 20px; + border: 1px solid #555; +} +ul hr { + margin-left: 0px; + margin-right: 0px; + border: 1px solid #444; +} +/* -------------------------------------------------------- TAGS */ +span.important, +span.note, +span.optional, +span.tip, +span.warning { + background-color: #d65827; + padding: 3px; + border-radius: 4px; + font-weight: bold; + color: white; + font-size: 15px; + margin-right: 2px; + box-shadow: 0px 2px 1px #282828; +} +span.note { + background-color: #2966B6; +} +span.optional { + background-color: #a77000; + color: white; +} +span.tip { + background-color: #118822; +} +span.warning { + background-color: #882233; +} +/* -------------------------------------------------------- LINKS */ +a { + text-decoration: none; +} +a:link, +a:visited { + font-weight: bold; + color: #04de80; +} +th a:link, +th a:visited { + font-weight: bold; + color: #eeeeee; + text-decoration: underline; +} +a[data-rhwidget="HyperlinkPopover"] { + font-weight: 550; +} +a.nocolour:link, +a.nocolour:visited { + font-weight: bold; +} +a:hover, +a:active { + color: #ffffff; +} +a.expandspot { + color: #79D779; + cursor: pointer; + text-decoration: underline; + font-size: 22px; + font-weight: bold; + line-height: 1.5; + margin-left: 20px; +} +span.expandtext { + font-style: italic; + font-weight: normal; + text-align: justify; + margin-left: 20px; + line-height: 1.5; +} +span.dropspotnote { + font-style: italic; + font-weight: normal; + text-align: justify; + margin-left: 20px; + line-height: 1.5; + font-size: 17px; +} +a.dropspot { + cursor: pointer; + color: #79D779; + font-family: 'open_sanssemibold'; + text-decoration: underline; + letter-spacing: 1px; + font-weight: bold; + font-size: 22px; + margin-left: 20px; +} +a.glossterm { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; +} +h1 a.glossterm:before { + content:"("; +} +h1 a.glossterm:after { + content:")"; +} +h1 a.glossterm { + margin-left: 0.2em; + font-size: 18px; + text-decoration: none; + cursor: pointer; + font-weight: bold; + font-style: italic; + color: #F2AF4B; +} +a.tooltip { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; +} +span.glosstext { + font-style: italic; + font-weight: normal; + color: #0000ff; +} +span.glossextra { + cursor: pointer; + text-decoration: underline; + font-weight: bold; + color: #E28F4B; + font-style: italic; +} +a[href^="https://"], +a[href^="http://"] { + background: url('../Images/Icons/Icon_External_Link.png') center right no-repeat; + background-size: 9px; + background-position: right 0px top 6px; + padding-right: 13px; +} +/* -------------------------------------------------------- LISTS */ +ul { + margin-top: -20px; + margin-bottom: 10px; + padding-left: 80px; +} +ol { + margin-top: -12px; + margin-bottom: 10px; + padding-left: 80px; +} +ul li { + margin-top: 20px; + margin-bottom: -5px; +} +ol li { + margin-top: 20px; + margin-bottom: -5px; + counter-increment: list; + list-style-type: none; + position: relative; +} +ol li::before { + color: #04de80; + content: counter(list) "."; + left: -32px; + position: absolute; + text-align: right; + width: 26px; +} +ul.colour { + list-style: none; +} +ul.colour li { + margin-top: 22px; +} +ul.colour li li { + list-style: none; +} +ul.colour li::before { + content: "\2022"; + color: #04de80; + font-weight: bold; + display: inline-block; + width: 1em; + margin-left: -1em; + height: 1.5em; +} +ul.dropspotlist { + list-style: none; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 120px; + counter-reset: item1; +} +ul.dropspotlist li::before { + content: "\2022"; + color: #04de80; + font-weight: bold; + display: inline-block; + width: 1em; + margin-left: -1em; + height: 1.5em; +} +ul.dropspotlist li { + margin-top: 22px; +} +ul.dropspotlist li li { + list-style: none; + margin-top: 10px; +} +/* -------------------------------------------------------- IMAGES */ +img.center { + display: block; + margin-top: 5px; + max-width: 90%; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + position: relative; +} +img.center_shadow, img.left_shadow, img.right_shadow { + display: block; + margin-top: 5px; + max-width: 70%; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + position: relative; + box-shadow: 4px 4px 10px 2px #000; +} +img.left_shadow, img.right_shadow { + display: block; + position: relative; + max-width: auto; + width: auto; + margin-left: 20px; + margin-right: 40px; +} +img.left_shadow { + float: left; +} +img.right_shadow { + float: right; +} +img.icon { + vertical-align: middle; +} +img.icon_small { + vertical-align: middle; + max-height: 24px; +} +img.invisible { + display: none; + position: relative; +} +iframe.center { + display: block; + margin-left: auto; + margin-right: auto; + width: 100%; + height: 400px; + max-width: 800px; + border-radius: 0.5em; +} +figcaption { + font-size: 15px; + font-style: italic; + text-align: center; + margin-top: -15px; +} +div.image_columns { + display: flex; + gap: 10px; + flex-direction: row; + align-items: center; + justify-content: center; + margin-bottom: 18px; +} +div.image_columns img, +div.image_columns figure img { + max-height: 500px; +} +div.image_columns figure figcaption { + font-size: 16px; + font-style: normal; + text-align: center; + margin-top: 0px; +} +/* -------------------------------------------------------- VIDEOS */ +video.center { + display: block; + margin-top: 20px; + max-width: 90%; + margin-bottom: 40px; + margin-left: auto; + margin-right: auto; + position: relative; +} +p.video_subtitle { + font-size: 15px; + font-style: italic; + text-align: center; + margin-bottom: 16px; + margin-top: -40px; +} +/* -------------------------------------------------------- DIVS */ +div.banner { + background-color: #000000; + border-width: 3px; + border-style: solid; + border-color: #000000; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-left: 10px; + margin-bottom: 10px; +} +div.clear { + clear: both; + background: #444444; + padding: 10px; + border-radius: 0.5em 0.5em 0 0; + + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: flex-start; +} +div.clear a { + font-weight: normal; +} +div.clear:nth-child(1) { + +} +div.clear:nth-child(2) { + +} +div.dropspotnote { + font-style: italic; + margin-left: 85px; + padding-top: 20px; + padding-bottom: 20px; + font-size: 16px; +} +div.snippet_quote { + margin-left: 30px; + font-style: italic; + color: #CCC; +} +/* -------------------------------------------------------- TABLES */ +table { + border: solid #026b3e 2px; + border-collapse: separate; + border-spacing: px; + background: #333333; + width: 80%; + margin-top: 1em; + margin-bottom: 1em; + margin-left: auto; + margin-right: auto; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} +th { + color: #efefef; + background: #039e5c; + border-style: none !important; + text-align: center; +} +td { + border-spacing: 2px; + border: solid #333333 1px; + padding: 10px 10px; +} +tr { + border-spacing: 2px; + border: solid #039e5c 1px; + border-spacing: 2px; + background: #555555; +} +table.icons { + padding-left: 25px; + border: 0px; + border-collapse: separate; + border-spacing: 10px; + width: 100%; + margin-left: auto; + margin-right: auto; + background: #282828; + box-shadow: 0px 0px 0px #282828; +} +table.dnd { + padding-left: 25px; + border: 0px; + border-collapse: separate; + border-spacing: 20px; + width: 50%; + background: #282828; + box-shadow: 0px 0px 0px #282828; + float: left; +} +td.icons { + background: #282828; + width: 50px; + border: 0px; +} +td.dnd_icons { + background: #282828; + border: 0px; +} +td.text { + background: #282828; + border: 0px; +} +td.dnd { + background: #282828; + border: 0px; + width: 200px; +} +tr:nth-child(odd) { + background: #4d4d4d; + width: 80%; +} +table.dnd td:nth-child(odd) { + content: "200px"; +} +/* -------------------------------------------------------- POP UP */ +.rh-popover { + min-width: 1000px; + border: 0.125rem solid #4e4e4e; +} +/* -------------------------------------------------------- EXTRAS */ +.body-scroll { + display: block; + position: absolute; + top: 70px; + bottom: 72px; + left: 0; + width: 100%; + margin-left: auto; + margin-right: auto; + overflow-y: auto; +} +.footer { + position: relative; + bottom: 0; + width: 100%; + height: 70px; + left: 0; +} +.buttons { + position: relative; + width: 100%; +} +/* -------------------------------------------------------- EXAMPLE CANVAS RELATED */ +canvas.gml_reference_example { + display: block; + margin-left: auto; + margin-right: auto; + border: 2px solid #444; + border-radius: 16px; + background-color: #222; +} +p.canvas_subtitle { + font-size: 15px; + font-style: italic; + text-align: center; + margin-bottom: 16px; + margin-top: -8px; +} +/* -------------------------------------------------------- MINI TOC */ +a.minitoc-caption { + text-decoration: none; + color: initial; + font-weight: bold; + font-size: 12pt; +} +p.minitoc-caption { + font-weight: bold; + font-size: 12pt; +} +ol.minitoc-list { + padding-left: 0; + margin-left: 0; + list-style: none; +} +ol.minitoc-list ol { + list-style: none; +} +a.minitoc-list-item {} +div.seealso { + background-color: #444; + border-radius: 16px; + margin: 30px; + padding-top: 8px; + padding-bottom: 8px; +} +p.seealso-caption { + background-color: #444; + font-weight: bold; + font-size: 14pt; + border-radius: 16px; +} +ol.seealso-list { + background-color: #444; + padding-left: 20px; +} +a.seealso-list-item { + padding-left: 20px; +} +p.reltopics-caption { + font-weight: bold; + font-size: 12pt; +} +ol.reltopics-list { + padding-left: 0; + margin-left: 0; + list-style: none; +} +a.reltopics-list-item {} +ul.Disc { + list-style-type: disc; +} +ul.dropspotlist>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 120px; + position: relative; +} +ul.dropspotlist>li:before { + counter-increment: item1; + content: counter(item1, disc); + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + width: var(--prefix-size); + overflow: hidden; + margin-right: var(--prefix-gap); +} +ol.AlphaNumeric { + list-style: decimal; +} +ol.AlphaNumeric>li>ol { + list-style: lower-alpha; +} +ol.AlphaNumeric>li>ol>li>ol { + list-style: lower-roman; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item4; + list-style: none; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li:before { + counter-increment: item4; + content: "("counter(item4, decimal)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol { + list-style: none; + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item5; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li:before { + counter-increment: item5; + content: "("counter(item5, lower-alpha)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol { + list-style: none; + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + counter-reset: item6; + padding-left: var(--prefix-size); + margin-left: calc(var(--list-indent) - var(--prefix-size)); +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol>li:before { + counter-increment: item6; + content: "("counter(item6, lower-roman)")"; + text-align: right; + position: absolute; + left: calc(-1 * var(--prefix-size) - var(--prefix-gap)); + margin-right: var(--prefix-gap); + width: var(--prefix-size); + overflow: hidden; +} +ol.AlphaNumeric>li>ol>li>ol>li>ol>li>ol>li>ol>li { + --prefix-size: 40px; + --prefix-fixed-size: false; + --prefix-gap: 4px; + --list-indent: 40px; + position: relative; +} +ol.RoundSquare { + list-style: disc; +} +ol.RoundSquare>li>ol { + list-style: square; +} +ol.RoundSquare>li>ol>li>ol { + list-style: circle; +} +ol.RoundSquare>li>ol>li>ol>li>ol { + list-style: disc; +} +ol.RoundSquare>li>ol>li>ol>li>ol>li>ol { + list-style: square; +} +ol.RoundSquare>li>ol>li>ol>li>ol>li>ol>li>ol { + list-style: circle; +} +ol.Decimal { + list-style-type: decimal; +} +p { + margin: 0; + padding: 0.5em 1em; + background: #282828; + text-align: justify; + text-justify: inter-word; + font-family: 'open_sansregular'; + line-height: 1.5; +} +/* hightlight.js (GML)*/ pre code.hljs{display:block;overflow-x:auto;padding:1em;}code.hljs{padding:3px 5px;}.hljs{background:#222;color:silver;}.hljs-keyword{color:#ffb871;font-weight:700;}.hljs-built_in{color:#ffb871;}.hljs-literal{color:#ff8080;}.hljs-symbol{color:#58e55a;}.hljs-comment{color:#5b995b;}.hljs-string{color:#ff0;}.hljs-number{color:#ff8080;}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-code,.hljs-deletion,.hljs-doctag,.hljs-function,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-name,.hljs-quote,.hljs-regexp,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:silver;}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:700;} \ No newline at end of file diff --git a/Manual/publish/templates/PDF/layout.css b/Manual/publish/templates/PDF/layout.css new file mode 100644 index 000000000..a98d8d2a9 --- /dev/null +++ b/Manual/publish/templates/PDF/layout.css @@ -0,0 +1,200 @@ +/*Created with Adobe RoboHelp*/ +body { + font-family: Calibri; + font-size: 11 pt; +} +a { + text-decoration: underline; +} +/*Chapter Styling*/ +.chapter-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.chapter-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.chapter-body {} +/* +.topic-body {} +*/ +/*TOC Styling*/ +.toc-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.toc-footer { + font-weight: bold; + font-size: 11pt; + color: #888888; + text-align: center; +} +.toc-body {} +.toc-title { + font-size: 21pt; + font-weight: bold; + margin-top: 24pt; + margin-bottom: 24pt; +} +.toc-level-1 { + font-size: 15pt; + text-decoration: none; + font-weight: bold; +} +/* +.toc-level-1::after { + content: leader(solid) " "target-counter(attr(href url), page) !important; +} +*/ +.toc-level-2 { + font-size: 14pt; + text-decoration: none; + font-weight: bold; +} +.toc-level-3 { + font-size: 13pt; + text-decoration: none; +} +.toc-level-4 { + font-size: 12pt; + text-decoration: none; +} +.toc-level-5 { + font-size: 11pt; + text-decoration: none; +} +.toc-level-6 { + font-size: 11pt; + text-decoration: none; +} +/*Chapter TOC Styling*/ +.chaptoc-body {} +.chaptoc-level-1 { + font-size: 12pt; + text-decoration: none; +} +.chaptoc-level-2 { + font-size: 12pt; + text-decoration: none; +} +.chaptoc-level-3 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-4 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-5 { + font-size: 11pt; + text-decoration: none; +} +.chaptoc-level-6 { + font-size: 11pt; + text-decoration: none; +} +/*List of Figures Styling*/ +.lof-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.lof-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.lof-body {} +.lof-title {} +.lof-level-1 { + text-decoration: none; +} +/*List of Tables styling*/ +.lot-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.lot-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.lot-body {} +.lot-title {} +.lot-level-1 { + text-decoration: none; +} +/*Index Styling*/ +.idx-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.idx-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.idx-body { + column-count: 2; + column-fill: balance; +} +.idx-title { + column-span: all; +} +.idx-keyword-group { + font-weight: bold; + font-size: 12pt; + margin-top: 16pt; +} +.idx-keyword-group:first-of-type { + margin-top: 0pt; +} +.idx-unit {} +.idx-keyword {} +.idx-name {} +.idx-link { + text-decoration: none; +} +.idx-child { + padding-left: 10pt; +} +/*Glossary Styling*/ +.glo-header { + font-weight: bold; + color: #888888; + font-size: 12pt; +} +.glo-footer { + font-weight: bold; + font-size: 12pt; + color: #888888; + text-align: center; +} +.glo-body {} +.glo-title {} +.glo-unit {} +.glo-term { + font-weight: bold; + margin-top: 16pt; +} +.glo-definition {} +/*Footnote Styling*/ +.fn { + float: footnote; +} +.fn::footnote-call { + content: counter(footnote, decimal); +} +.fn::footnote-marker { + content: counter(footnote, decimal); +} \ No newline at end of file diff --git a/Manual/publish/templates/PDF/pdf.css b/Manual/publish/templates/PDF/pdf.css new file mode 100644 index 000000000..c826b3e4d --- /dev/null +++ b/Manual/publish/templates/PDF/pdf.css @@ -0,0 +1,61 @@ +/*Created with Adobe RoboHelp 2019*/ +/*TOC Styling*/ +body.pdf-toc-body {} +.toc-title { + color: #FFFFFF; +} +p.pdf-toc { + color: #FFFFFF +} +a.pdf-toc-link { + color: #FFFFFF +} +a.pdf-toc-link:after {} +span.pdf-toc-page-no {} +p.pdf-toc-level1 { + color: #FFFFFF +} +a.pdf-toc-link-level1 { + color: #FFFFFF +} +span.pdf-toc-page-no-level1 {} +p.pdf-toc-level2 { + color: #FFFFFF +} +a.pdf-toc-link-level2 { + color: #FFFFFF +} +span.pdf-toc-page-no-level2 {} +p.pdf-toc-level3 { + color: #FFFFFF +} +p.pdf-toc-level4 { + color: #FFFFFF +} +p.pdf-toc-level5 { + color: #FFFFFF +} +p.pdf-toc-level6 { + color: #FFFFFF +} +/*Index Styling*/ +body.pdf-idx-body {} +h1.pdf-idx-title { + color: #FFFFFF +} +div.pdf-idx-unit {} +p.pdf-idx-keyword { + color: #FFFFFF +} +div.pdf-idx-topics {} +p.pdf-idx-topic { + color: #FFFFFF +} +a.pdf-idx-link {} +div.pdf-idx-child {} +/*Glossary Styling*/ +body.pdf-glo-body {} +h1.pdf-glo-title {} +div.pdf-glo-unit {} +p.pdf-glo-term {} +p.pdf-glo-definition {} \ No newline at end of file diff --git a/Manual/publish/templates/PDF/pdf.plt b/Manual/publish/templates/PDF/pdf.plt new file mode 100644 index 000000000..e91065f9c --- /dev/null +++ b/Manual/publish/templates/PDF/pdf.plt @@ -0,0 +1,21 @@ + + + + + pdf + + + +
    +

    +
    + + + + +
    +

    Blank Project1                                                                                                        Page 1 of + 1 + +

    +
    \ No newline at end of file diff --git a/Manual/publish/templates/PDF/pdf.tpl b/Manual/publish/templates/PDF/pdf.tpl new file mode 100644 index 000000000..0dfee8329 --- /dev/null +++ b/Manual/publish/templates/PDF/pdf.tpl @@ -0,0 +1,30 @@ + + + pdf + PDF + 2022.0.0 + pdf + + + + + + Continued on page %page-num% + Continued from page %page-num% + true + false + dotted + false + true + 4 + true + true + false + false + true + false + false + false + false + RGB + \ No newline at end of file diff --git a/Manual/settings/colors.json b/Manual/settings/colors.json new file mode 100644 index 000000000..86bcc69d8 --- /dev/null +++ b/Manual/settings/colors.json @@ -0,0 +1,66 @@ +[ + { + "name": "Black", + "value": "#000000" + }, + { + "name": "Red", + "value": "#FF0000" + }, + { + "name": "Lime", + "value": "#00FF00" + }, + { + "name": "Blue", + "value": "#0000FF" + }, + { + "name": "Maroon", + "value": "#800000" + }, + { + "name": "Green", + "value": "#008000" + }, + { + "name": "Navy", + "value": "#000080" + }, + { + "name": "Gray", + "value": "#808080" + }, + { + "name": "White", + "value": "#FFFFFF" + }, + { + "name": "Fuchsia", + "value": "#FF00FF" + }, + { + "name": "Aqua", + "value": "#00FFFF" + }, + { + "name": "Yellow", + "value": "#FFFF00" + }, + { + "name": "Purple", + "value": "#800080" + }, + { + "name": "Olive", + "value": "#808000" + }, + { + "name": "Teal", + "value": "#008080" + }, + { + "name": "Silver", + "value": "#C0C0C0" + } +] \ No newline at end of file diff --git a/Manual/settings/ctaggroups.json b/Manual/settings/ctaggroups.json new file mode 100644 index 000000000..0cfc5e9e9 --- /dev/null +++ b/Manual/settings/ctaggroups.json @@ -0,0 +1,5 @@ +[ + "Export", + "Licence", + "Misc" +] \ No newline at end of file diff --git a/Manual/settings/fields.json b/Manual/settings/fields.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/Manual/settings/fields.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/Manual/settings/fontlist.xml b/Manual/settings/fontlist.xml index a59e63094..77ae3ced2 100644 --- a/Manual/settings/fontlist.xml +++ b/Manual/settings/fontlist.xml @@ -1,2 +1 @@ - - \ No newline at end of file +{"systemfonts":true,"fontlist":[]} \ No newline at end of file diff --git a/Manual/settings/statuslist.json b/Manual/settings/statuslist.json new file mode 100644 index 000000000..425af897d --- /dev/null +++ b/Manual/settings/statuslist.json @@ -0,0 +1,8 @@ +[ + "Draft", + "In Progress", + "Ready for Review", + "Sent for Review", + "Reviewed", + "Complete" +] \ No newline at end of file diff --git a/Manual/toc/Default.toc b/Manual/toc/Default.toc index 2950bdc20..e5c0288df 100644 --- a/Manual/toc/Default.toc +++ b/Manual/toc/Default.toc @@ -728,6 +728,7 @@ + @@ -1205,12 +1206,13 @@ + + - @@ -1662,10 +1664,13 @@ + + + @@ -2754,6 +2759,16 @@ + + + + + + + + + + @@ -2766,23 +2781,15 @@ - - - - - - - - - + diff --git a/build_robohelp_gh.bat b/build_robohelp_gh.bat index b355a1917..768ee9446 100644 --- a/build_robohelp_gh.bat +++ b/build_robohelp_gh.bat @@ -90,4 +90,4 @@ type "%basedir%SupportFiles\layout_fix_append.css" >> "%DESTDIR%\RoboHelp\templa @REM rem ************************************************** ZIP up the output pushd %DESTDIR%\RoboHelp 7z a YoYoStudioRoboHelp.zip . -r -popd \ No newline at end of file +popd