http://wiki.spheredev.org/index.php?title=Legacy:RestartGame&feed=atom&action=history
Legacy:RestartGame - Revision history
2024-03-29T05:42:58Z
Revision history for this page on the wiki
MediaWiki 1.29.0
http://wiki.spheredev.org/index.php?title=Legacy:RestartGame&diff=584&oldid=prev
Apollolux: added navbox
2013-06-01T22:31:18Z
<p>added navbox</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 22:31, 1 June 2013</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l35" >Line 35:</td>
<td colspan="2" class="diff-lineno">Line 35:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[API:Exit|Exit]]()</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[API:Exit|Exit]]()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[API:Abort|Abort]]()</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[API:Abort|Abort]]()</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{API:Engine/navbox}}</ins></div></td></tr>
</table>
Apollolux
http://wiki.spheredev.org/index.php?title=Legacy:RestartGame&diff=574&oldid=prev
Apollolux: created from http://web.archive.org/web/20110805022216/http://www.spheredev.org/wiki/RestartGame
2013-06-01T22:10:55Z
<p>created from http://web.archive.org/web/20110805022216/http://www.spheredev.org/wiki/RestartGame</p>
<p><b>New page</b></p><div>This simply restarts the game.<br />
<br />
==Usage==<br />
<br />
{{Usage|func=RestartGame}}<br />
<br />
<br />
==Examples==<br />
<br />
<syntaxhighlight><br />
RestartGame();<br />
</syntaxhighlight><br />
<br />
Restarts the game.<br />
<br />
<syntaxhighlight><br />
function SwitchResolution(width, height)<br />
{<br />
var proj = OpenFile("../game.sgm");<br />
proj.write("screen_height", height);<br />
proj.write("screen_width", width);<br />
proj.flush();<br />
proj.close();<br />
RestartGame();<br />
}<br />
</syntaxhighlight><br />
<br />
A function that allows you to easily change the resolution of the current game. The file operations set the game screen dimensions and save them. The <code>RestartGame</code>() call reinitialises Sphere, at which point the Sphere engine will actually change its size due to the numbers written in the game project file earlier.<br />
<br />
==Notes==<br />
All variables and things Sphere loaded into memory will be cleaned from memory as if you just started the game.<br />
<br />
==See also==<br />
<br />
* [[API:Exit|Exit]]()<br />
* [[API:Abort|Abort]]()</div>
Apollolux