<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>pivot_sprite</title>
		<link>http://www.allegro.cc/forums/view/586632</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 23 Jul 2006 20:38:26 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve never used pivot_sprite before and have run into some problems. Basically, my player sprite is broken into two sections. A top and a bottom. This is because I want the top of the body to &#39;tilt&#39; slightly left or right. Fine, I thought. I&#39;ll just break the two images apart and have the top pivot across the bottom. Each bitmap is 32x32 and the body is currently represented by a stick figure</p><div class="source-code snippet"><div class="inner"><pre>   O
   <span class="k3">|</span>
   ^
</pre></div></div><p>

</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/pivot_sprite" target="_blank"><span class="a">pivot_sprite</span></a><span class="k2">(</span> bmp, player.body<span class="k2">[</span><span class="n">0</span><span class="k2">]</span>, x, y, <span class="n">16</span>, <span class="n">32</span>, <a href="http://www.allegro.cc/manual/itofix" target="_blank"><span class="a">itofix</span></a><span class="k2">(</span><span class="n">35</span><span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

Now, I thought that 16x32 would align the top half of the body to the middle-bottom of the image. So that the &#39;spine&#39; of the stick man would align with its bottom half. But I&#39;m not having any luck. Am I just being stupid here, or what?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ngiacomelli)</author>
		<pubDate>Sun, 23 Jul 2006 20:38:26 +0000</pubDate>
	</item>
</rss>
