<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Packing Images into EXE files and reading them out again?</title>
		<link>http://www.allegro.cc/forums/view/610216</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 22 May 2012 09:52:14 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>(Using Windows and Allegro 5.0.6 here)<br />I have some images I&#39;d like to use in my program. While I can put them in a different folder from my program for organization, I&#39;d <i>really</i> like to put them in the executable itself and read from it. Unfortunately, after hours of fruitless searching, I&#39;m at a loss. I&#39;ve found tools like dat2c and exedat, but they&#39;re both for Allegro 4. Is there any way to read images from the EXE file&#39;s resources into Allegro? I don&#39;t care too badly if it&#39;s platform specific, as long as it can be done.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SomeoneElse)</author>
		<pubDate>Sun, 13 May 2012 06:27:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><s>1. Base64 encode the files you need
2. Put the resultant strings into your program
3. Decode said strings into memory during program initialization
4. Use the memfile addon to map that memory as files
5. Use the _f prefixed function (`al_load_bitmap_f`) to load the images

You can skip the Base64 step... but it&#39;ll probably be best if you don&#39;t in the long run.</s></p><p>EDIT: Actually nevermind, that was stupid. Just put the contents of your file into this kind of form:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">const</span> <span class="k1">char</span> my_bitmap <span class="k3">=</span> <span class="k2">{</span><span class="n">0xff</span>, <span class="n">0x0f</span> ...<span class="k2">}</span><span class="k2">;</span>
</pre></div></div><p>

