<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - [QUESTION] About a total save game]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=671&amp;type=atom"/>
	<updated>2013-05-18T18:07:44Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=671</id>
		<entry>
			<title type="html"><![CDATA[Re: [QUESTION] About a total save game]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4177#p4177"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-05-18T18:07:44Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4177#p4177</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [QUESTION] About a total save game]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4176#p4176"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[firelite]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1537</uri>
			</author>
			<updated>2013-05-18T16:07:29Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4176#p4176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [QUESTION] About a total save game]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4174#p4174"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-05-18T10:47:20Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4174#p4174</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[QUESTION] About a total save game]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4172#p4172"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[firelite]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1537</uri>
			</author>
			<updated>2013-05-17T17:59:07Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4172#p4172</id>
		</entry>
</feed>
