<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>tilemap editor for allegro on linux.</title>
		<link>http://www.allegro.cc/forums/view/588548</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 15 Nov 2006 21:42:33 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>afaik Mappy is only for windows... which sucks because i&#39;m not developing on windows. Any equivalent that&#39;s possibly multiplatform?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (relay01)</author>
		<pubDate>Tue, 14 Nov 2006 06:44:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There&#39;s my MapSlapper program .... it&#39;s kinda beta though and uses Win32 .... if you&#39;re bored you could make a pure Allegro version since it&#39;s open source. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (23yrold3yrold)</author>
		<pubDate>Tue, 14 Nov 2006 08:16:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There&#39;s this <a href="http://tegel.sourceforge.net/">TEGEL</a> thing you could try out. It&#39;s quite good. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Tue, 14 Nov 2006 15:08:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can compile Mappy from source on Linux, which is what I did quite a while ago. I don&#39;t know how it compares with the Windows version though. IIRC the interface wasn&#39;t nice at all so I got frustrated with it and removed it from my PC.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Hano Wair)</author>
		<pubDate>Tue, 14 Nov 2006 15:34:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is <a href="http://annie.kezako.net/eme/">http://annie.kezako.net/eme/</a> as well,<br />which is a native Linux tile editor with a lot of functionality<br />and you can write your own plugin/map format if you can&#39;t get<br />the one you want with the supplied default plugin.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (vpenquerch)</author>
		<pubDate>Tue, 14 Nov 2006 21:08:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just write my own mapmaker app. With some work, you can make something very versatile. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Tue, 14 Nov 2006 21:39:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>TEGEL does look really good... and I don&#39;t think I&#39;m a good enough progammer to write my own... although I want to add support for it in my game...  I also may try and compile mappy on linux... oh the posibilities... </p><p>Anyway... thanks for the help... and my game design continues...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (relay01)</author>
		<pubDate>Wed, 15 Nov 2006 01:48:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Writing it is no problem. I <s>stink</s> at programming, but I have already written one. Here is some sample code, but untested, using Allegro and the mouse:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/mouse_b" target="_blank"><span class="a">mouse_b</span></a> <span class="k3">&amp;</span> <span class="n">1</span><span class="k2">)</span>
<span class="k2">{</span>
     tile<span class="k2">[</span><a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a><span class="k3">/</span>TILE_SIZE<span class="k2">]</span><span class="k2">[</span><a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k3">/</span>TILE_SIZE<span class="k2">]</span> <span class="k3">=</span> this_tile<span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
nest that within a test to see if the mouse is in the map preview, and poof!, you have a map maker. Use file_select_ex() to save it, then add another part of the window to let the player select a tile to paint, like this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/mouse_b" target="_blank"><span class="a">mouse_b</span></a> <span class="k3">&amp;</span> <span class="n">1</span><span class="k2">)</span>
<span class="k2">{</span>
     this_tile <span class="k3">=</span> tile_set<span class="k2">[</span><a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a><span class="k3">/</span>TILE_SIZE<span class="k2">]</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
for a horizontal selector, or this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/mouse_b" target="_blank"><span class="a">mouse_b</span></a> <span class="k3">&amp;</span> <span class="n">1</span><span class="k2">)</span>
<span class="k2">{</span>
     this_tile <span class="k3">=</span> tile_set<span class="k2">[</span><a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k3">/</span>TILE_SIZE<span class="k2">]</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
for a vertical selector.</p><p>Anyway, it shouldn&#39;t be too hard. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Wed, 15 Nov 2006 21:42:33 +0000</pubDate>
	</item>
</rss>
