<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - [QUESTION] About a total save game]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=671</link>
		<description><![CDATA[The most recent posts in [QUESTION] About a total save game.]]></description>
		<lastBuildDate>Sat, 18 May 2013 18:07:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [QUESTION] About a total save game]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4177#p4177</link>
			<description><![CDATA[<p>originally it&#039;s without &#039;*&#039; (svn version) : <br /></p><div class="codebox"><pre><code>writeFloatValues(file, &quot;color&quot;, text-&gt;getColor(), 4);</code></pre></div><p>but older code was *text-&gt;getColor(), so you maybe got a older code version.</p><p>anyways, what you wrote is also correct (but normally unnecessary as MVector4 returns a (float*)) :<br /></p><div class="codebox"><pre><code>writeFloatValues(file, &quot;color&quot;, (float*)text-&gt;getColor(), 4);</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sat, 18 May 2013 18:07:44 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4177#p4177</guid>
		</item>
		<item>
			<title><![CDATA[Re: [QUESTION] About a total save game]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4176#p4176</link>
			<description><![CDATA[<p>in the code you wrote there is a compatibility problem with c++ standard. </p><div class="codebox"><pre><code>writeFloatValues(file, &quot;color&quot;, *text-&gt;getColor(), 4);</code></pre></div><p>This is an example of an instruction that doesn&#039;t compile with microsoft visual c++ 2010. I had to rewrite it in</p><div class="codebox"><pre><code>writeFloatValues(file, &quot;color&quot;, (float*)text-&gt;getColor(), 4);</code></pre></div><p>I don&#039;t know if it&#039;s good because I didn&#039;t test yet. However if my solution isn&#039;t good, how may I fix it?</p><p>I included MLevelLoad and MLevelSave so I can reuse your code for saving the game.</p>]]></description>
			<author><![CDATA[dummy@example.com (firelite)]]></author>
			<pubDate>Sat, 18 May 2013 16:07:29 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4176#p4176</guid>
		</item>
		<item>
			<title><![CDATA[Re: [QUESTION] About a total save game]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4174#p4174</link>
			<description><![CDATA[<p>Hi,</p><p>no the pointer adress are not safe to save, the data is inside the pointer, not the pointer itself.<br />If you want to save some data, you have to identity the data before. If it&#039;s the scene, you need to parse the scene, all the objects and save the objects values (position, rotation etc), you have to parse your game values etc.</p><p>As an exemple you can see how Maratis editor saves a level in xml :<br /><a href="https://code.google.com/p/maratis/source/browse/trunk/dev/Maratis/Common/MFileManager/MLevelSave.cpp">https://code.google.com/p/maratis/sourc &#133; elSave.cpp</a></p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sat, 18 May 2013 10:47:20 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4174#p4174</guid>
		</item>
		<item>
			<title><![CDATA[[QUESTION] About a total save game]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4172#p4172</link>
			<description><![CDATA[<p>I have to save the Engine status for have a complete photo of game status? This means I have to save each pointed address from each pointer in engine and so on for each pointer pointed by engine right?</p><br /><div class="codebox"><pre><code>ar &amp;g-&gt; getSoundContext();
    ar &amp;g-&gt; getRenderingContext();
      ar &amp;g-&gt; getPhysicsContext();
      ar &amp;g-&gt; getScriptContext();
      ar &amp;g-&gt; getInputContext();
      ar &amp;g-&gt; getSystemContext();

    // data loaders
     ar &amp;g-&gt; getFontLoader();
     ar &amp;g-&gt; getImageLoader();
     ar &amp;g-&gt; getSoundLoader();
     ar &amp;g-&gt; getMeshLoader();
     ar &amp;g-&gt; getArmatureAnimLoader();
     ar &amp;g-&gt; getTexturesAnimLoader();
     ar &amp;g-&gt; getMaterialsAnimLoader();
     ar &amp;g-&gt; getLevelLoader();
         // behavior manager
    ar &amp;g-&gt; getBehaviorManager();

    // renderer manager
      ar &amp;g-&gt; getRendererManager();

    // package manager
    
      ar &amp;g-&gt; getPackageManager()
      ar &amp;g-&gt; getLevel()
      ar &amp;g-&gt; getGame()
      ar &amp;g-&gt; getRenderer();</code></pre></div><p>And then continue for each pointer...<br />Or there is another way I cannot figure out?</p>]]></description>
			<author><![CDATA[dummy@example.com (firelite)]]></author>
			<pubDate>Fri, 17 May 2013 17:59:07 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4172#p4172</guid>
		</item>
	</channel>
</rss>
