<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>reading off the bitmap</title>
		<link>http://www.allegro.cc/forums/view/587566</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 16 Sep 2006 02:32:40 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hi,<br />    i&#39;ve got this here code :-</p><div class="source-code snippet"><div class="inner"><pre>tile_type2 <span class="k3">=</span> <a href="http://www.allegro.cc/manual/_getpixel" target="_blank"><span class="a">_getpixel</span></a><span class="k2">(</span>map, x, y <span class="k3">-</span> <span class="n">2</span><span class="k2">)</span>
</pre></div></div><p>

 while y &lt; 2, the coordinates are off the bitmap. the docs say _getpixel() returns<br />-1 in such cases but in my program i get a crash as this line is executed.<br /> I&#39;m a bit puzzled.<br /> tile_type2 is an int. I assume an int can hold a signed value. Is this right.</p><p>please help
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (William Labbett)</author>
		<pubDate>Fri, 15 Sep 2006 23:47:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I assume an int can hold a signed value. Is this right.
</p></div></div><p>

Yes. Unless you&#39;ve declared it to be <tt>unsigned</tt>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Fri, 15 Sep 2006 23:53:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
I don&#39;t think _getpixel does any bounds checking. Try getpixel instead.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Fri, 15 Sep 2006 23:54:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
the docs say _getpixel() returns -1 in such cases
</p></div></div><p>
They most definately do not:
</p><div class="quote_container"><div class="title">man _getpixel said:</div><div class="quote"><p>
These<br />       won&#39;t  work in mode-X, and don&#39;t do any clipping, so you must make sure<br />       the point lies inside the bitmap.
</p></div></div><p>
You&#39;re confused with getpixel().
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 15 Sep 2006 23:58:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Grrrrrr, at the bug that causes underscores to not show up (is this a forum bug, or browser bug?). I thought he WAS using getpixel():</p><p><span class="remote-thumbnail"><span class="json">{"name":"590176","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/b\/1b22c6d1449bdeb7fa4c73e3c5a371cc.jpg","w":353,"h":50,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/b\/1b22c6d1449bdeb7fa4c73e3c5a371cc"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/1/b/1b22c6d1449bdeb7fa4c73e3c5a371cc-240.jpg" alt="590176" width="240" height="33" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sat, 16 Sep 2006 00:01:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
is this a forum bug, or browser bug?
</p></div></div><p>
I have no idea what you&#39;re talking about. I can see underscores just fine... maybe check your font settings.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 16 Sep 2006 00:04:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
The underscore shows up fine here too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Sat, 16 Sep 2006 00:05:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks</p><p> I supposed because getpixel() checkedl, _getpixel would too.<br />I&#39;ll let you know how I get on (so if someone would kindly bump for me?).</p><p>Thanks <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (William Labbett)</author>
		<pubDate>Sat, 16 Sep 2006 00:12:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I have no idea what you&#39;re talking about. I can see underscores just fine... maybe check your font settings.
</p></div></div><p>

I know I&#39;m not the only person affected by this, as I&#39;ve seen other mention it before. It&#39;s not a font problem, as sometimes the underscore is visible, and at other times not. This only occurs on underscores on hyperlinks, and it could be an Opera bug, as it looks fine with FF, but I&#39;ve only ever seen it occur on this forum. <br />  <br />  <br /><a href="http://www.allegro.cc/forums/thread/587566/613687">testing_testing</a></p><p>[edit]I can see the above underscore no problem, but the original is still not visible.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sat, 16 Sep 2006 00:28:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, I couldn&#39;t see the underscores either.  Using Opera.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sat, 16 Sep 2006 01:10:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>thanks for the help, it&#39;s working now.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (William Labbett)</author>
		<pubDate>Sat, 16 Sep 2006 02:32:40 +0000</pubDate>
	</item>
</rss>
