<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Drawing from a Datafile</title>
		<link>http://www.allegro.cc/forums/view/590707</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 26 Mar 2007 00:48:32 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you are mousing over this...just please answer it. IT WON&#39;T TAKE VERY LONG...</p><p>Whenever I try to draw from a datafile, nothing happens. Just nothing- the screen stays black. However, it worked in a test file. This is the relevant code:</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include "ZomOn.h"</span>
<a href="http://www.allegro.cc/manual/DATAFILE" target="_blank"><span class="a">DATAFILE</span></a> <span class="k3">*</span>zombo <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_datafile" target="_blank"><span class="a">load_datafile</span></a><span class="k2">(</span><span class="s">"ZomOn.dat"</span><span class="k2">)</span><span class="k2">;</span>

<span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span>
  <span class="c">//init stuff here</span>
  <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>zombo<span class="k2">[</span>hud_back<span class="k2">]</span>.dat, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">480</span>, <span class="n">480</span>, <span class="n">60</span><span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

This doesn&#39;t work. It just stays black (the screen). Why?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SkaxCo)</author>
		<pubDate>Sun, 25 Mar 2007 21:38:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Too little information. There&#39;s nothing wrong in what you provided, so the error is somewhere else. Well, I would put the load_datafile() call inside main. I feel unsure with function calls outside function bodies. When does the function call happen? Before allegro_init(), which is inside main()?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Johan Halmén)</author>
		<pubDate>Mon, 26 Mar 2007 00:10:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Double Post...<br /><a href="http://www.allegro.cc/forums/thread/590708">Other post</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Dalrymple)</author>
		<pubDate>Mon, 26 Mar 2007 00:48:32 +0000</pubDate>
	</item>
</rss>
