<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Installing Allegro 5 with Code::Blocks and MinGW problems</title>
		<link>http://www.allegro.cc/forums/view/608763</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 09 Nov 2011 09:33:39 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello, I&#39;m completely new to allegro, and I have tried every tutorial for installing it I found through the internet, but none seems to work for me. I use Windows 7, 64 bit, Code Blocks 10.5 and I&#39;m trying to install Allegro 5. </p><p>My latest hope was the one I found on this thread: <a href="http://www.allegro.cc/forums/thread/606041">http://www.allegro.cc/forums/thread/606041</a></p><p>I follow every instruction as it is written, have no problems whatsoever during the installation, even when I build the example program there&#39;s no warning. However, when I try run the example, I get:</p><p>Assertion failed: dm.dmFields &amp; 0x00100000, file C:\CodeBlocks\allegro\src\win\wsystem.c, line 361</p><p>And Windows closes the program.</p><p>From what I&#39;ve found on the net, this is due to the assertion on the wsystem file in line 361 being false, but I never modified it, so I don&#39;t get this problem at all.<br />I&#39;ve searched the forums for a similar problem without success, so I&#39;m writing here, hoping anyone can help me, because I really want to use allegro, but it&#39;s like my 5th failed installation method.<br />Also, if the thread I was following does not work, please tell me so I can try another way, and If anyone knows the best, with the smallest chance of error method to install allegro with my specs, please tell me.</p><p>Thanks for the attention and I hope someone can help me solve this.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lordalaqua)</author>
		<pubDate>Mon, 07 Nov 2011 19:40:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Line 361 of src/win/wsystem.c from 5.0.0rc4 is :
</p><div class="source-code snippet"><div class="inner"><pre>   <a href="http://www.allegro.cc/manual/ASSERT"><span class="a">ASSERT</span></a><span class="k2">(</span>dm.dmFields <span class="k3">&amp;</span> DM_PELSHEIGHT<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
So DM_PELSHEIGHT is not set, and that is why it fails the assertion.</p><p>5.0.0rc4 is pretty old by now, and you should be using a more current version. <a href="http://www.allegro.cc/forums/thread/608749/936480#target">5.0.5 just came out</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 07 Nov 2011 20:21:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Have you tried the one in the <a href="http://wiki.allegro.cc/index.php?title=Windows_Vista,_Code::Blocks_10.05_and_Allegro_5">Wiki</a>?.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Mon, 07 Nov 2011 22:32:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Actually I did, otherwise I wouldn&#39;t come here to ask, but I guess it doesn&#39;t hurt to try again, when I used the tutorial from the wiki I had a strange problem:</p><p>Everything compiled OK, but when I ran the program I got the normal black console window I get when compiling any C program, and another window I couldn&#39;t see, but it was in the taskbar, and I could see the preview window from windows 7, and there was the program running, but I can&#39;t actually see it, just the preview-thing in the taskbar... I don&#39;t know if I made myself clear, if not tell me.</p><p>Does anyone know if this can be fixed, or did I install something wrong?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lordalaqua)</author>
		<pubDate>Tue, 08 Nov 2011 22:20:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sounds like you&#39;ve been bit by the window position bug - just set the window position manually after creating the display :
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_set_new_window_position"><span class="a">al_set_new_window_position</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span> display <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span><span class="n">800</span>,<span class="n">600</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_set_window_position"><span class="a">al_set_window_position</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span><span class="c">// in case al_set_new_window_position doesn't work</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 09 Nov 2011 05:31:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Edgar Reynaldo, thank you so much! It worked!<br />I was really looking forward to using allegro, and I just couldn&#39;t get it to work, but now I&#39;ll finally start having fun with it, thanks!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lordalaqua)</author>
		<pubDate>Wed, 09 Nov 2011 07:49:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No problem.</p><p>If you want to center the window, use al_get_monitor_info.</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_MONITOR_INFO"><span class="a">ALLEGRO_MONITOR_INFO</span></a> i<span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_get_monitor_info"><span class="a">al_get_monitor_info</span></a><span class="k2">(</span>ALLEGRO_DEFAULT_DISPLAY_ADAPTER , <span class="k3">&amp;</span>i<span class="k2">)</span><span class="k2">;</span>
<span class="k1">int</span> monwidth <span class="k3">=</span> i.x2 <span class="k3">-</span> i.x1<span class="k2">;</span><span class="c">// + 1?</span>
<span class="k1">int</span> monheight <span class="k3">=</span> i.y2 <span class="k3">-</span> i.y1<span class="k2">;</span><span class="c">// + 1?</span>
al_set_new_display_position<span class="k2">(</span><span class="k2">(</span>monwidth <span class="k3">-</span> windowwidth<span class="k2">)</span><span class="k3">/</span><span class="n">2</span> , <span class="k2">(</span>monheight <span class="k3">-</span> windowheight<span class="k2">)</span><span class="k3">/</span><span class="n">2</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span> display <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span>windowwidth , windowheight<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 09 Nov 2011 09:33:39 +0000</pubDate>
	</item>
</rss>
