-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into develop
- Loading branch information
Showing
17 changed files
with
179 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_get_used_size.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>buffer_get_used_size</title> | ||
<meta name="generator" content="Adobe RoboHelp 2022" /> | ||
<link rel="stylesheet" type="text/css" href="../../../assets/css/default.css" /> | ||
<script src="../../../assets/scripts/main_script.js" type="module"></script> | ||
<meta name="rh-authors" content="" /> | ||
<meta name="topic-comment" content="" /> | ||
<meta name="rh-index-keywords" content="buffer_get_used_size" /> | ||
<meta name="search-keywords" content="buffer_get_used_size" /> | ||
<meta name="template" content="assets/masterpages/Manual_Keyword_Page.htt" /> | ||
</head> | ||
<body> | ||
<h1><span data-field="title" data-format="default">buffer_get_used_size</span></h1> | ||
<p>This function returns the used size of the given buffer.</p> | ||
<p>The used size is the number of bytes that have been written to the buffer. It starts out at 0 for a new buffer created with <span class="inline3_func"><a data-xref="{title}" href="buffer_create.htm">buffer_create</a></span> and increases when you write to it. It can be set manually using <span class="inline3_func"><a data-xref="{title}" href="buffer_set_used_size.htm">buffer_set_used_size</a></span>.</p> | ||
<p> </p> | ||
<h4>Syntax:</h4> | ||
<p class="code"><span data-field="title" data-format="default">buffer_get_used_size</span>(buffer)</p> | ||
<table> | ||
<colgroup> | ||
<col /> | ||
<col /> | ||
<col /> | ||
</colgroup> | ||
<tbody> | ||
<tr> | ||
<th>Argument</th> | ||
<th>Type</th> | ||
<th>Description</th> | ||
</tr> | ||
<tr> | ||
<td>buffer</td> | ||
<td><span data-keyref="Type_ID_Buffer"><a href="buffer_create.htm" target="_blank">Buffer</a></span></td> | ||
<td>The buffer to get the used size of</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<p> </p> | ||
<h4>Returns:</h4> | ||
<p class="code"><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></p> | ||
<p> </p> | ||
<h4>Example:</h4> | ||
<p class="code">var _buffer = buffer_create(16, buffer_grow, 1);<br /> | ||
repeat(6)<br /> | ||
{<br /> | ||
buffer_write(_buffer, buffer_f32, 4);<br /> | ||
}<br /> | ||
var _used_size = <span data-field="title" data-format="default">buffer_get_used_size</span>(_buffer);<br /> | ||
var _size = buffer_get_size(_buffer);<br /> | ||
<br /> | ||
show_debug_message($"size: {_size}, used: {_used_size}"); | ||
</p> | ||
<p>The above code creates a new grow buffer with an initial size of 16 bytes and then writes 6 values of type <span class="inline2">buffer_f32</span> to it in a <span class="inline2"><a data-xref="{title}" href="../../GML_Overview/Language_Features/repeat.htm">repeat</a></span> loop. Each value of this data type takes up 4 bytes in the buffer, bringing the total size to 24 bytes, which is more than the initial size of the buffer. After the writes the used size and actual size of the buffer are retrieved using <span class="inline3_func"><span data-field="title" data-format="default">buffer_get_used_size</span></span> and <span class="inline3_func"><a data-xref="{title}" href="buffer_get_size.htm">buffer_get_size</a></span> respectively and are output in a debug message. While the used size shows the exact number of bytes written (24), the size shows a larger number of bytes, indicating that the buffer was resized to accommodate more data than was written.</p> | ||
<p> </p> | ||
<p> </p> | ||
<div class="footer"> | ||
<div class="buttons"> | ||
<div class="clear"> | ||
<div>Back: <a data-xref="{title}" href="Buffers.htm">Buffers</a></div> | ||
<div>Next: <a data-xref="{title}" href="buffer_copy.htm">buffer_copy</a></div> | ||
</div> | ||
</div> | ||
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5> | ||
</div> | ||
<!-- KEYWORDS | ||
buffer_get_used_size | ||
--> | ||
<!-- TAGS | ||
buffer_get_used_size | ||
--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...ents/GameMaker_Language/GML_Reference/In_App_Purchases/mac_refresh_receipt_validation.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>mac_refresh_receipt_validation</title> | ||
<meta name="generator" content="Adobe RoboHelp 2022" /> | ||
<link rel="stylesheet" type="text/css" href="../../../assets/css/default.css" /> | ||
<script src="../../../assets/scripts/main_script.js" type="module"></script> | ||
<meta name="rh-authors" content="" /> | ||
<meta name="topic-comment" content="" /> | ||
<meta name="rh-index-keywords" content="mac_refresh_receipt_validation" /> | ||
<meta name="search-keywords" content="mac_refresh_receipt_validation" /> | ||
<meta name="template" content="assets/masterpages/Manual_Keyword_Page.htt" /> | ||
</head> | ||
<body> | ||
<h1><span data-field="title" data-format="default">mac_refresh_receipt_validation</span></h1> | ||
<p>This function attempts to revalidate a Mac App Store receipt.</p> | ||
<p>It triggers an Async <a data-xref="{title}" href="../../../The_Asset_Editors/Object_Properties/Async_Events/System.htm">System</a> event of type <span class="inline2">"receipt_validation"</span>. If the receipt is valid, the <span class="inline2">valid</span> key in <span class="inline2">async_load</span> will be <span class="inline2">true</span>. See the example below.</p> | ||
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> The async event is automatically triggered a single time at game start.</p> | ||
<p> </p> | ||
<h4>Syntax:</h4> | ||
<p class="code"><span data-field="title" data-format="default">mac_refresh_receipt_validation</span>();</p> | ||
<p> </p> | ||
<h4>Returns:</h4> | ||
<p class="code"><span data-keyref="Type_Void">N/A</span></p> | ||
<p> </p> | ||
<h4>Example:</h4> | ||
<p class="code_heading">Left Pressed Event</p> | ||
<p class="code"> <span data-field="title" data-format="default">mac_refresh_receipt_validation</span>();</p> | ||
<p class="code_heading">Async - System Event</p> | ||
<p class="code">if (async_load[? "type"] != "receipt_validation") exit;<br /> | ||
<br /> | ||
if (async_load[? "valid"])<br /> | ||
{<br /> | ||
// Unlock functionality<br /> | ||
// ...<br /> | ||
}<br /> | ||
else<br /> | ||
{<br /> | ||
// Show debug message and keep functionality unchanged<br /> | ||
show_debug_message("Invalid receipt - staying in demo mode");<br /> | ||
} | ||
</p> | ||
<p>The above code shows a call to <span class="inline3_func"><span data-field="title" data-format="default">mac_refresh_receipt_validation</span></span> in a mouse Left Pressed event - on a button object, for example - and the code of the Async <a data-xref="{title}" href="../../../The_Asset_Editors/Object_Properties/Async_Events/System.htm">System</a> event. If the event type held in the <span class="inline2"><a data-xref="{title}" href="../../GML_Overview/Variables/Builtin_Global_Variables/async_load.htm">async_load</a></span> map doesn't equal <span class="inline2">"receipt_validation"</span>, the code is exited. If it does, code execution continues and the <span class="inline2">"valid"</span> key is checked in an <span class="inline2">if</span> statement. If the receipt is valid, additional functionality is unlocked. If not, a debug message is shown and no additional functionality is unlocked.</p> | ||
<p> </p> | ||
<p> </p> | ||
<div class="footer"> | ||
<div class="buttons"> | ||
<div class="clear"> | ||
<div>Back: <a data-xref="{title}" href="In_App_Purchases.htm">In-App Purchases</a></div> | ||
<div>Next: <a data-xref="{title}" href="../Asynchronous_Functions/Asynchronous_Functions.htm">Asynchronous Functions</a></div> | ||
</div> | ||
</div> | ||
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5> | ||
</div> | ||
<!-- KEYWORDS | ||
mac_refresh_receipt_validation | ||
--> | ||
<!-- TAGS | ||
mac_refresh_receipt_validation | ||
--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.