(you can write a simple program that fopen&#39;s the file and outputs a .c file with those contents).</p><p>Then you&#39;d mount that my_bitmap pointer with the memfile addon 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> to load the actual bitmap.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sun, 13 May 2012 07:18:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The downside is that that it will <i>dramatically</i> inflate the size of the file, so it&#39;s mostly only practical for smaller image files.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mark Oates)</author>
		<pubDate>Sun, 13 May 2012 08:35:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I wrote some code for extracting BMP files from .exe files into Allegro bitmaps.  There&#39;s an A4.0 version that shouldn&#39;t be too difficult to update to A5.0.  Unfortunately, my motherboard has died, so I can&#39;t upload it here, but the uploaded version in <a>this</a> thread should still work.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sun, 13 May 2012 09:15:54 +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/610216/954749#target">Mark Oates</a> said:</div><div class="quote"><p> The downside is that that it will dramatically inflate the size of the file, so it&#39;s mostly only practical for smaller image files.</p></div></div><p>Are you sure? For me the exe size increases exactly by the amount of the file I encode in the way I suggested in my post.</p><p>Here&#39;s the generator I used (haven&#39;t actually tested to see if it actually loads the files though <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />):</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="p">#include &lt;stdlib.h&gt;</span>
<span class="number">  2</span><span class="p">#include &lt;stdio.h&gt;</span>
<span class="number">  3</span><span class="p">#include &lt;string.h&gt;</span>
<span class="number">  4</span>
<span class="number">  5</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span><span class="k3">*</span><span class="k3">*</span> argv<span class="k2">)</span>
<span class="number">  6</span><span class="k2">{</span>
<span class="number">  7</span>  <span class="k1">if</span><span class="k2">(</span>argc <span class="k3">&lt;</span> <span class="n">3</span><span class="k2">)</span>
<span class="number">  8</span>  <span class="k2">{</span>
<span class="number">  9</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"Usage:\n%s infile outfile_no_ext\n"</span>, argv<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 10</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 11</span>  <span class="k2">}</span>
<span class="number"> 12</span>  
<span class="number"> 13</span>  FILE<span class="k3">*</span> infile <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span>argv<span class="k2">[</span><span class="n">1</span><span class="k2">]</span>, <span class="s">"r"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>  <span class="k1">if</span><span class="k2">(</span>infile <span class="k3">=</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 15</span>  <span class="k2">{</span>
<span class="number"> 16</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"Error opening %s for reading.\n"</span>, argv<span class="k2">[</span><span class="n">1</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 17</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 18</span>  <span class="k2">}</span>
<span class="number"> 19</span>  
<span class="number"> 20</span>  <span class="k1">char</span><span class="k3">*</span> outfilename <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_551.html" target="_blank">malloc</a><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_764.html" target="_blank">strlen</a><span class="k2">(</span>argv<span class="k2">[</span><span class="n">2</span><span class="k2">]</span> <span class="k3">+</span> <span class="n">3</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 21</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_737.html" target="_blank">sprintf</a><span class="k2">(</span>outfilename, <span class="s">"%s.c"</span>, argv<span class="k2">[</span><span class="n">2</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 22</span>  FILE<span class="k3">*</span> outfile <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span>outfilename, <span class="s">"w"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 23</span>  <span class="k1">if</span><span class="k2">(</span>outfile <span class="k3">=</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 24</span>  <span class="k2">{</span>
<span class="number"> 25</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"Error opening %s for writing.\n"</span>, outfilename<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 26</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 27</span>  <span class="k2">}</span>
<span class="number"> 28</span>  
<span class="number"> 29</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">"#include \"allegro5/allegro_memfile.h\"\n"</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 30</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">"static const unsigned char _filedata[] = {"</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 31</span>  
<span class="number"> 32</span>  <span class="k1">unsigned</span> <span class="k1">char</span> byte<span class="k2">;</span>
<span class="number"> 33</span>  <span class="k1">size_t</span> size <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 34</span>  <span class="k1">while</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_349.html" target="_blank">fread</a><span class="k2">(</span><span class="k3">&amp;</span>byte, <span class="n">1</span>, <span class="n">1</span>, infile<span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> <span class="n">1</span><span class="k2">)</span>
<span class="number"> 35</span>  <span class="k2">{</span>
<span class="number"> 36</span>    <span class="k1">if</span><span class="k2">(</span>size <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 37</span>      <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">", "</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 38</span>    
<span class="number"> 39</span>    <span class="k1">char</span> hex<span class="k2">[</span><span class="n">5</span><span class="k2">]</span><span class="k2">;</span>
<span class="number"> 40</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_737.html" target="_blank">sprintf</a><span class="k2">(</span>hex, <span class="s">"0x%X"</span>, byte<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 41</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span>hex, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 42</span>    size<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number"> 43</span>  <span class="k2">}</span>
<span class="number"> 44</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">"};\n"</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 45</span>  
<span class="number"> 46</span>  <span class="k1">char</span> size_string<span class="k2">[</span><span class="n">256</span><span class="k2">]</span><span class="k2">;</span>
<span class="number"> 47</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_737.html" target="_blank">sprintf</a><span class="k2">(</span>size_string, <span class="s">"%zd"</span>, size<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 48</span>  
<span class="number"> 49</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">"ALLEGRO_FILE* load_"</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 50</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span>argv<span class="k2">[</span><span class="n">2</span><span class="k2">]</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 51</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">"()\n{\n    return al_open_memfile((void*)_filedata, "</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 52</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span>size_string, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 53</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_348.html" target="_blank">fputs</a><span class="k2">(</span><span class="s">", \"w\");\n}\n"</span>, outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 54</span>  
<span class="number"> 55</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_308.html" target="_blank">fclose</a><span class="k2">(</span>infile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 56</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_308.html" target="_blank">fclose</a><span class="k2">(</span>outfile<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 57</span><span class="k2">}</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sun, 13 May 2012 09:20:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If he was referring to the size of the C source file vs the image file, then his observation is both true and irrelevant.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 13 May 2012 09:45:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow, SiegeLord&#39;s method seems rather straight-forward now that I see what&#39;s going on. But, it requires a separate program and only works with bitmaps and simple data/text. As Mark pointed out, it requires a huge c file, and if you want to change it, you have to recompile the entire program connected to it (because you have to #include it to reference it).</p><p><i>However</i>, while browsing the Allegro source code (I can&#39;t even remember why), I came up with another idea. What if I just made an extension, in a sense, that created ALLEGRO_FILE instances that could read from the EXE&#39;s resources themselves? I made some code that should do just that. I hope. I&#39;ll test it out in the morning and let you know how it goes, but if it works it should let you include any kind of data file in the resources of the EXE and read them through Allegro&#39;s normal functions without anything more complicated than setting an RC definition. Plus, if you make changes, you&#39;re only recompiling the RC script, so it&#39;s faster. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> (right? I think this is how the C++ linker works)</p><p>(I&#39;d post the code here, but it&#39;d be 200 lines. I think that&#39;s a little much.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SomeoneElse)</author>
		<pubDate>Sun, 13 May 2012 11:39:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>NASM can include binary blobs, you&#39;d have to relink whenever it changed.  I did this just last week with a 4+Mb text file to avoid having to get the file size, malloc(), read in in, etc.  It was to test a word wrap function on the king james bible.</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>incbin.asm
<span class="number">  2</span>
<span class="number">  3</span>section .data
<span class="number">  4</span>
<span class="number">  5</span>global TEXTER
<span class="number">  6</span>global ENDTEXT
<span class="number">  7</span>
<span class="number">  8</span>TEXTER:
<span class="number">  9</span>incbin <span class="s">"kjv12.txt"</span>
<span class="number"> 10</span>ENDTEXT:
<span class="number"> 11</span>
<div class="highlight"><span class="number"> 12</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span></div><span class="number"> 13</span>
<span class="number"> 14</span>relevant parts of t.c
<span class="number"> 15</span>
<span class="number"> 16</span><span class="k1">extern</span> <span class="k1">char</span> TEXTER<span class="k2">;</span>
<span class="number"> 17</span><span class="k1">extern</span> <span class="k1">char</span> ENDTEXT<span class="k2">;</span>
<span class="number"> 18</span>
<span class="number"> 19</span>result <span class="k3">=</span> wrap<span class="k2">(</span><span class="k3">&amp;</span>TEXTER,<span class="k3">&amp;</span>finallines,<span class="k3">&amp;</span>ENDTEXT-<span class="k3">&amp;</span>TEXTER,TEXTLEN<span class="k2">)</span><span class="k2">;</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Sun, 13 May 2012 12:47: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/610216/954754#target">SomeoneElse</a> said:</div><div class="quote"><p> But, it requires a separate program
</p></div></div><p>And what do you think dat2c was <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> only works with bitmaps and simple data/text
</p></div></div><p>It works for any file type. The only issue is that you have to use it through the Allegro file routines. This means it can be any file Allegro can read, but also any file other libraries can read as long as you can override their file interface.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> (because you have to #include it to reference it).
</p></div></div><p>Ever heard of header files? It&#39;ll work for this method too, I just didn&#39;t include a header generation code in my code. It&#39;ll just contain the <span class="source-code"><a href="http://www.allegro.cc/manual/ALLEGRO_FILE"><span class="a">ALLEGRO_FILE</span></a><span class="k3">*</span> load_foo<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></span> function.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> read them through Allegro&#39;s normal functions without anything more complicated than setting an RC definition.
</p></div></div><p>So it&#39;ll have the same limitations as my method <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />.</p><p>EDIT: Also, are these resource scripts even available under Linux? The method I presented is 100% cross-platform as far as I can tell.</p><p>I also looked around a bit, and turns out there is a Linux program does more or less what my little code snipped did:
</p><pre class="terminal">xdd -i some_file out.c</pre><p>
It&#39;ll produce the same static array (and a length variable) as my code, but without the nice loading function.</p><p>Lastly, it turns out you can directly encode a file into an object file bypassing the compilation step. This time the exact procedure is compiler specific, so if you&#39;re not using GCC it might be a bit too much: <a href="http://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967">linky</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Sun, 13 May 2012 21:33:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hehe, I was really tired last night when I posted that. <i>*embarrassed</i> Yes, your method does work with any file-type and mine has the same limitations as yours, if not more. I suppose what I was getting at was that with your method, the file has to be run through an external program and included as a C file (a header file can be used for compiling efficiency), which is a little less straight-forward than simply including it in the resource files. It is, however, more cross-platform compatible as well as much better protected than mine, and it works just as well. Thank you very much, that was very helpful! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I&#39;m sorry if my ill-formed words offended you. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /></p><p>So, conclusion (for easy searches): To pack an image/other file into an EXE/other executable and still use it in Allegro 5, include the file as a byte[] constant in a C file in your code and use the memfile addon to pretend it&#39;s a file. Continue with normal Allegro functions.</p><p>P.S., I tested my program this morning and it worked! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> I could include any kind of data file in the resources and read it out perfectly fine. I didn&#39;t try to break it, but it works fine for normal operations. Accessing EXE resources may be useful in any case, so if anyone wants the code I&#39;ll be glad to hand it out. It&#39;s just a C file and a header.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SomeoneElse)</author>
		<pubDate>Sun, 13 May 2012 23:38:59 +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/610216/954753#target">Matthew Leverton</a> said:</div><div class="quote"><p>If he was referring to the size of the C source file vs the image file, then his observation is both true and irrelevant.</p></div></div><p>Unless you&#39;re distributing the source.  But yes, that&#39;s what I was saying.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mark Oates)</author>
		<pubDate>Sun, 13 May 2012 23:48:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is a method with GCC, it works on Windows, Linux etc:<br /><span class="source-code">ld <span class="k3">-</span>r <span class="k3">-</span>b binary <span class="k3">-</span>o myimage.o myimage.png</span><br />Add myimage.o when linking, and in your program, the data will be stored at the following address:<br /><span class="source-code"><span class="k1">extern</span> <span class="k1">char</span> <span class="k3">*</span> binary_myimage_png_start<span class="k2">;</span></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Mon, 14 May 2012 02:02:53 +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/610216/954770#target">Audric</a> said:</div><div class="quote"><p> ld -r -b binary -o myimage.o myimage.png</p></div></div><p><img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>Thanks!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 14 May 2012 02:14:32 +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/610216/954770#target">Audric</a> said:</div><div class="quote"><p>ld -r -b binary -o myimage.o myimage.png</p></div></div><p>

boom.</p><p>there it is.</p><p><img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mark Oates)</author>
		<pubDate>Mon, 14 May 2012 02:40:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was thinking the ld method couldn&#39;t give information on the size of the binary blob, but <a href="http://stackoverflow.com/questions/4158900/embedding-resources-in-exe-using-gcc">this SO page says it can.</a>  It could be inconvenient with namespaces though, seeing as how the variable names depend on the filename.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 14 May 2012 12:31:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If I understand correctly, the data will be loaded into memory as if it were a global variable. It might be nifty, if somebody would know a way to access a tar or (uncompressed) zip archive this way (only one file gets linked in; file system like access).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (weapon_S)</author>
		<pubDate>Tue, 15 May 2012 21:28:50 +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/610216/954905#target">weapon_S</a> said:</div><div class="quote"><p> It might be nifty, if somebody would know a way to access a tar or (uncompressed) zip archive this way (only one file gets linked in; file system like access).</p></div></div><p>PhysFS has a function for this, <a href="http://icculus.org/physfs/docs-devel/html/physfs_8h.html#ac80d0bc4d170b52cc2fc5b7771837cb6">PHYSFS_mountMemory</a>. You&#39;d mount that memory, setup the PhysFS interface via the PhysFS addon and every function in Allegro will work transparently with that archive.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Tue, 15 May 2012 22:48:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for posting that. I had trouble navigating their docs.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (weapon_S)</author>
		<pubDate>Tue, 22 May 2012 09:52:14 +0000</pubDate>
	</item>
</rss>
