<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5] loading multiple images stored in a single .dat</title>
		<link>http://www.allegro.cc/forums/view/608141</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 22 Aug 2011 05:15:35 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>using 
</p><div class="source-code snippet"><div class="inner"><pre>  file <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_fopen"><span class="a">al_fopen</span></a><span class="k2">(</span><span class="s">"test.dat"</span>, <span class="s">"wb"</span><span class="k2">)</span><span class="k2">;</span>
  <a href="http://www.allegro.cc/manual/al_save_bitmap_f"><span class="a">al_save_bitmap_f</span></a><span class="k2">(</span>file,<span class="s">".png"</span>,sprite<span class="k2">)</span><span class="k2">;</span>
  <a href="http://www.allegro.cc/manual/al_save_bitmap_f"><span class="a">al_save_bitmap_f</span></a><span class="k2">(</span>file,<span class="s">".png"</span>,sprite2<span class="k2">)</span><span class="k2">;</span>
  <a href="http://www.allegro.cc/manual/al_fclose"><span class="a">al_fclose</span></a><span class="k2">(</span>file<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

I think I have created a .dat file with 2 pngs, but when I go to access them with</p><div class="source-code snippet"><div class="inner"><pre>  file <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_fopen"><span class="a">al_fopen</span></a><span class="k2">(</span><span class="s">"test.dat"</span>, <span class="s">"rb"</span><span class="k2">)</span><span class="k2">;</span>
  sprite2 <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>file, <span class="s">".png"</span><span class="k2">)</span><span class="k2">;</span>
  std::cout<span class="k3">&lt;</span><span class="k3">&lt;</span><span class="s">"loaded file from .dat"</span><span class="k3">&lt;</span><span class="k3">&lt;</span>std::endl<span class="k2">;</span>
  std::cout<span class="k3">&lt;</span><span class="k3">&lt;</span><span class="s">"size of bitmap: "</span><span class="k3">&lt;</span><span class="k3">&lt;</span><span class="k1">sizeof</span><span class="k2">(</span>sprite2<span class="k2">)</span><span class="k3">&lt;</span><span class="k3">&lt;</span>std::endl<span class="k2">;</span>    
  <a href="http://www.allegro.cc/manual/al_fseek"><span class="a">al_fseek</span></a><span class="k2">(</span>file,<span class="n">11</span>,ALLEGRO_SEEK_CUR<span class="k2">)</span><span class="k2">;</span>
  sprite <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>file, <span class="s">".png"</span><span class="k2">)</span><span class="k2">;</span>  
  std::cout<span class="k3">&lt;</span><span class="k3">&lt;</span><span class="s">"read head at "</span><span class="k3">&lt;</span><span class="k3">&lt;</span><a href="http://www.allegro.cc/manual/al_ftell"><span class="a">al_ftell</span></a><span class="k2">(</span>file<span class="k2">)</span><span class="k3">&lt;</span><span class="k3">&lt;</span>std::endl<span class="k2">;</span>
  <a href="http://www.allegro.cc/manual/al_fclose"><span class="a">al_fclose</span></a><span class="k2">(</span>file<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

sprite and sprite2 both contain the same image.<br /><span class="remote-thumbnail"><span class="json">{"name":"8W3gm.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/d\/cd4cc7727cee7a5e1464105da72996ef.gif","w":392,"h":296,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/d\/cd4cc7727cee7a5e1464105da72996ef"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/c/d/cd4cc7727cee7a5e1464105da72996ef-240.jpg" alt="8W3gm.gif" title="Hosted by imgur.com" width="240" height="181" /></span></p><p>as an aside, I&#39;m fairly sure my use of sizeof is incorrect. The size of the png is 41347, so shouldn&#39;t that be the result of sizeof? 4 would be the size of the pointer, but I&#39;m not passing *sprite. Is there some indirection operator I&#39;m missing?</p><p>Sorry for the newbie questions; I&#39;m an artist, not a programmer (yet)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Sat, 20 Aug 2011 20:55:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><span class="k1">sizeof</span></span> is a compile time thing, so there&#39;s no way it could return anything except the size of the pointer.</p><p>Also, what you are doing is not guaranteed to work. You need to load the data into a memfile and then use <span class="source-code"><a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a></span>. Or if you are using 5.1, you can use <span class="source-code">al_fopen_slice</span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 20 Aug 2011 22:11:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The documentation page only has like 3 lines on al_open_memfile(), and I can&#39;t seem to make any usage of it compile. </p><p>How (explicitly) do I go about loading data into a memfile, and what data exactly am I trying to load into it? Am I loading the entire test.dat file, or only one image at a time?</p><p>and what does the parameter &#39;void *mem&#39; mean? A pointer to empty memory? Does that mean I have to use malloc() or al_malloc()? I&#39;m not even sure I understand what those functions do.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Sun, 21 Aug 2011 21:19:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sorry if the memfile docs aren&#39;t entirely clear.</p><p>You pass in a block of memory, it returns an ALLEGRO_FILE which you can then use the allegro file/fshook api on as if it were a real file. So things like al_load_bitmap work on chunks of memory.</p><p>A void pointer is just a way of specifying its just a pointer with no specific type associated.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 21 Aug 2011 21:43:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay that makes a lot more sense. But if I still have to use al_fopen to load the .dat, then its contents are already in memory as an ALLEGRO_FILE type. </p><p>What&#39;s the purpose of a memfile here? do I pass the pointer of the ALLEGRO_FILE and just specify a smaller size to extract the individual .png files?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Sun, 21 Aug 2011 22:15:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608141/928802#target">Jay Hayden</a> said:</div><div class="quote"><p>Okay that makes a lot more sense. But if I still have to use al_fopen to load the .dat, then its contents are already in memory as an ALLEGRO_FILE type.</p></div></div><p>Nope. Allegro does not load anything into memory when you al_fopen a file. You have to manually load the data with one or more of the al_fread* functions.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>What&#39;s the purpose of a memfile here?</p></div></div><p>Some image loaders like to seek around and not set the file position to 1 byte past the end of the last byte of the individual image. So when you try to load the next image, it starts at the wrong place. If you read each image into a chunk of memory and use the <span class="source-code"><a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a></span> function to load from the memfile, there won&#39;t be any problems.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 21 Aug 2011 22:21:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem with your original code is that there is no guarantee that the image loader will load all bytes of the image sequentially. It could make use of SEEK_SET, SEEK_END or leave the file open somewhere other than at the end. </p><p>The purpose of the memfile is that you explicitly load N bytes, where N is the known size of the image. You then pass those N bytes of memory to the image loader which can then do whatever it wants.</p><p>Alternatively, on 5.1 you can use <span class="source-code">al_fopen_slice<span class="k2">(</span><span class="k2">)</span></span> which allows you to treat a section of a file as if it were a whole file, and thus guarantees it to be compatible with the image loaders.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 21 Aug 2011 22:22:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ah, I think I understand now. I&#39;ll give it a shot. Thanks a lot both of you <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>I&#39;m using 5.3, which means no al_fopen_slice. Why does 5.3 not have an equivalent function? It seems pretty useful.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Sun, 21 Aug 2011 22:37:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608141/928807#target">Jay Hayden</a> said:</div><div class="quote"><p>
I&#39;m using 5.3, which means no al_fopen_slice. Why does 5.3 not have an equivalent function? It seems pretty useful.
</p></div></div><p>
You&#39;re using 5.0.3 not 5.3. 5.1 is the development branch of Allegro 5, while you are using the stable branch (5.0 branch).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sun, 21 Aug 2011 22:40:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do you think it would be worth switching to the development version?</p><p>also, I&#39;m fairly certain I still don&#39;t have the syntax for al_open_memfile right.
</p><div class="source-code snippet"><div class="inner"><pre>datfile <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_fopen"><span class="a">al_fopen</span></a><span class="k2">(</span><span class="s">"test.dat"</span>, <span class="s">"rb"</span><span class="k2">)</span><span class="k2">;</span>
membuffer <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a><span class="k2">(</span>membuffer,<a href="http://www.allegro.cc/manual/al_fsize"><span class="a">al_fsize</span></a><span class="k2">(</span>datfile<span class="k2">)</span>,<span class="s">"rwb"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_fread"><span class="a">al_fread</span></a><span class="k2">(</span>datfile, membuffer,<a href="http://www.allegro.cc/manual/al_fsize"><span class="a">al_fsize</span></a><span class="k2">(</span>datfile<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>

sprite <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>membuffer,<span class="s">".png"</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

I&#39;m still unsure what I should pass as the void *mem parameter.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Sun, 21 Aug 2011 22:56:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608141/928809#target">Jay Hayden</a> said:</div><div class="quote"><p>I&#39;m still unsure what I should pass as the void *mem parameter.</p></div></div><p>You pass it a pointer to a chunk of memory that you previously loaded the image data you want to use with <span class="source-code"><a href="http://www.allegro.cc/manual/al_load_bitmap"><span class="a">al_load_bitmap</span></a></span>.</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a></span> returns an <span class="source-code"><a href="http://www.allegro.cc/manual/ALLEGRO_FILE"><span class="a">ALLEGRO_FILE</span></a></span>, which you then use with <span class="source-code"><a href="http://www.allegro.cc/manual/al_load_bitmap"><span class="a">al_load_bitmap</span></a></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 22 Aug 2011 01:16:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>now I&#39;m 100% lost
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span>  <span class="c">//Open test.dat which contains 2 png images.</span>
<span class="number">  2</span>  datfile <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_fopen"><span class="a">al_fopen</span></a><span class="k2">(</span><span class="s">"test.dat"</span>, <span class="s">"rb"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  3</span>
<span class="number">  4</span>  <span class="c">//Load one image into ALLEGRO_BITMAP *sprite</span>
<span class="number">  5</span>  sprite <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>datfile,<span class="s">".png"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  6</span>
<span class="number">  7</span>  <span class="c">//Create a memory file out of the chunk of memory where sprite now resides</span>
<span class="number">  8</span>  membuffer <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a><span class="k2">(</span>sprite,<a href="http://www.allegro.cc/manual/al_fsize"><span class="a">al_fsize</span></a><span class="k2">(</span>datfile<span class="k2">)</span>,<span class="s">"rwb"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  9</span>
<span class="number"> 10</span>  <span class="c">//read the data from test.dat into this memfile</span>
<span class="number"> 11</span>  <a href="http://www.allegro.cc/manual/al_fread"><span class="a">al_fread</span></a><span class="k2">(</span>datfile, membuffer,<a href="http://www.allegro.cc/manual/al_fsize"><span class="a">al_fsize</span></a><span class="k2">(</span>datfile<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 12</span>
<span class="number"> 13</span>  <span class="c">//Load 2 sprites from the memfile now?</span>
<span class="number"> 14</span>  sprite <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>membuffer,<span class="s">".png"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span>  sprite2 <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a><span class="k2">(</span>membuffer,<span class="s">".png"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span>
<span class="number"> 17</span>  <span class="c">//What the hell am I doing?</span>
</div></div><p>

The image data that I want to use is contained in an external file, and I&#39;m having trouble creating 2 bitmaps from it using al_load_bitmap; how does it help me to create a memfile from the single bitmap?</p><p>this code compiles and the application doesn&#39;t crash, but al_draw_bitmap(sprite) does nothing.</p><p><b>EDIT</b><br />So al_fread returns 0 meaning, I assume, it didn&#39;t copy anything into the membuffer, which means its empty? or does it contain the bitmap data from when I loaded sprite using al_load_bitmap_f the first time.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Mon, 22 Aug 2011 01:37:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oi.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608141/928815#target">Jay Hayden</a> said:</div><div class="quote"><p>The image data that I want to use is contained in an external file, and I&#39;m having trouble creating 2 bitmaps from it using al_load_bitmap; how does it help me to create a memfile from the single bitmap?</p></div></div><p>You load up each bitmap in the data file one at a time, into a chunk of memory, then call <span class="source-code"><a href="http://www.allegro.cc/manual/al_open_memfile"><span class="a">al_open_memfile</span></a></span> to obtain an ALLEGRO_FILE, then use <span class="source-code"><a href="http://www.allegro.cc/manual/al_load_bitmap_f"><span class="a">al_load_bitmap_f</span></a></span> to get an ALLEGRO_BITMAP from the memfile.</p><p>So first, you need to open the data file, then read the data for each image in the data file one at a time into a chunk of memory you obtained from <span class="source-code"><a href="http://www.delorie.com/djgpp/doc/libc/libc_551.html" target="_blank">malloc</a></span> or <span class="source-code"><span class="k1">new</span></span>. Second, you create an ALLEGRO_FILE from each chunk of memory. And third, you create the ALLEGRO_BITMAPs from said ALLEGRO_FILE&#39;s.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 22 Aug 2011 01:43:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I thought I needed to use some memory allocation, but my C++ professor is an old IBM project bum, and he&#39;s far more concerned with teaching UML than practical C++.</p><p>I&#39;ll take a shot at it and let you know how badly I screw up</p><p>Thank you for being so patient btw. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT: the only usage I know of new is when I&#39;m instantiating an existing construct. </p><p>al_fread says to give it the pointer that refers to a buffer, but I wouldn&#39;t literally type <span class="source-code">bitmapBuffer <span class="k3">=</span> <span class="k1">new</span> buffer</span> would I?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Mon, 22 Aug 2011 01:46:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is it just me, or isn&#39;t this what PhysFS is for? So you can read and write to zip files. Then you don&#39;t have to mess around with knowing how big each of your files is so you can allocate data to open with al_open_memfile.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 22 Aug 2011 01:50:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve read PhysicsFS on the API, but I didn&#39;t know how difficult it would be to include it in my project, so I didn&#39;t really consider it.</p><p>I&#39;ll do some more looking.</p><p>Do you know off-hand if the compression-decompression has any performance overhead?</p><p>EDIT:<br />It appears that only the source files are available, and I don&#39;t have the slightest hint of how to create the windows binaries I think i would need
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Mon, 22 Aug 2011 01:55:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s not hard to build PhysFS - I did it myself to build A5.1 SVN. Follow the directions in physfs-2.0.2/Install.txt. Whether you&#39;re building with MinGW or MSVC you will need CMake. </p><p>It doesn&#39;t look like PhysFS comes with the binary distributions of A5, so you&#39;ll have to build it yourself.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 22 Aug 2011 02:23:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608141/928817#target">Jay Hayden</a> said:</div><div class="quote"><p>al_fread says to give it the pointer that refers to a buffer, but I wouldn&#39;t literally type bitmapBuffer = new buffer would I?</p></div></div><p>I think most of your problems stem from not quite knowing the language well enough. You might want to do some more studying.</p><p>When you want to create a buffer of bytes with new, you do something like:</p><p><span class="source-code"><span class="k1">char</span> <span class="k3">*</span>buffer <span class="k3">=</span> <span class="k1">new</span> <span class="k1">char</span><span class="k2">[</span>buffer_length<span class="k2">]</span><span class="k2">;</span></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 22 Aug 2011 02:29:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/608141/928823#target">Edgar Reynaldo</a> said:</div><div class="quote"><p> It doesn&#39;t look like PhysFS comes with the binary distributions of A5, so you&#39;ll have to build it yourself.
</p></div></div><p>It is included.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Mon, 22 Aug 2011 02:33:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It may be now, but it wasn&#39;t in 5.0.2 at least.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 22 Aug 2011 02:47:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Before it&#39;s asked, you can&#39;t set a password on a PhysFS file.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (William Labbett)</author>
		<pubDate>Mon, 22 Aug 2011 02:52:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh wow, I just spent half an hour building physfs with cmake and visual studio and now I realize that the binaries are included with the allegro 5.0.3 distribution </p><p>DERRRRRRRP</p><p>I can initialize physfs and it can open files just fine, but when I call <br />	al_set_physfs_file_interface(); it grayscreens and the program goes unresponsive</p><p>EDIT: Nevermind, the problem occurs after I set the file interface. I&#39;ll find it and fix it.</p><p>EDIT: So it wasn&#39;t working because it was actually working correctly, odd as it seems.</p><p>I assumed that the compile directory stayed on the filesystem but you have to explicitly add it to the search path with PHYSFS_mount(). So everything works fine and dandy now, I can read files from a virtual filesystem handled by PhysicsFS that is created from a .zip of my resources.</p><p>Everything is so complicated. &gt;___________&lt; it all works, but it feels like if I sneeze on the damn thing everything will explode and I&#39;ll have to spend an hour trying to tape it back together again. thank you all for you help, though I warn you this is probably not the last time I&#39;ll need it. <br />If anyone needs some 2D graphics, I&#39;d be glad to give something back instead of just being an information leech.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jay Hayden)</author>
		<pubDate>Mon, 22 Aug 2011 05:15:35 +0000</pubDate>
	</item>
</rss>
