<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Help - Error - Assertion failed: rx &gt;= 0...</title>
		<link>http://www.allegro.cc/forums/view/612644</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 24 May 2013 04:25:51 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can anyone help me with what this might mean.. the program works fine until I add a some code c++ using Allegro 5 I a debug error:</p><p>Debug error R6010 - Abort() has been called</p><p>Assertion failed: rx &gt;= 0, file allegro-git\addons\primitives\high_primitives.c, line 944</p><p>this is the code that I&#39;m inserting that seems to cause the problem. To save me inserting my full main file I have just snipped this code, obviously when i&#39;m using it I&#39;m putting the code in all the right places.</p><p>Complete newbie here and any help would be massively appreciated! Thanks</p><p>[code]<br />void InitFASTCAR(FASTCAR &amp;fastcarr);<br />void DrawFASTCAR(FASTCAR &amp;fastcarr);<br />void StartFASTCAR(FASTCAR &amp;fastcarr);<br />void UpdateFASTCAR(FASTCAR &amp;fastcarr);</p><p>FASTCAR fastcarr;</p><p>InitFASTCAR(fastcarr);</p><p>StartFASTCAR(fastcarr);<br />UpdateFASTCAR(fastcarr);</p><p>DrawFASTCAR(fastcarr);</p><p>void InitFASTCAR(FASTCAR &amp;fastcarr)<br />{<br />		fastcarr.ID = FC;<br />	    fastcarr.live = false;<br />		fastcarr.speed = 8;<br />		fastcarr.boundx = 35;<br />		fastcarr.boundy = 25;<br />}<br />void DrawFASTCAR(FASTCAR &amp;fastcarr)<br />{<br />			al_draw_filled_rounded_rectangle(fastcarr.x, fastcarr.y, fastcarr.x +70, fastcarr.y +50, fastcarr.x - 4,fastcarr.y - 4,al_map_rgb(255,0,0));</p><p>			al_draw_filled_rounded_rectangle(fastcarr.x, fastcarr.y, fastcarr.x +70, fastcarr.y +50, fastcarr.x - 4,fastcarr.y - 4,al_map_rgb(50,50,50));<br />}<br />void StartFASTCAR(FASTCAR &amp;fastcarr)<br />{<br />		if(!fastcarr.live)<br />		{<br />			if(rand() % 500 == 0)<br />			{<br />				fastcarr.live = true;<br />				fastcarr.x = width;<br />				fastcarr.y = 30 + rand() % (height - 60);<br />			}<br />		}<br />}</p><p>void UpdateFASTCAR(FASTCAR &amp;fastcarr)<br />{</p><p>		if(fastcarr.live)<br />		{<br />			fastcarr.x -= fastcarr.speed;</p><p>			if(fastcarr.x &lt; 0)<br />				fastcarr.live = false;</p><p>			<br />		}</p><p>}<br />[/code]
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ryan lee)</author>
		<pubDate>Fri, 24 May 2013 00:28:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_draw_filled_rounded_rectangle"><span class="a">al_draw_filled_rounded_rectangle</span></a></span> parameter <span class="source-code">rx</span> and <span class="source-code">ry</span> must be greater than zero.</p><div class="source-code snippet"><div class="inner"><pre><span class="c">// Are you sure you want variable radii here?</span>
<a href="http://www.allegro.cc/manual/al_draw_filled_rounded_rectangle"><span class="a">al_draw_filled_rounded_rectangle</span></a><span class="k2">(</span>fastcarr.x, fastcarr.y, fastcarr.x <span class="k3">+</span><span class="n">70</span>, fastcarr.y <span class="k3">+</span><span class="n">50</span>, fastcarr.x <span class="k3">-</span> <span class="n">4</span>,fastcarr.y <span class="k3">-</span> <span class="n">4</span>,<a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jeff Bernard)</author>
		<pubDate>Fri, 24 May 2013 00:50:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Aha! Your a legend thank you so much! I&#39;ve just changed it to a normal rectangle as I can&#39;t really figure out the rounded thing for now!</p><p>Thanks again! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ryan lee)</author>
		<pubDate>Fri, 24 May 2013 01:17:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Imagine a rounded rectangle was a normal rectangle, but with 4 ovals instead of the corners. The parameters <span class="source-code">rx</span> and <span class="source-code">ry</span> are the horizontal and vertical radii of the ovals. So increasing those parameters would put larger ovals on the corners, so the corners would be more round.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jeff Bernard)</author>
		<pubDate>Fri, 24 May 2013 03:03:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ah I see, so I wouldn&#39;t need to use my &#39;object&#39;s&#39; x and y position variables, just a single number?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ryan lee)</author>
		<pubDate>Fri, 24 May 2013 03:16:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Imagine an ellipse with the specified radii, and then cut it in four and put it on the corners of the rectangle. hradius and vradius must be less than half the width and height respectively.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 24 May 2013 04:25:51 +0000</pubDate>
	</item>
</rss>
