<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Platforms</title><link>https://sourceforge.net/p/hpg-projects/wiki/Platforms/</link><description>Recent changes to Platforms</description><atom:link href="https://sourceforge.net/p/hpg-projects/wiki/Platforms/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 20 Jan 2023 12:19:58 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hpg-projects/wiki/Platforms/feed" rel="self" type="application/rss+xml"/><item><title>Platforms modified by Hugh Greene</title><link>https://sourceforge.net/p/hpg-projects/wiki/Platforms/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This directory contains additionally directories implementing several&lt;br/&gt;
functions, including the all-important &lt;code&gt;main()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As in other modular &lt;a class="" href="../SHELL/" title="wikilink"&gt;SHELL/&lt;/a&gt; directories, this&lt;br/&gt;
directory contains a &lt;a class="" href="../_mandatory_header" title="wikilink"&gt;_mandatory header&lt;/a&gt;.&lt;br/&gt;
Its specification follows.&lt;/p&gt;
&lt;h2 id="role"&gt;Role&lt;/h2&gt;
&lt;p&gt;Systems under this directory are required to implement the game's&lt;br/&gt;
&lt;code&gt;main()&lt;/code&gt; function. It should call &lt;code&gt;enigma::initialize_everything()&lt;/code&gt;&lt;br/&gt;
once, then set up its displays and input methods before entering its&lt;br/&gt;
main loop, in which it should invoke &lt;code&gt;enigma::ENIGMA_events()&lt;/code&gt;. At the&lt;br/&gt;
end of the main loop, before disposing everything and before program&lt;br/&gt;
close, it should make one final call to &lt;code&gt;enigma::game_ending()&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="mandatory"&gt;Mandatory&lt;/h2&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;windowsystem_write_exename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;exenamehere&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;This method should write the name of the running module to&lt;br/&gt;
    exenamehere.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;sleep_for_framerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;framerate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;This method should take an integer framerate and perform the&lt;br/&gt;
    necessary operations to limit fps to that rate.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;input_initialize&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;This method is called at load time. It allows for initializing&lt;br/&gt;
    arrays for input.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These next functions are standard GML that are an integral part of the&lt;br/&gt;
system. Each instance must implement these, even if they are unable to&lt;br/&gt;
do anything on the target platform.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;show_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;This obviously displays an error message.&lt;/li&gt;
&lt;li&gt;It should offer a button to end the game.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;window_set_caption&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;caption&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;This function sets the game window caption, if there is a place&lt;br/&gt;
    reserved for such.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;window_set_size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;unsigned&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;unsigned&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;This function should resize the window, meaning a lowered resolution&lt;br/&gt;
    if the device displays all windows full screen.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a class="" title="wikilink"&gt;Category:ENIGMAsystem/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugh Greene</dc:creator><pubDate>Fri, 20 Jan 2023 12:19:58 -0000</pubDate><guid>https://sourceforge.netfcc35547d385fa111685d47493a5b888a0fd910e</guid></item></channel></rss>