Skip to content

Commit

Permalink
Merge pull request #165 from YoYoGames/develop.gurpreet
Browse files Browse the repository at this point in the history
Develop.gurpreet
  • Loading branch information
gurpreetsinghmatharoo authored Aug 26, 2024
2 parents e89ce30 + 9f0c3ef commit fc49719
Show file tree
Hide file tree
Showing 19 changed files with 125 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">buffer_save</span></h1>
<p>This function saves the contents of a buffer to a file, ready to be read back into memory using the <span class="inline3_func"><a data-xref="{title}" href="buffer_load.htm">buffer_load</a></span> function.</p>
<p><span data-conref="../../../assets/snippets/This_Saves_To_GameSaveID.hts"> </span></p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> On HTML5 the contents of the buffer will be saved as base64 encoded strings when using this function.</p>
<p> </p>
<h4>Syntax:</h4>
Expand All @@ -29,12 +30,12 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>buffer</td>
<td><span data-keyref="Type_ID_Buffer"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer</a></span></td>
<td><span data-keyref="Type_ID_Buffer"><a href="buffer_create.htm" target="_blank">Buffer</a></span></td>
<td>The buffer to save.</td>
</tr>
<tr>
<td>filename</td>
<td><span data-keyref="Type_String"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">String</a></span></td>
<td><span data-keyref="Type_String"><a href="../../GML_Overview/Data_Types.htm" target="_blank">String</a></span></td>
<td>The name of the file to save as.</td>
</tr>
</tbody>
Expand All @@ -55,7 +56,7 @@ <h4>Example:</h4>
<div style="float:right">Next: <a href="buffer_save_ext.htm">buffer_save_ext</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
buffer_save
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">buffer_save_async</span></h1>
<p>This function saves part of the contents of a buffer to a file asynchronously, ready to be read back into memory using any of the <span class="inline3_func">buffer_load_*</span> functions.</p>
<p>This function saves part of the contents of a buffer to a file asynchronously, ready to be read back into memory using any of the <span class="inline3_func">buffer_load_*</span> functions. <span data-conref="../../../assets/snippets/This_Saves_To_GameSaveID.hts"> </span></p>
<p>The &quot;offset&quot; defines the start position within the buffer for saving (in bytes), and the &quot;size&quot; is the size of the buffer area to be saved from that offset onwards (also in bytes). This function works asynchronously, and so the game will continue running while being saved.</p>
<p>All files saved using this function will be placed in a &quot;default&quot; folder (unless you are using an <a href="buffer_async_group_begin.htm">async group</a>, then the name of the group replaces &quot;default&quot;). This folder does <i>not</i> need to be included in the filename as it is added automatically by <span data-keyref="GameMaker Name">GameMaker</span>. For example the filename path &quot;<span class="inline">Data\Player_Save.sav</span>&quot; would actually be saved to &quot;<span class="inline">default\Data\Player_Save.sav</span>&quot;. When you load the file using the function <span class="inline3_func"><a data-xref="{title}" href="buffer_load_async.htm">buffer_load_async</a></span>, you do not need to supply the &quot;default&quot; part of the path either (but any other file function <i>will</i> require it, except on consoles Xbox, PlayStation and Nintendo Switch).</p>
<p class="note"><b><span data-conref="../../../assets/snippets/Tag_note.hts"> </span></b> On HTML5 &quot;default/&quot; is not added automatically and you may have to account for this in your code.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">buffer_save_ext</span></h1>
<p>This function saves part of the contents of a buffer to a file, ready to be read back into memory using the <span class="inline3_func"><a data-xref="{title}" href="buffer_load.htm">buffer_load</a></span> function.</p>
<p>This function saves part of the contents of a buffer to a file, ready to be read back into memory using the <span class="inline3_func"><a data-xref="{title}" href="buffer_load.htm">buffer_load</a></span> function. <span data-conref="../../../assets/snippets/This_Saves_To_GameSaveID.hts"> </span></p>
<p>The &quot;offset&quot; defines the start position within the buffer for saving (in bytes), and the &quot;size&quot; is the size of the buffer area to be saved from that offset onwards (also in bytes).</p>
<p> </p>
<h4>Syntax:</h4>
Expand All @@ -29,22 +29,22 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>buffer</td>
<td><span data-keyref="Type_ID_Buffer"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer</a></span></td>
<td><span data-keyref="Type_ID_Buffer"><a href="buffer_create.htm" target="_blank">Buffer</a></span></td>
<td>The buffer to save.</td>
</tr>
<tr>
<td>filename</td>
<td><span data-keyref="Type_String"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">String</a></span></td>
<td><span data-keyref="Type_String"><a href="../../GML_Overview/Data_Types.htm" target="_blank">String</a></span></td>
<td>The name of the file to save as.</td>
</tr>
<tr>
<td>offset</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The offset within the buffer to save from (in bytes).</td>
</tr>
<tr>
<td>size</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The size of the buffer area to save (in bytes).</td>
</tr>
</tbody>
Expand All @@ -65,7 +65,7 @@ <h4>Example:</h4>
<div style="float:right">Next: <a href="buffer_save_async.htm">buffer_save_async</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
buffer_save_ext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mipmapping</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css" />
<script src="../../../../assets/scripts/main_script.js" type="module"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand All @@ -15,7 +15,10 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">Mipmapping</span></h1>
<p>This section contains all the functions related to using the <a href="https://en.wikipedia.org/wiki/Mipmap" target="_blank">mipmapping</a> functions. Before using these functions you should have enabled mipmapping for the required texture pages in the <a href="../../../../Settings/Texture_Groups.htm">Texture Group Editor</a> and/or enabled mipmapping for those sprites that have been set to use only a single texture page from the <a href="../../../../Settings/Game_Options.htm">General Game Options</a>. The image below shows the difference mipmapping can make when rendering your project:</p>
<p>This section contains all the functions related to using the <a href="https://en.wikipedia.org/wiki/Mipmap" target="_blank">mipmapping</a> functions. Before using these functions you should have enabled mipmapping for the required texture pages in the <a href="../../../../Settings/Texture_Groups.htm">Texture Group Editor</a> and/or enabled it for sprites that use separate texture pages from the <a href="../../../../Settings/Game_Options.htm">General Game Options</a>, and then at runtime enable mipmapping <a href="gpu_set_tex_mip_enable.htm">using this function</a>.</p>
<p>Mipmapping generates lower resolution textures for drawing at appropriate distance levels. There will be multiple mipmap &quot;levels&quot;, where 0 is the original texture, 1 is the half the size of 0, 2 is half the size of 1, and so on (you can control the <a href="gpu_set_tex_min_mip.htm">minimum</a> and <a href="gpu_set_tex_max_mip.htm">maximum</a> mipmap levels used). For each subsequent mipmap level, a 2x2 block from the previous mipmap level is sampled (i.e. 4 pixels) to create one pixel, resulting in a texture that is half the size.</p>
<p>Mipmapping can cause bleeding issues if multiple sprites are close together on the texture page and pixels from both happen to be sampled into a 2x2 block. This is where the <strong>border size</strong> option for a Texture Group comes into play as it creates a gap of the given size between each sprite on a texture page. Since a border is added around each individual sprite, a border size of 8 allows mipmaps to be scaled up to its sixteenth level without bleeding (as then the actual gap between two sprites would be 8 + 8 = 16).</p>
<p>The image below shows the difference mipmapping can make when rendering your project:</p>
<p><img alt="Mipmapping example" class="center" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/Mipmapping_Example.png" />Once you have enabled mipmapping for the project or a texture page, you can then use the following functions to get and set values which will change how things will look in your project when run.</p>
<h2 id="func_ref">Function Reference</h2>
<h3 id="func_ref_getters">Getters</h3>
Expand Down Expand Up @@ -57,7 +60,7 @@ <h3 id="func_ref_setters">Setters</h3>
<div style="float:right">Next: <a href="../Basic_Forms/Basic_Forms.htm">Basic Forms</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
Mipmapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1><span data-field="title" data-format="default">flexpanel_node_style_set_flex
<p>See: <a data-rhwidget="HyperlinkPopover" data-xref="{text}" href="../../Flex_Panels_Styling.htm#h7">Flex Basis</a></p>
<p> </p>
<h4>Syntax:</h4>
<p class="code"><span data-field="title" data-format="default">flexpanel_node_style_set_flex_basis</span>(node, unit, value);</p>
<p class="code"><span data-field="title" data-format="default">flexpanel_node_style_set_flex_basis</span>(node, value, unit);</p>
<table>
<colgroup>
<col />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1><span data-field="title" data-format="default">flexpanel_node_style_set_posi
<p>See: <a data-rhwidget="HyperlinkPopover" data-xref="{text}" href="../../Flex_Panels_Styling.htm#h12">Insets</a></p>
<p> </p>
<h4>Syntax:</h4>
<p class="code"><span data-field="title" data-format="default">flexpanel_node_style_set_position</span>(node, edge, unit, value);</p>
<p class="code"><span data-field="title" data-format="default">flexpanel_node_style_set_position</span>(node, edge, value, unit);</p>
<table>
<colgroup>
<col />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h1><span data-field="title" data-format="default">keyboard_virtual_height</span
<li>if the keyboard is not visible.</li>
<li><span>on platforms that don&#39;t have a virtual keyboard.</span></li>
</ul>
<p class="note"><b><span class="note">NOTE</span> </b>This function is only valid for the <strong>Xbox (GDK)</strong><strong>Android</strong> (including <strong>AndroidTV</strong>), and <strong>iOS </strong>(including <strong>tvOS</strong>) target platforms.</p>
<p> </p>
<h4>Syntax</h4>
<p class="code"><span data-field="title" data-format="default">keyboard_virtual_height</span>()</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<h1>keyboard_virtual_hide</h1>
<p>This function can be used to hide the virtual keyboard on the device running the game.</p>
<p>On Windows, this function disables the use of IMEs, which can then be re-enabled by calling <span class="inline3_func"><a data-xref="{title}" href="keyboard_virtual_show.htm">keyboard_virtual_show</a></span>.</p>
<div data-conref="../../../../assets/snippets/Note_keyboard_virtual_platforms.hts"> </div>
<p>For virtual keyboard use, calling this function will generate a <a href="../../../../The_Asset_Editors/Object_Properties/Async_Events/System.htm">System Asynchronous Event</a>, in which the <span class="inline">async_load</span> DS map will be populated with the following key/value pairs:</p>
<ul class="colour">
<li>&quot;<b>event_type</b>&quot; - this will be &quot;<b>virtual keyboard status</b>&quot; when triggered by virtual keyboard functions.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<h1>keyboard_virtual_show</h1>
<p>This function can be used to show the virtual keyboard on the device running the game. See <a data-xref="{text}" href="Virtual_Keys_And_Keyboards.htm#h">Virtual Keyboard</a> for information on platform support.</p>
<p>On Windows, this function is used to enable the use of IMEs after they have been disabled with <span class="inline3_func"><a data-xref="{title}" href="keyboard_virtual_hide.htm">keyboard_virtual_hide</a></span>. In that case, none of the arguments are used and you can pass <span class="inline2">undefined</span> to all of them.</p>
<div data-conref="../../../../assets/snippets/Note_keyboard_virtual_platforms.hts"> </div>
<p>For virtual keyboard use, you need to provide one of the following constants for each of the first three arguments:</p>
<ul class="colour">
<li><b>Keyboard type</b>: This constant is used to set which keyset will be available on the virtual keyboard. The available keyboard types are:</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<h1><span data-field="title" data-format="default">keyboard_virtual_status</span></h1>
<p>This function gets the status of the virtual keyboard on the device running the game. The function will return <span class="inline2">true</span> if the OS virtual keyboard is visible/being shown or <span class="inline2">false</span> if it is hidden/hiding.</p>
<p>On Windows, this returns whether the runner has disabled IMEs or not (through the functions <span class="inline3_func"><a data-xref="{title}" href="keyboard_virtual_hide.htm">keyboard_virtual_hide</a></span> and <span class="inline3_func"><a data-xref="{title}" href="keyboard_virtual_show.htm">keyboard_virtual_show</a></span>).</p>
<div data-conref="../../../../assets/snippets/Note_keyboard_virtual_platforms.hts"> </div>
<p> </p>
<h4>Syntax</h4>
<p class="code"><span data-field="title" data-format="default">keyboard_virtual_status</span>()</p>
Expand Down
Loading

0 comments on commit fc49719

Please sign in to comment.