<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>MinorHack Attack!</title>
		<link>http://www.allegro.cc/forums/view/587326</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 18 Sep 2006 22:01:16 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, I finally got around to making a decent MinorHack website. For those of you who don&#39;t remember, the first thread is <a href="http://www.allegro.cc/forums/thread/586670">here</a>. The difference between the old one and this one is that now there is a rule-o-matic. 1 rule is arbitrarily selected to govern entries.</p><p>Anyways, I want to run a few of these. I want to do 2 this weekend, and I&#39;m hoping, if I can get enough interest, that I can get one in today also. Anybody up for it? Give me times, and I will schedule it!</p><p>Also, spend some time at the <a href="http://cgamesplay.com/minorhack/">site</a> and add a few rules. We need rules to get the competition interesting!</p><p>[edit]<br />Current competition is scheduled for 2100 GMT on September 3.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 30 Aug 2006 20:35:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m currently thinking 6 hours for the competition
</p></div></div><p>
Do you mean &quot;have a competition in 6 hours&quot; or &quot;competition will be 6 hours long&quot;?  </p><p>Anyway, I&#39;m hosed today/tonight, but I&#39;d be open for doing them this weekend any time.  Whoo-hoo, 4-day weekend!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Wed, 30 Aug 2006 20:54:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I mean it would be 1 hour long, and start at 6 p.m. EDT <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 30 Aug 2006 20:56:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It would be nice if the site allowed every entrant to start when he wants to. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Once logged in, he would have option &quot;enter the compo&quot; for every compo that&#39;s open at the moment, which would give him access to the rules, but at the same time it would start the countdown and close submission for him after 60 minutes. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Wed, 30 Aug 2006 21:06:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Once logged in, he would have option &quot;enter the compo&quot; for every compo that&#39;s open at the moment, which would give him access to the rules, but at the same time it would start the countdown and close submission for him after 60 minutes. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>Yeah, but that takes the social aspect out of it <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Plus it allows cheating. Not that we really care about that <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /></p><p>Okay, let&#39;s get some more rules in the system, okay?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 30 Aug 2006 21:17:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Okay, let&#39;s get some more rules in the system, okay?
</p></div></div><p>
Okay, I&#39;ve added a bunch. I may add something more later, when I&#39;ll have some more ideas. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Wed, 30 Aug 2006 22:31:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;d like to on Sunday night or something, but I wouldn&#39;t be able to tonight. I need more notice! <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Derezo)</author>
		<pubDate>Wed, 30 Aug 2006 22:34:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Eh. Too short to produce anything meaningful.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Wed, 30 Aug 2006 22:48:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Eh. Too short to produce anything meaningful.
</p></div></div><p>
How about 72 hours? No, wait.... <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Wed, 30 Aug 2006 22:56:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hey, I wrote one of my &quot;best&quot; games during the last one... a simple snake game. Most of my games I have the problem of overengineering, but with 1 hour, I just hacked up whatever works.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Wed, 30 Aug 2006 22:56:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t think I&#39;m good enough to hack something in one hour <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Wed, 30 Aug 2006 23:17:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If this happens, i think I&#39;ll give it a shot.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Wed, 30 Aug 2006 23:45:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OTOH, I enjoy a good challenge every now and then <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Thu, 31 Aug 2006 00:28:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What times, guys? Sunday at 2100 GMT sound good? Anyone else?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 00:35:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hmmm...on the Rules section of your site, I don&#39;t see any rules.  Or...has none been approved yet?  Browser:  Opera.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Thu, 31 Aug 2006 01:12:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>At the time that you posted (and now), there are 14 rules. If you can&#39;t see them, try <a href="http://cgamesplay.com/minorhack/xml/rules/">the xml</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 01:36:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I can see the rules in the xml, but there all smashed together in one long paragraph.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Thu, 31 Aug 2006 01:38:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Opera sucks <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> So what does the <a href="http://cgamesplay.com/minorhack/rules">rules page</a> look like normally then?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 01:44:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Opera sucks
</p></div></div><p>
That&#39;s it, I&#39;m going to make my own internet browser and it shall be named:  sUcks (Super URL Connecting at Killer Speeds).</p><p>Anyway, the rules page looks fine now...odd.</p><p>[edit] - Added some really zany rules.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Thu, 31 Aug 2006 02:07:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just had to write a test-game to see what i could do in one hour. I think it turned out pretty well. The code is horrible, but that is to be expected i guess <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br /><a href="http://hem.bredband.net/b391724/files/snake.rar">GAME!</a><br />or just the source <a href="http://hem.bredband.net/b391724/files/snake.c">Sauce!</a></p><p>Download, run, tell me your scores!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 14:29:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Impressive! 3761 after a few tries.</p><p>EDIT: 4343!</p><p>Btw, you should have limited the placement of the green circles more to the centre of the board. If you get one in one of the corners, you can&#39;t even get to it. And you could make a minimum distance from the last green circle, otherwise if you&#39;re lucky, you can get three or four in a straight line.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Thu, 31 Aug 2006 14:55:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Good point with the corners, didn&#39;t think of that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 15:07:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I put this code in eat_treat() instead of the two lines that calculate the new x/y:
</p><div class="source-code snippet"><div class="inner"><pre>  <span class="k1">while</span> <span class="k2">(</span><span class="n">1</span><span class="k2">)</span> <span class="k2">{</span>
    newx <span class="k3">=</span> <span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">460</span><span class="k2">)</span><span class="k3">+</span><span class="n">80</span><span class="k2">;</span>
    newy <span class="k3">=</span> <span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">320</span><span class="k2">)</span><span class="k3">+</span><span class="n">80</span><span class="k2">;</span>

    <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>treat.x <span class="k3">-</span> newx<span class="k2">)</span><span class="k3">*</span><span class="k2">(</span>treat.x <span class="k3">-</span> newx<span class="k2">)</span> <span class="k3">+</span> <span class="k2">(</span>treat.y <span class="k3">-</span> newy<span class="k2">)</span><span class="k3">*</span><span class="k2">(</span>treat.y <span class="k3">-</span> newy<span class="k2">)</span> <span class="k3">&gt;</span><span class="k3">=</span> <span class="n">150</span><span class="k3">*</span><span class="n">150</span><span class="k2">)</span> <span class="k2">{</span>
      treat.x <span class="k3">=</span> newx<span class="k2">;</span>
      treat.y <span class="k3">=</span> newy<span class="k2">;</span>
      <span class="k1">break</span><span class="k2">;</span>
    <span class="k2">}</span>
  <span class="k2">}</span>
</pre></div></div><p>
Got 5758 points the first time. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Thu, 31 Aug 2006 15:11:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks =)<br />You could probably have used the &quot;is_overlapping&quot; function to do that.<br />Also, you can increase/decrease the speed of the snake (with the up/down arrows)</p><p>I&#39;ll put up an alternate version (over one hour of work) with some updates.</p><p>EDIT:<br />Here is version &quot;2&quot; (&quot;real&quot; version still in the previous post):<br /><a href="http://hem.bredband.net/b391724/files/snake_v2.rar">GAME!</a><br />or just the source <a href="http://hem.bredband.net/b391724/files/snake_v2.c">Sauce!</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 15:32:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So does that mean you&#39;re in for this weekend, Jonathan?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 15:42:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Aye, if i can. My girlfriend has her family over, but i should be able to squeeze in an hour of coding there.</p><p>Nothing like a time constraint to fuel productivity =)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 15:45:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I set it up for Sunday at 2200 GMT (if I did that correctly). It&#39;s Sunday at 6 p.m. for you EDT&#39;ers like me. If anyone has a problem with this time, let me know!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 16:06:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Another bunch of rules from me is on the way. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Thu, 31 Aug 2006 16:20:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>in your first post that was 2100 UTC. Make up your mind =)<br />2100 would suit me better, but both would probably work.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 16:21:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Rescheduled <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I don&#39;t like all this converting between time formats &gt;_&lt; In the first post, by the way, 6 p.m. is 2200 GMT <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /> Anyways, it&#39;s 2100 GMT now, which is 5 p.m. Sunday, EDT.</p><p>[append]<br />By the way, I am rephrasign the rules as I approve them. Let me know if I miss the point of the original.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 16:31:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Good. You should probably edit the first post to reflect the changes so people won&#39;t have to read through the entire thread =)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 16:49:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>GMT+1 Here, so it&#39;s not gonna be a problem. Unless I&#39;m unavailable <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Thu, 31 Aug 2006 16:50:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Play my game! Tell me I&#39;m pretty and smart!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 31 Aug 2006 17:06:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I don&#39;t like all this converting between time formats &gt;_&lt;
</p></div></div><p>
Then just put them as GMT. Even better - make a countdown timer. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> The way it is now, &quot;Times are in EST/EDT (GMT-5/GMT-4)&quot; is completely confusing.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
By the way, I am rephrasign the rules as I approve them. Let me know if I miss the point of the original.
</p></div></div><p>
OK, so:</p><p>- &quot;The game must feature high number of autonomic &quot;creatures&quot; driven by some kind of AI in a swarm fashion.&quot; - &quot;Swarm!&quot; was only a title of the rule, but I didn&#39;t require &quot;AI in a swarm fashion&quot;. As long as there is large number of creatures with similar behavior they can be considered some kind of swarm. Of course swarm AI is fine, too, but it wasn&#39;t compulsory in my version. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>- &quot;The game must be turn-based. Anything that allows player to think before making his move will do (try avoiding making multiplayer games with no optional AI, as second player isn&#39;t always at hand).&quot; - Multiplayer with optional AI sounds a bit difficult to make in one hour, so it wasn&#39;t in my version. If you think that good AI replacement for human player can be written in one hour you can leave this way, but I&#39;d prefer more games, where computer has advantage over he player than games where poor AI makes everything too easy. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>The rest seems to be fine. I&#39;m waiting for the second batch of my rules to be added. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Thu, 31 Aug 2006 18:11:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hmmm, I&#39;d like to think I could make a snake game in an hour. But I&#39;d try to do something a little better than just a snake game, and I&#39;d fail.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonny Cook)</author>
		<pubDate>Thu, 31 Aug 2006 18:32:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Then just put them as GMT. Even better - make a countdown timer. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> The way it is now, &quot;Times are in EST/EDT (GMT-5/GMT-4)&quot; is completely confusing.
</p></div></div><p><a href="http://cgamesplay.com/minorhack/current-competition">Clicka de link.</a> I&#39;m also adding the other rules right now. I&#39;ll make those changes you pointed out.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Hmmm, I&#39;d like to think I could make a snake game in an hour. But I&#39;d try to do something a little better than just a snake game, and I&#39;d fail.
</p></div></div><p>Yeah, I failed my first one <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> You should play anyways <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
GMT+1 Here, so it&#39;s not gonna be a problem. Unless I&#39;m unavailable <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div></div><p>Great. Look forward to seeing your entry <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>[append]</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If you think that good AI replacement for human player can be written in one hour you can leave this way, but I&#39;d prefer more games, where computer has advantage over he player than games where poor AI makes everything too easy. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>I&#39;m not going to change this one, because the actual rule simply states that the game must be turn-based, and nothing more. Remember, everything past the first sentence is just suggestion or clarification. And I strongly encourage bending the rules as much as possible.</p><p>Oh, and I had to not approve a rule: The one that said all variables must end in ++, because I&#39;m not sure <tt>int i++;</tt> is valid syntax.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 31 Aug 2006 22:58:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Clicka de link. [cgamesplay.com] I&#39;m also adding the other rules right now. I&#39;ll make those changes you pointed out.
</p></div></div><p>
Showing minutes and seconds in remaining time may come in handy when the compo will get closer. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>- &quot;The player&#39;s representation in the game must be a circle drawn with circlefill. That is, the main character must be drawn with circlfill.&quot; - a typo in the last word.</p><p>The rest looks fine. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Fri, 01 Sep 2006 00:13:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ll try and participate!</p><p>Did anyone else here participate in BlitzHack? I thought that was a lot of fun. It was 6 hours though, so you were able to add quite a few features if you managed your time well.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Derezo)</author>
		<pubDate>Fri, 01 Sep 2006 00:40:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Showing minutes and seconds in remaining time may come in handy when the compo will get closer. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>I&#39;ll deal with that issue, once, say, the number of days reaches 0 <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Also, I don&#39;t know what the Halting Problem is.</p><p>Derezo: Glad to have you! No, I didn&#39;t participate in BlitzHack. Wasn&#39;t that one-time-only?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 01:23:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Any chance on lifting the c++/allegro restrictions?</p><p>Marcello
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Marcello)</author>
		<pubDate>Fri, 01 Sep 2006 01:26:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There&#39;s no C++ restriction, but you must use C or C++, and can only use Allegro and the standard C library.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 02:23:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How much frequent it&#39;ll be? One time per year? One time per month? One time per week? Just once and nevermore?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Fri, 01 Sep 2006 02:36:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
There&#39;s no C++ restriction, but you must use C or C++, and can only use Allegro and the standard C library.
</p></div></div><p>
I think you should allow standard C++ library (including STL). Also allowing WinAPI would be cool, although the only function there that doesn&#39;t have Allegro replacement is timeGetTime() and other high resolution timing functions. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Fri, 01 Sep 2006 02:50:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I think you should allow standard C++ library (including STL). Also allowing WinAPI would be cool, although the only function there that doesn&#39;t have Allegro replacement is timeGetTime() and other high resolution timing functions. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>Yeah, standard C++ library also. Personally, I don&#39;t care what you use so long as it is Allegro or comes with the compiler. And it had better compile on Windows and Linux <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How much frequent it&#39;ll be? One time per year? One time per month? One time per week? Just once and nevermore?
</p></div></div><p>This is the second time in 2 months. It can be as often as people want it <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Just drop me a line and I can add it to the DB.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 03:01:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How many rules will be selected? By your rule-o-matic? (or maybe rule-o-human)?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Fri, 01 Sep 2006 03:19:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>1 rule is used per competition.</p><p>I denied the &quot;argc/argv&quot; rule. Users in Windows (and Linux, et al.) should be able to double click on an executable without passing parameters <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 03:31:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Added some more rules...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Fri, 01 Sep 2006 03:54:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
 1 rule is used per competition.
</p></div></div><p>

It would be nice to say that in the site.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Fri, 01 Sep 2006 04:05:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Added some more rules...
</p></div></div><p>If you added the rules about California and politics, then congratualations! Those are the most brilliant rules I have ever seen <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It would be nice to say that in the site.
</p></div></div><p>Done <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 04:34:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
you must use C or C++, and can only use Allegro and the standard C library.
</p></div></div><p>It&#39;s a pretty informal competition, right -- we&#39;re just posting our results in a forum thread?  So I don&#39;t see how or why there should be any restrictions like that.  If it&#39;s a pain to get a game to run, you can always just not run it.  Just let people do whatever -- it&#39;s all for fun.</p><p>edit: on a similar note: I also have no idea why you&#39;d disallow media files.  Seems like you&#39;re just arbitrarily reducing the potential quality of the entries.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 01 Sep 2006 04:35:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If it&#39;s a pain to get a game to run, you can always just not run it.
</p></div></div><p>You&#39;re right. There are only two rules that are actually enforced. The 1-source-file limit, and the rule-o-matic&#39;s selection. I just set that as a rule to enforce that it be as easy to run as possible. It should compile for everyone, and the only things that they should have to have are a C(++) compiler and Allegro. I need to re-write the main page of the site to clarify this and other rules, as it is written very porrly right now.</p><p>[append]<br />Okay, good thing I did that, because I uncovered a rather serious bug in the rule selector. Anyways, I think everything is written much more nicely now, and the current competition page will reiterate the rules when the time comes.</p><p>Media files are disallowed to add a restriction to the competition, which is to keep it simple. Just personal preference, I suppose. By the way, rule submitters, I am not opposed to requiring entries to use a certain media file that you provide.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 04:41:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s a 1 hour competition, how much media do you need? I personally like just being able to do simple programmers art without having my entry stick out like a sore thumb.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Fri, 01 Sep 2006 05:59:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It&#39;s a 1 hour competition, how much media do you need?
</p></div></div><p>A main character bitmap and an enemy bitmap would be nice.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I personally like just being able to do simple programmers art without having my entry stick out like a sore thumb.
</p></div></div><p>I kind of doubt that, with an hour to do the code and the media, anyone would have much more than simple programmer&#39;s art.  All allowing media files would do is enable graphics a bit more &#39;flavorful&#39; and versatile than colored circles and squares.<br />Also, I&#39;m generally opposed to setting rules of a competition with the purpose of dragging down the quality of everyone&#39;s entries just because I can&#39;t get that quality myself ... ie, removing drawing just because I can&#39;t draw.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
which is to keep it simple.
</p></div></div><p>How does that &quot;keep it simple&quot;?  I don&#39;t see any particular extra trouble in running entries that include a few media files along with their single source file.  And allegro makes bitmap loading and rendering totally straightforward.  Making bitmaps is pretty trivial, too -- just spend a minute clicking in MS Paint, and you get comically bad media files for the cost of a bathroom break.  Easier than trying to make anything interesting out of circles and squares, probably.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 01 Sep 2006 07:15:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It says you need to make sure it compiles on Linux and Windows. But I do not have access to Linux for compiling, and probably won&#39;t for another week or two. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Fri, 01 Sep 2006 17:51:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just write ANSI code + Allegro and no #pragma&#39;s etc and you should be ok i think.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Fri, 01 Sep 2006 17:58:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>And don&#39;t include conio.h, winalleg.h, and windows.h. There are others, but I think these are the most common ones.</p><p>Well, I wanted to write a proper response to this, but I guess I won&#39;t have time:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How does that &quot;keep it simple&quot;? I don&#39;t see any particular extra trouble in running entries that include a few media files along with their single source file. And allegro makes bitmap loading and rendering totally straightforward. Making bitmaps is pretty trivial, too -- just spend a minute clicking in MS Paint, and you get comically bad media files for the cost of a bathroom break. Easier than trying to make anything interesting out of circles and squares, probably.
</p></div></div><p>

I think the biggest reason for disallowing extra media is that it really hits home the fact that gameplay is everything. If you can use blank bitmaps each with an X on it, generated at load time, you can focus on your game&#39;s mechanics instead of art in your hour. If you so choose, you can enhance your entry later with real bitmaps loaded in place of the placeholder bitmaps. This won&#39;t count as part of your entry, but it allows you to have a nicer finished product.</p><p>This competition is about straining creativity to design a game meeting the rules in as little work as possible. The goal of this competition is <i>not</i> to have a finished product; it is to put forth an innovative idea that is fun to play.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 18:13:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
 If you added the rules about California and politics, then congratualations! Those are the most brilliant rules I have ever seen <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>

Personally, I added the rules &quot;just the mouse&quot;, &quot;no text&quot;, &quot;bananas&quot;, &quot;something undestructible wants to kill the player who must destroy something&quot;. &quot;upside-down&quot;, &quot;l33t&quot;, &quot;politcs&quot; and &quot;pig and cow&quot;.<br />I added &quot;argc/argv&quot; too, but you declined.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Fri, 01 Sep 2006 18:15:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This competition is about straining creativity to design a game meeting the rules in as little work as possible. The goal of this competition is not to have a finished product; it is to put forth an innovative idea that is fun to play.
</p></div></div><p>
Hmmm... I can&#39;t seem to agree with this... art is part of the creativity too, isn&#39;t it? And considering media production is generally a larger time factor than coding, polished art will be expensive anyway. Or am I missing a point here?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 01 Sep 2006 18:45:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And don&#39;t include conio.h, winalleg.h, and windows.h. There are others, but I think these are the most common ones.
</p></div></div><p>
I always was forced to include &lt;winalleg.h&gt; whenever I wanted to use STL, as its implementations I was using were including &lt;windows.h&gt; indirectly, which conflicted with Allegro (especially BITMAP structure). Also Allegro doesn&#39;t have high resolution timers, so they can&#39;t be easily replaced.</p><p>I&#39;m not sure whether I&#39;ll have time to enter the compo when it starts, but I&#39;m planning to include compatibility version of &quot;winalleg.h&quot; for Linux users (included below), so dropping this file to compile directory will hopefully solve all problems. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include &lt;sys/time.h&gt;</span>

<span class="k1">unsigned</span> <span class="k1">long</span> <span class="k1">long</span> timeGetTime<span class="k2">(</span><span class="k2">)</span>
<span class="k2">{</span>
        timeval T<span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_421.html" target="_blank">gettimeofday</a><span class="k2">(</span><span class="k3">&amp;</span>T,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <span class="k1">return</span> <span class="k2">(</span><span class="k2">(</span><span class="k1">long</span> <span class="k1">long</span><span class="k2">)</span>T.tv_sec<span class="k2">)</span><span class="k3">*</span><span class="n">1000</span><span class="k3">+</span>T.tv_usec<span class="k3">/</span><span class="n">1000</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Fri, 01 Sep 2006 18:50:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Or, in your source file:
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#ifdef _WIN32</span>
<span class="p">#include &lt;winalleg.h&gt;</span>
<span class="p">#else</span>
<span class="p">#include &lt;sys/time.h&gt;</span>

<span class="k1">unsigned</span> <span class="k1">long</span> <span class="k1">long</span> timeGetTime<span class="k2">(</span><span class="k2">)</span>
<span class="k2">{</span>
        timeval T<span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_421.html" target="_blank">gettimeofday</a><span class="k2">(</span><span class="k3">&amp;</span>T,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <span class="k1">return</span> <span class="k2">(</span><span class="k2">(</span><span class="k1">long</span> <span class="k1">long</span><span class="k2">)</span>T.tv_sec<span class="k2">)</span><span class="k3">*</span><span class="n">1000</span><span class="k3">+</span>T.tv_usec<span class="k3">/</span><span class="n">1000</span><span class="k2">;</span>
<span class="k2">}</span>
<span class="p">#endif</span>
</pre></div></div><p>(add _WIN64 at your leisure)</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Hmmm... I can&#39;t seem to agree with this... art is part of the creativity too, isn&#39;t it? And considering media production is generally a larger time factor than coding, polished art will be expensive anyway. Or am I missing a point here?
</p></div></div><p>I find that disallowing media will encourage more creative use of code. After all, this is primarily a programming competition. However, as I have said before, the bonus rule for a competition could be to use a specific media file in your entry, and that would be fine.</p><p>I think the only thing that can really be said on the matter that (hopefully) we can agree on is this: A competition is such because it has rules. These rules may be arbitrary, but they are in place solely for the purpose of limiting competitors. The challenge of a competition is putting out a good effort, despite the rules set in place.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 19:17:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
you can focus on your game&#39;s mechanics instead of art
</p></div></div><p>You can do that whether art is allowed or not.  Actually, the time limit alone pretty much requires it -- if you were to &#39;focus&#39; on art, you probably just wouldn&#39;t finish.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This competition is about straining creativity to design a game meeting the rules in as little work as possible.
</p></div></div><p>Adding art gives more room for creativity, and doesn&#39;t add any more work than an entrant wants.  I&#39;m sure anyone entering this will have to be quite good at managing their time anyway: No need to pretend to manage it for them, and go banning things because you think they wouldn&#39;t have time for it.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
it is to put forth an innovative idea that is fun to play.
</p></div></div><p>And adding media files opens up the range of ideas that can be coherently represented ... with no drawbacks, because everyone is still free, of course, to not use media files.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I find that disallowing media will encourage more creative use of code
</p></div></div><p>Do you?  Really?  Are you sure it doesn&#39;t just encourage use of circle() instead of blit() ...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
this is primarily a programming competition
</p></div></div><p>I thought it was about making games, not just code.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
These rules may be arbitrary, but they are in place solely for the purpose of limiting competitors.
</p></div></div><p>A good competition would choose rules that improve the competition, and would be able to justify those rules.  Just adding completely arbitrary restrictions, well, it might make the competition arbitrarily worse.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 01 Sep 2006 19:33:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is no size limit... store the raw bitmap data in your source.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Fri, 01 Sep 2006 19:51:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
There is no size limit... store the raw bitmap data in your source.
</p></div></div><p>If that&#39;s fine, it just emphasizes how pointless the no-media rule is ...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 01 Sep 2006 20:01:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
A good competition would choose rules that improve the competition, and would be able to justify those rules. Just adding completely arbitrary restrictions, well, it might make the competition arbitrarily worse.
</p></div></div><p>I guess we can&#39;t agree then. I am going to keep this rule for the purpose of simplicity. I hope this doesn&#39;t discourage you from participating.</p><p>If you are interested in modifying the competition&#39;s rules, let me know. I will supply you with the source code for the web site and you can host your own.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 01 Sep 2006 20:03:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think the &quot;one source file only, nothing else&quot; is good. I think it&#39;s very suitable for such a short competition. It&#39;s also fun to work with something else than bitmaps. It gives you the opportunity to express yourself in a way that in any other game would look bad.</p><p>It also feels 1337.</p><p>I rest my case.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Fri, 01 Sep 2006 20:20:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think it&#39;s time I try hacking myself, and I guess this would be a nice competetion to get me going. Though I&#39;m not sure I can drop in for this particular one (coding in 1:00-2:00 AM when school is on is no good...)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Sat, 02 Sep 2006 18:45:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, if all goes well I should be in this one! This could be really nice, as it is possible to convert games made for this into finished products eventually. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>[EDIT]<br />is END_OF_MAIN(); still necessary on Linux?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 03 Sep 2006 04:29:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve made this one just to see what can I create in one hour. Done in 59 minutes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Sun, 03 Sep 2006 05:16:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Pretty neat! A little long though, might tweak the physics a little. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 03 Sep 2006 06:28:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s END_OF_MAIN() and you should use it anyway for platform compatibility.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Sun, 03 Sep 2006 06:51:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I hope this doesn&#39;t discourage you from participating.
</p></div></div><p>No -- it&#39;s all good.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />  It&#39;ll still be a fun competition, and I&#39;ll put in an effort as long as I can be around that hour.  Glad you&#39;re going through the trouble of hosting it!</p><p>(I&#39;m way too happy to get argumentative ... really, I think the media thing is a pretty minor point.  There&#39;s no time to do art anyway!)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 03 Sep 2006 08:34:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m going to participate if I&#39;ll be able to. However, 23:00-0:00 before a Monday is pretty evil for the majority of Europe that lives in CET.</p><p>I&#39;ve had a similar idea for a hack, and maybe I&#39;ll still execute it... But meanwhile, yours sounds interesting <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.</p><p>And please, remove the rule about bananas <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />. One banana infested compo is enough.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Sun, 03 Sep 2006 15:45:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, glad to see so much participation! Personally, I will have a lot of trouble playing. I am presently on vacation at some resort, and the rooms don&#39;t have internet. I have a phone with the internet (how I am typing this), and a laptop. I&#39;ll be playing, of course, but it might take me a while to finish my judging.</p><p>Speaking of judging, I think we should use the Borda method of voting. First place gets n points, second gets n - 1, ... last gets 0 points.</p><p>Also, as soon as I get some free time, I&#39;ll be writing a &quot;past entries&quot; page on the site, with everyone&#39;s progress at the end of the hour.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 03 Sep 2006 17:37:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hook your phone to your laptop???
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Sun, 03 Sep 2006 17:42:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I imagine I could write software to do that, but the provided software uses the OS&#39;s features, which make sure that &quot;data service&quot; and &quot;tethered dial-up networking&quot; are not active at the sae time. I know that&#39;s a single bit in the config, but it&#39;s a 30/mo bit. Anyways, I can transfer data over the storage card.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 03 Sep 2006 17:58:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Current competition is scheduled for 2100 GMT on September 3.
</p></div></div><p>

+</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The next competition starts in 2 hours and 7 minutes.
</p></div></div><p>

=</p><p>NaN</p><p>Unless I&#39;ve gone bonkers, the competition starts at 2200 GMT according to the page.<br />I will assume the page is right, which is a shame. I might not be able to participate that late (one hour is a lot when you have your girlfriend&#39;s sister sleeping in your computer room). But I&#39;ll do my best =)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Sun, 03 Sep 2006 23:56:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have a comment about one of the bonus rules: How would a game be played inside it&#39;s own source code? It doesn&#39;t make much sense, if any.</p><p>Also, a quick question: If I submit an executible file, could the source be put in a project so I can use the linker? I don&#39;t have a makefile for it yet.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 00:04:15 +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 a question about one of the bonus rules: How would a game be played inside it&#39;s own source code? It doesn&#39;t make much sense, if any.
</p></div></div><p>
You could use the possibility of including your own source file to include some data hidden as comments.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Lenman)</author>
		<pubDate>Mon, 04 Sep 2006 00:07:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It sounds like a silly thing to have in a one hour game... Actually, it sounds like a silly thing period. But so are some other rules (i don&#39;t even know how the state of California looks!)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 00:26:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Get a map of the US. California is on the lower-left. And, I still don&#39;t understand the source code thing, just hope it doesn&#39;t come up.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 00:32:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I realize that it&#39;s not a big deal to find out how the state of California looks, but it&#39;s so arbitrary. Also quite hard to do without bitmaps (like the banana theme).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 00:58:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I realize that it&#39;s not a big deal to find out how the state of California looks, but it&#39;s so arbitrary. Also quite hard to do without bitmaps (like the banana theme).
</p></div></div><p>
You can generate bananas using a pair of circles (one yellow and one transparent) or even just using a single arc. As for shape of California, just draw arbitrary random shape and state that it&#39;s post-apocalyptic version of it. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 01:04:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You can generate bananas using a pair of circles (one yellow and one transparent) or even just using a single arc.
</p></div></div><p>

Hehe .. I made the bananas with two arcs, and I experimented for about 15 minutes until I got the right radii, positions, angles ... <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Faerber)</author>
		<pubDate>Mon, 04 Sep 2006 01:15:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MinorHack starting in 20 min. <b>twitch, twitch</b>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 01:41:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Kikaru: for instance, load your source code and render it to a bitmap using textprintf. Then scale this bitmap up and use it as a background image. There are more creative things you can do, but this is the simplest. Okay, I might check this page one more time before the compo, but I doubt it (it&#39;s quite a pain). Just put your source in this thread when your entry is done. Good luck Allegroites!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 04 Sep 2006 01:47:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The competition is running, but I don&#39;t see the bonus rule listed anywhere ... <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /><br />edit: oh, I see it now (sorry &#39;bout that ... just a bit of blindness + panic)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Mon, 04 Sep 2006 02:09:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I guess i&#39;m &quot;done&quot;.<br />Better turn it in now and not try to add last minute stuff <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />pick up the... green ... coins and avoid the big evil grey .. ball.<br />meh.</p><p>The gold ball (you) tries to move towards the mouse, while the big evil ball (the grey one) tries to crush you. If it hits you - game over.<br />you bounce of the walls.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 02:55:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Here is mine. Code here and attached, readme included <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.</p><p>The game gradually gets harder so try for your high score <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />. Try to reload as little as possible and hit those coins for maximum points.</p><p>Also, a little balancing after the contest:  replace &quot;randomFloat(0, 48 - level)&quot; with &quot;randomFloat(0, 46 - level * 2)&quot; and &quot;level += 0.0012&quot; with &quot;level += 0.0017&quot; to make it less boring.</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">   1</span><span class="c">/*</span>
<span class="number">   2</span><span class="c">    BADDIE</span>
<span class="number">   3</span><span class="c">    </span>
<span class="number">   4</span><span class="c">    press left mouse button to shoot, right to reload</span>
<span class="number">   5</span><span class="c">    each reload costs 250 points, each baddie scores points, each coin scores mucho points</span>
<span class="number">   6</span><span class="c">    </span>
<span class="number">   7</span><span class="c">    each baddie that goes off screen costs HP</span>
<span class="number">   8</span><span class="c">    </span>
<span class="number">   9</span><span class="c">    when HP is zero, you're dead</span>
<span class="number">  10</span><span class="c">    </span>
<span class="number">  11</span><span class="c">    link with allegro</span>
<span class="number">  12</span><span class="c">*/</span>
<span class="number">  13</span>
<span class="number">  14</span><span class="p">#include &lt;iostream&gt;</span>
<span class="number">  15</span><span class="p">#include &lt;cstdlib&gt;</span>
<span class="number">  16</span><span class="p">#include &lt;cmath&gt;</span>
<span class="number">  17</span><span class="p">#include &lt;ctime&gt;</span>
<span class="number">  18</span><span class="p">#include &lt;allegro.h&gt;</span>
<span class="number">  19</span><span class="p">#include &lt;string&gt;</span>
<span class="number">  20</span><span class="p">#include &lt;list&gt;</span>
<span class="number">  21</span><span class="p">#include &lt;vector&gt;</span>
<span class="number">  22</span>
<span class="number">  23</span><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span>
<span class="number">  24</span>
<span class="number">  25</span><span class="c">/**********************************************************/</span>
<span class="number">  26</span>
<span class="number">  27</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buffer, <span class="k3">*</span>crosshair, <span class="k3">*</span>baddie<span class="k2">;</span>
<span class="number">  28</span><span class="k1">int</span> score <span class="k3">=</span> <span class="n">0</span>, hp <span class="k3">=</span> <span class="n">4</span>, ammo <span class="k3">=</span> <span class="n">6</span><span class="k2">;</span>
<span class="number">  29</span><span class="k1">float</span> level<span class="k2">;</span>
<span class="number">  30</span>
<span class="number">  31</span><span class="c">/**********************************************************/</span>
<span class="number">  32</span><span class="c">/**********************************************************/</span>
<span class="number">  33</span><span class="c">/**********************************************************/</span>
<span class="number">  34</span>
<span class="number">  35</span><span class="k1">static</span> <span class="k1">volatile</span> <span class="k1">int</span> ticks <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number">  36</span>
<span class="number">  37</span><span class="k1">void</span> incTicks<span class="k2">(</span><span class="k2">)</span>
<span class="number">  38</span><span class="k2">{</span>
<span class="number">  39</span>  ticks<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number">  40</span><span class="k2">}</span>
<span class="number">  41</span>
<span class="number">  42</span><span class="k1">void</span> resetTicks<span class="k2">(</span><span class="k2">)</span>
<span class="number">  43</span><span class="k2">{</span>
<span class="number">  44</span>  ticks <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number">  45</span><span class="k2">}</span>
<span class="number">  46</span>
<span class="number">  47</span><span class="c">/**********************************************************/</span>
<span class="number">  48</span>
<span class="number">  49</span><span class="k1">void</span> initRandom<span class="k2">(</span><span class="k2">)</span>
<span class="number">  50</span><span class="k2">{</span>
<span class="number">  51</span>  std::srand<span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_821.html" target="_blank">time</a><span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  52</span><span class="k2">}</span>
<span class="number">  53</span>
<span class="number">  54</span><span class="c">/************************************************************/</span>
<span class="number">  55</span>
<span class="number">  56</span><span class="k1">float</span> randomFloat<span class="k2">(</span><span class="k1">float</span> min, <span class="k1">float</span> max<span class="k2">)</span>
<span class="number">  57</span><span class="k2">{</span>
<span class="number">  58</span>  <span class="k1">return</span> min <span class="k3">+</span> <span class="k2">(</span><span class="k2">(</span><span class="k1">float</span><span class="k2">)</span>std::rand<span class="k2">(</span><span class="k2">)</span> <span class="k3">/</span> <span class="k2">(</span><span class="k1">float</span><span class="k2">)</span>RAND_MAX<span class="k2">)</span> <span class="k3">*</span> <span class="k2">(</span>max <span class="k3">-</span> min<span class="k2">)</span><span class="k2">;</span>
<span class="number">  59</span><span class="k2">}</span>
<span class="number">  60</span>
<span class="number">  61</span><span class="c">/************************************************************/</span>
<span class="number">  62</span>
<span class="number">  63</span><span class="k1">long</span> randomInt<span class="k2">(</span><span class="k1">long</span> min, <span class="k1">long</span> max<span class="k2">)</span>
<span class="number">  64</span><span class="k2">{</span>
<span class="number">  65</span>  <span class="k1">return</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % <span class="k2">(</span>max <span class="k3">-</span> min <span class="k3">+</span> <span class="n">1</span><span class="k2">)</span> <span class="k3">+</span> min<span class="k2">;</span>
<span class="number">  66</span><span class="k2">}</span>
<span class="number">  67</span>
<span class="number">  68</span><span class="c">/**********************************************************/</span>
<span class="number">  69</span><span class="c">/**********************************************************/</span>
<span class="number">  70</span><span class="c">/**********************************************************/</span>
<span class="number">  71</span>
<span class="number">  72</span><span class="c">/**********************************************************/</span>
<span class="number">  73</span>
<span class="number">  74</span><span class="k1">void</span> init<span class="k2">(</span><span class="k2">)</span>
<span class="number">  75</span><span class="k2">{</span>
<span class="number">  76</span>  <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  77</span>  
<span class="number">  78</span>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/desktop_color_depth" target="_blank"><span class="a">desktop_color_depth</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  79</span>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  80</span>  
<span class="number">  81</span>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  82</span>  <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  83</span>  <a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  84</span>  
<span class="number">  85</span>  <a href="http://www.allegro.cc/manual/install_int_ex" target="_blank"><span class="a">install_int_ex</span></a><span class="k2">(</span>incTicks, BPS_TO_TIMER<span class="k2">(</span><span class="n">60</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  86</span>  
<span class="number">  87</span>  initRandom<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  88</span>  
<span class="number">  89</span>  <span class="c">// buffer</span>
<span class="number">  90</span>  
<span class="number">  91</span>  buffer <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">640</span>, <span class="n">480</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  92</span>  
<span class="number">  93</span>  <span class="c">// crosshair</span>
<span class="number">  94</span>  
<span class="number">  95</span>  crosshair <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">40</span>, <span class="n">40</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  96</span>  <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>crosshair, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">0</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  97</span>  <a href="http://www.allegro.cc/manual/circle" target="_blank"><span class="a">circle</span></a><span class="k2">(</span>crosshair, <span class="n">20</span>, <span class="n">20</span>, <span class="n">16</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">200</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  98</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>crosshair, <span class="n">20</span>, <span class="n">0</span>, <span class="n">20</span>, <span class="n">12</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">200</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span> 
<span class="number">  99</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>crosshair, <span class="n">20</span>, <span class="n">40</span>, <span class="n">20</span>, <span class="n">28</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">200</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span> 
<span class="number"> 100</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>crosshair, <span class="n">0</span>, <span class="n">20</span>, <span class="n">12</span>, <span class="n">20</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">200</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span> 
<span class="number"> 101</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>crosshair, <span class="n">40</span>, <span class="n">20</span>, <span class="n">28</span>, <span class="n">20</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">200</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 102</span>  
<span class="number"> 103</span>  <span class="c">// baddie</span>
<span class="number"> 104</span>  
<span class="number"> 105</span>  baddie <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">32</span>, <span class="n">32</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 106</span>  <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>baddie, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">0</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 107</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>baddie, <span class="n">1</span>, <span class="n">0</span>, <span class="n">30</span>, <span class="n">31</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">50</span>, <span class="n">80</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 108</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>baddie, <span class="n">0</span>, <span class="n">1</span>, <span class="n">31</span>, <span class="n">30</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">50</span>, <span class="n">80</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 109</span>  <a href="http://www.allegro.cc/manual/rect" target="_blank"><span class="a">rect</span></a><span class="k2">(</span>baddie, <span class="n">2</span>, <span class="n">2</span>, <span class="n">30</span>, <span class="n">30</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 110</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>baddie, <span class="n">6</span>, <span class="n">10</span>, <span class="n">12</span>, <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 111</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>baddie, <span class="n">20</span>, <span class="n">10</span>, <span class="n">26</span>, <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 112</span>  <a href="http://www.allegro.cc/manual/rect" target="_blank"><span class="a">rect</span></a><span class="k2">(</span>baddie, <span class="n">6</span>, <span class="n">10</span>, <span class="n">12</span>, <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 113</span>  <a href="http://www.allegro.cc/manual/rect" target="_blank"><span class="a">rect</span></a><span class="k2">(</span>baddie, <span class="n">20</span>, <span class="n">10</span>, <span class="n">26</span>, <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 114</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>baddie, <span class="n">9</span>, <span class="n">12</span>, <span class="n">11</span>, <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 115</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>baddie, <span class="n">23</span>, <span class="n">12</span>, <span class="n">25</span>, <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 116</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>baddie, <span class="n">6</span>, <span class="n">6</span>, <span class="n">12</span>, <span class="n">8</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 117</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>baddie, <span class="n">20</span>, <span class="n">8</span>, <span class="n">26</span>, <span class="n">6</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>  
<span class="number"> 118</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>baddie, <span class="n">8</span>, <span class="n">24</span>, <span class="n">24</span>, <span class="n">24</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span> 
<span class="number"> 119</span><span class="k2">}</span>
<span class="number"> 120</span>
<span class="number"> 121</span><span class="c">/**********************************************************/</span>
<span class="number"> 122</span>
<span class="number"> 123</span><span class="k1">void</span> destroy<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 124</span><span class="k2">{</span>
<span class="number"> 125</span><span class="k2">}</span>
<span class="number"> 126</span>
<span class="number"> 127</span><span class="c">/**********************************************************/</span>
<span class="number"> 128</span><span class="c">/**********************************************************/</span>
<span class="number"> 129</span><span class="c">/**********************************************************/</span>
<span class="number"> 130</span>
<span class="number"> 131</span>
<span class="number"> 132</span><span class="k1">class</span> Thing
<span class="number"> 133</span><span class="k2">{</span>
<span class="number"> 134</span>  public:
<span class="number"> 135</span>  
<span class="number"> 136</span>  <span class="k1">virtual</span> <span class="k1">bool</span>    isAlive<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span><span class="k1">return</span> <span class="k1">true</span><span class="k2">;</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 137</span>  
<span class="number"> 138</span>  <span class="k1">virtual</span> <span class="k1">void</span>    update<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 139</span>  <span class="k1">virtual</span> <span class="k1">void</span>  draw<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 140</span>  
<span class="number"> 141</span>  <span class="k1">virtual</span> <span class="k1">void</span>    shootAt<span class="k2">(</span><span class="k1">int</span> x, <span class="k1">int</span> y<span class="k2">)</span><span class="k2">{</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 142</span>  
<span class="number"> 143</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 144</span>
<span class="number"> 145</span>list<span class="k3">&lt;</span>Thing<span class="k3">*</span><span class="k3">&gt;</span> world<span class="k2">;</span>
<span class="number"> 146</span>
<span class="number"> 147</span><span class="k1">class</span> Gun <span class="k2">:</span> <span class="k1">public</span> Thing
<span class="number"> 148</span><span class="k2">{</span>
<span class="number"> 149</span>  <span class="k1">int</span> x, y<span class="k2">;</span>
<span class="number"> 150</span>  
<span class="number"> 151</span>  public:
<span class="number"> 152</span>
<span class="number"> 153</span>  <span class="k1">void</span> update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 154</span>  <span class="k2">{</span>
<span class="number"> 155</span>    x <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a><span class="k2">;</span>
<span class="number"> 156</span>    y <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k2">;</span>
<span class="number"> 157</span>  <span class="k2">}</span>
<span class="number"> 158</span>  
<span class="number"> 159</span>  <span class="k1">void</span> draw<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 160</span>  <span class="k2">{</span>
<span class="number"> 161</span>    <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>buffer, crosshair, x <span class="k3">-</span> <span class="n">20</span>, y <span class="k3">-</span> <span class="n">20</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 162</span>  <span class="k2">}</span>
<span class="number"> 163</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 164</span>
<span class="number"> 165</span><span class="k1">class</span> Particle <span class="k2">:</span> <span class="k1">public</span> Thing
<span class="number"> 166</span><span class="k2">{</span>
<span class="number"> 167</span>  public:
<span class="number"> 168</span>  
<span class="number"> 169</span>  <span class="k1">int</span> color<span class="k2">;</span>
<span class="number"> 170</span>  
<span class="number"> 171</span>  <span class="k1">float</span> x, y<span class="k2">;</span>
<span class="number"> 172</span>  <span class="k1">float</span> vx, vy<span class="k2">;</span>
<span class="number"> 173</span>  
<span class="number"> 174</span>  Particle<span class="k2">(</span><span class="k1">int</span> x, <span class="k1">int</span> y, <span class="k1">float</span> vx, <span class="k1">float</span> vy, <span class="k1">int</span> color<span class="k2">)</span>
<span class="number"> 175</span>    <span class="k2">:</span> x<span class="k2">(</span>x<span class="k2">)</span>, y<span class="k2">(</span>y<span class="k2">)</span>, vx<span class="k2">(</span>vx<span class="k2">)</span>, vy<span class="k2">(</span>vy<span class="k2">)</span>, color<span class="k2">(</span>color<span class="k2">)</span>
<span class="number"> 176</span>  <span class="k2">{</span>
<span class="number"> 177</span>    
<span class="number"> 178</span>  <span class="k2">}</span>
<span class="number"> 179</span>  
<span class="number"> 180</span>  <span class="k1">bool</span> isAlive<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 181</span>  <span class="k2">{</span>
<span class="number"> 182</span>    <span class="k1">return</span> y <span class="k3">&lt;</span> <span class="n">480</span><span class="k2">;</span>
<span class="number"> 183</span>  <span class="k2">}</span>
<span class="number"> 184</span>  
<span class="number"> 185</span>  <span class="k1">void</span> update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 186</span>  <span class="k2">{</span>
<span class="number"> 187</span>    vy <span class="k3">+</span><span class="k3">=</span> <span class="n">0</span>.<span class="n">2</span><span class="k2">;</span>
<span class="number"> 188</span>    
<span class="number"> 189</span>    x <span class="k3">+</span><span class="k3">=</span> vx<span class="k2">;</span>
<span class="number"> 190</span>    y <span class="k3">+</span><span class="k3">=</span> vy<span class="k2">;</span>
<span class="number"> 191</span>  <span class="k2">}</span>
<span class="number"> 192</span>  
<span class="number"> 193</span>  <span class="k1">void</span> draw<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 194</span>  <span class="k2">{</span>
<span class="number"> 195</span>    <a href="http://www.allegro.cc/manual/putpixel" target="_blank"><span class="a">putpixel</span></a><span class="k2">(</span>buffer, <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>x, <span class="k1">int</span><span class="k2">(</span>y<span class="k2">)</span>, color<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 196</span>  <span class="k2">}</span>
<span class="number"> 197</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 198</span>
<span class="number"> 199</span><span class="k1">class</span> Bonus <span class="k2">:</span> <span class="k1">public</span> Thing
<span class="number"> 200</span><span class="k2">{</span>
<span class="number"> 201</span>  public:
<span class="number"> 202</span>  
<span class="number"> 203</span>  <span class="k1">float</span> x, y<span class="k2">;</span>
<span class="number"> 204</span>  <span class="k1">float</span> vy<span class="k2">;</span>
<span class="number"> 205</span>  <span class="k1">bool</span> destroyed<span class="k2">;</span>
<span class="number"> 206</span>  
<span class="number"> 207</span>  public:
<span class="number"> 208</span>  
<span class="number"> 209</span>  Bonus<span class="k2">(</span><span class="k1">int</span> x, <span class="k1">float</span> vy<span class="k2">)</span>
<span class="number"> 210</span>    <span class="k2">:</span> x<span class="k2">(</span>x<span class="k2">)</span>, vy<span class="k2">(</span>vy<span class="k2">)</span>
<span class="number"> 211</span>  <span class="k2">{</span>
<span class="number"> 212</span>    y <span class="k3">=</span> <span class="k3">-</span><span class="n">20</span><span class="k2">;</span>
<span class="number"> 213</span>    destroyed <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 214</span>  <span class="k2">}</span>
<span class="number"> 215</span>  
<span class="number"> 216</span>  <span class="k1">bool</span> isAlive<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 217</span>  <span class="k2">{</span>
<span class="number"> 218</span>    <span class="k1">return</span> <span class="k2">(</span><span class="k3">!</span>destroyed<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 219</span>  <span class="k2">}</span>
<span class="number"> 220</span>  
<span class="number"> 221</span>  <span class="k1">void</span> draw<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 222</span>  <span class="k2">{</span>
<span class="number"> 223</span>    <a href="http://www.allegro.cc/manual/circlefill" target="_blank"><span class="a">circlefill</span></a><span class="k2">(</span>buffer, <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>x, <span class="k1">int</span><span class="k2">(</span>y<span class="k2">)</span>, <span class="n">10</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 224</span>  <span class="k2">}</span>
<span class="number"> 225</span>  
<span class="number"> 226</span>  
<span class="number"> 227</span>  <span class="k1">void</span> update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 228</span>  <span class="k2">{</span>
<span class="number"> 229</span>    y <span class="k3">+</span><span class="k3">=</span> vy<span class="k2">;</span>
<span class="number"> 230</span>    
<span class="number"> 231</span>    <span class="k1">if</span> <span class="k2">(</span>y <span class="k3">&gt;</span><span class="k3">=</span> <span class="n">490</span><span class="k2">)</span>
<span class="number"> 232</span>    <span class="k2">{</span>
<span class="number"> 233</span>      destroyed <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 234</span>    <span class="k2">}</span>
<span class="number"> 235</span>  <span class="k2">}</span>
<span class="number"> 236</span>  
<span class="number"> 237</span>  <span class="k1">void</span> shootAt<span class="k2">(</span><span class="k1">int</span> sx, <span class="k1">int</span> sy<span class="k2">)</span>
<span class="number"> 238</span>  <span class="k2">{</span>
<span class="number"> 239</span>    <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span><span class="k2">(</span>sx <span class="k3">-</span> x<span class="k2">)</span> <span class="k3">*</span> <span class="k2">(</span>sx <span class="k3">-</span> x<span class="k2">)</span> <span class="k3">+</span> <span class="k2">(</span>sy <span class="k3">-</span> y<span class="k2">)</span> <span class="k3">*</span> <span class="k2">(</span>sy <span class="k3">-</span> y<span class="k2">)</span><span class="k2">)</span> <span class="k3">&lt;</span> <span class="n">100</span><span class="k2">)</span>
<span class="number"> 240</span>    <span class="k2">{</span>
<span class="number"> 241</span>      score <span class="k3">+</span><span class="k3">=</span> <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span><span class="k2">(</span>level <span class="k3">*</span> <span class="n">100</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 242</span>      destroyed <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 243</span>      
<span class="number"> 244</span>      <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">20</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 245</span>      <span class="k2">{</span>
<span class="number"> 246</span>        world.push_back<span class="k2">(</span><span class="k1">new</span> Particle<span class="k2">(</span><span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>x <span class="k3">+</span> randomInt<span class="k2">(</span><span class="k3">-</span><span class="n">5</span>, <span class="n">5</span><span class="k2">)</span>, <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>y <span class="k3">+</span> randomInt<span class="k2">(</span><span class="k3">-</span><span class="n">5</span>, <span class="n">5</span><span class="k2">)</span>, randomFloat<span class="k2">(</span><span class="k3">-</span><span class="n">2</span>, <span class="n">2</span><span class="k2">)</span>, randomFloat<span class="k2">(</span><span class="k3">-</span><span class="n">2</span>, <span class="n">2</span><span class="k2">)</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">200</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 247</span>      <span class="k2">}</span>
<span class="number"> 248</span>    <span class="k2">}</span>    
<span class="number"> 249</span>  <span class="k2">}</span>  
<span class="number"> 250</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 251</span>
<span class="number"> 252</span>
<span class="number"> 253</span><span class="k1">class</span> Baddie <span class="k2">:</span> <span class="k1">public</span> Thing
<span class="number"> 254</span><span class="k2">{</span>
<span class="number"> 255</span>  public:
<span class="number"> 256</span>  
<span class="number"> 257</span>  <span class="k1">float</span> x, y<span class="k2">;</span>
<span class="number"> 258</span>  <span class="k1">float</span> vy<span class="k2">;</span>
<span class="number"> 259</span>  <span class="k1">bool</span> destroyed<span class="k2">;</span>
<span class="number"> 260</span>  
<span class="number"> 261</span>  public:
<span class="number"> 262</span>  
<span class="number"> 263</span>  Baddie<span class="k2">(</span><span class="k1">int</span> x, <span class="k1">float</span> vy<span class="k2">)</span>
<span class="number"> 264</span>    <span class="k2">:</span> x<span class="k2">(</span>x<span class="k2">)</span>, vy<span class="k2">(</span>vy<span class="k2">)</span>
<span class="number"> 265</span>  <span class="k2">{</span>
<span class="number"> 266</span>    y <span class="k3">=</span> <span class="k3">-</span><span class="n">20</span><span class="k2">;</span>
<span class="number"> 267</span>    destroyed <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 268</span>  <span class="k2">}</span>
<span class="number"> 269</span>  
<span class="number"> 270</span>  <span class="k1">bool</span> isAlive<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 271</span>  <span class="k2">{</span>
<span class="number"> 272</span>    <span class="k1">return</span> <span class="k2">(</span><span class="k3">!</span>destroyed<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 273</span>  <span class="k2">}</span>
<span class="number"> 274</span>  
<span class="number"> 275</span>  <span class="k1">void</span> draw<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 276</span>  <span class="k2">{</span>
<span class="number"> 277</span>    <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>buffer, baddie, <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>x <span class="k3">-</span> <span class="n">16</span>, <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>y <span class="k3">-</span> <span class="n">16</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 278</span>  <span class="k2">}</span>
<span class="number"> 279</span>  
<span class="number"> 280</span>  
<span class="number"> 281</span>  <span class="k1">void</span> update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 282</span>  <span class="k2">{</span>
<span class="number"> 283</span>    y <span class="k3">+</span><span class="k3">=</span> vy<span class="k2">;</span>
<span class="number"> 284</span>    
<span class="number"> 285</span>    <span class="k1">if</span> <span class="k2">(</span>y <span class="k3">&gt;</span><span class="k3">=</span> <span class="n">490</span><span class="k2">)</span>
<span class="number"> 286</span>    <span class="k2">{</span>
<span class="number"> 287</span>      hp--<span class="k2">;</span>
<span class="number"> 288</span>      destroyed <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 289</span>    <span class="k2">}</span>
<span class="number"> 290</span>  <span class="k2">}</span>
<span class="number"> 291</span>  
<span class="number"> 292</span>  <span class="k1">void</span> shootAt<span class="k2">(</span><span class="k1">int</span> sx, <span class="k1">int</span> sy<span class="k2">)</span>
<span class="number"> 293</span>  <span class="k2">{</span>
<span class="number"> 294</span>    <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>std::abs<span class="k2">(</span>sx <span class="k3">-</span> x<span class="k2">)</span> <span class="k3">&lt;</span> <span class="n">15</span><span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>std::abs<span class="k2">(</span>sy <span class="k3">-</span> y<span class="k2">)</span> <span class="k3">&lt;</span> <span class="n">15</span><span class="k2">)</span><span class="k2">)</span>
<span class="number"> 295</span>    <span class="k2">{</span>
<span class="number"> 296</span>      score <span class="k3">+</span><span class="k3">=</span> <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span><span class="k2">(</span>level <span class="k3">*</span> <span class="n">25</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 297</span>      destroyed <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 298</span>      
<span class="number"> 299</span>      <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">20</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 300</span>      <span class="k2">{</span>
<span class="number"> 301</span>        world.push_back<span class="k2">(</span><span class="k1">new</span> Particle<span class="k2">(</span><span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>x <span class="k3">+</span> randomInt<span class="k2">(</span><span class="k3">-</span><span class="n">5</span>, <span class="n">5</span><span class="k2">)</span>, <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>y <span class="k3">+</span> randomInt<span class="k2">(</span><span class="k3">-</span><span class="n">5</span>, <span class="n">5</span><span class="k2">)</span>, randomFloat<span class="k2">(</span><span class="k3">-</span><span class="n">2</span>, <span class="n">2</span><span class="k2">)</span>, randomFloat<span class="k2">(</span><span class="k3">-</span><span class="n">2</span>, <span class="n">2</span><span class="k2">)</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">50</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 302</span>      <span class="k2">}</span>
<span class="number"> 303</span>    <span class="k2">}</span>
<span class="number"> 304</span>  <span class="k2">}</span>
<span class="number"> 305</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 306</span>
<span class="number"> 307</span><span class="k1">class</span> Scoreboard <span class="k2">:</span> <span class="k1">public</span> Thing
<span class="number"> 308</span><span class="k2">{</span>
<span class="number"> 309</span>  public:
<span class="number"> 310</span>  <span class="k1">void</span> draw<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 311</span>  <span class="k2">{</span>
<span class="number"> 312</span>    <a href="http://www.allegro.cc/manual/textprintf_ex" target="_blank"><span class="a">textprintf_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">4</span>, <span class="n">4</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</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="k3">-</span><span class="n">1</span>, <span class="s">"HP:"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 313</span>    <span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> hp<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 314</span>    <span class="k2">{</span>
<span class="number"> 315</span>      <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>buffer, <span class="n">30</span> <span class="k3">+</span> i <span class="k3">*</span> <span class="n">10</span>, <span class="n">4</span>, <span class="n">30</span> <span class="k3">+</span> i <span class="k3">*</span> <span class="n">10</span> <span class="k3">+</span> <span class="n">8</span>, <span class="n">9</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</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>
<span class="number"> 316</span>    <span class="k2">}</span>
<span class="number"> 317</span>    <a href="http://www.allegro.cc/manual/textprintf_ex" target="_blank"><span class="a">textprintf_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">160</span>, <span class="n">4</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Ammo:"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 318</span>    <span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> ammo<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 319</span>    <span class="k2">{</span>
<span class="number"> 320</span>      <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>buffer,  <span class="n">204</span> <span class="k3">+</span> i <span class="k3">*</span> <span class="n">5</span>, <span class="n">4</span>, <span class="n">204</span> <span class="k3">+</span> i <span class="k3">*</span> <span class="n">5</span> <span class="k3">+</span> <span class="n">3</span>, <span class="n">9</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 321</span>    <span class="k2">}</span>
<span class="number"> 322</span>    
<span class="number"> 323</span>    <a href="http://www.allegro.cc/manual/textprintf_right_ex" target="_blank"><span class="a">textprintf_right_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">636</span>, <span class="n">4</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">0</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Score: %d"</span>, score<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 324</span>  <span class="k2">}</span>
<span class="number"> 325</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 326</span>
<span class="number"> 327</span><span class="c">/**********************************************************/</span>
<span class="number"> 328</span><span class="c">/**********************************************************/</span>
<span class="number"> 329</span><span class="c">/**********************************************************/</span>
<span class="number"> 330</span>
<span class="number"> 331</span><span class="c">/**********************************************************/</span>
<span class="number"> 332</span>
<span class="number"> 333</span>
<span class="number"> 334</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 335</span><span class="k2">{</span>
<span class="number"> 336</span>  init<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 337</span>  
<span class="number"> 338</span>  resetTicks<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 339</span>  
<span class="number"> 340</span>  <span class="k1">bool</span> end <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 341</span>  list<span class="k3">&lt;</span>Thing<span class="k3">*</span><span class="k3">&gt;</span><span class="k2">:</span><span class="k2">:</span>iterator it<span class="k2">;</span>
<span class="number"> 342</span>  
<span class="number"> 343</span>  Gun <span class="k3">*</span>gun <span class="k3">=</span> <span class="k1">new</span> Gun<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 344</span>  Scoreboard <span class="k3">*</span>sb <span class="k3">=</span> <span class="k1">new</span> Scoreboard<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 345</span>  
<span class="number"> 346</span>  level <span class="k3">=</span> <span class="n">4</span>.<span class="n">0</span><span class="k2">;</span>  
<span class="number"> 347</span>  <span class="k1">int</span> prev_button <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 348</span>  
<span class="number"> 349</span>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span>end<span class="k2">)</span>
<span class="number"> 350</span>  <span class="k2">{</span>
<span class="number"> 351</span>    <span class="k1">if</span> <span class="k2">(</span>ticks <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 352</span>    <span class="k2">{</span>
<span class="number"> 353</span>      <span class="k1">while</span><span class="k2">(</span>ticks-- <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 354</span>      <span class="k2">{</span>
<span class="number"> 355</span>        <span class="k1">if</span> <span class="k2">(</span>randomFloat<span class="k2">(</span><span class="n">0</span>, <span class="n">48</span> <span class="k3">-</span> level<span class="k2">)</span> <span class="k3">&lt;</span> <span class="n">1</span>.<span class="n">0</span><span class="k2">)</span>
<span class="number"> 356</span>        <span class="k2">{</span>
<span class="number"> 357</span>          <span class="k1">if</span> <span class="k2">(</span>randomInt<span class="k2">(</span><span class="n">0</span>, <span class="n">15</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 358</span>            world.push_back<span class="k2">(</span><span class="k1">new</span> Bonus<span class="k2">(</span>randomInt<span class="k2">(</span><span class="n">20</span>, <span class="n">620</span><span class="k2">)</span>, level <span class="k3">*</span> randomFloat<span class="k2">(</span><span class="n">0</span>.<span class="n">99</span>, <span class="n">1</span>.<span class="n">05</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 359</span>          <span class="k1">else</span>
<span class="number"> 360</span>            world.push_back<span class="k2">(</span><span class="k1">new</span> Baddie<span class="k2">(</span>randomInt<span class="k2">(</span><span class="n">20</span>, <span class="n">620</span><span class="k2">)</span>, level <span class="k3">*</span> randomFloat<span class="k2">(</span><span class="n">0</span>.<span class="n">99</span>, <span class="n">1</span>.<span class="n">05</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 361</span>        <span class="k2">}</span>
<span class="number"> 362</span>        
<span class="number"> 363</span>        <span class="k1">for</span><span class="k2">(</span>it <span class="k3">=</span> world.begin<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it <span class="k3">!</span><span class="k3">=</span> world.end<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 364</span>          <span class="k2">(</span><span class="k3">*</span>it<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 365</span>        
<span class="number"> 366</span>        <span class="k1">for</span><span class="k2">(</span>it <span class="k3">=</span> world.begin<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it <span class="k3">!</span><span class="k3">=</span> world.end<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span><span class="k2">)</span>
<span class="number"> 367</span>        <span class="k2">{</span>
<span class="number"> 368</span>          <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span><span class="k2">(</span><span class="k3">*</span>it<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>isAlive<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span>
<span class="number"> 369</span>          <span class="k2">{</span>
<span class="number"> 370</span>            <span class="k1">delete</span> <span class="k2">(</span><span class="k3">*</span>it<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 371</span>            it <span class="k3">=</span> world.erase<span class="k2">(</span>it<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 372</span>          <span class="k2">}</span>
<span class="number"> 373</span>          <span class="k1">else</span>
<span class="number"> 374</span>          <span class="k2">{</span>
<span class="number"> 375</span>            it<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number"> 376</span>          <span class="k2">}</span>
<span class="number"> 377</span>        <span class="k2">}</span>
<span class="number"> 378</span>        gun-&gt;update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 379</span>        
<span class="number"> 380</span>        <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/key" target="_blank"><span class="a">key</span></a><span class="k2">[</span>KEY_ESC<span class="k2">]</span><span class="k2">)</span>
<span class="number"> 381</span>        <span class="k2">{</span>
<span class="number"> 382</span>          end <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 383</span>        <span class="k2">}</span>
<span class="number"> 384</span>        end <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>hp <span class="k3">&lt;</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 385</span>        
<span class="number"> 386</span>        level <span class="k3">+</span><span class="k3">=</span> <span class="n">0</span>.<span class="n">0012</span><span class="k2">;</span>
<span class="number"> 387</span>        
<span class="number"> 388</span>        <span class="k1">if</span> <span class="k2">(</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">=</span><span class="k3">=</span> <span class="n">1</span><span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</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">!</span><span class="k3">=</span> prev_button<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>ammo <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span><span class="k2">)</span>
<span class="number"> 389</span>        <span class="k2">{</span>
<span class="number"> 390</span>          ammo--<span class="k2">;</span>
<span class="number"> 391</span>          <span class="k1">for</span><span class="k2">(</span>it <span class="k3">=</span> world.begin<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it <span class="k3">!</span><span class="k3">=</span> world.end<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 392</span>            <span class="k2">(</span><span class="k3">*</span>it<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>shootAt<span class="k2">(</span><a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a>, <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 393</span>        <span class="k2">}</span>
<span class="number"> 394</span>        <span class="k1">if</span> <span class="k2">(</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">=</span><span class="k3">=</span> <span class="n">2</span><span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</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">!</span><span class="k3">=</span> prev_button<span class="k2">)</span><span class="k2">)</span>
<span class="number"> 395</span>        <span class="k2">{</span>
<span class="number"> 396</span>          ammo <span class="k3">=</span> <span class="n">6</span><span class="k2">;</span>
<span class="number"> 397</span>          score <span class="k3">-</span><span class="k3">=</span> <span class="n">250</span><span class="k2">;</span>
<span class="number"> 398</span>        <span class="k2">}</span>
<span class="number"> 399</span>        
<span class="number"> 400</span>        prev_button <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_b" target="_blank"><span class="a">mouse_b</span></a><span class="k2">;</span>
<span class="number"> 401</span>      <span class="k2">}</span>
<span class="number"> 402</span>    <span class="k2">}</span>    
<span class="number"> 403</span>    
<span class="number"> 404</span>    <a href="http://www.allegro.cc/manual/clear_bitmap" target="_blank"><span class="a">clear_bitmap</span></a><span class="k2">(</span>buffer<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 405</span>    <span class="k1">for</span><span class="k2">(</span>it <span class="k3">=</span> world.begin<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it <span class="k3">!</span><span class="k3">=</span> world.end<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> it<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 406</span>      <span class="k2">(</span><span class="k3">*</span>it<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>draw<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 407</span>    gun-&gt;draw<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 408</span>    sb-&gt;draw<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 409</span>    
<span class="number"> 410</span>    <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">640</span>, <span class="n">480</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 411</span>  <span class="k2">}</span>
<span class="number"> 412</span>  
<span class="number"> 413</span>  <a href="http://www.allegro.cc/manual/clear_bitmap" target="_blank"><span class="a">clear_bitmap</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 414</span>  <a href="http://www.allegro.cc/manual/textprintf_centre_ex" target="_blank"><span class="a">textprintf_centre_ex</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">320</span>, <span class="n">220</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</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="k3">-</span><span class="n">1</span>, <span class="s">"G A M E    O V E R"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 415</span>  <a href="http://www.allegro.cc/manual/textprintf_centre_ex" target="_blank"><span class="a">textprintf_centre_ex</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">320</span>, <span class="n">240</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Final score: %d"</span>, score<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 416</span>  <a href="http://www.allegro.cc/manual/textprintf_centre_ex" target="_blank"><span class="a">textprintf_centre_ex</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">320</span>, <span class="n">260</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">0</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Press both mouse buttons to exit"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 417</span>  
<span class="number"> 418</span>  <span class="k1">while</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="k2">)</span><span class="k2">;</span>
<span class="number"> 419</span>  <span class="k1">while</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">!</span><span class="k3">=</span> <span class="n">3</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 420</span>  
<span class="number"> 421</span>  destroy<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 422</span><span class="k2">}</span>
<span class="number"> 423</span><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 02:57:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>here attached
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 04 Sep 2006 02:59:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Dodge the Blocks!!!!!!!!!!!!!!</p><p>Scores are formed by where the blocks land.  The higher the block, the better the score!</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">   1</span><span class="c">// Compile with allegro!</span>
<span class="number">   2</span><span class="p">#include "allegro.h"</span>
<span class="number">   3</span><span class="p">#include&lt;stdio.h&gt;</span>
<span class="number">   4</span>
<span class="number">   5</span><span class="c">/**************** DEFINES &amp; MACROS *************/</span>
<span class="number">   6</span><span class="p">#define BPP 32</span>
<span class="number">   7</span><span class="p">#define MODE GFX_AUTODETECT_WINDOWED</span>
<span class="number">   8</span><span class="p">#define GFX_W 640</span>
<span class="number">   9</span><span class="p">#define GFX_H 480</span>
<span class="number">  10</span><span class="p">#define MAX_BLOCKS 1000</span>
<span class="number">  11</span>
<span class="number">  12</span><span class="c">/*************** CONSTANTS ********************/</span>
<span class="number">  13</span><span class="k1">const</span> <span class="k1">int</span> MASK <span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">0</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  14</span><span class="k1">const</span> <span class="k1">int</span> WHITE <span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  15</span>
<span class="number">  16</span>
<span class="number">  17</span><span class="c">/*************** GLOBAL ********************/</span>
<span class="number">  18</span><span class="k1">volatile</span> <span class="k1">int</span> system_time<span class="k2">;</span>
<span class="number">  19</span><span class="k1">volatile</span> <span class="k1">int</span> ticks<span class="k2">;</span>
<span class="number">  20</span><span class="k1">volatile</span> <span class="k1">int</span> framerate<span class="k2">;</span>
<span class="number">  21</span><span class="k1">volatile</span> <span class="k1">int</span> draw_ticks<span class="k2">;</span>
<span class="number">  22</span><a href="http://www.allegro.cc/manual/PALETTE" target="_blank"><span class="a">PALETTE</span></a> pal<span class="k2">;</span>
<span class="number">  23</span><a href="http://www.allegro.cc/manual/COLOR_MAP" target="_blank"><span class="a">COLOR_MAP</span></a> trans_table<span class="k2">;</span>
<span class="number">  24</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buffer<span class="k2">;</span>
<span class="number">  25</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bText<span class="k2">;</span>
<span class="number">  26</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bScreen<span class="k2">;</span>
<span class="number">  27</span><span class="k1">int</span> startpos<span class="k2">;</span>
<span class="number">  28</span><span class="k1">int</span> iTimer_Speed<span class="k2">;</span>
<span class="number">  29</span><span class="k1">bool</span> iFrameRate<span class="k2">;</span>
<span class="number">  30</span><span class="k1">bool</span> quit, over<span class="k2">;</span>
<span class="number">  31</span><span class="k1">int</span> block_create<span class="k2">;</span>
<span class="number">  32</span><span class="k1">int</span> dark<span class="k2">;</span>
<span class="number">  33</span><span class="k1">int</span> score<span class="k2">;</span>
<span class="number">  34</span>
<span class="number">  35</span><span class="k1">void</span> timer1<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  36</span><span class="k2">{</span>
<span class="number">  37</span>  system_time<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>      
<span class="number">  38</span><span class="k2">}</span><a href="http://www.allegro.cc/manual/END_OF_FUNCTION" target="_blank"><span class="a">END_OF_FUNCTION</span></a><span class="k2">(</span>timer1<span class="k2">)</span><span class="k2">;</span>
<span class="number">  39</span>
<span class="number">  40</span><span class="k1">void</span> frametimer<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  41</span><span class="k2">{</span>
<span class="number">  42</span>  framerate <span class="k3">=</span> draw_ticks<span class="k2">;</span>
<span class="number">  43</span>  draw_ticks <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number">  44</span><span class="k2">}</span><a href="http://www.allegro.cc/manual/END_OF_FUNCTION" target="_blank"><span class="a">END_OF_FUNCTION</span></a><span class="k2">(</span>frametimer<span class="k2">)</span><span class="k2">;</span>
<span class="number">  45</span>
<span class="number">  46</span>
<span class="number">  47</span>
<span class="number">  48</span><span class="k1">void</span> init<span class="k2">(</span><span class="k2">)</span>
<span class="number">  49</span><span class="k2">{</span>
<span class="number">  50</span>  <span class="c">//  Allegro Library</span>
<span class="number">  51</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  52</span>  <span class="k2">{</span>
<span class="number">  53</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failed to initialize allegro library.  Terminating program.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  54</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number">  55</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  56</span>  <span class="k2">}</span>
<span class="number">  57</span>
<span class="number">  58</span>  
<span class="number">  59</span>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span>BPP<span class="k2">)</span> <span class="k2">;</span> <span class="c">// 24 bit colour  </span>
<span class="number">  60</span>  <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>MODE, GFX_W, GFX_H, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k3">&lt;</span><span class="n">0</span><span class="k2">)</span>
<span class="number">  61</span>  <span class="k2">{</span>
<span class="number">  62</span>    <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  63</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failure to init video mode!  Terminating program.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  64</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number">  65</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  66</span>  <span class="k2">}</span>
<span class="number">  67</span>  
<span class="number">  68</span>
<span class="number">  69</span>  <span class="c">//  Install Timer</span>
<span class="number">  70</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  71</span>  <span class="k2">{</span>
<span class="number">  72</span>    <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  73</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failed to install timer.  Terminating program.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  74</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number">  75</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  76</span>  <span class="k2">}</span>
<span class="number">  77</span>  
<span class="number">  78</span>
<span class="number">  79</span>
<span class="number">  80</span>  <span class="c">//  Install Keyboard  </span>
<span class="number">  81</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  82</span>  <span class="k2">{</span>
<span class="number">  83</span>    <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  84</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failed to install keyboard.  Terminating program.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  85</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number">  86</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  87</span>  <span class="k2">}</span>  
<span class="number">  88</span>
<span class="number">  89</span>  <span class="c">/*install_joystick(JOY_TYPE_AUTODETECT);</span>
<span class="number">  90</span><span class="c">  poll_joystick();</span>
<span class="number">  91</span><span class="c">  if(num_joysticks == 0)</span>
<span class="number">  92</span><span class="c">  {</span>
<span class="number">  93</span><span class="c">    allegro_message("NOTE:  No joystick could be found, but you can still use keyboard.");</span>
<span class="number">  94</span><span class="c">  }</span>
<span class="number">  95</span><span class="c">  startpos = joy[0].stick[0].axis[0].pos;*/</span>
<span class="number">  96</span>
<span class="number">  97</span>
<span class="number">  98</span>  <span class="c">//  Install Mouse</span>
<span class="number">  99</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">&lt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 100</span>  <span class="k2">{</span>
<span class="number"> 101</span>    <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 102</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failed to install mouse.  Terminating program.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 103</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 104</span>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 105</span>  <span class="k2">}</span>
<span class="number"> 106</span>  
<span class="number"> 107</span>  text_mode<span class="k2">(</span>MASK<span class="k2">)</span><span class="k2">;</span>  
<span class="number"> 108</span>  <a href="http://www.allegro.cc/manual/reserve_voices" target="_blank"><span class="a">reserve_voices</span></a><span class="k2">(</span><span class="n">32</span>,<span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span> <span class="c">///Reserves more channels of sound for us</span>
<span class="number"> 109</span>  
<span class="number"> 110</span>  <span class="c">//  Install Sound</span>
<span class="number"> 111</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/install_sound" target="_blank"><span class="a">install_sound</span></a><span class="k2">(</span>DIGI_AUTODETECT, MIDI_NONE, NULL<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>  
<span class="number"> 112</span>  <span class="k2">{</span>
<span class="number"> 113</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failure to install sound.  Attempting to run without sound.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 114</span>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 115</span>    <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/install_sound" target="_blank"><span class="a">install_sound</span></a><span class="k2">(</span>DIGI_NONE, MIDI_NONE, NULL<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 116</span>    <span class="k2">{</span>
<span class="number"> 117</span>      <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"ERROR:  Failed to install sound.  Terminating program.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 118</span>      <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"REPORT:  %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 119</span>      <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 120</span>    <span class="k2">}</span>    
<span class="number"> 121</span>  <span class="k2">}</span>
<span class="number"> 122</span>    
<span class="number"> 123</span>  <a href="http://www.delorie.com/djgpp/doc/libc/libc_739.html" target="_blank">srand</a><span class="k2">(</span> <span class="k2">(</span><span class="k1">unsigned</span><span class="k2">)</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_821.html" target="_blank">time</a><span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 124</span>  
<span class="number"> 125</span>  <span class="c">// Install Time Handler</span>
<span class="number"> 126</span>  <a href="http://www.allegro.cc/manual/LOCK_VARIABLE" target="_blank"><span class="a">LOCK_VARIABLE</span></a><span class="k2">(</span>system_time<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 127</span>  <a href="http://www.allegro.cc/manual/LOCK_VARIABLE" target="_blank"><span class="a">LOCK_VARIABLE</span></a><span class="k2">(</span>ticks<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 128</span>  <a href="http://www.allegro.cc/manual/LOCK_VARIABLE" target="_blank"><span class="a">LOCK_VARIABLE</span></a><span class="k2">(</span>framerate<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 129</span>  <a href="http://www.allegro.cc/manual/LOCK_VARIABLE" target="_blank"><span class="a">LOCK_VARIABLE</span></a><span class="k2">(</span>draw_ticks<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 130</span>  <a href="http://www.allegro.cc/manual/LOCK_FUNCTION" target="_blank"><span class="a">LOCK_FUNCTION</span></a><span class="k2">(</span>timer1<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 131</span>  <a href="http://www.allegro.cc/manual/LOCK_FUNCTION" target="_blank"><span class="a">LOCK_FUNCTION</span></a><span class="k2">(</span>frametimer<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 132</span>  iTimer_Speed <span class="k3">=</span> <span class="n">60</span><span class="k2">;</span>
<span class="number"> 133</span>  <a href="http://www.allegro.cc/manual/install_int_ex" target="_blank"><span class="a">install_int_ex</span></a><span class="k2">(</span>timer1, BPS_TO_TIMER<span class="k2">(</span>iTimer_Speed<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 134</span>  <a href="http://www.allegro.cc/manual/install_int_ex" target="_blank"><span class="a">install_int_ex</span></a><span class="k2">(</span>frametimer, BPS_TO_TIMER<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 135</span>  <span class="c">//install_int(timer1, 1000);</span>
<span class="number"> 136</span>  
<span class="number"> 137</span>  <span class="c">// Setup the buffer</span>
<span class="number"> 138</span>  buffer <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span>GFX_W, GFX_H<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 139</span>
<span class="number"> 140</span>  <span class="c">// Setup translucent table</span>
<span class="number"> 141</span>  <a href="http://www.allegro.cc/manual/create_trans_table" target="_blank"><span class="a">create_trans_table</span></a><span class="k2">(</span><span class="k3">&amp;</span>trans_table, pal, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, NULL<span class="k2">)</span><span class="k2">;</span>  
<span class="number"> 142</span>  <a href="http://www.allegro.cc/manual/color_map" target="_blank"><span class="a">color_map</span></a> <span class="k3">=</span> <span class="k3">&amp;</span>trans_table<span class="k2">;</span>  
<span class="number"> 143</span><span class="k2">}</span>
<span class="number"> 144</span>
<span class="number"> 145</span><span class="c">//**************** Classes ***********************</span>
<span class="number"> 146</span><span class="k1">class</span> BLOCK
<span class="number"> 147</span><span class="k2">{</span>
<span class="number"> 148</span>public:
<span class="number"> 149</span>  BLOCK<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 150</span>  ~BLOCK<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 151</span>    
<span class="number"> 152</span>  <span class="k1">void</span> update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 153</span>  <span class="k1">void</span> draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bDisplay<span class="k2">)</span><span class="k2">;</span>  
<span class="number"> 154</span>  <span class="k1">void</span> set_speed<span class="k2">(</span><span class="k1">int</span> v<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 155</span>
<span class="number"> 156</span>private:
<span class="number"> 157</span>  <span class="k1">int</span> speed<span class="k2">;</span>
<span class="number"> 158</span>  <span class="k1">int</span> x, y<span class="k2">;</span>
<span class="number"> 159</span>  <span class="k1">int</span> col<span class="k2">;</span>
<span class="number"> 160</span>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bImage<span class="k2">;</span>
<span class="number"> 161</span>  <span class="k1">int</span> eye_length<span class="k2">;</span>
<span class="number"> 162</span>  <span class="k1">int</span> update_timer<span class="k2">;</span>
<span class="number"> 163</span>  <span class="k1">int</span> check_timer<span class="k2">;</span>
<span class="number"> 164</span>  <span class="k1">bool</span> move<span class="k2">;</span>
<span class="number"> 165</span>  <span class="k1">bool</span> scoring<span class="k2">;</span>
<span class="number"> 166</span><span class="k2">}</span><span class="k2">;</span>
<span class="number"> 167</span>
<span class="number"> 168</span>BLOCK::BLOCK<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 169</span><span class="k2">{</span>
<span class="number"> 170</span>  x <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % GFX_W<span class="k2">;</span>
<span class="number"> 171</span>  y <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 172</span>  bImage <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">20</span>, <span class="n">20</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 173</span>  col <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % <span class="n">255</span><span class="k2">;</span>
<span class="number"> 174</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>bImage, <span class="n">0</span>, <span class="n">0</span>, bImage-&gt;w, bImage-&gt;h, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % dark,<a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % dark,<a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % dark<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 175</span>  eye_length <span class="k3">=</span> <span class="n">4</span><span class="k2">;</span>
<span class="number"> 176</span>  update_timer <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 177</span>  speed <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 178</span>  move <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 179</span>  scoring <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 180</span>  check_timer <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 181</span>
<span class="number"> 182</span><span class="k2">}</span>
<span class="number"> 183</span>
<span class="number"> 184</span>BLOCK::~BLOCK<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 185</span><span class="k2">{</span>
<span class="number"> 186</span>  <span class="k1">if</span><span class="k2">(</span>bImage <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span> <span class="k2">{</span><a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>bImage<span class="k2">)</span><span class="k2">;</span>bImage <span class="k3">=</span> NULL<span class="k2">;</span><span class="k2">}</span>
<span class="number"> 187</span><span class="k2">}</span>
<span class="number"> 188</span>
<span class="number"> 189</span><span class="k1">void</span> BLOCK::set_speed<span class="k2">(</span><span class="k1">int</span> v<span class="k2">)</span>
<span class="number"> 190</span><span class="k2">{</span>
<span class="number"> 191</span>  speed <span class="k3">=</span> v<span class="k2">;</span>
<span class="number"> 192</span><span class="k2">}</span>
<span class="number"> 193</span>
<span class="number"> 194</span><span class="k1">void</span> BLOCK::update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 195</span><span class="k2">{</span>
<span class="number"> 196</span>  <span class="k1">int</span> yold <span class="k3">=</span> y<span class="k2">;</span>
<span class="number"> 197</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>ticks <span class="k3">-</span> update_timer<span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">5</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> move <span class="k3">=</span><span class="k3">=</span> <span class="k1">true</span><span class="k2">)</span>
<span class="number"> 198</span>  <span class="k2">{</span>
<span class="number"> 199</span>    y <span class="k3">+</span><span class="k3">=</span> speed<span class="k2">;</span>
<span class="number"> 200</span>    <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/getpixel" target="_blank"><span class="a">getpixel</span></a><span class="k2">(</span>bScreen, x <span class="k3">+</span> <span class="n">10</span>, y <span class="k3">+</span> <span class="n">20</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> y <span class="k3">&gt;</span> <span class="n">100</span><span class="k2">)</span>
<span class="number"> 201</span>      move <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 202</span>    <span class="k1">if</span><span class="k2">(</span>y <span class="k3">&gt;</span> GFX_H<span class="k2">)</span>
<span class="number"> 203</span>    <span class="k2">{</span>
<span class="number"> 204</span>      move <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 205</span>      y <span class="k3">=</span> GFX_H <span class="k3">-</span> <span class="n">20</span><span class="k2">;</span>
<span class="number"> 206</span>    <span class="k2">}</span>
<span class="number"> 207</span>
<span class="number"> 208</span>    <span class="k1">if</span><span class="k2">(</span>move <span class="k3">=</span><span class="k3">=</span> <span class="k1">false</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> scoring <span class="k3">=</span><span class="k3">=</span> <span class="k1">true</span><span class="k2">)</span>
<span class="number"> 209</span>      score <span class="k3">+</span><span class="k3">=</span> <span class="k2">(</span>y <span class="k3">-</span> GFX_H<span class="k2">)</span> <span class="k3">*</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span>
<span class="number"> 210</span>
<span class="number"> 211</span>    update_timer <span class="k3">=</span> ticks<span class="k2">;</span>
<span class="number"> 212</span>  <span class="k2">}</span>
<span class="number"> 213</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>ticks <span class="k3">-</span> check_timer<span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">30</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> move <span class="k3">=</span><span class="k3">=</span> <span class="k1">false</span><span class="k2">)</span>
<span class="number"> 214</span>  <span class="k2">{</span>
<span class="number"> 215</span>    scoring <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 216</span>    move <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 217</span>    check_timer <span class="k3">=</span> ticks<span class="k2">;</span>
<span class="number"> 218</span>  <span class="k2">}</span>
<span class="number"> 219</span>
<span class="number"> 220</span>  <span class="c">//collision</span>
<span class="number"> 221</span>  <span class="k1">if</span><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">&gt;</span> x <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a> <span class="k3">&lt;</span> x <span class="k3">+</span> <span class="n">20</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a> <span class="k3">&gt;</span> y <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a> <span class="k3">&lt;</span> y <span class="k3">+</span> <span class="n">20</span><span class="k2">)</span>
<span class="number"> 222</span>    over <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 223</span>  
<span class="number"> 224</span><span class="k2">}</span>
<span class="number"> 225</span>
<span class="number"> 226</span><span class="k1">void</span> BLOCK::draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bDisplay<span class="k2">)</span>
<span class="number"> 227</span><span class="k2">{</span>
<span class="number"> 228</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>bImage, <span class="n">5</span>, <span class="n">10</span> <span class="k3">-</span> eye_length, <span class="n">5</span>, <span class="n">10</span> <span class="k3">+</span> eye_length, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 229</span>  <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a><span class="k2">(</span>bImage, <span class="n">15</span>, <span class="n">10</span> <span class="k3">-</span> eye_length, <span class="n">15</span>, <span class="n">10</span> <span class="k3">+</span> eye_length, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 230</span>  
<span class="number"> 231</span>  <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>bDisplay, bImage, x, y<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 232</span>  <a href="http://www.allegro.cc/manual/putpixel" target="_blank"><span class="a">putpixel</span></a><span class="k2">(</span>bDisplay, x <span class="k3">+</span> <span class="n">5</span>, y <span class="k3">+</span> <span class="n">10</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 233</span>  <a href="http://www.allegro.cc/manual/putpixel" target="_blank"><span class="a">putpixel</span></a><span class="k2">(</span>bDisplay, x <span class="k3">+</span> <span class="n">15</span>, y <span class="k3">+</span> <span class="n">10</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 234</span><span class="k2">}</span>
<span class="number"> 235</span>
<span class="number"> 236</span><span class="k1">class</span> BLOCKS
<span class="number"> 237</span><span class="k2">{</span>
<span class="number"> 238</span>public:
<span class="number"> 239</span>  BLOCKS<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 240</span>  ~BLOCKS<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 241</span>
<span class="number"> 242</span>  <span class="k1">void</span> update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 243</span>  <span class="k1">void</span> draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bDisplay<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 244</span>
<span class="number"> 245</span>private:
<span class="number"> 246</span>  BLOCK <span class="k3">*</span>bBlocks<span class="k2">[</span>MAX_BLOCKS<span class="k2">]</span><span class="k2">;</span>
<span class="number"> 247</span>  <span class="k1">int</span> update_timer<span class="k2">;</span>
<span class="number"> 248</span>  <span class="k1">int</span> speed_timer<span class="k2">;</span>
<span class="number"> 249</span>  <span class="k1">int</span> block_timer<span class="k2">;</span>
<span class="number"> 250</span>  <span class="k1">int</span> dark_timer<span class="k2">;</span>
<span class="number"> 251</span>  <span class="k1">int</span> gspeed<span class="k2">;</span>
<span class="number"> 252</span>  <span class="k1">void</span> create_block<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 253</span><span class="k2">}</span> <span class="k3">*</span>MyBlocks<span class="k2">;</span>
<span class="number"> 254</span>
<span class="number"> 255</span>BLOCKS::BLOCKS<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 256</span><span class="k2">{</span>
<span class="number"> 257</span>  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> MAX_BLOCKS<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 258</span>    bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">=</span> NULL<span class="k2">;</span>
<span class="number"> 259</span>  update_timer <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 260</span>  gspeed <span class="k3">=</span> <span class="n">5</span><span class="k2">;</span>
<span class="number"> 261</span>  speed_timer <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 262</span>  block_timer <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 263</span>  dark_timer <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 264</span><span class="k2">}</span>
<span class="number"> 265</span>
<span class="number"> 266</span>BLOCKS::~BLOCKS<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 267</span><span class="k2">{</span>
<span class="number"> 268</span>  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> MAX_BLOCKS<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 269</span>    <span class="k1">if</span><span class="k2">(</span>bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
<span class="number"> 270</span>    <span class="k2">{</span>
<span class="number"> 271</span>      <span class="k1">delete</span> bBlocks<span class="k3">&lt;</span>i&gt;<span class="k2">;</span>
<span class="number"> 272</span>      bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">=</span> NULL<span class="k2">;</span>
<span class="number"> 273</span>    <span class="k2">}</span>
<span class="number"> 274</span><span class="k2">}</span>
<span class="number"> 275</span>
<span class="number"> 276</span><span class="k1">void</span> BLOCKS::update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 277</span><span class="k2">{</span>
<span class="number"> 278</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>ticks <span class="k3">-</span> update_timer<span class="k2">)</span> <span class="k3">&gt;</span> block_create<span class="k2">)</span>
<span class="number"> 279</span>  <span class="k2">{</span>
<span class="number"> 280</span>    create_block<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 281</span>    update_timer <span class="k3">=</span> ticks<span class="k2">;</span>
<span class="number"> 282</span>  <span class="k2">}</span>
<span class="number"> 283</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>ticks <span class="k3">-</span> speed_timer<span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">1000</span><span class="k2">)</span>
<span class="number"> 284</span>  <span class="k2">{</span>
<span class="number"> 285</span>    gspeed<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number"> 286</span>    speed_timer <span class="k3">=</span> ticks<span class="k2">;</span>
<span class="number"> 287</span>  <span class="k2">}</span>
<span class="number"> 288</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>ticks <span class="k3">-</span> block_timer<span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">60</span><span class="k2">)</span>
<span class="number"> 289</span>  <span class="k2">{</span>
<span class="number"> 290</span>    block_create--<span class="k2">;</span>
<span class="number"> 291</span>    <span class="k1">if</span><span class="k2">(</span>block_create <span class="k3">&lt;</span> <span class="n">5</span><span class="k2">)</span> block_create <span class="k3">=</span> <span class="n">5</span><span class="k2">;</span>
<span class="number"> 292</span>    block_timer <span class="k3">=</span> ticks<span class="k2">;</span>
<span class="number"> 293</span>  <span class="k2">}</span>
<span class="number"> 294</span>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>ticks <span class="k3">-</span> dark_timer<span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">30</span><span class="k2">)</span>
<span class="number"> 295</span>  <span class="k2">{</span>
<span class="number"> 296</span>    dark--<span class="k2">;</span>
<span class="number"> 297</span>    dark_timer <span class="k3">=</span> ticks<span class="k2">;</span>
<span class="number"> 298</span>  <span class="k2">}</span>
<span class="number"> 299</span>  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> MAX_BLOCKS<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 300</span>    <span class="k1">if</span><span class="k2">(</span>bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
<span class="number"> 301</span>      bBlocks<span class="k3">&lt;</span>i&gt;-&gt;update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 302</span><span class="k2">}</span>
<span class="number"> 303</span>
<span class="number"> 304</span><span class="k1">void</span> BLOCKS::create_block<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 305</span><span class="k2">{</span>
<span class="number"> 306</span>  <span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 307</span>  <span class="k1">while</span><span class="k2">(</span>i <span class="k3">&lt;</span> MAX_BLOCKS <span class="k3">&amp;</span><span class="k3">&amp;</span> bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
<span class="number"> 308</span>    i<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number"> 309</span>  <span class="k1">if</span><span class="k2">(</span>i <span class="k3">&gt;</span><span class="k3">=</span> MAX_BLOCKS<span class="k2">)</span> <span class="k1">return</span><span class="k2">;</span>
<span class="number"> 310</span>  bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">=</span> <span class="k1">new</span> BLOCK<span class="k2">;</span>
<span class="number"> 311</span>  bBlocks<span class="k3">&lt;</span>i&gt;-&gt;set_speed<span class="k2">(</span>gspeed<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 312</span><span class="k2">}</span>
<span class="number"> 313</span>
<span class="number"> 314</span><span class="k1">void</span> BLOCKS::draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bDisplay<span class="k2">)</span>
<span class="number"> 315</span><span class="k2">{</span>
<span class="number"> 316</span>  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> MAX_BLOCKS<span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 317</span>    <span class="k1">if</span><span class="k2">(</span>bBlocks<span class="k3">&lt;</span>i&gt; <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
<span class="number"> 318</span>      bBlocks<span class="k3">&lt;</span>i&gt;-&gt;draw<span class="k2">(</span>bDisplay<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 319</span><span class="k2">}</span>
<span class="number"> 320</span>
<span class="number"> 321</span><span class="k1">void</span> game_init<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 322</span><span class="k2">{</span>
<span class="number"> 323</span>  dark <span class="k3">=</span> <span class="n">255</span><span class="k2">;</span>
<span class="number"> 324</span>  score <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 325</span>  quit <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 326</span>  over <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 327</span>  bText <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">100</span>, <span class="n">30</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 328</span>  bScreen <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span>GFX_W, GFX_H<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 329</span>  clear<span class="k2">(</span>bScreen<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 330</span>  MyBlocks <span class="k3">=</span> <span class="k1">new</span> BLOCKS<span class="k2">;</span>  
<span class="number"> 331</span>  block_create <span class="k3">=</span> <span class="n">50</span><span class="k2">;</span>
<span class="number"> 332</span>  <a href="http://www.allegro.cc/manual/show_mouse" target="_blank"><span class="a">show_mouse</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 333</span><span class="k2">}</span>
<span class="number"> 334</span>
<span class="number"> 335</span><span class="k1">void</span> game_update<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 336</span><span class="k2">{</span>
<span class="number"> 337</span>  MyBlocks-&gt;update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>  
<span class="number"> 338</span><span class="k2">}</span>
<span class="number"> 339</span>
<span class="number"> 340</span><span class="k1">void</span> game_draw<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 341</span><span class="k2">{</span>
<span class="number"> 342</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>bText, <span class="n">0</span>, <span class="n">0</span>, bText-&gt;w, bText-&gt;h, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">180</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 343</span>  textprintf<span class="k2">(</span>bText, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">4</span>, <span class="n">10</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>,<span class="n">255</span><span class="k2">)</span>, <span class="s">"SCORE:  %d"</span>, score<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 344</span>  <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>bScreen, <span class="n">0</span>, <span class="n">0</span>, bScreen-&gt;w, bScreen-&gt;h, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 345</span>  MyBlocks-&gt;draw<span class="k2">(</span>bScreen<span class="k2">)</span><span class="k2">;</span>  
<span class="number"> 346</span>  
<span class="number"> 347</span>  <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>buffer, bScreen, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 348</span>
<span class="number"> 349</span>  <a href="http://www.allegro.cc/manual/set_trans_blender" target="_blank"><span class="a">set_trans_blender</span></a><span class="k2">(</span><span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>, <span class="n">180</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 350</span>  <a href="http://www.allegro.cc/manual/draw_trans_sprite" target="_blank"><span class="a">draw_trans_sprite</span></a><span class="k2">(</span>buffer, bText, <span class="n">10</span>, <span class="n">10</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 351</span>  <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, buffer, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 352</span>  
<span class="number"> 353</span><span class="k2">}</span>
<span class="number"> 354</span>
<span class="number"> 355</span><span class="k1">void</span> game_shutdown<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 356</span><span class="k2">{</span>  
<span class="number"> 357</span>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>buffer<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 358</span>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>bText<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 359</span><span class="k2">}</span>
<span class="number"> 360</span>
<span class="number"> 361</span>
<span class="number"> 362</span>
<span class="number"> 363</span><span class="k1">void</span> play_game<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 364</span><span class="k2">{</span>  
<span class="number"> 365</span>  iFrameRate <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 366</span>  game_init<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 367</span>  
<span class="number"> 368</span>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span>quit<span class="k2">)</span>
<span class="number"> 369</span>  <span class="k2">{</span>
<span class="number"> 370</span>    <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/key" target="_blank"><span class="a">key</span></a><span class="k2">[</span>KEY_ESC<span class="k2">]</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k3">!</span>over<span class="k2">)</span>
<span class="number"> 371</span>    <span class="k2">{</span>
<span class="number"> 372</span>      <span class="k1">while</span><span class="k2">(</span>system_time <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k3">!</span>over<span class="k2">)</span>
<span class="number"> 373</span>      <span class="k2">{</span>
<span class="number"> 374</span>        system_time--<span class="k2">;</span>
<span class="number"> 375</span>        ticks<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number"> 376</span>        game_update<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>        
<span class="number"> 377</span>      <span class="k2">}</span>    
<span class="number"> 378</span>        
<span class="number"> 379</span>      draw_ticks<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
<span class="number"> 380</span>      game_draw<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 381</span>
<span class="number"> 382</span>      <span class="k1">if</span><span class="k2">(</span>iFrameRate<span class="k2">)</span> textprintf<span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">10</span>, <span class="n">10</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"%d"</span>, framerate<span class="k2">)</span><span class="k2">;</span>          
<span class="number"> 383</span>    <span class="k2">}</span>
<span class="number"> 384</span>    quit <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 385</span>    system_time <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 386</span>    ticks <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 387</span>  <span class="k2">}</span>
<span class="number"> 388</span>
<span class="number"> 389</span>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/key" target="_blank"><span class="a">key</span></a><span class="k2">[</span>KEY_ENTER<span class="k2">]</span><span class="k2">)</span>
<span class="number"> 390</span>    textprintf<span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">100</span>, <span class="n">100</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span>, <span class="s">"GAME OVER!  Press ENTER to end game!"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 391</span>  game_shutdown<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 392</span><span class="k2">}</span>
<span class="number"> 393</span>
<span class="number"> 394</span>
<span class="number"> 395</span>
<span class="number"> 396</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 397</span><span class="k2">{</span>
<span class="number"> 398</span>  init<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 399</span>
<span class="number"> 400</span>  
<span class="number"> 401</span>
<span class="number"> 402</span>  play_game<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 403</span>
<span class="number"> 404</span>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 405</span><span class="k2">}</span>
<span class="number"> 406</span><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span>
</div></div><p>

Dodge the Blocks!!!!!!!!!!!!!!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 04 Sep 2006 03:00:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Finished! Move the blue dot to pick up the gold coins.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 03:01:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, crappy rule to get on a development environment with only a trackpad, but I have my entry! It&#39;s tron, I guess. I finished with about a minute to spare, but uploading this is slow.</p><p>Oh yay. My phone doesn&#39;t support the attachments tab... Emailing my entry to Baf...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 04 Sep 2006 03:04:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>************ BUG *********************<br />I added some code in the last 3 minutes that kind of messes up the gameplay.  Just comment out lines 213 to 218 and it&#39;s quite a bit more fun.</p><p>[edit] Also, the game crashes after so long...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 04 Sep 2006 03:05:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>About the mine:<br />Got tons of codes from my SH2006 game: Rambanana.<br />It leaks a lot memory.<br />just move the mouse and run away from the asteroids.</p><p>PS: My crappy dialed internet connection almost made i lose the deadline. I posted in 20:59 (GMT), just a few seconds.</p><p>[EDIT: It inherited some cool thing from Rambanana (which was inherited from my SH2005 Game: The attack of the space bugs). This include passing &quot;F&quot; as a argc/argv command to make it fullscreen. It inherited other things to handle sound, music and joystick, but doesn&#39;t use these.</p><p>Oh, i found a serious bug: After some time, large white strips start to appear in the game. These are asteroids with something really wrong in their math (and very letal to the player). Maybe some overflow or division by zero bug? ]
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 04 Sep 2006 03:07:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I&#39;ve got all the entries so far compiled, I&#39;ll wait for CGamesPlay&#39;s if he does post it, and then attach a binary pack for Windows <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />. Looks good, seems everyone who participated did finish something, we&#39;re better than Speedhack <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />.</p><p>Victor: Hm, I didn&#39;t know if code reuse was allowed... I did everything from scratch, but it&#39;s OK, it was more fun that way. I felt like my fingers were on fire <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.</p><p>CGames: BAF doesn&#39;t seem to be around, just e-mail it to me at krajzega@kalamburos.gov.net, without the gov. I&#39;ll include it with the binaries and post source here.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 03:16:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Done. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Simple RTS with Starcraft-like controls. As default settings are quite hard (or maybe impossible), you can play with AI difficulty and hive health settings (difficulty 10 and hive health 1000 is doable, but I doubt you can save at least one hive at any difficulty). Entire game is a bit pointless, but one hour doesn&#039;t leave much time for gameplay tweaking. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>For Linux people, here is &quot;winalleg.h&quot; compatibility replacement to run this game (also don&#039;t forget to change &lt;winalleg.h&gt; to &quot;winalleg.h&quot; in the source code).
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include &lt;sys/time.h&gt;</span>

<span class="k1">unsigned</span> <span class="k1">long</span> <span class="k1">long</span> timeGetTime<span class="k2">(</span><span class="k2">)</span>
<span class="k2">{</span>
        timeval T<span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_421.html" target="_blank">gettimeofday</a><span class="k2">(</span><span class="k3">&amp;</span>T,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <span class="k1">return</span> <span class="k2">(</span><span class="k2">(</span><span class="k1">long</span> <span class="k1">long</span><span class="k2">)</span>T.tv_sec<span class="k2">)</span><span class="k3">*</span><span class="n">1000</span><span class="k3">+</span>T.tv_usec<span class="k3">/</span><span class="n">1000</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">   1</span><span class="p">#include &lt;stdio.h&gt;</span>
<span class="number">   2</span><span class="p">#include &lt;stdlib.h&gt;</span>
<span class="number">   3</span><span class="p">#include &lt;string.h&gt;</span>
<span class="number">   4</span><span class="p">#include &lt;math.h&gt;</span>
<span class="number">   5</span><span class="p">#include &lt;time.h&gt;</span>
<span class="number">   6</span>
<span class="number">   7</span><span class="p">#include &lt;allegro.h&gt;</span>
<span class="number">   8</span><span class="p">#include &lt;winalleg.h&gt;</span>
<span class="number">   9</span>
<span class="number">  10</span><span class="p">#include &lt;vector&gt;</span>
<span class="number">  11</span><span class="p">#include &lt;string&gt;</span>
<span class="number">  12</span><span class="p">#include &lt;algorithm&gt;</span>
<span class="number">  13</span>
<span class="number">  14</span><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span>
<span class="number">  15</span>
<span class="number">  16</span>
<span class="number">  17</span>
<span class="number">  18</span><span class="p">#define DIFFICULTY    30</span>
<span class="number">  19</span><span class="p">#define HIVE_HP      10000</span>
<span class="number">  20</span>
<span class="number">  21</span>
<span class="number">  22</span>
<span class="number">  23</span><span class="k1">class</span> tUnit <span class="k2">{</span>
<span class="number">  24</span>public:
<span class="number">  25</span>  <span class="k1">float</span>  xp,yp<span class="k2">;</span>
<span class="number">  26</span>  <span class="k1">float</span>  vx,vy<span class="k2">;</span>
<span class="number">  27</span>  <span class="k1">float</span>  tx,ty<span class="k2">;</span>
<span class="number">  28</span>  <span class="k1">bool</span>  selected<span class="k2">;</span>
<span class="number">  29</span>  <span class="k1">bool</span>  hive<span class="k2">;</span>
<span class="number">  30</span>  <span class="k1">int</span>    side<span class="k2">;</span>
<span class="number">  31</span>  <span class="k1">int</span>    enemy<span class="k2">;</span>
<span class="number">  32</span>  <span class="k1">float</span>  timer<span class="k2">;</span>
<span class="number">  33</span>  <span class="k1">int</span>    hp<span class="k2">;</span>
<span class="number">  34</span>  
<span class="number">  35</span>  tUnit<span class="k2">(</span><span class="k2">)</span> <span class="k2">:</span> selected<span class="k2">(</span><span class="k1">false</span><span class="k2">)</span>,enemy<span class="k2">(</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span>, timer<span class="k2">(</span><span class="n">0</span><span class="k2">)</span>, vx<span class="k2">(</span><span class="n">0</span><span class="k2">)</span>, vy<span class="k2">(</span><span class="n">0</span><span class="k2">)</span>, hive<span class="k2">(</span><span class="k1">false</span><span class="k2">)</span>, hp<span class="k2">(</span><span class="n">100</span><span class="k2">)</span> <span class="k2">{</span><span class="k2">}</span>
<span class="number">  36</span>
<span class="number">  37</span>  <span class="k1">void</span> Draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buff<span class="k2">)</span><span class="k2">;</span>
<span class="number">  38</span>  <span class="k1">bool</span> Think<span class="k2">(</span><span class="k1">float</span> delta<span class="k2">)</span><span class="k2">;</span>
<span class="number">  39</span>  <span class="k1">void</span> MoveTo<span class="k2">(</span><span class="k1">float</span> x2,<span class="k1">float</span> y2<span class="k2">)</span><span class="k2">;</span>
<span class="number">  40</span><span class="k2">}</span><span class="k2">;</span>
<span class="number">  41</span>
<span class="number">  42</span>
<span class="number">  43</span>vector<span class="k3">&lt;</span>tUnit&gt; units<span class="k2">[</span><span class="n">2</span><span class="k2">]</span><span class="k2">;</span>
<span class="number">  44</span><span class="k1">int</span> sel_cx,sel_cy<span class="k2">;</span>
<span class="number">  45</span><span class="k1">float</span> sel_rad<span class="k2">;</span>
<span class="number">  46</span><span class="k1">int</span> _mb<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>
<span class="number">  47</span><span class="k1">float</span> closest_dist<span class="k2">;</span>
<span class="number">  48</span>
<span class="number">  49</span>
<span class="number">  50</span><span class="k1">int</span> nearest_unit<span class="k2">(</span><span class="k1">int</span> side,<span class="k1">float</span> xp,<span class="k1">float</span> yp<span class="k2">)</span>
<span class="number">  51</span><span class="k2">{</span>
<span class="number">  52</span>  <span class="k1">float</span> md2<span class="k3">=</span><span class="n">100000</span><span class="k2">;</span>
<span class="number">  53</span>  <span class="k1">int</span> id <span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span>
<span class="number">  54</span>  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>units<span class="k2">[</span>side<span class="k2">]</span>.size<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number">  55</span>  <span class="k2">{</span>
<span class="number">  56</span>    <span class="k1">float</span> dx <span class="k3">=</span> units<span class="k2">[</span>side<span class="k2">]</span><span class="k3">&lt;</span>i&gt;.xp <span class="k3">-</span> xp<span class="k2">;</span>
<span class="number">  57</span>    <span class="k1">float</span> dy <span class="k3">=</span> units<span class="k2">[</span>side<span class="k2">]</span><span class="k3">&lt;</span>i&gt;.yp <span class="k3">-</span> yp<span class="k2">;</span>
<span class="number">  58</span>    dx<span class="k3">=</span>dx<span class="k3">*</span>dx<span class="k3">+</span>dy<span class="k3">*</span>dy<span class="k2">;</span>
<span class="number">  59</span>    <span class="k1">if</span><span class="k2">(</span>units<span class="k2">[</span>side<span class="k2">]</span><span class="k3">&lt;</span>i&gt;.hive<span class="k2">)</span>
<span class="number">  60</span>      dx<span class="k3">/</span><span class="k3">=</span><span class="n">9</span><span class="k2">;</span>
<span class="number">  61</span>    <span class="k1">if</span><span class="k2">(</span>md2&gt;dx<span class="k2">)</span>
<span class="number">  62</span>    <span class="k2">{</span>
<span class="number">  63</span>      md2<span class="k3">=</span>dx<span class="k2">;</span>
<span class="number">  64</span>      id<span class="k3">=</span>i<span class="k2">;</span>
<span class="number">  65</span>    <span class="k2">}</span>
<span class="number">  66</span>  <span class="k2">}</span>
<span class="number">  67</span>  closest_dist <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_738.html" target="_blank">sqrt</a><span class="k2">(</span>md2<span class="k2">)</span><span class="k2">;</span>
<span class="number">  68</span>  <span class="k1">return</span> id<span class="k2">;</span>
<span class="number">  69</span><span class="k2">}</span>
<span class="number">  70</span>
<span class="number">  71</span>
<span class="number">  72</span>
<span class="number">  73</span><span class="k1">void</span> tUnit::Draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buff<span class="k2">)</span>
<span class="number">  74</span><span class="k2">{</span>
<span class="number">  75</span>  <span class="k1">int</span> col <span class="k3">=</span> <span class="n">2</span><span class="k2">;</span>
<span class="number">  76</span>  <span class="k1">if</span><span class="k2">(</span>selected<span class="k2">)</span> col<span class="k3">=</span><span class="n">14</span><span class="k2">;</span>
<span class="number">  77</span>  <span class="k1">if</span><span class="k2">(</span>side<span class="k3">!</span><span class="k3">=</span><span class="n">0</span><span class="k2">)</span> col<span class="k3">=</span><span class="n">4</span><span class="k2">;</span>
<span class="number">  78</span>  <a href="http://www.allegro.cc/manual/circle" target="_blank"><span class="a">circle</span></a><span class="k2">(</span>buff,<span class="k1">int</span><span class="k2">(</span>xp<span class="k2">)</span>,<span class="k1">int</span><span class="k2">(</span>yp<span class="k2">)</span>,hive?<span class="k1">int</span><span class="k2">(</span><span class="n">13</span><span class="k3">-</span>timer<span class="k3">*</span><span class="n">2</span><span class="k2">)</span><span class="k2">:</span><span class="n">2</span>,col<span class="k2">)</span><span class="k2">;</span>
<span class="number">  79</span>  <span class="k1">if</span><span class="k2">(</span>hive<span class="k2">)</span>
<span class="number">  80</span>  <span class="k2">{</span>
<span class="number">  81</span>    <a href="http://www.allegro.cc/manual/hline" target="_blank"><span class="a">hline</span></a><span class="k2">(</span>buff,<span class="k1">int</span><span class="k2">(</span>xp<span class="k2">)</span><span class="k3">-</span><span class="n">6</span>,<span class="k1">int</span><span class="k2">(</span>yp<span class="k2">)</span>,<span class="k1">int</span><span class="k2">(</span>xp<span class="k2">)</span><span class="k3">+</span><span class="n">6</span>,<span class="n">8</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  82</span>    <a href="http://www.allegro.cc/manual/hline" target="_blank"><span class="a">hline</span></a><span class="k2">(</span>buff,<span class="k1">int</span><span class="k2">(</span>xp<span class="k2">)</span><span class="k3">-</span><span class="n">6</span>,<span class="k1">int</span><span class="k2">(</span>yp<span class="k2">)</span>,<span class="k1">int</span><span class="k2">(</span>xp<span class="k2">)</span><span class="k3">-</span><span class="n">6</span><span class="k3">+</span><span class="k1">int</span><span class="k2">(</span><span class="k2">(</span><span class="n">13</span>.f<span class="k3">*</span>hp<span class="k2">)</span><span class="k3">/</span>HIVE_HP<span class="k2">)</span>,col<span class="k2">)</span><span class="k2">;</span>
<span class="number">  83</span>  <span class="k2">}</span>
<span class="number">  84</span><span class="k2">}</span>
<span class="number">  85</span>
<span class="number">  86</span><span class="k1">bool</span> tUnit::Think<span class="k2">(</span><span class="k1">float</span> delta<span class="k2">)</span>
<span class="number">  87</span><span class="k2">{</span>
<span class="number">  88</span>  <span class="k1">if</span><span class="k2">(</span>hp<span class="k3">&lt;</span><span class="k3">=</span><span class="n">0</span><span class="k2">)</span>
<span class="number">  89</span>    <span class="k1">return</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number">  90</span>
<span class="number">  91</span>  <span class="k1">if</span><span class="k2">(</span>hive<span class="k2">)</span>
<span class="number">  92</span>  <span class="k2">{</span>
<span class="number">  93</span>    selected <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number">  94</span>    timer-<span class="k3">=</span>delta<span class="k2">;</span>
<span class="number">  95</span>    <span class="k1">if</span><span class="k2">(</span>timer<span class="k3">&lt;</span><span class="k3">=</span><span class="n">0</span><span class="k2">)</span>
<span class="number">  96</span>    <span class="k2">{</span>
<span class="number">  97</span>      hp<span class="k3">+</span><span class="k3">=</span><span class="n">10</span><span class="k2">;</span>
<span class="number">  98</span>      <span class="k1">if</span><span class="k2">(</span>hp&gt;HIVE_HP<span class="k2">)</span>
<span class="number">  99</span>        hp<span class="k3">=</span>HIVE_HP<span class="k2">;</span>
<span class="number"> 100</span>
<span class="number"> 101</span>      <span class="k1">float</span> r <span class="k3">=</span> <span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">360</span><span class="k2">)</span><span class="k3">*</span>M_PI<span class="k3">/</span><span class="n">180</span>.f<span class="k2">;</span>
<span class="number"> 102</span>      tUnit u<span class="k2">;</span>
<span class="number"> 103</span>
<span class="number"> 104</span>      u.side <span class="k3">=</span> side<span class="k2">;</span>
<span class="number"> 105</span>      u.xp <span class="k3">=</span> xp<span class="k2">;</span>
<span class="number"> 106</span>      u.yp <span class="k3">=</span> yp<span class="k2">;</span>
<span class="number"> 107</span>      u.tx <span class="k3">=</span> xp <span class="k3">+</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_113.html" target="_blank">cos</a><span class="k2">(</span>r<span class="k2">)</span><span class="k3">*</span><span class="n">30</span><span class="k2">;</span>
<span class="number"> 108</span>      u.ty <span class="k3">=</span> yp <span class="k3">+</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_728.html" target="_blank">sin</a><span class="k2">(</span>r<span class="k2">)</span><span class="k3">*</span><span class="n">30</span><span class="k2">;</span>
<span class="number"> 109</span>
<span class="number"> 110</span>      units<span class="k2">[</span>side<span class="k2">]</span>.push_back<span class="k2">(</span>u<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 111</span>
<span class="number"> 112</span>      timer<span class="k3">+</span><span class="k3">=</span><span class="n">1</span><span class="k3">+</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">1000</span><span class="k2">)</span><span class="k3">/</span><span class="n">1000</span>.f<span class="k2">;</span>
<span class="number"> 113</span>    <span class="k2">}</span>
<span class="number"> 114</span>    
<span class="number"> 115</span>    <span class="k1">return</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 116</span>  <span class="k2">}</span>
<span class="number"> 117</span>  
<span class="number"> 118</span>
<span class="number"> 119</span>  <span class="c">// AI</span>
<span class="number"> 120</span>  timer-<span class="k3">=</span>delta<span class="k2">;</span>
<span class="number"> 121</span>  <span class="k1">if</span><span class="k2">(</span>timer<span class="k3">&lt;</span><span class="k3">=</span><span class="n">0</span><span class="k2">)</span>
<span class="number"> 122</span>  <span class="k2">{</span>
<span class="number"> 123</span>    <span class="k1">int</span> enemy <span class="k3">=</span> nearest_unit<span class="k2">(</span><span class="k3">!</span>side,xp,yp<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 124</span>    <span class="k1">if</span><span class="k2">(</span>enemy&gt;<span class="k3">=</span><span class="n">0</span><span class="k2">)</span>
<span class="number"> 125</span>    <span class="k2">{</span>
<span class="number"> 126</span>      <span class="k1">if</span><span class="k2">(</span>closest_dist<span class="k3">&lt;</span><span class="n">5</span><span class="k2">)</span>
<span class="number"> 127</span>        units<span class="k2">[</span><span class="k3">!</span>side<span class="k2">]</span><span class="k2">[</span>enemy<span class="k2">]</span>.hp-<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">120</span><span class="k2">;</span>
<span class="number"> 128</span>    
<span class="number"> 129</span>      <span class="k1">if</span><span class="k2">(</span>side<span class="k3">!</span><span class="k3">=</span><span class="n">0</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>closest_dist<span class="k3">&lt;</span><span class="n">30</span> <span class="k3">|</span><span class="k3">|</span> <span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">100</span><span class="k3">&lt;</span>DIFFICULTY<span class="k2">)</span><span class="k2">)</span><span class="k2">)</span>
<span class="number"> 130</span>      <span class="k2">{</span>
<span class="number"> 131</span>        tx <span class="k3">=</span> units<span class="k2">[</span><span class="k3">!</span>side<span class="k2">]</span><span class="k2">[</span>enemy<span class="k2">]</span>.xp<span class="k2">;</span>
<span class="number"> 132</span>        ty <span class="k3">=</span> units<span class="k2">[</span><span class="k3">!</span>side<span class="k2">]</span><span class="k2">[</span>enemy<span class="k2">]</span>.yp<span class="k2">;</span>
<span class="number"> 133</span>      <span class="k2">}</span>
<span class="number"> 134</span>
<span class="number"> 135</span>      timer<span class="k3">+</span><span class="k3">=</span><span class="n">0</span>.<span class="n">5</span><span class="k3">+</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">500</span><span class="k2">)</span><span class="k3">/</span><span class="n">1000</span>.f<span class="k2">;</span>
<span class="number"> 136</span>    <span class="k2">}</span>
<span class="number"> 137</span>  <span class="k2">}</span>
<span class="number"> 138</span>
<span class="number"> 139</span>  <span class="k1">float</span> acc <span class="k3">=</span> <span class="n">0</span>.<span class="n">3</span><span class="k2">;</span>
<span class="number"> 140</span>  <span class="k1">float</span> frc <span class="k3">=</span> <span class="n">0</span>.<span class="n">5</span><span class="k2">;</span>
<span class="number"> 141</span>
<span class="number"> 142</span>  acc <span class="k3">=</span> acc<span class="k3">*</span>delta<span class="k2">;</span>
<span class="number"> 143</span>  frc <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_618.html" target="_blank">pow</a><span class="k2">(</span>frc,delta<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 144</span>
<span class="number"> 145</span>  vx<span class="k3">+</span><span class="k3">=</span><span class="k2">(</span>tx-xp<span class="k2">)</span><span class="k3">*</span>acc<span class="k2">;</span>  vx<span class="k3">*</span><span class="k3">=</span>frc<span class="k2">;</span>
<span class="number"> 146</span>  vy<span class="k3">+</span><span class="k3">=</span><span class="k2">(</span>ty-yp<span class="k2">)</span><span class="k3">*</span>acc<span class="k2">;</span>  vy<span class="k3">*</span><span class="k3">=</span>frc<span class="k2">;</span>
<span class="number"> 147</span>  xp<span class="k3">+</span><span class="k3">=</span>vx<span class="k3">*</span>delta<span class="k2">;</span>
<span class="number"> 148</span>  yp<span class="k3">+</span><span class="k3">=</span>vy<span class="k3">*</span>delta<span class="k2">;</span>
<span class="number"> 149</span>
<span class="number"> 150</span>  <span class="k1">return</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 151</span><span class="k2">}</span>
<span class="number"> 152</span>
<span class="number"> 153</span><span class="k1">void</span> tUnit::MoveTo<span class="k2">(</span><span class="k1">float</span> x2,<span class="k1">float</span> y2<span class="k2">)</span>
<span class="number"> 154</span><span class="k2">{</span>
<span class="number"> 155</span>  tx<span class="k3">=</span>x2<span class="k3">+</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">21</span><span class="k3">-</span><span class="n">10</span><span class="k2">;</span>
<span class="number"> 156</span>  ty<span class="k3">=</span>y2<span class="k3">+</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="n">21</span><span class="k3">-</span><span class="n">10</span><span class="k2">;</span>
<span class="number"> 157</span><span class="k2">}</span>
<span class="number"> 158</span>
<span class="number"> 159</span>
<span class="number"> 160</span>
<span class="number"> 161</span><span class="k1">void</span> init_armies<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 162</span><span class="k2">{</span>
<span class="number"> 163</span>  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> s<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>s<span class="k3">&lt;</span><span class="n">2</span><span class="k2">;</span>s<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 164</span>  <span class="k2">{</span>
<span class="number"> 165</span>    units<span class="k2">[</span>s<span class="k2">]</span>.clear<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 166</span>    <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> y<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>y<span class="k3">&lt;</span><span class="n">3</span><span class="k2">;</span>y<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 167</span>    <span class="k2">{</span>
<span class="number"> 168</span>      tUnit u<span class="k2">;</span>
<span class="number"> 169</span>
<span class="number"> 170</span>      u.side <span class="k3">=</span> s<span class="k2">;</span>
<span class="number"> 171</span>      u.xp <span class="k3">=</span> <span class="n">40</span><span class="k3">+</span><span class="n">560</span><span class="k3">*</span>s<span class="k2">;</span>
<span class="number"> 172</span>      u.yp <span class="k3">=</span> <span class="n">40</span><span class="k3">+</span><span class="n">200</span><span class="k3">*</span>y<span class="k2">;</span>
<span class="number"> 173</span>      u.hive <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 174</span>      u.hp <span class="k3">=</span> HIVE_HP<span class="k2">;</span>
<span class="number"> 175</span>
<span class="number"> 176</span>      units<span class="k2">[</span>s<span class="k2">]</span>.push_back<span class="k2">(</span>u<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 177</span>    <span class="k2">}</span>
<span class="number"> 178</span>  <span class="k2">}</span>
<span class="number"> 179</span><span class="k2">}</span>
<span class="number"> 180</span>
<span class="number"> 181</span>
<span class="number"> 182</span><span class="k1">void</span> think_mouse<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 183</span><span class="k2">{</span>
<span class="number"> 184</span>  <span class="k1">int</span> mx <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a><span class="k2">;</span>
<span class="number"> 185</span>  <span class="k1">int</span> my <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k2">;</span>
<span class="number"> 186</span>  <span class="k1">int</span> mb <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_b" target="_blank"><span class="a">mouse_b</span></a><span class="k2">;</span>
<span class="number"> 187</span>  <span class="k1">if</span><span class="k2">(</span>mb<span class="k3">&amp;</span><span class="n">2</span><span class="k2">)</span> mb<span class="k3">=</span><span class="n">2</span><span class="k2">;</span>
<span class="number"> 188</span>  
<span class="number"> 189</span>  <span class="k1">if</span><span class="k2">(</span>mb<span class="k3">=</span><span class="k3">=</span><span class="n">1</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> _mb<span class="k3">!</span><span class="k3">=</span><span class="n">1</span><span class="k2">)</span>
<span class="number"> 190</span>  <span class="k2">{</span>
<span class="number"> 191</span>    sel_cx <span class="k3">=</span> mx<span class="k2">;</span>
<span class="number"> 192</span>    sel_cy <span class="k3">=</span> my<span class="k2">;</span>
<span class="number"> 193</span>    sel_rad<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>
<span class="number"> 194</span>  <span class="k2">}</span>
<span class="number"> 195</span>  
<span class="number"> 196</span>  <span class="k1">if</span><span class="k2">(</span>mb<span class="k3">=</span><span class="k3">=</span><span class="n">1</span><span class="k2">)</span>
<span class="number"> 197</span>  <span class="k2">{</span>
<span class="number"> 198</span>    <span class="k1">int</span> dx<span class="k3">=</span>mx-sel_cx<span class="k2">;</span>
<span class="number"> 199</span>    <span class="k1">int</span> dy<span class="k3">=</span>my-sel_cy<span class="k2">;</span>
<span class="number"> 200</span>    sel_rad<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_738.html" target="_blank">sqrt</a><span class="k2">(</span><span class="k1">float</span><span class="k2">(</span>dx<span class="k3">*</span>dx<span class="k3">+</span>dy<span class="k3">*</span>dy<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 201</span>  <span class="k2">}</span>
<span class="number"> 202</span>  
<span class="number"> 203</span>  <span class="k1">if</span><span class="k2">(</span>mb<span class="k3">!</span><span class="k3">=</span><span class="n">1</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> _mb<span class="k3">=</span><span class="k3">=</span><span class="n">1</span><span class="k2">)</span>
<span class="number"> 204</span>    <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span>.size<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 205</span>    <span class="k2">{</span>
<span class="number"> 206</span>      <span class="k1">int</span> dx<span class="k3">=</span>units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k3">&lt;</span>i&gt;.xp-sel_cx<span class="k2">;</span>
<span class="number"> 207</span>      <span class="k1">int</span> dy<span class="k3">=</span>units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k3">&lt;</span>i&gt;.yp-sel_cy<span class="k2">;</span>
<span class="number"> 208</span>      units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k3">&lt;</span>i&gt;.selected <span class="k3">=</span> <span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_738.html" target="_blank">sqrt</a><span class="k2">(</span><span class="k1">float</span><span class="k2">(</span>dx<span class="k3">*</span>dx<span class="k3">+</span>dy<span class="k3">*</span>dy<span class="k2">)</span><span class="k2">)</span><span class="k3">&lt;</span><span class="k3">=</span>sel_rad<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 209</span>    <span class="k2">}</span>
<span class="number"> 210</span>
<span class="number"> 211</span>  <span class="k1">if</span><span class="k2">(</span>mb<span class="k3">=</span><span class="k3">=</span><span class="n">2</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> _mb<span class="k3">!</span><span class="k3">=</span><span class="n">2</span><span class="k2">)</span>
<span class="number"> 212</span>    <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span>.size<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 213</span>      <span class="k1">if</span><span class="k2">(</span>units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k3">&lt;</span>i&gt;.selected<span class="k2">)</span>
<span class="number"> 214</span>        units<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k3">&lt;</span>i&gt;.MoveTo<span class="k2">(</span>mx,my<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 215</span>
<span class="number"> 216</span>  _mb <span class="k3">=</span> mb<span class="k2">;</span>
<span class="number"> 217</span><span class="k2">}</span>
<span class="number"> 218</span>
<span class="number"> 219</span>
<span class="number"> 220</span>
<span class="number"> 221</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span>
<span class="number"> 222</span><span class="k2">{</span>
<span class="number"> 223</span>  <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 224</span>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 225</span>  <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 226</span>  <a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 227</span>  
<span class="number"> 228</span>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">8</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 229</span>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED,<span class="n">640</span>,<span class="n">480</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 230</span>
<span class="number"> 231</span>  <a href="http://www.allegro.cc/manual/show_mouse" target="_blank"><span class="a">show_mouse</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 232</span>  
<span class="number"> 233</span>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buff <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>,<a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 234</span>  clear<span class="k2">(</span>buff<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 235</span>  
<span class="number"> 236</span>  init_armies<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 237</span>
<span class="number"> 238</span>  <span class="k1">unsigned</span> <span class="k1">int</span> t0,t1<span class="k2">;</span>
<span class="number"> 239</span>  t0<span class="k3">=</span>t1<span class="k3">=</span>timeGetTime<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 240</span>
<span class="number"> 241</span>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/key" target="_blank"><span class="a">key</span></a><span class="k2">[</span>KEY_ESC<span class="k2">]</span><span class="k2">)</span>
<span class="number"> 242</span>  <span class="k2">{</span>
<span class="number"> 243</span>    clear<span class="k2">(</span>buff<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 244</span>    
<span class="number"> 245</span>    <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> s<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>s<span class="k3">&lt;</span><span class="n">2</span><span class="k2">;</span>s<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 246</span>      <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>units<span class="k2">[</span>s<span class="k2">]</span>.size<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 247</span>        units<span class="k2">[</span>s<span class="k2">]</span><span class="k3">&lt;</span>i&gt;.Draw<span class="k2">(</span>buff<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 248</span>      
<span class="number"> 249</span>    <span class="k1">if</span><span class="k2">(</span>_mb<span class="k3">=</span><span class="k3">=</span><span class="n">1</span><span class="k2">)</span>
<span class="number"> 250</span>      <a href="http://www.allegro.cc/manual/circle" target="_blank"><span class="a">circle</span></a><span class="k2">(</span>buff,sel_cx,sel_cy,<span class="k1">int</span><span class="k2">(</span>sel_rad<span class="k2">)</span>,<span class="n">2</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 251</span>    
<span class="number"> 252</span>    <a href="http://www.allegro.cc/manual/vsync" target="_blank"><span class="a">vsync</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 253</span>    <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>buff,<a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>,<a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 254</span>
<span class="number"> 255</span>    t1 <span class="k3">=</span> timeGetTime<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 256</span>    <span class="k1">float</span> delta <span class="k3">=</span> <span class="k2">(</span>t1-t0<span class="k2">)</span><span class="k3">/</span><span class="n">1000</span>.f<span class="k2">;</span>
<span class="number"> 257</span>    t0<span class="k3">=</span>t1<span class="k2">;</span>
<span class="number"> 258</span>    
<span class="number"> 259</span>    think_mouse<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 260</span>
<span class="number"> 261</span>    <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> s<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>s<span class="k3">&lt;</span><span class="n">2</span><span class="k2">;</span>s<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 262</span>      <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>units<span class="k2">[</span>s<span class="k2">]</span>.size<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="number"> 263</span>        <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>units<span class="k2">[</span>s<span class="k2">]</span><span class="k3">&lt;</span>i&gt;.Think<span class="k2">(</span>delta<span class="k2">)</span><span class="k2">)</span>
<span class="number"> 264</span>        <span class="k2">{</span>
<span class="number"> 265</span>          units<span class="k2">[</span>s<span class="k2">]</span><span class="k3">&lt;</span>i&gt; <span class="k3">=</span> units<span class="k2">[</span>s<span class="k2">]</span><span class="k2">[</span>units<span class="k2">[</span>s<span class="k2">]</span>.size<span class="k2">(</span><span class="k2">)</span><span class="k3">-</span><span class="n">1</span><span class="k2">]</span><span class="k2">;</span>
<span class="number"> 266</span>          units<span class="k2">[</span>s<span class="k2">]</span>.erase<span class="k2">(</span>units<span class="k2">[</span>s<span class="k2">]</span>.end<span class="k2">(</span><span class="k2">)</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 267</span>          i--<span class="k2">;</span>
<span class="number"> 268</span>        <span class="k2">}</span>
<span class="number"> 269</span>
<span class="number"> 270</span>  <span class="k2">}</span>
<span class="number"> 271</span>
<span class="number"> 272</span>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 273</span><span class="k2">}</span>
<span class="number"> 274</span><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 03:18:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can&#39;t get any of the source codes to compile. <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /> I keep getting errors like &quot;textout_ex undeclared,&quot; or &quot;invalid conversion from int to float,&quot; and even &quot;confilcting definitions of BITMAP&quot;. More recent version of Allegro should fix the &#39;textout_ex&#39; error though.</p><p>Maybe attach some .exe files later?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 03:18:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Maybe attach some .exe files later?
</p></div></div><p>

I&#39;ll post the binary pack in my next post, whether CGames makes it or not.</p><div class="quote_container"><div class="title">KK said:</div><div class="quote"><p>

Done.
</p></div></div><p>

Late <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 03:21:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Baf doesn&#39;t seem to be available. I can email it to anyone who asks me... PM me, I guess.</p><p>Oh, I will also email the entry to cgamespla@mailinator.com. Go to <a href="http://mailinator.com">http://mailinator.com</a> and log into to cgamespla&#39;s mailbox. Not cgamesplay&#39;s, but cgamespla&#39;s.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 04 Sep 2006 03:21:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oops. Didn&#39;t get to test the final thing, so two changes: replace &#39;doline&#39; with &#39;do_line&#39;, and on line 98, change &#39;cointime&#39; to &#39;score&#39;. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 03:23:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;math.h&gt;</span></td></tr><tr><td class="number">2</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">3</td><td><span class="p">#include &lt;vector&gt;</span></td></tr><tr><td class="number">4</td><td>&#160;</td></tr><tr><td class="number">5</td><td><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span></td></tr><tr><td class="number">6</td><td>&#160;</td></tr><tr><td class="number">7</td><td><span class="k1">struct</span> Point</td></tr><tr><td class="number">8</td><td><span class="k2">{</span></td></tr><tr><td class="number">9</td><td>  <span class="k1">int</span> x, y<span class="k2">;</span></td></tr><tr><td class="number">10</td><td><span class="k2">}</span><span class="k2">;</span></td></tr><tr><td class="number">11</td><td>&#160;</td></tr><tr><td class="number">12</td><td><span class="k1">class</span> Mouse</td></tr><tr><td class="number">13</td><td><span class="k2">{</span></td></tr><tr><td class="number">14</td><td>  public: <span class="c">// Types</span></td></tr><tr><td class="number">15</td><td>    <span class="k1">static</span> <span class="k1">const</span> <span class="k1">int</span> spacing <span class="k3">=</span> <span class="n">8</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td>    <span class="k1">static</span> <span class="k1">const</span> <span class="k1">int</span> radius <span class="k3">=</span> <span class="n">4</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td>&#160;</td></tr><tr><td class="number">18</td><td>  public: <span class="c">// Public variables</span></td></tr><tr><td class="number">19</td><td>    <span class="k1">int</span> pressed_x, pressed_y<span class="k2">;</span></td></tr><tr><td class="number">20</td><td>    vector<span class="k3">&lt;</span>Point&gt; snake<span class="k2">;</span></td></tr><tr><td class="number">21</td><td>    <span class="k1">int</span> countdown<span class="k2">;</span></td></tr><tr><td class="number">22</td><td>    Point next<span class="k2">;</span></td></tr><tr><td class="number">23</td><td>    <span class="k1">int</span> score<span class="k2">;</span></td></tr><tr><td class="number">24</td><td>    <span class="k1">bool</span> dead<span class="k2">;</span></td></tr><tr><td class="number">25</td><td>&#160;</td></tr><tr><td class="number">26</td><td>  public: <span class="c">// Public functions</span></td></tr><tr><td class="number">27</td><td>    Mouse<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">28</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">29</td><td>      Restart<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">30</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">31</td><td>&#160;</td></tr><tr><td class="number">32</td><td>    <span class="k1">bool</span> Logic<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">33</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">34</td><td>      <span class="k1">bool</span> pressed <span class="k3">=</span> <span class="k3">!</span><span class="k2">(</span>pressed_x <span class="k3">=</span><span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">35</td><td>      <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>pressed<span class="k2">)</span></td></tr><tr><td class="number">36</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">37</td><td>        <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></td></tr><tr><td class="number">38</td><td>        <span class="k2">{</span></td></tr><tr><td class="number">39</td><td>          pressed_x <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a><span class="k2">;</span></td></tr><tr><td class="number">40</td><td>          pressed_y <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k2">;</span></td></tr><tr><td class="number">41</td><td>&#160;</td></tr><tr><td class="number">42</td><td>          <span class="k1">if</span><span class="k2">(</span>countdown <span class="k3">=</span><span class="k3">=</span> <span class="k3">-</span><span class="n">1</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k3">!</span>dead<span class="k2">)</span></td></tr><tr><td class="number">43</td><td>            countdown <span class="k3">=</span> <span class="n">15</span><span class="k2">;</span></td></tr><tr><td class="number">44</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">45</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">46</td><td>      <span class="k1">if</span><span class="k2">(</span>pressed<span class="k2">)</span></td></tr><tr><td class="number">47</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">48</td><td>        <span class="k1">if</span><span class="k2">(</span><span class="k3">!</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></td></tr><tr><td class="number">49</td><td>        <span class="k2">{</span></td></tr><tr><td class="number">50</td><td>          <span class="k1">if</span><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">&lt;</span> <span class="n">100</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> pressed_x <span class="k3">&lt;</span> <span class="n">100</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a> <span class="k3">&gt;</span> <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> pressed_y <span class="k3">&gt;</span> <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span><span class="k2">)</span></td></tr><tr><td class="number">51</td><td>            <span class="k1">return</span> <span class="k1">false</span><span class="k2">;</span></td></tr><tr><td class="number">52</td><td>          <span class="k1">if</span><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">&lt;</span> <span class="n">200</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> pressed_x <span class="k3">&lt;</span> <span class="n">200</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a> <span class="k3">&gt;</span> <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> pressed_y <span class="k3">&gt;</span> <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span><span class="k2">)</span></td></tr><tr><td class="number">53</td><td>          <span class="k2">{</span></td></tr><tr><td class="number">54</td><td>            Restart<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">55</td><td>          <span class="k2">}</span></td></tr><tr><td class="number">56</td><td>          pressed_x <span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">57</td><td>          pressed_y <span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">58</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">59</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">60</td><td>&#160;</td></tr><tr><td class="number">61</td><td>      <span class="k1">if</span><span class="k2">(</span>countdown <span class="k3">&gt;</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">62</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">63</td><td>        countdown--<span class="k2">;</span></td></tr><tr><td class="number">64</td><td>        <span class="k1">if</span><span class="k2">(</span>countdown <span class="k3">=</span><span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">)</span></td></tr><tr><td class="number">65</td><td>        <span class="k2">{</span></td></tr><tr><td class="number">66</td><td>          snake.push_back<span class="k2">(</span>next<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">67</td><td>          <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>Dead<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">68</td><td>          <span class="k2">{</span></td></tr><tr><td class="number">69</td><td>            countdown <span class="k3">=</span> <span class="n">15</span><span class="k2">;</span></td></tr><tr><td class="number">70</td><td>            score<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">71</td><td>          <span class="k2">}</span></td></tr><tr><td class="number">72</td><td>          <span class="k1">else</span></td></tr><tr><td class="number">73</td><td>            dead <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span></td></tr><tr><td class="number">74</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">75</td><td>        next.x <span class="k3">=</span> snake.back<span class="k2">(</span><span class="k2">)</span>.x<span class="k2">;</span></td></tr><tr><td class="number">76</td><td>        next.y <span class="k3">=</span> snake.back<span class="k2">(</span><span class="k2">)</span>.y<span class="k2">;</span></td></tr><tr><td class="number">77</td><td>        <span class="k1">double</span> angle <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_50.html" target="_blank">atan2</a><span class="k2">(</span><span class="k2">(</span><span class="k1">double</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> next.y, <a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a> <span class="k3">-</span> next.x<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">78</td><td>        next.x <span class="k3">+</span><span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_113.html" target="_blank">cos</a><span class="k2">(</span>angle<span class="k2">)</span> <span class="k3">*</span> spacing<span class="k2">;</span></td></tr><tr><td class="number">79</td><td>        next.y <span class="k3">+</span><span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_728.html" target="_blank">sin</a><span class="k2">(</span>angle<span class="k2">)</span> <span class="k3">*</span> spacing<span class="k2">;</span></td></tr><tr><td class="number">80</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">81</td><td>      <span class="k1">return</span> <span class="k1">true</span><span class="k2">;</span></td></tr><tr><td class="number">82</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">83</td><td>&#160;</td></tr><tr><td class="number">84</td><td>    <span class="k1">void</span> Draw<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span> buffer<span class="k2">)</span></td></tr><tr><td class="number">85</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">86</td><td>      <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>dead<span class="k2">)</span></td></tr><tr><td class="number">87</td><td>        <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">88</td><td>      <span class="k1">else</span></td></tr><tr><td class="number">89</td><td>        <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</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></td></tr><tr><td class="number">90</td><td>      <a href="http://www.allegro.cc/manual/hline" target="_blank"><span class="a">hline</span></a><span class="k2">(</span>buffer, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span>, <span class="n">200</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">91</td><td>      <a href="http://www.allegro.cc/manual/vline" target="_blank"><span class="a">vline</span></a><span class="k2">(</span>buffer, <span class="n">100</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">92</td><td>      <a href="http://www.allegro.cc/manual/textprintf_centre_ex" target="_blank"><span class="a">textprintf_centre_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">50</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Quit"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">93</td><td>      <a href="http://www.allegro.cc/manual/vline" target="_blank"><span class="a">vline</span></a><span class="k2">(</span>buffer, <span class="n">200</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">25</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">94</td><td>      <a href="http://www.allegro.cc/manual/textprintf_centre_ex" target="_blank"><span class="a">textprintf_centre_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">150</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Restart"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">95</td><td>      <a href="http://www.allegro.cc/manual/textprintf_right_ex" target="_blank"><span class="a">textprintf_right_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a> <span class="k3">-</span> <span class="n">6</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">-</span> <span class="n">14</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Score: %02d"</span>, score<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">96</td><td>&#160;</td></tr><tr><td class="number">97</td><td>      <span class="k1">for</span><span class="k2">(</span>vector<span class="k3">&lt;</span>Point&gt;::iterator i <span class="k3">=</span> snake.begin<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> i <span class="k3">!</span><span class="k3">=</span> snake.end<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span></td></tr><tr><td class="number">98</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">99</td><td>        <a href="http://www.allegro.cc/manual/circle" target="_blank"><span class="a">circle</span></a><span class="k2">(</span>buffer, i-&gt;x, i-&gt;y, radius, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">100</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">101</td><td>      <span class="k1">if</span><span class="k2">(</span>countdown <span class="k3">!</span><span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">)</span></td></tr><tr><td class="number">102</td><td>        <a href="http://www.allegro.cc/manual/circle" target="_blank"><span class="a">circle</span></a><span class="k2">(</span>buffer, next.x, next.y, radius, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">128</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">103</td><td>      <span class="k1">if</span><span class="k2">(</span>dead<span class="k2">)</span></td></tr><tr><td class="number">104</td><td>        <a href="http://www.allegro.cc/manual/textprintf_centre_ex" target="_blank"><span class="a">textprintf_centre_ex</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a> <span class="k3">/</span> <span class="n">2</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">/</span> <span class="n">2</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span>, <span class="k3">-</span><span class="n">1</span>, <span class="s">"Game over"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">105</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">106</td><td>&#160;</td></tr><tr><td class="number">107</td><td>    <span class="k1">bool</span> Dead<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">108</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">109</td><td>      <span class="k1">for</span><span class="k2">(</span>vector<span class="k3">&lt;</span>Point&gt;::iterator i <span class="k3">=</span> snake.begin<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> i <span class="k3">!</span><span class="k3">=</span> snake.end<span class="k2">(</span><span class="k2">)</span> <span class="k3">-</span> <span class="n">2</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span></td></tr><tr><td class="number">110</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">111</td><td>        <span class="k1">double</span> dist <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_738.html" target="_blank">sqrt</a><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_618.html" target="_blank">pow</a><span class="k2">(</span><span class="k2">(</span><span class="k1">double</span><span class="k2">)</span> i-&gt;x <span class="k3">-</span> next.x, <span class="n">2</span><span class="k2">)</span> <span class="k3">+</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_618.html" target="_blank">pow</a><span class="k2">(</span><span class="k2">(</span><span class="k1">double</span><span class="k2">)</span> i-&gt;y <span class="k3">-</span> next.y, <span class="n">2</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">112</td><td>        <span class="k1">if</span><span class="k2">(</span>dist <span class="k3">&lt;</span> <span class="n">2</span> <span class="k3">*</span> radius<span class="k2">)</span></td></tr><tr><td class="number">113</td><td>          <span class="k1">return</span> <span class="k1">true</span><span class="k2">;</span></td></tr><tr><td class="number">114</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">115</td><td>      <span class="k1">return</span> <span class="k1">false</span><span class="k2">;</span></td></tr><tr><td class="number">116</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">117</td><td>&#160;</td></tr><tr><td class="number">118</td><td>    <span class="k1">void</span> Restart<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">119</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">120</td><td>      pressed_x <span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">121</td><td>      pressed_y <span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">122</td><td>      countdown <span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">123</td><td>      score <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">124</td><td>      dead <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span></td></tr><tr><td class="number">125</td><td>      snake.clear<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">126</td><td>      Point p<span class="k2">;</span></td></tr><tr><td class="number">127</td><td>      p.y <span class="k3">=</span> <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">/</span> <span class="n">2</span><span class="k2">;</span></td></tr><tr><td class="number">128</td><td>      p.x <span class="k3">=</span> <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a> <span class="k3">/</span> <span class="n">2</span> <span class="k3">-</span> <span class="k2">(</span><span class="n">5</span> <span class="k3">*</span> spacing<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">129</td><td>      <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">5</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span></td></tr><tr><td class="number">130</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">131</td><td>        snake.push_back<span class="k2">(</span>p<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">132</td><td>        p.x <span class="k3">+</span><span class="k3">=</span> spacing<span class="k2">;</span></td></tr><tr><td class="number">133</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">134</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">135</td><td><span class="k2">}</span><span class="k2">;</span></td></tr><tr><td class="number">136</td><td>&#160;</td></tr><tr><td class="number">137</td><td><span class="k1">volatile</span> <span class="k1">int</span> tick <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">138</td><td>&#160;</td></tr><tr><td class="number">139</td><td><span class="k1">void</span> tock<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">140</td><td><span class="k2">{</span></td></tr><tr><td class="number">141</td><td>  <span class="k3">+</span><span class="k3">+</span>tick<span class="k2">;</span></td></tr><tr><td class="number">142</td><td><span class="k2">}</span></td></tr><tr><td class="number">143</td><td>&#160;</td></tr><tr><td class="number">144</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span><span class="k3">*</span> argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span></td></tr><tr><td class="number">145</td><td><span class="k2">{</span></td></tr><tr><td class="number">146</td><td>  <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">147</td><td>&#160;</td></tr><tr><td class="number">148</td><td>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">32</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">149</td><td>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">150</td><td>  </td></tr><tr><td class="number">151</td><td>  <a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">152</td><td>  <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">153</td><td>&#160;</td></tr><tr><td class="number">154</td><td>  <a href="http://www.allegro.cc/manual/install_int_ex" target="_blank"><span class="a">install_int_ex</span></a><span class="k2">(</span>tock, BPS_TO_TIMER<span class="k2">(</span><span class="n">30</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">155</td><td>&#160;</td></tr><tr><td class="number">156</td><td>  <span class="k1">bool</span> quit <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span></td></tr><tr><td class="number">157</td><td>  Mouse m<span class="k2">;</span></td></tr><tr><td class="number">158</td><td>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span> buffer <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">159</td><td>  <a href="http://www.allegro.cc/manual/show_mouse" target="_blank"><span class="a">show_mouse</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">160</td><td>&#160;</td></tr><tr><td class="number">161</td><td>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span>quit<span class="k2">)</span></td></tr><tr><td class="number">162</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">163</td><td>    <span class="k1">while</span><span class="k2">(</span>tick <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">164</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">165</td><td>      <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>m.Logic<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">166</td><td>        quit <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span></td></tr><tr><td class="number">167</td><td>      <span class="k3">-</span><span class="k3">-</span>tick<span class="k2">;</span></td></tr><tr><td class="number">168</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">169</td><td>    m.Draw<span class="k2">(</span>buffer<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">170</td><td>    <a href="http://www.allegro.cc/manual/scare_mouse" target="_blank"><span class="a">scare_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">171</td><td>    <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">172</td><td>    <a href="http://www.allegro.cc/manual/unscare_mouse" target="_blank"><span class="a">unscare_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">173</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">174</td><td>&#160;</td></tr><tr><td class="number">175</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>buffer<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">176</td><td>&#160;</td></tr><tr><td class="number">177</td><td>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">178</td><td><span class="k2">}</span></td></tr><tr><td class="number">179</td><td><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">180</td><td><span class="c">// The end</span></td></tr></tbody></table></div></div><p>

There is CGames&#39;s entry.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Mon, 04 Sep 2006 03:28:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Can&#39;t get any of the source codes to compile. <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /> I keep getting errors like &quot;textout_ex undeclared,&quot; or &quot;invalid conversion from int to float,&quot; and even &quot;confilcting definitions of BITMAP&quot;. More recent version of Allegro should fix the &#39;textout_ex&#39; error though.
</p></div></div><p>
As you&#39;ve said, textout_ex in newer Allegro version. &quot;invalid conversion&quot; is just a warning and you should be able to get rid of &quot;conflicting definitions of BITMAP&quot; by adding &quot;-DNOGDI&quot; to compiler parameters (it prevents &lt;windows.h&gt; from defining it&#39;s own BITMAP type). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
KK said:<br />Done.</p><p>Late <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />.
</p></div></div><p>
On time. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> The code you&#39;ve got in my post is a snapshot taken just before the compo ended. I&#39;ve spent additional time before posting it playing it a bit with different settings, so I could make the suggestion, but the code you&#39;ve got is pure compo version. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 03:30:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Off-topic:</p><div class="quote_container"><div class="title">Jakub Wasilewski said:</div><div class="quote"><p>
(...) without the gov (...)
</p></div></div><p>
Nice way to fool e-mail harvesters. <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 04 Sep 2006 03:30:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The binary package is attached.</p><p>Steven Silvey&#39;s code is patched with the change he mentioned to remove a bug.<br />My code is patched with the two-constant tweak I mentioned.<br />Kikaru&#39;s is corrected with the &quot;doline&quot;=&gt;&quot;do_line&quot; change.</p><p>The rest is left untouched. All exe&#39;s require alleg42.dll.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 03:39:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, now that I am not so worried about getting my entry up:</p><p>Click to start the game. The blue circle is where the next node will appear. Make the snake as long as possible without crossing itself. I had no time to experiment with different difficulties, but the magic number 15 in the code can be lowered to make the game harder. (countdown is 15 at the beginning of adding a node.</p><p>I had fun doing this one, finished with about a minute to spare, so I&#39;m happy that I did better than last time.</p><p>I&#39;m going out for a few hours now. If Jakub gets his binary pack together, I can play tonight, otherwise, probably not till Tuesday (when I am back at home).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 04 Sep 2006 03:44:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I need the alleg42.dll. Anyone have it handy?</p><p>All in all, the competition was fun! When is the next one?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 04:25:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc/files/attachment/590111">Here</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 04:28:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The next one will be after the judging for this one is over <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Just put them in your favorite order, from first to last.</p><p>Let me know what weekend would be best for everyone, and I can schedule another.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 04 Sep 2006 06:05:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow, some nice entries.  I&#39;d say either Jakub or Johnathan for my first vote.</p><p>@KK:  I couldn&#39;t get it to compile.  timeGetTime couldn&#39;t be found (linking error) and M_PI was undefined.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 04 Sep 2006 12:15:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Unfortunately, I could not attend. There was a really vehement thunderstorm, and I didn&#39;t want to push my luck, so I unplugged my PC.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Mon, 04 Sep 2006 15:49:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I couldn&#39;t get it to compile. timeGetTime couldn&#39;t be found (linking error) and M_PI was undefined.
</p></div></div><p>

For the first thing, link with the winmm lib (-lwinmm for MinGW), for the second, I don&#39;t know. Maybe try including &lt;cmath&gt; instead of &quot;math.h&quot;? It should be defined there. If that doesn&#39;t help, just add #define M_PI 3.141592 and be done with it <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 16:17:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
@KK: I couldn&#39;t get it to compile. timeGetTime couldn&#39;t be found (linking error) and M_PI was undefined.
</p></div></div><p>
M_PI should be defined in &lt;math.h&gt;, but if it isn&#39;t, you can define it yourself. timeGetTime() is Windows high-frequency timer, which declaration is in &lt;windows.h&gt; (included indirectly via &lt;winalleg.h&gt; (you may also have to pass &quot;-lwinmm&quot; linker option if it doesn&#39;t include this library by default). If you are running Linux, try compatibility timeGetTime() Linux replacement I&#39;ve posted together with my code. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 16:19:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Very well done everyone! 7 entires is not bad i think.</p><p>EDIT: fixed
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 18:09:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I got to play all of the games. Here are my notes:</p><p>Jakub: good game. No way to restart, and games are really short <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I could quit without the keyboard though.</p><p>Jonathan: very creative game. Hard to control the ball though. I can quit and restart without the keyboard <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>Kikaru: cool concept. The score display is broken, though, and there is no end-game screen, either.</p><p>Krzysztof: Neat idea. I don&#39;t really know how to win, and the game never seems to end, but it was cool. Also demonstrated the ability to make a strategy game in 1 hour. No way to quit or restart with the mouse.</p><p>Onewing: good game with some bugs. I eventually found a pocket I was invulnerable in <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> My score seemed to restart, too. No way to quit or restart using just the mouse.</p><p>Victor: fun game with nice graphics. For some reason, my ship diappeared in a flash of light. No way to quit or restart using the mouse.</p><p>I&#39;m not holding the quit/restart issues against anyone. Here is my ranking:</p><p>Krzysztof, Kikaru, CGamesPlay, Hedborg, Onewing, Jakub, Victor.</p><p>This was hard to rank. I like Krzy&#39;s the best, but the rest were all pretty close. I put Kikaru&#39;s second because it was a neat idea. Hedborg&#39;s had control issues, and was hard. Onewing&#39;s had some bugs. Jakub&#39;s was like impossible to play for long because I guess you have to shoot ammo to gain ammo <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> And Victor&#39;s was last, even though it had the best graphics, because there was no score or way to quit.</p><p>Good effort participants! I think I may want to switch to a quantitative judging system in future competitions. It was really hard to place my own entry <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>Another thing to note is what rules these entries also followed. For instance Krzy&#39;s and strategy. Just think about that before saying a rule is impossible. Okay, now I am out for the day. When I get back, I expect your ratings, guys. I will put up a winners page on the site, too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 04 Sep 2006 18:26:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Jonatan: You mean good, right?</p><p>Other than that, I can&#39;t wait for the next one (I hope it will be earlier than this, or on Saturday/Friday evening). Congratulations for those of who did manage to get something done!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Mon, 04 Sep 2006 18:29:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Uh yeah. Fixed. I have no idea why that said &quot;bad&quot; <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> I think it was suppose to be &quot;not bad&quot;</p><p>Also; Are you allowed to vote for your own game?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 18:39:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
For some reason, my ship diappeared in a flash of light.
</p></div></div><p>
The flash of light is an asteroid distorted by an overflow bug.</p><p>Oh, ih got the last place? <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 04 Sep 2006 18:50:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>kk, Victor Williams, Onewing, Jonatan Hedborg, CGamesPlay, Jakub Wasilewski.</p><p>KK: Your game was awesome! You should consider turning it into a full project.</p><p>CGamesPlay: It was good, maybe the most polished of them, but very slow, and a little boring.</p><p>Jakub: The reason I rank your game last is that the max score possible is 6, and after you fire 6 times you just wait until you die.</p><p>(the score display can be fixed by changing &quot;cointime&quot; to &quot;score&quot; on the textprintf. It was a testing thing, and I guess I hit &#39;undo&#39; after I fixed it.):P
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 19:03:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I will withdraw some internal points for using the keyboard.</p><p>From best to less best:<br />- Krzysztof Kluczek: Very ambitious. No way to win (or score) brings the score down a bit. A bit easy.</p><p>- Jakub: Very nice graphics and polish. Gets old kind of quick.</p><p>- Jonatan Hedborg: Well, cant really objectively comment this, but i think i did pretty well =) Perhaps i should have made the player-ball a tad faster. But then again, i like it this way - nice and difficult &gt;: )<br />Note: You cant quit prematurely - but it&#39;s not really a problem as you tend to die within a few seconds anyway <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>CGamesPlay: A neat puzzle-style game with a nice UI. No real challenge in the game however. I can imagine it takes quite some time to die from space-exhaustion.</p><p>Steven Silvey: A nice concept, and the graphics are quite good. The blocks seems to fall quite &quot;choppily&quot; however, and they don&#39;t seem to stack well all the time (some of them got stuck half-way down the screen). Not much interactivity is needed to stay alive for the first few minutes, then you need to keep alive for a while and after that you can just hide in a &quot;cave&quot; and never die. So it&#39;s a bit easy =)</p><p>Victor Williams: Beautiful, especially the background. No way to win or compare results. Quite easy as well. Works as a screen-saver after you die.</p><p>Kikaru: The graphics are flickering (might just be here) and you can&#39;t quit the game early. The score system seems broken.</p><p>I think we all did a very nice job with the games! Man did i feel the pressure at the end there <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> <br />One hour is not a lot of time.<br />Great job all!</p><p>EDIT:<br />Uhm, you reload the gun with the right mouse button in Jakub&#39;s game <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />Also, we need a better voting system.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 19:26:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For my game, I was finishing coding my enty, watching the on-site time limit, and typing a quick description all at the same time, during the last 2 min of the competition, and barely got it submitted. I did not install keybourd or use any mouse buttons, and didn&#39;t have time to code hotspots.<br />However, this was also the first program I ever wrote in under a week of casual programming and testing, so I think I did okay. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>I am going to make an update to it, showing what it was supposed to be.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 19:32:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh yes, don&#39;t be offended by my comments <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />Getting anything that runs in one hour is great.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 19:33:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Comments (ordered by name):<br />- CGamesPlay: Nice, a bit improved, Snake clone, although gameplay can get boring after a while (adding &quot;beans&quot; instead of continuous growth and increasing the speed could help a lot).</p><p>- Jakub: Well done and polished classic. It&#39;s sometimes physically impossible to survive some waves, but other than this, it&#39;s OK.</p><p>- Jonathan: Simple and playable, with some polish.</p><p>- Kikaru: The idea is simple, but after some improvements it can be quite nice tool for testing someone&#39;s reflex (eg. coin value could decrease over time). Too bad it just quits after time has passed.</p><p>- Steven: Simple idea, which works quite nice, but not without some problems (scores above 9999 are displayed incorrectly, blocks don&#39;t collide properly and sometimes stop and hover above the field). There is also a gameplay problem: once some boxes form a kind of &quot;roof&quot;, you can hide the mouse there and be completely safe (aligning boxes before dropping them should would solve this problem).</p><p>- Victor: Simple idea, but done nicely, but looking at the code makes me really doubt it all was written from scratch during 1 hour.</p><p>(on a second thought, I should probably have left all &quot;simple idea&quot; comments) <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>My vote goes as follows:<br />Jakub, Steven, Victor, Jonathan, CGamesPlay, Kikaru</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
No way to quit or restart with the mouse.
</p></div></div><p>
The game itself uses just the mouse. It&#39;s just exiting it that doesn&#39;t - other games sometimes even don&#39;t have this feature. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m not holding the quit/restart issues against anyone. Here is my ranking:</p><p>Krzysztof, Kikaru, CGamesPlay, Hedborg, Onewing, Jakub, Victor.
</p></div></div><p>
I find it strange you&#39;ve included yourself in the ranking. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I like Krzy&#39;s the best, but the rest were all pretty close.
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Your game was awesome! You should consider turning it into a full project.
</p></div></div><p>
Thanks! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /> (you can just call me KK)</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
- Krzysztof Kluczek: Very ambitious. No way to win (or score) brings the score down a bit. A bit easy.
</p></div></div><p>
You can destroy enemy &quot;hives&quot; with your units. Destroying all enemy activity in the zone while saving at least one &quot;hive&quot; can be considered complete victory. Destroying all enemy activity while loosing all own &quot;hives&quot; can be considered partial victory. Loosing own &quot;hives&quot; while allowing enemy &quot;hives&quot; to continue spawning is clear failure. I don&#39;t think achieving complete victory is too easy (it&#39;s doable, although it probably requires more luck than strategy). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 19:35:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>People who ranked my game last because of &quot;only 6 rounds of ammo&quot;, please do read the source file. There it is clearly on the top of the file - &quot;<b>press RMB to reload, each reload costs 200 points</b>&quot; or something like this <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />. Just in case you want to change your mind <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />.</p><p>Well, here is my order:</p><p>Jonatan, Krzysiek, Steven, Victor, CGamesPlay, Kikaru.</p><p>Jonatan - original concept, challenging controls, simple gameplay. Nice touch with the graphics, they look almost acceptable <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />. Most fun factor earns this entry a win.</p><p>Krzysiek - a strategy game in 1 hour is always impressive, even if as simple as that one. It&#39;s nicely executed, the display is clear, and it takes some skill to win (I was able to rescue 2 hives after a bit of practice, default settings). Pretty fun.</p><p>Steven - pretty complete, somewhat original. The bugs ruin it though, and there is ga gameplay flaw where you can find a closed pocket and wait there until your score... well, restarts from 0 <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.</p><p>Victor - well, pretty complete, though dull - at first it&#39;s nearly impossible to die, and then some sort of ray usually kills you without a chance of avoiding it.</p><p>CGamesPlay - somewhat original concept, though it actually doesn&#39;t turn out to be all that fun.</p><p>That&#39;s my take.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Mon, 04 Sep 2006 19:58:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the vote there =)</p><p>Also, feel free to remove my name from my own list. I just added it in there because CGP did.</p><p>KK: Oh yeah, i &quot;won&quot; it two out of three times, once with one surviving hive and once with two. It&#39;s quite fun (but would be more suitable as a &quot;real&quot; game. Please make it one <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />). I just meant that it would have been nice with a &quot;Yay, you crushed the enemy ants/xenomorphs/bees like a melon shot by a gun!&quot; screen.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 20:13:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Here is what my game was <i>supposed</i> to look like. Requires alleg40.dll. Not to be used for judging. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>[edit]<br />Jakub: game is ok, a little wierd though. My vote now goes:kk, Victor Williams, Onewing, Jonatan Hedborg, Jakub Wasilewski, CGamesPlay.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 04 Sep 2006 20:40:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">KK said:</div><div class="quote"><p>
I don&#39;t think achieving complete victory is too easy (it&#39;s doable, although it probably requires more luck than strategy). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>Hmm, when I tried out the game I always won.  Are you sure you didn&#39;t change something re the difficulty at the last minute?<br />(My strat was to cluster my guys at the hive they emerged from until I had lots and lots of guys, then take a small group from the side of each hive&#39;s cluster, and form a new, large cluster in the middle (but not in a stream of enemies), then send that new cluster to each enemy hive.  After you destroy, eg, the top enemy hive, you can send all the units defending your top hive to attack the middle hive.)</p><p>Anyway, great entries all around.  My favorite was Jonatan&#39;s <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Mon, 04 Sep 2006 21:35:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Hmm, when I tried out the game I always won. Are you sure you didn&#39;t change something re the difficulty at the last minute?<br />(My strat was to cluster my guys at the hive they emerged from until I had lots and lots of guys, then take a small group from the side of each hive&#39;s cluster, and form a new, large cluster in the middle (but not in a stream of enemies), then send that new cluster to each enemy hive. After you destroy, eg, the top enemy hive, you can send all the units defending your top hive to attack the middle hive.)
</p></div></div><p>
Thanks for this post! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /> It seems that I&#39;ve actually managed to create a game where strategy plays certain role. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT: You are right. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Your strategy works really well. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 21:44:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I agree. It&#39;s quite possible to play it in a good or a bad way. I managed to win it without loosing any hives just now. You need to make sure you have sufficent defense and attack them with a large force, then spread out your defenses a bit <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p><s>This is why you deserve to win.</s></p><p>Ahem. Yes. And vote for me! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>Thanks Zaphos =)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 21:49:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It seems that I&#39;ve actually managed to create a game where strategy plays certain role.
</p></div></div><p>You didn&#39;t know?  Neat -- emergent gameplay!</p><p>Maybe these competitions should have two vote categories; one for &quot;most fun&quot; and another for &quot;most interesting&quot;.  I could rank things quite a bit differently depending on how I weigh those two criteria, and it&#39;d be nice to encourage both solid gameplay and &#39;risky,&#39; unique designs <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>edit:  Just noticed this comment:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but looking at the code makes me really doubt it all was written from scratch during 1 hour.
</p></div></div><p>Victor said it <a href="http://allegro.cc/forums/thread/587326/611562#target">inherited a bunch of code from his speedhack entry</a>.  Perhaps the MinorHack rules should be clarified here -- it seems some of the contestants thought it was an &#39;all from scratch&#39; deal, and some thought code re-use was fine.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Mon, 04 Sep 2006 22:28:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Quote:<br />It seems that I&#39;ve actually managed to create a game where strategy plays certain role.</p><p>You didn&#39;t know? Neat -- emergent gameplay!
</p></div></div><p>
I knew that it&#39;s surely possible to do something stupid, but the strategy I was using all the time was just sending all my units to middle enemy base thinking that it should work better than AI splitting forces into three streams, but it heavily depended on luck whether my hives managed to survive, or not. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 04 Sep 2006 22:49:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I&#39;ve played them all now.  Here&#39;s my order of choice (me included):</p><p>Johnathan, Jakub, KK, Victor, Onewing, CGames, Kikaru.</p><p>The first three were hard to place, since I liked them all.  For those of you who gave Jakub a low score, play it again, and keep in mind that you reload with the right mouse button.  </p><p>For graphics, the award goes to Victor.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 04 Sep 2006 22:54:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My votes</p><p>Me - I just loved my game. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /> Just that f*cking ray overflow bug spoils it. <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" /> (I know, maybe my own vote just doesn&#39;t count, ok)<br />Jakub - Very creative, but a bit too hard.<br />Jonatan - Very creative.<br />KK - Nice idea, i liked it. Very original.<br />Onewing - Good, but not much fun.<br />Kikaru - I didn&#39;t understand your game.<br />CGamesPlay - The game should run faster to get some fun.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 04 Sep 2006 23:37:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s all the votes i think?<br />I think it&#39;s pretty reasonable to not be able to vote for yourself (pretty standard behaviour in competitions).</p><p>How are the scores calculated?<br />N-(placing-1)?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Mon, 04 Sep 2006 23:48:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For this one they are N-placing, since you can&#39;t vote for yourself.</p><p>By the way I am back at a proper resolution now <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 00:16:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Speaking of judging, I think we should use the Borda method of voting. First place gets n points, second gets n - 1, ... last gets 0 points.
</p></div></div><p>
OK, I&#39;ve summed it up, considering this rule. Actually, in my version the last place gets 1 point, but it gives exactly the same ranking (every entrant gets exactly 6 points more). I&#39;ve removed selfvotes from the lists to make it fair (voting for self-made games will never be truly unbiased). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>The votes I&#39;ve gathered look like this: (in order of voting)
</p><div class="source-code snippet"><div class="inner"><pre><span class="k3">*</span> points:  <span class="n">6</span>  <span class="n">5</span>  <span class="n">4</span>  <span class="n">3</span>  <span class="n">2</span>  <span class="n">1</span>
CGamesPlay:   KK  Kikaru  Jonatan  Onewing  Jakub  Victor
Jonatan:  KK  Jakub  CGames  Onewing  Victor  Kikaru
Krzysztof:  Jakub  Onewing  Victor  Jonatan  CGames  Kikaru
Jakub:    Jonatan  KK  Onewing  Victor  CGames  Kikaru
Kikaru:    KK  Victor  Onewing  Jonatan  Jakub  CGames
Onewing:  Jonatan  Jakub  KK  Victor  CGames  Kikaru
Victor:    Jakub  Jonatan  KK  Onewing  Kikaru  CGames
</pre></div></div><p>

And the results are:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k3">*</span> results:
Krzysztof:  <span class="n">6</span> <span class="n">6</span> <span class="n">5</span> <span class="n">6</span> <span class="n">4</span> <span class="n">4</span> <span class="k3">=</span> <span class="n">31</span>
Jonatan:  <span class="n">4</span> <span class="n">3</span> <span class="n">6</span> <span class="n">3</span> <span class="n">6</span> <span class="n">5</span> <span class="k3">=</span> <span class="n">27</span>
Jakub:    <span class="n">2</span> <span class="n">5</span> <span class="n">6</span> <span class="n">2</span> <span class="n">5</span> <span class="n">6</span> <span class="k3">=</span> <span class="n">26</span>
Onewing:  <span class="n">3</span> <span class="n">3</span> <span class="n">5</span> <span class="n">4</span> <span class="n">4</span> <span class="n">3</span> <span class="k3">=</span> <span class="n">22</span>
Victor:    <span class="n">1</span> <span class="n">2</span> <span class="n">4</span> <span class="n">3</span> <span class="n">5</span> <span class="n">3</span> <span class="k3">=</span> <span class="n">18</span>
CGamesPlay:   <span class="n">4</span> <span class="n">2</span> <span class="n">2</span> <span class="n">1</span> <span class="n">2</span> <span class="n">1</span> <span class="k3">=</span> <span class="n">12</span>
Kikaru:    <span class="n">5</span> <span class="n">1</span> <span class="n">1</span> <span class="n">1</span> <span class="n">1</span> <span class="n">2</span> <span class="k3">=</span> <span class="n">11</span>
</pre></div></div><p>


Congratulations for all entrants. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 05 Sep 2006 00:17:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Congratulations KK!<br />Also, hooray! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>Great job everyone.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 00:22:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Great effort! After re-playing Jakub&#39;s entry, I want to put it above Jonathan&#39;s, which affects the results... Up to you guys whether or not you want to accept this new ranking or not:</p><p>KK, Kikaru, Jakub, Jonathan, Onewing, Victor.</p><p>Okay, on the topic of this competition&#39;s future:</p><p>I will be adding a winner&#39;s page ASAP, and may also contact Mr. Leverton about getting Allegro.cc&#39;s SSO on the site, and allowing uploads. I&#39;m thinking the following:</p><p>Allow entries to be uploaded for the hour after the competition. The entry will be timestamped. Then the user can enter a description of his game, any notes, etc, as well as a new version of the game. The first version will be used for judging, but the later ones can be displayed just for posterity&#39;s sake. There will also be a page displaying the number of medals each person has received.</p><p>I like Zaphos&#39; idea of two categories of games. Please, offer your opinions on what the grading system should be ideally.</p><p>Code reuse: In my opinion, code reuse is fine. I wrote my game from scratch. I think code reuse should be allowed, but stated with the entry. Again, offer opinions.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 00:35:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think we should make MinorHack a weekly competition. After all, it&#39;s quite automated already, and with the necessary addition of SSO and uploads it will be even more so. With the addition of online voting it could in theory run weekly without any supervision.</p><p>And I like it so much I would probably participate every week <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />. This time around the bonus rule wasn&#39;t too good, at least in my opinion - it was very unrestricting, but also didn&#39;t offer any clues as to what game to develop (anything can use only the mouse). I made my decision in about 15 seconds, and it was the first thing that popped up in my mind when thinking of simple mouse-only games. There was no time to wait for the second thing to pop up <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.</p><p>On the topic of code reuse, well... After consideration, I&#39;m going to be against. One hour is hardcore, and it is supposed to be hardcore. Disallowing code reuse allows to keep it that way. Of course, I&#39;m against disqualifying people for reusing a 3-line function generating a random number, but reusing larger parts of code should be prohibited or at least discouraged.</p><p>As for the revised votes, use whichever set you feel expresses your opinion better. Of course, I&#39;m not impartial (I would benefit from the change) so I&#39;d better shut up. As far as I&#39;m concerned, Jonatan deserves the second place as much as I do <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Tue, 05 Sep 2006 01:13:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What I am planning right now is the ability to set a &quot;I want to be in any competition of x people or more&quot;. Then anyone can add a competition time to the list, and anyone can say &quot;I want to be in that one&quot;. Once there are enough people who will participate, the competition is scheduled.</p><p>If I have time and interest, I will also add voting on rules, to completely automate everything.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As for the revised votes, use whichever set you feel expresses your opinion better.
</p></div></div><p>Well, I feel the the second one does, of course. When I put the votes into the site I will use that set, then.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
On the topic of code reuse, well... After consideration, I&#39;m going to be against. One hour is hardcore, and it is supposed to be hardcore. Disallowing code reuse allows to keep it that way. Of course, I&#39;m against disqualifying people for reusing a 3-line function generating a random number, but reusing larger parts of code should be prohibited or at least discouraged.
</p></div></div><p>Unless anyone else disagrees, I guess I will make it a no-no, with something like &quot;The code should all be original. Please write as much of the entry as possible during the hour without copying from other projects. You are allowed to copy, but try to limit the amount. 10 lines is a good guideline.&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 01:32:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Meh. That&#39;s a shame. But i guess you deservered it as well.</p><p>next time, let&#39;s make votes final so i dont get my hopes up <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 01:42:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
next time, let&#39;s make votes final so i dont get my hopes up <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div></div><p>Yeah, sorry to disappoint <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> I hope you aren&#39;t too mad at me for my attempt to participate even though I was out of town and didn&#39;t have internet <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Well, you have incentive to participate next time then <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 01:43:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I like Zaphos&#39; idea of two categories of games. Please, offer your opinions on what the grading system should be ideally.
</p></div></div><p>
I think the way it is now is OK. You can add extra categories as long as there is &quot;overall&quot; category, but having too much categories for 1 hour compo sounds a bit crazy. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Code reuse: In my opinion, code reuse is fine. I wrote my game from scratch. I think code reuse should be allowed, but stated with the entry. Again, offer opinions.
</p></div></div><p>
I think I&#39;m against code reuse here. Reasons:<br />- Code reuse is fine for 24h/48h/72h compos, where you often spend 6-10h rewriting stuff you&#39;ve coded before, but here you are unlikely to spend more than 15 minutes on it.<br />- Code reuse makes judging much harder.<br />- Allegro requires seconds to get it running, so frameworks aren&#39;t really needed here.<br />- Writing from scratch boosts creativity (no temptation to use ready routines), especially in case of 1 hour compo (all you risk is 1 hour of coding and bad place in the ranking).</p><p>Of course you still can prepare for the compo by thinking about possible bonus rules or learning new techniques (eg. random map generation or texture generation). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
his time around the bonus rule wasn&#39;t too good, at least in my opinion - it was very unrestricting, but also didn&#39;t offer any clues as to what game to develop (anything can use only the mouse). I made my decision in about 15 seconds, and it was the first thing that popped up in my mind when thinking of simple mouse-only games. There was no time to wait for the second thing to pop up <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div></div><p>
Well, this was the problem for me. I&#39;ve decided to make simple RTS quite quickly, but I haven&#39;t idea on how gameplay should work until much later, so for some time I wasn&#39;t completely sure what I&#39;m coding. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 05 Sep 2006 01:44:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The only code I reused was my init function which handles some basic stuff.  Everything else, all 300 lines of it, were coded from scratch.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 05 Sep 2006 01:47:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>A few more things that i think would be good:<br />Enable upload and voting through the page. Or at least voting.<br />&quot;Open voting&quot; affects results.<br />Maybe this is a way; When you enter the contest, a one-use code is generated which you use to vote with.</p><p>Also, the amount of tweaking after the time limit should be limited. <br />To none.<br />This contest is quite hardcore and you have to plan your time well. This includes testing and gameplay tweaking and making sure it compiles. At least IMO.</p><p>And code re-use should be more or less forbidden.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 01:54:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So it seems more people prefer completely from scratch than using any external code. So be it <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>As far as timing goes, I&#39;m thinking you have until T+1:10 to upload your entry. You then have forever to submit future versions of it or change the notes. Voting should be completed by T+3 hours (2 hours of voting).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 02:00:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Maybe this is a way; When you enter the contest, a one-use code is generated which you use to vote with.
</p></div></div><p>
Database and user accounts will solve this problem much better. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Also, the amount of tweaking after the time limit should be limited.<br />To none.<br />This contest is quite hardcore and you have to plan your time well. This includes testing and gameplay tweaking and making sure it compiles. At least i think it should be like that. IMO naturally =)
</p></div></div><p>
Of course everything what is submitted should be created during the compo, but some extra time for uploading would be nice as long as everybody is fair. Of course one hour is probably too much - 5-10 minutes should be fine. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You then have forever to submit future versions of it or change the notes. Voting should be completed by T+3 hours (2 hours of voting).
</p></div></div><p>
2 hours for voting may be not enough in some cases (it comes to compiling, you never know when). Windows binary package will solve this problem, at least for me, bot not for Linux people for sure. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 05 Sep 2006 02:01:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m thinking you have until T+1:10 to upload your entry. You then have forever to submit future versions of it or change the notes.
</p></div></div><p>

is that one hour and ten minutes to upload?<br />Uhm, so it&#39;s a two hour compo then?</p><p>And the future versions, should they be used in the voting? Because then we might as well call it a 4 hour compo.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 02:05:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
is that one hour and ten minutes to upload?<br />Uhm, so it&#39;s a two hour compo then?
</p></div></div><p>
T = starting time of the compo <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And the future versions, should they be used in the voting?
</p></div></div><p>
No, for sure. They can be only used for having fun. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 05 Sep 2006 02:07:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>About code reuse: I&#39;m not against reuse nor against prohibiting that. However prohibiting it is hard, because there is no way to prove that the code was not reused from somewhere, except if the rules are so twisted that it makes almost impossible to reuse something, but in this case one hour wouldn&#39;t be enough.</p><p>About the frequency: Every week would be too much. People are attracted by uncommon things, if it is too frequent, few people will be interested. (Imagine if speedhack was weekly. Would we get so many entrants so dedicated to make the game? Probably not).<br />I think that every three weeks is good.</p><p>And we could make things a bit different alternating 1-hour, 2-hour and 3-hour minorhacks. Eg: Today&#39;s minorhack is one-hour length, the next minorhack will be two-hours, the subsequently minorhack is three-hours. The next one is one-hour again.</p><p>Edit: Four-hours and six-hours compos also comes in mind.<br />Edit2: typo
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Tue, 05 Sep 2006 02:17:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
2 hours for voting may be not enough in some cases (it comes to compiling, you never know when).
</p></div></div><p>How long do you suggest? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>[append]</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
However prohibiting it is hard, because there is no way to prove that the code was not reused from somewhere, except if the rules are so twisted that it makes almost impossible to reuse something, but in this case one hour wouldn&#39;t be enough.
</p></div></div><p>Right, it is hard, so I&#39;m not out to stop it. I am saying &quot;please don&#39;t&quot;. This competition is all about honesty in the first place. The bonus rule is to prohibit cheating, even though it is very vague and doesn&#39;t really stop it.</p><p>Also, with the peer scheduling idea, it will be scheduled as often as people want it to be <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 02:19:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
How long do you suggest?
</p></div></div><p>

My suggestion: 48 hours after the binaries have been uploaded. It would be enough to everyone test every entry in calm without delaying real-life problems.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Tue, 05 Sep 2006 02:22:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I would sugest different times, so people from other time zones will be able to participate as well. I would have loved to take part, but programming a game in the middle of a night was no good idea because I had to go to work the next day :/<br />But that&#39;s a problem of a 1h compo you can&#39;t easily solve, because there will always be someone in some timezone who would have to code 1h in the middle of the night. :/
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Lenman)</author>
		<pubDate>Tue, 05 Sep 2006 02:27:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>See my append, above.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
My suggestion: 48 hours after the binaries have been uploaded. It would be enough to everyone test every entry in calm without delaying real-life problems.
</p></div></div><p>No way. The most I might be convinced of is 24 hours after the competition starts.</p><p>[append]</p><p>Lenman: With the competition voting hopefully in place after the next competition, you will be able to have them whenever you want <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> In the mean time, let me know what times (GMT) would be good for you.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 02:28:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
The most I might be convinced of is 24 hours after the competition starts.
</p></div></div><p>

So let it be. 24 hours is good enough for one hour compo. But if we got some three to six hours compos, i think 48 hours would be better because the games would tend to be more complex.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Tue, 05 Sep 2006 02:35:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Imagine if speedhack was weekly. Would we get so many entrants so dedicated to make the game? Probably not
</p></div></div><p>

That&#39;s an altogether different thing:</p><p>- Speedhack requires you to have time for most of the 72 hours straight. While taking 1 hour out of your weekend is something that can almost always easily be done, having a whole weekend of free time is much harder.<br />- Speedhack is a taxing competition if you go all out. I remember that after my first (and only) Speedhack I was mentally exhausted for 2 days or so, and didn&#39;t do anything except reading and watching TV.</p><p>MinorHack is a one-off competition. You just sit down and make some stuff, and after an hour you&#39;re free to go. You aren&#39;t tired, and you don&#39;t have to re-work your work schedule to save some time for it.</p><p>I still think we could make it a weekly occurence, though the peer scheduling could also yield good results, if tweaked properly.</p><p>I&#39;d also say we move it a few hours back. 18:00 GMT on a Saturday seems to be good for most of the participants. Europe is mostly GMT or GMT+1, and USA IIRC GMT-6 and something around that, so that would allow everyone from those continents to participate. Japan and Australia will be left out though, but it&#39;s impossible to avoid with all the different timezones...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Tue, 05 Sep 2006 02:40:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How long do you suggest? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>
24 hours for voting should be fine. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The bonus rule is to prohibit cheating, even though it is very vague and doesn&#39;t really stop it.
</p></div></div><p>
I thought the bonus rule is for fun. The compo would be really boring without it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 05 Sep 2006 02:53:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Jakubs suggestion (18:00 GMT) sounds pretty good to me! Also, the idea of having it on a saturday is much better than a sunday, because Monday is a day where most people have to work, while Sunday will be free to the majority of people.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Lenman)</author>
		<pubDate>Tue, 05 Sep 2006 02:53:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I thought the bonus rule is for fun. The compo would be really boring without it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>The meaning of the rule really has shifted to make it fun, but the original intent was to make the game harder to create ahead of time.</p><p>[append]</p><p>Well, I&#39;ve imported all of the entries into the database, which can&#39;t be browsed. <s>61</s> 67 KB of source code. Wow!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 03:20:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I agree with Saturday. I go to church on Sunday, and don&#39;t get back until 1:30 sometimes(EST). Maybe make it every two weeks?</p><p>User acounts could work, just store a username and password. Then, make the &#39;submit&#39; and &#39;vote&#39; pages member-only.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Tue, 05 Sep 2006 05:29:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
User acounts could work, just store a username and password. Then, the &#39;submit&#39; and &#39;vote&#39; pages member-only. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>No, it will log on using your Allegro.cc account.</p><p>[append]</p><p>How about September 16th at 1800 GMT?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 05:37:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sounds good to me <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT: is something broken? I can&#39;t seem to access page 1 of this thread without changing the URL
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 12:45:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
EDIT: is something broken? I can&#39;t seem to access page 1 of this thread without changing the URL
</p></div></div><p>
That&#39;s how the forums are constructed. This was brought up before, but it seems that ML is fine with it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>btw. CGamesPlay: You probably should sig compo site. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 05 Sep 2006 13:07:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
That&#39;s how the forums are constructed. This was brought up before, but it seems that ML is fine with it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>The pager on the compact header bar works fine for me...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
btw. CGamesPlay: You probably should sig compo site. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>I&#39;ll add it to the TODO <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 05 Sep 2006 15:52:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Also, if someone is intrested, here is the slightly improved version of my entry =)<br />I have (i think) improved the controlls and increased the difficulty slightly (its easier to make the yellow ball go where you want, but the grey ball is more dangerous now)</p><p>compile with gcc -O3 minorHack.c -o minorHack -lalleg</p><p>My highscore is 54.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 18:57:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, I&#39;ve got 73 with the new version on my first try... overall, I liked the original compo version better. It&#39;s just not so fun when your ball simply goes where you want it to go <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />. The previous version required more skill and was more fun because of that, in my opinion.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Tue, 05 Sep 2006 22:15:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>73 eh? Wallhack <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" /></p><p>Well, i got complaints that the game was to hard to controll before.<br />Perhaps i&#39;ll just keep the grey ball&#39;s movement and make the yellow one a bit more like before.</p><p>EDIT: yeah, perhaps you are right. Too easy now. I got 70 on the very next try.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 05 Sep 2006 22:52:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>16th works, that would be 1:00 EST... Sounds good! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Wed, 06 Sep 2006 03:00:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Kikaru said:</div><div class="quote"><p>
16th works, that would be 1:00 EST... Sounds good! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>
It&#39;s ok for me too. Although I&#39;m not sure if i will have some free time to participate.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Wed, 06 Sep 2006 04:16:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just one week till next MinorHack! Hey, I got a cool idea: You could keep an archive of the MinorHack winners. For the first one, you would put in KK and his strategy game. Then, you would just have a page to show all the winning entries, in the order the competitions were held.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 09 Sep 2006 06:07:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://cgamesplay.com/minorhack/competitions/past">http://cgamesplay.com/minorhack/competitions/past</a></p><p>Still in development, don&#39;t bother telling me what doesn&#39;t work.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 09 Sep 2006 10:13:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was thinking a bit about code re-use -- I&#39;m fine with the hack being opposed to code re-use, but it might be nice if it provided a template of general starter code that is &#39;okay&#39; to use -- nothing game related, just the window setup and a standard logic loop.  Writing that code for the 20th time just gets annoying.</p><p>I&#39;m thinking something like this:
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td><span class="k1">bool</span> quitnow <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span></td></tr><tr><td class="number">4</td><td><span class="k1">void</span> Close<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">5</td><td>    quitnow <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span></td></tr><tr><td class="number">6</td><td><span class="k2">}</span></td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td><span class="k1">int</span> logic_time <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">9</td><td><span class="k1">void</span> logic_timer<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">10</td><td><span class="k2">{</span></td></tr><tr><td class="number">11</td><td>  logic_time<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">12</td><td><span class="k2">}</span></td></tr><tr><td class="number">13</td><td><a href="http://www.allegro.cc/manual/END_OF_FUNCTION" target="_blank"><span class="a">END_OF_FUNCTION</span></a><span class="k2">(</span>logic_timer<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>&#160;</td></tr><tr><td class="number">15</td><td><span class="c">// initialize systems!</span></td></tr><tr><td class="number">16</td><td><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span> Init<span class="k2">(</span><span class="k1">int</span> w, <span class="k1">int</span> h, <span class="k1">const</span> <span class="k1">char</span> <span class="k3">*</span>title<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">17</td><td>    <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td>    <a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">19</td><td>    <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">20</td><td>    <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">21</td><td>&#160;</td></tr><tr><td class="number">22</td><td>    <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">16</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">23</td><td>    <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, w, h, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">24</td><td>        <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">15</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">25</td><td>        <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, w, h, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span><span class="k2">{</span></td></tr><tr><td class="number">26</td><td>            <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Couldn't set graphics mode!"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">27</td><td>            <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">28</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">29</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">30</td><td>&#160;</td></tr><tr><td class="number">31</td><td>    <a href="http://www.allegro.cc/manual/LOCK_VARIABLE" target="_blank"><span class="a">LOCK_VARIABLE</span></a><span class="k2">(</span>logic_time<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">32</td><td>    <a href="http://www.allegro.cc/manual/LOCK_FUNCTION" target="_blank"><span class="a">LOCK_FUNCTION</span></a><span class="k2">(</span>logic_timer<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">33</td><td>    <a href="http://www.allegro.cc/manual/install_int_ex" target="_blank"><span class="a">install_int_ex</span></a><span class="k2">(</span>logic_timer, BPS_TO_TIMER<span class="k2">(</span><span class="n">60</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>&#160;</td></tr><tr><td class="number">35</td><td>    <a href="http://www.allegro.cc/manual/set_close_button_callback" target="_blank"><span class="a">set_close_button_callback</span></a><span class="k2">(</span>Close<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>    <a href="http://www.allegro.cc/manual/set_window_title" target="_blank"><span class="a">set_window_title</span></a><span class="k2">(</span>title<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">38</td><td>&#160;</td></tr><tr><td class="number">39</td><td>    <span class="k1">return</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span>w, h<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">40</td><td><span class="k2">}</span></td></tr><tr><td class="number">41</td><td>    </td></tr><tr><td class="number">42</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">43</td><td>&#160;</td></tr><tr><td class="number">44</td><td>    <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buffer <span class="k3">=</span> Init<span class="k2">(</span><span class="n">640</span>,<span class="n">480</span>, <span class="s">"minorhack"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">45</td><td>    <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span>buffer<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">46</td><td>        <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Couldn't create back buffer"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">47</td><td>        <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">48</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">49</td><td>    </td></tr><tr><td class="number">50</td><td>    </td></tr><tr><td class="number">51</td><td>    <span class="k1">while</span> <span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/key" target="_blank"><span class="a">key</span></a><span class="k2">[</span>KEY_ESC<span class="k2">]</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k3">!</span>quitnow<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">52</td><td>        </td></tr><tr><td class="number">53</td><td>        <span class="k1">while</span> <span class="k2">(</span>logic_time <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">54</td><td>            <span class="c">// game goes here</span></td></tr><tr><td class="number">55</td><td>            logic_time--<span class="k2">;</span></td></tr><tr><td class="number">56</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">57</td><td>        </td></tr><tr><td class="number">58</td><td>        <span class="c">// drawing goes here</span></td></tr><tr><td class="number">59</td><td>        <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">60</td><td>        <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">61</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">62</td><td><span class="k2">}</span> <a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span></td></tr></tbody></table></div></div><p>

I&#39;d think that roughly that amount of code would be convenient without violating the spirit of the thing.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sat, 09 Sep 2006 11:11:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I can agree with that. Though one in pure C would be nice as well (not that i usualy use C, but i currently take a course at uni so i try to use it for practice (like in last minorHack))
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Sat, 09 Sep 2006 13:35:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Zaphos: If you leave out error checking, 15-bit fall back, closing callback and timers (use timeGetTime()/gettimeofday()) you don&#39;t really need much time do create the framework. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 09 Sep 2006 14:32:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Whatever code base you agree upon, I will put it up.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 09 Sep 2006 17:37:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>As I&#39;ve said, no code base would be best when it comes to keeping the spirit of the compo. I&#39;m OK with compatibility includes (like the one I&#39;ve used during this compo) emulating certain Windows/Linux-specific functions on the other system, but IMHO the game should be written from scratch on at least one platform.</p><p>Here is the &quot;base code&quot; I&#39;ve used for the compo. Retyping it takes almost no thinking and just about 3 minutes of coding, which is really small price for the fact that you can state that your game is 100% coded during one hour. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;stdio.h&gt;</span></td></tr><tr><td class="number">2</td><td><span class="p">#include &lt;stdlib.h&gt;</span></td></tr><tr><td class="number">3</td><td><span class="p">#include &lt;string.h&gt;</span></td></tr><tr><td class="number">4</td><td><span class="p">#include &lt;math.h&gt;</span></td></tr><tr><td class="number">5</td><td><span class="p">#include &lt;time.h&gt;</span></td></tr><tr><td class="number">6</td><td>&#160;</td></tr><tr><td class="number">7</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">8</td><td><span class="p">#include "winalleg.h"</span></td></tr><tr><td class="number">9</td><td>&#160;</td></tr><tr><td class="number">10</td><td><span class="p">#include &lt;vector&gt;</span></td></tr><tr><td class="number">11</td><td><span class="p">#include &lt;string&gt;</span></td></tr><tr><td class="number">12</td><td><span class="p">#include &lt;algorithm&gt;</span></td></tr><tr><td class="number">13</td><td><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span></td></tr><tr><td class="number">14</td><td>&#160;</td></tr><tr><td class="number">15</td><td>&#160;</td></tr><tr><td class="number">16</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">17</td><td><span class="k2">{</span></td></tr><tr><td class="number">18</td><td>  <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">19</td><td>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">20</td><td>  <a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">21</td><td>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED,<span class="n">640</span>,<span class="n">480</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">22</td><td>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buff <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>,<a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">23</td><td>&#160;</td></tr><tr><td class="number">24</td><td>  <span class="k1">unsigned</span> <span class="k1">long</span> <span class="k1">long</span> t0,t1<span class="k2">;</span></td></tr><tr><td class="number">25</td><td>  t0 <span class="k3">=</span> timeGetTime<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">26</td><td>  <span class="k1">while</span><span class="k2">(</span><span class="n">1</span><span class="k2">)</span></td></tr><tr><td class="number">27</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">28</td><td>    clear<span class="k2">(</span>buff<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>    <span class="c">// rendering</span></td></tr><tr><td class="number">30</td><td>    <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>buff,<a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>,<a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">31</td><td>&#160;</td></tr><tr><td class="number">32</td><td>    t1 <span class="k3">=</span> timeGetTime<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">33</td><td>    <span class="k1">float</span> delta <span class="k3">=</span> <span class="k2">(</span>t1-t0<span class="k2">)</span><span class="k3">/</span><span class="n">1000</span>.f<span class="k2">;</span></td></tr><tr><td class="number">34</td><td>    t0<span class="k3">=</span>t1<span class="k2">;</span></td></tr><tr><td class="number">35</td><td>&#160;</td></tr><tr><td class="number">36</td><td>    <span class="c">// logic</span></td></tr><tr><td class="number">37</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">38</td><td>&#160;</td></tr><tr><td class="number">39</td><td>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">40</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 09 Sep 2006 18:00:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Though one in pure C would be nice as well
</p></div></div><p>That one compiles in gcc -- I&#39;m not sure what I&#39;d have to do to make it pure C?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If you leave out error checking, 15-bit fall back, closing callback and timers (use timeGetTime()/gettimeofday()) you don&#39;t really need much time do create the framework.
</p></div></div><p>But I want error checking, programs that work, programs that close nicely, and programs that use a portable timer.  And I wouldn&#39;t want to worry about the idiosyncrasies of a delta timing system in an hour-long hack ...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Retyping it takes almost no thinking and just about 3 minutes of coding, which is really small price for the fact that you can state that your game is 100% coded during one hour.
</p></div></div><p>Is retyping from memory any different from a stupid version of copy-paste?  Personally I get no pride from that at all.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sat, 09 Sep 2006 21:05:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Woops. I was suppose to participate last sunday! <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /><br />I completely forgot about it, was very busy. I&#39;ll try and participate this sunday <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Derezo)</author>
		<pubDate>Sat, 09 Sep 2006 21:12:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The next one is Saturday <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 09 Sep 2006 21:31:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I agree, a simple code base to initialize allegro in the main loop, include allegro, and standard C/C++ libraries would be nice.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 09 Sep 2006 23:26:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
That one compiles in gcc
</p></div></div><p>
C and C++ both compile with gcc. Hell, even Pascal and FORTRAN compile with gcc if it&#39;s been configured for those languages.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m not sure what I&#39;d have to do to make it pure C?
</p></div></div><p>
Not use C++&#39;s standard bool type.</p><p>Since I&#39;m not planning on joining any programming competition anytime soon the following is probably not very useful, but the only game template I&#39;d consider using is my own, because that corresponds to my coding style and way of thinking...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 10 Sep 2006 00:28:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Since I&#39;m not planning on joining any programming competition anytime soon the following is probably not very useful, but the only game template I&#39;d consider using is my own, because that corresponds to my coding style and way of thinking...
</p></div></div><p>Right, which is why the kit is optional. It&#39;s designed for those who are still learning how to do what it does.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 10 Sep 2006 00:45:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, so here&#39;s mine again, c89 style:
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td><span class="k1">int</span> quitnow <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">4</td><td><span class="k1">void</span> close_callback<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">5</td><td>    quitnow <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">6</td><td><span class="k2">}</span></td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td><span class="k1">int</span> logic_time <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">9</td><td><span class="k1">void</span> logic_timer<span class="k2">(</span><span class="k2">)</span></td></tr><tr><td class="number">10</td><td><span class="k2">{</span></td></tr><tr><td class="number">11</td><td>  logic_time<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">12</td><td><span class="k2">}</span></td></tr><tr><td class="number">13</td><td><a href="http://www.allegro.cc/manual/END_OF_FUNCTION" target="_blank"><span class="a">END_OF_FUNCTION</span></a><span class="k2">(</span>logic_timer<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>&#160;</td></tr><tr><td class="number">15</td><td><span class="c">/* initialize systems! */</span></td></tr><tr><td class="number">16</td><td><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span> init<span class="k2">(</span><span class="k1">int</span> w, <span class="k1">int</span> h, <span class="k1">const</span> <span class="k1">char</span> <span class="k3">*</span>title<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">17</td><td>    <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td>    <a href="http://www.allegro.cc/manual/install_mouse" target="_blank"><span class="a">install_mouse</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">19</td><td>    <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">20</td><td>    <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">21</td><td>&#160;</td></tr><tr><td class="number">22</td><td>    <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">16</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">23</td><td>    <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, w, h, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">24</td><td>        <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">15</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">25</td><td>        <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, w, h, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span><span class="k2">{</span></td></tr><tr><td class="number">26</td><td>            <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Couldn't set graphics mode!"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">27</td><td>            <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">28</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">29</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">30</td><td>&#160;</td></tr><tr><td class="number">31</td><td>    <a href="http://www.allegro.cc/manual/LOCK_VARIABLE" target="_blank"><span class="a">LOCK_VARIABLE</span></a><span class="k2">(</span>logic_time<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">32</td><td>    <a href="http://www.allegro.cc/manual/LOCK_FUNCTION" target="_blank"><span class="a">LOCK_FUNCTION</span></a><span class="k2">(</span>logic_timer<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">33</td><td>    <a href="http://www.allegro.cc/manual/install_int_ex" target="_blank"><span class="a">install_int_ex</span></a><span class="k2">(</span>logic_timer, BPS_TO_TIMER<span class="k2">(</span><span class="n">60</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>&#160;</td></tr><tr><td class="number">35</td><td>    <a href="http://www.allegro.cc/manual/set_close_button_callback" target="_blank"><span class="a">set_close_button_callback</span></a><span class="k2">(</span>close_callback<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>    <a href="http://www.allegro.cc/manual/set_window_title" target="_blank"><span class="a">set_window_title</span></a><span class="k2">(</span>title<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">38</td><td>&#160;</td></tr><tr><td class="number">39</td><td>    <span class="k1">return</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span>w, h<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">40</td><td><span class="k2">}</span></td></tr><tr><td class="number">41</td><td>    </td></tr><tr><td class="number">42</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">43</td><td>&#160;</td></tr><tr><td class="number">44</td><td>    <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>buffer <span class="k3">=</span> init<span class="k2">(</span><span class="n">640</span>,<span class="n">480</span>, <span class="s">"minorhack"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">45</td><td>    <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span>buffer<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">46</td><td>        <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Couldn't create back buffer"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">47</td><td>        <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="k3">-</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">48</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">49</td><td>    </td></tr><tr><td class="number">50</td><td>    </td></tr><tr><td class="number">51</td><td>    <span class="k1">while</span> <span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/key" target="_blank"><span class="a">key</span></a><span class="k2">[</span>KEY_ESC<span class="k2">]</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k3">!</span>quitnow<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">52</td><td>        <span class="k1">while</span> <span class="k2">(</span>logic_time <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">53</td><td>            <span class="c">/* game goes here */</span></td></tr><tr><td class="number">54</td><td>            logic_time--<span class="k2">;</span></td></tr><tr><td class="number">55</td><td>        <span class="k2">}</span></td></tr><tr><td class="number">56</td><td>        </td></tr><tr><td class="number">57</td><td>        <span class="c">/* drawing goes here */</span></td></tr><tr><td class="number">58</td><td>        <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">59</td><td>        <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span>buffer, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">60</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">61</td><td>    </td></tr><tr><td class="number">62</td><td>    <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">63</td><td><span class="k2">}</span> <a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span></td></tr></tbody></table></div></div><p>

</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
the only game template I&#39;d consider using is my own, because that corresponds to my coding style and way of thinking...
</p></div></div><p>Perhaps the competition could say &quot;using a custom template which accomplishes nothing significantly more or different from the provided template is also fine.&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 10 Sep 2006 01:15:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But I want error checking, programs that work, programs that close nicely, and programs that use a portable timer. And I wouldn&#39;t want to worry about the idiosyncrasies of a delta timing system in an hour-long hack ...
</p></div></div><p>
I haven&#39;t got Allegro get_gfx_mode error since I&#39;ve moved away from my 486DX4 and switched from DOSt to using Windows 98 as a main platforms. For me pressing &quot;Esc&quot; counts as closing nicely for sure and timeGetTime() is portable timer if you use my gettimeofday replacement version. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> As for timing, I&#39;d use Allegro timers, but delta-timing is much easier for me and using timeGetTime() takes less code than using Allegro timers. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 10 Sep 2006 01:39:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I had my basic code completed in under 5 minutes (+3 for the entity system I often use here and there) and I honestly think that retyping the same old stuff is only to your advantage. Your hands have something to do, while your brain can concentrate on how to tackle the important parts of the game <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.</p><p>I already expressed my position about code reuse, so I will only do a short recap... I believe the &quot;clean slate&quot; approach provides much more feeling of achievement, and I honestly recommend this style, it&#39;s worth it in my opinion. On the other hand, if you feel like using a framework, I won&#39;t hold that against you or your entry. It&#39;s just another approach, and who am I to tell you what&#39;s fun for <i>you</i>?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but delta-timing is much easier for me and using timeGetTime() takes less code than using Allegro timers
</p></div></div><p>

With my previous entry, I somehow thought that using allegro timers will be faster to code, but it wasn&#39;t exactly the case. I&#39;ll go with what I&#39;m used to (DT) in the next one, with the added benefit that it&#39;ll run smoother <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Sun, 10 Sep 2006 05:18:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>About code re-use for initialization only, that was exactly what i reused in my asteroid game (from Rambanana). That was just code to detect joystick, keyboard and mouse, setting up sound and MIDI, defining graphic modes (32, 24, 16, 15 and 8 bits, fullscreen and windowed), LOCK_VARIABLE, LOCK_FUNCTION, etc.</p><p>It&#39;s a few messed up. Maybe i should modularize it better to make it look better and avoid the code overbloat (I.E: Sound and joystick code, which had no use in my game).</p><p>I think it&#39;s very annoying and repetitive retype this whole thing again and again and again. It&#39;s very easier copy and paste it in your code and work all the 60 minutes for what really matter: develop the game.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 11 Sep 2006 22:07:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
for what really matter: develop the game.
</p></div></div><p>MinorHack isn&#39;t about developing a game <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /> It&#39;s about developing a game in 1 hour <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I think I will put up both a C and a C++ template sometime this week. It will set a graphics mode, install a keyboard, mouse, and timer at 30 BPS, and set up a double buffer. That should be enough to get people off to a good start without giving them too much of an advantage. Objections?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 11 Sep 2006 22:12:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I think I will put up both a C and a C++ template sometime this week.
</p></div></div><p>

As long as it&#39;s optional.  I don&#39;t think there&#39;s anything wrong with having initialization code and a very generic framework laid out beforehand.  I have my code that, although slightly bloated, works well for me.  It consists of an init function (setting up allegro, keyboard, joysticks, etc.), a game init function (for setting up game variables), a play_game function (runs the main loop), a game_update function (for doing all the update functions) and a game_draw function (for handling all the drawing functions).</p><p>With this simple layout, all I have to worry about is making the game.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 11 Sep 2006 22:35:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
It&#39;s about developing a game in 1 hour
</p></div></div><p>
</p><div class="quote_container"><div class="title">I said:</div><div class="quote"><p>
work all the <b>60 minutes</b> for what really matter: develop the game.
</p></div></div><p><img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 11 Sep 2006 23:13:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No, you miss the point. The idea of Minorhack isn&#39;t to have a high-quality game that you can show off to friends. It&#39;s to have a low-quality game that you can show off to your friends and say &quot;yeah, I did this entirely in 1 hour&quot;.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Retyping it takes almost no thinking and just about 3 minutes of coding, which is really small price for the fact that you can state that your game is 100% coded during one hour.
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 11 Sep 2006 23:16:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
<b>Copying and Pasting</b> takes no thinking and just about <b>30 seconds</b>, which is really small price for the fact that you can state that your game is <b>97%</b> coded during one hour.
</p></div></div><p>
Fixed.;D
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 11 Sep 2006 23:21:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Right, right. That&#39;s why we are allowing using templates. To each his own.</p><p>On a side note, I just got clearance for the Allegro.cc authentication, so I will be adding that in in just a few hours. I am also conviniently leaving work early.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 11 Sep 2006 23:25:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Right, right. That&#39;s why we are allowing using templates. To each his own.
</p></div></div><p>
Heh, I&#39;m just giving you a hard time.  Whatever format you choose, we shall abide to (or not do entirely).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 11 Sep 2006 23:36:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
The idea of Minorhack isn&#39;t to have a high-quality game that you can show off to friends.
</p></div></div><p>

Of course. Actually, Chuck Norris is the only person that is capable of doing a high-quality game in one hour. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><div class="quote_container"><div class="title">CGamesPlay said:</div><div class="quote"><p>
It&#39;s to have a low-quality game that you can show off to your friends and say &quot;yeah, I did this entirely in 1 hour&quot;.
</p></div></div><p>

Or maybe &quot;I did this entirely in 1 hour after copying and pasting this code&quot;.:P
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 11 Sep 2006 23:47:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
<b>Copying Quake 3 source code</b> takes <b>absolutely</b> no thinking and just about <b>5 seconds</b>, which is really small price for the fact that you can state that your game is <b>0%</b> coded during one hour.
</p></div></div><p>
Fixed the fix. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Anyway, do whatever you enjoy, I&#39;ll be starting from scratch to get 100% one hour coded game. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 12 Sep 2006 00:13:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Anyway, do whatever you enjoy, I&#39;ll be starting from scratch to get 100% one hour coded game.
</p></div></div><p>

We should get a &quot;100% natural product, no artificial ingredients&quot; sticker for our games <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Tue, 12 Sep 2006 04:25:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
We should get a &quot;100% natural product, no artificial ingredients&quot; sticker for our games <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div></div><p>
And in our case &quot;Teraz Polska&quot; would accompany it nicely (especially considering our last MinorHack results). <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Tue, 12 Sep 2006 05:31:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>my girlfriend (she&#39;s polish) is laughing at me because i got beaten by two polish guys <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Tue, 12 Sep 2006 05:32:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Being beaten by two Poles is most certainly not a pleasant experience, I imagine. Nevertheless, I will risk that beating to participate in the next MicroHack, assuming some unfortunate event does not arise during its hour.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (relpatseht)</author>
		<pubDate>Tue, 12 Sep 2006 06:13:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
my girlfriend (she&#39;s polish) is laughing at me because i got beaten by two polish guys
</p></div></div><p>

Well, tell her that at least you have beaten both of us to her, and that&#39;s probably more of an achievement <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.<br />And honestly, I think the only way to get &#39;beaten&#39; in this competition is if you do not finish and get beaten by your own weaknesses. And after all, I still would rate your entry above mine (if I had to rate mine).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Being beaten by two Poles is most certainly not a pleasant experience, I imagine.
</p></div></div><p>

I&#39;m wondering, how is it any worse than being beaten by two other random guys? Honestly, I&#39;m curious.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Tue, 12 Sep 2006 17:51:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Honestly, I&#39;m curious.
</p></div></div><p>It was a pun.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Tue, 12 Sep 2006 20:02:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think the rule for the next competition should be &quot;How many Poles does it take to change a light bulb?&quot;</p><p>[append]<br />This is my first 200-reply thread.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Tue, 12 Sep 2006 22:59:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Two. Krzysztof figures out how to render it with PS 3.0, and I change it <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This is my first 200-reply thread.
</p></div></div><p>

If you keep the competitions coming, you&#39;ll overtake ChristmasHack&#39;s thread pretty soon <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Tue, 12 Sep 2006 23:02:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If you keep the competitions coming, you&#39;ll overtake ChristmasHack&#39;s thread pretty soon .
</p></div></div><p>
Ooooh, which reminds me, are you going to be hosting the ChristmasHack again this year, Jakub?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Wed, 13 Sep 2006 00:05:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I got confirmation from Matthew about using Allegro.cc&#39;s user database, so one can now log on to the site. This doesn&#39;t actually allow you to do anything yet though. Unfortunately, time zone info is not provided by the Allegro.cc code, so one will still have to set it at the site separately. I&#39;ve asked Matthew to add that information, but I doubt he will have time to add it before this Saturday.</p><p>[append]</p><p>I had to deny the rule about fixed colors, because it was too general. It&#39;s an interesting modification of the two- and three-color rules, though. I say that if one of those rules pops up and you only used exactly 2 or 3 colors on screen at any time, you could give a good argument.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 13 Sep 2006 01:09:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
are you going to be hosting the ChristmasHack again this year, Jakub?
</p></div></div><p>

For sure, I think the previous one was something of a success (especially considering it was announced, IIRC, some three days before it started <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />) and am looking forward to this year&#39;s. There will be some changes, but the basic formula will stay the same.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Wed, 13 Sep 2006 02:29:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
For sure
</p></div></div><p>
Hack yeah!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Wed, 13 Sep 2006 03:04:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yarr!</p><p><a href="http://cgamesplay.com/minorhack/">http://cgamesplay.com/minorhack/</a></p><p>Now you can log in, and navigate to your entry page (see <a href="http://cgamesplay.com/minorhack/competitions/1">http://cgamesplay.com/minorhack/competitions/1</a>), and from there upload notes and a revised version (the edit link is at the bottom of the entry page).</p><p>I will eventually be allowing HTML to the notes section, but until then you can&#39;t use it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 14 Sep 2006 07:46:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I won&#39;t be able to participate in this minorHack D:<br />At least it&#39;s very unlikley.</p><p>Next time for sure =)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonatan Hedborg)</author>
		<pubDate>Thu, 14 Sep 2006 14:06:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Jonatan Hedborg said:</div><div class="quote"><p>
I won&#39;t be able to participate in this minorHack
</p></div></div><p>

I&#39;m out too. Too much work to do in real life, too short deadlines.<br />Good luck for you all.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Thu, 14 Sep 2006 18:23:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So who all will be participating?</p><p>I&#39;m still in...</p><p>/me makes mental not to add &quot;intent to participate&quot; feature.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Thu, 14 Sep 2006 19:26:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I should be able to.  I reserve Saturdays for coding on my projects and playing games.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Thu, 14 Sep 2006 21:58:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m pretty sure I&#39;m in too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Thu, 14 Sep 2006 22:41: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 won&#39;t be able to participate in this minorHack D:<br />At least it&#39;s very unlikley.</p><p>Next time for sure =)
</p></div></div><p>

Hey, man, come on <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />. Don&#39;t you want to be the nasty Poles? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I&#39;m in, of course, unless something unexpected happens.</p><p>I checked out the new site and I found one annoying thing - every downloadable source file is called entry.cpp, which has two drawbacks:</p><p>1) If you put them in one dir, you have to rename them by hand, and more importantly<br />2) All the files have a CPP extension, and compilers automatically assume C++ mode - while some entries are actually in pure C and won&#39;t compile as C++ (due to C++ being more strict about stuff).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Fri, 15 Sep 2006 01:11:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Right. Eventually I will add the option to upload C or C++, and it will remember that. I can also make it use the participant&#39;s name, but that might not be filename-friendly (Victor longname).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 15 Sep 2006 02:55:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I can also make it use the participant&#39;s name, but that might not be filename-friendly (Victor longname).
</p></div></div><p>I suppose you could do something like [first five chars of name]_[member number]_[minihack number].[user specified extension] ...<br />Nice job with the site, anyway!</p><p>I&#39;ll probably compete in this next hack.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 15 Sep 2006 03:06:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MinorHack tommorrow (today?). Hurray! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 05:17:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>/me needs to code the file upload tonight &gt;_&lt;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 05:24:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m just wondering, is the competition on 18:00 or 19:00 (UTC)? It seems like it&#39;s on 19:00 according to <a href="http://cgamesplay.com/minorhack/competitions/3">this page</a>. That, and does login work? It doesn&#39;t seem to do anything.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Sat, 16 Sep 2006 12:11:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You were right, but it is fixed.</p><p><a href="http://www.allegro.cc/account/login/http://cgamesplay.com/minorhack/login/admin/info">click here</a>, set your time zone properly, and profit <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> Time zone is in the format of either &quot;EDT&quot; etc, or &quot;America/New_York&quot;, etc.</p><p>The site is the final say on when the competition is, and it says 6 p.m. UTC, which is 1800. I guess I should also code in support for locales.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 15:49:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nice login system <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>Is there a submit entry page yet?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 18:46:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If I say &quot;almost&quot;, will you be confident? <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" /></p><p>The login system is really Mathew&#39;s doing <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 18:55:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, does it use auto login cookies or something?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 19:14:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No, as you can see from that link, it&#39;s actually a link to Allegro.cc, with data that says where to go back to after the user successfully logs in. Since you were already logged in, it didn&#39;t ask you to again. You have to get permission from Matthew in order to use the system on your site. Also when you return to the site you take an ID Allegro.cc gave you and give it to me. I use that ID to get an XML-formatted version of your profile (I don&#39;t get any private information). I can use that to add your entry to my local database.</p><p>Unfortunately I don&#39;t get timezone info (I don&#39;t know whether Matthew considers this private or just didn&#39;t consider adding it, he hasn&#39;t yet responded to my request), so you have to set that manually. Email isn&#39;t used yet, eventually it will be for notifying you of competitions you want to participate in.</p><p>[append]<br />Be careful when setting your time zone. You need to pick on that is DST-aware. relpatseht, I&#39;m looking at you. I recommend America/New_York...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 19:19:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh. Neat. I thought it might just use the cookies left over from auto-login or something.</p><p><s>[EDIT]
is &quot;EST&quot; a supported timezone?</s></p><p>Why in the world is there a 10:15 competition in the same day as the 1:00?!? <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 19:23:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The extra competition was me testing the file upload code. I don&#39;t believe in test environments.</p><p>Anyways, it all works now, with language selection. Of course, you can&#39;t change the language without re-uploading your entry, but I don&#39;t know how in the world that could be a problem.</p><p>Files are named by member number, as that was the easiest to code.</p><p>I still don&#39;t have a good judging scheme, though. Any ideas?</p><p>I vote for a ranking of everyone else&#39;s entry in first to last order in each of the categories interesting and quality. For example:</p><p>Interesting: Kikaru, Onewing, Jakub<br />Quality: Onewing, Kikaru, Jakub</p><p>There will be two winners, one for each category.</p><p>Does everyone agree, or propose an alternative?</p><p>[append]<br />Also tell me entry numbers that should be changed to C lanuage.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 20:38:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Does everyone agree, or propose an alternative?
</p></div></div><p>
There should be some kind of Overall category, so we can have clear winner of the compo, even if results in other categories differ. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 16 Sep 2006 20:40:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was thinking the primary winner would be the Quality field, with &quot;Interesting&quot; sort of being a consolidation prize (if someone doesn&#39;t win both!)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 20:41:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I was thinking the primary winner would be the Quality field, with &quot;Interesting&quot; sort of being a consolidation prize (if someone doesn&#39;t win both!)
</p></div></div><p>
Then make category name suggest that. Even low quality games can win in overall ranking as long as they are fun to play. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 16 Sep 2006 20:58:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just noticed that it says on the site next competition is in <b>two hours</b>. According to my clock, it should be in one hour.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 20:59:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>According to GMT clock and compo starting time on the site, it should just have started (it&#39;s 16:00 GMT now). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 16 Sep 2006 21:01:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>On-Site clock says 1 hr 55-58 min left.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 21:02:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think dividing the vote into categories is overcomplicating stuff. The rules are simple, the games are simple, and the voting should also be simple. Otherwise we will end up with Oscar-like setup with &quot;best character drawn with only squares&quot;, &quot;best story&quot;, &quot;best controls&quot;, &quot;best red mean-eyed enemy&quot; and &quot;best golf game with badgers&quot;.</p><p>Okay, enough exaggeration... I think that one rating is good enough.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Sat, 16 Sep 2006 21:03:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This is a list of the competitions that are currently scheduled to run. Times are in the time zone GMT . Click on the current competition for a countdown timer.</p><p>    * September 16th at 4:00 pm
</p></div></div><p>
Considering this and <a href="http://wwp.greenwichmeantime.com/">GMT time</a>, competition should be running just now. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Okay, enough exaggeration... I think that one rating is good enough.
</p></div></div><p>
Seconded.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 16 Sep 2006 21:04:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This is a list of the competitions that are currently scheduled to run. Times are in the time zone UTC. Click on the current competition for a countdown timer.</p><p>September 16th at 6:00 pm
</p></div></div><p>

That&#39;s what mine says. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>[EDIT]<br />When switched to GMT time, nothing changes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 21:06:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Okay, enough exaggeration... I think that one rating is good enough.
</p></div></div><p>So be it then <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I ranking, using the same scoring method as last competition.</p><p>As far as the system time goes... 6 p.m. EST is 1800 GMT. This is the time that it has been scheduled at for the past week <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /> The countdown on the site agrees with itself, which is all that is important AFAIC.</p><p>[append]</p><p>Krzysztof: You have &quot;GMT +2&quot;, which is getting cut off by the php timezone output. <a href="http://us2.php.net/manual/en/timezones.php">Time zones</a>. Those are underscores, not spaces. (I would have linked to this earlier but php.net has been down)</p><p>I wish I had a better time zone selector, but until you write me one, you gotta use that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 21:44:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I worked out that the MinorHack is at <b>2:00 EST</b>, even though the site says 1:00 EST.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 21:49:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>EST is not in Daylight Savings Time, like America/New_York is. See what I said to relpatseht. You could manually set it to EDT also. See my append above.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 21:51:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh. OK. &quot;The MinorHack is approaching.&quot; <b>reloads gun</b>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 22:21:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, the Allegro binaries on the Allegro.cc files section don&#39;t work for MSVC 8. Just thought you should know <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>[append]<br />The 7.1 binaries appear to work with MSVC 8 though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 22:30:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, so I haven&#39;t read this thread in a while.  Someone want to sum it up for me?  Anything new I should know about the competition starting in seven minutes?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sat, 16 Sep 2006 22:54:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nope!</p><p>We will grade using the same system as last time. The web site has log in support but the time zone selector sucks. The web site also has an entry upload form, as well as the ability to manage your old entries (add new revisions, etc). Let me know if you need a certain entry to be listed as C, as they are all C++ right now and you can&#39;t change it through the web.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 16 Sep 2006 22:56:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Sat, 16 Sep 2006 22:56:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>that&#39;ll do!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sat, 16 Sep 2006 22:59:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Seems I&#39;m dropping out this time. What I did wrong:</p><p>- I had an image of the game I want to do before the competition rule was announced, which wasn&#39;t very smart<br />- Because it was an idea I thought for a while about, it was too elaborate to fit in the one-hour timeframe, and changing the idea to fit the rule wasn&#39;t too easy</p><p>All in all, I tried to do too much in too little time and failed miserably. I don&#39;t think the game would do well even if I did finish it, though, as it wasn&#39;t anything ground-breaking and didn&#39;t even prove to be all that fun. Well, good luck to fellow contestants <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jakub Wasilewski)</author>
		<pubDate>Sat, 16 Sep 2006 23:49:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m finished! Hurray! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>Entry uploaded to the site. I attached my source here as well.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sat, 16 Sep 2006 23:59:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[[edit]  Ooops, guess I needed to upload the entry to the site, eh?[/edit]  <br />
<br />
Ok, now to actually play my game.  :o<br />
<br />
[code]<br />
// Entry for MinorHack at September 16th, at 6:00 UTC<br />
// Submitted by Onewing<br />
// Compile with allegro!<br />
#include &quot;allegro.h&quot;<br />
#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
<br />
/**************** DEFINES &amp; MACROS *************/<br />
#define BPP 32<br />
#define MODE GFX_AUTODETECT_WINDOWED<br />
#define GFX_W 640<br />
#define GFX_H 480<br />
#define MAX_BLOCKS 1000<br />
<br />
/*************** CONSTANTS ********************/<br />
#define MASK makecol(255,0,255)<br />
<br />
/*************** GLOBAL ********************/<br />
volatile int system_time;<br />
volatile int ticks;<br />
volatile int framerate;<br />
volatile int draw_ticks;<br />
PALETTE pal;<br />
COLOR_MAP trans_table;<br />
BITMAP *buffer;<br />
BITMAP *bText;<br />
int iTimer_Speed;<br />
int iFrameRate;<br />
int quit;<br />
int over;<br />
<br />
#define MAX_SLOGANS 10<br />
#define MAX_CARDS MAX_SLOGANS * 2<br />
char cText[MAX_SLOGANS][2][100];<br />
int iText[MAX_SLOGANS][2];<br />
int cards_showing;<br />
int card_timer;<br />
int score;<br />
int intensity;<br />
int gfx_timer;<br />
bool up;<br />
<br />
void timer1(void)<br />
{<br />
	system_time++;			<br />
}END_OF_FUNCTION(timer1);<br />
<br />
void frametimer(void)<br />
{<br />
	framerate = draw_ticks;<br />
	draw_ticks = 0;<br />
}END_OF_FUNCTION(frametimer);<br />
<br />
<br />
<br />
void init()<br />
{<br />
	//  Allegro Library<br />
	if(allegro_init() != 0)<br />
	{<br />
		allegro_message(&quot;ERROR:  Failed to initialize allegro library.  Terminating program.\n&quot;);<br />
		allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
		exit(0);<br />
	}<br />
<br />
	<br />
	set_color_depth(BPP) ; // 24 bit colour	<br />
	if (set_gfx_mode(MODE, GFX_W, GFX_H, 0, 0)&lt;0)<br />
	{<br />
		set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);<br />
		allegro_message(&quot;ERROR:  Failure to init video mode!  Terminating program.\n&quot;);<br />
		allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
		exit(0);<br />
	}<br />
	<br />
<br />
	//  Install Timer<br />
	if(install_timer() != 0)<br />
	{<br />
		set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);<br />
		allegro_message(&quot;ERROR:  Failed to install timer.  Terminating program.\n&quot;);<br />
		allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
		exit(0);<br />
	}<br />
	<br />
<br />
<br />
	//  Install Keyboard	<br />
	if(install_keyboard() != 0)<br />
	{<br />
		set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);<br />
		allegro_message(&quot;ERROR:  Failed to install keyboard.  Terminating program.\n&quot;);<br />
		allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
		exit(0);<br />
	}	<br />
<br />
	/*install_joystick(JOY_TYPE_AUTODETECT);<br />
	poll_joystick();<br />
	if(num_joysticks == 0)<br />
	{<br />
		allegro_message(&quot;NOTE:  No joystick could be found, but you can still use keyboard.&quot;);<br />
	}<br />
	startpos = joy[0].stick[0].axis[0].pos;*/<br />
<br />
<br />
	//  Install Mouse<br />
	if(install_mouse() &lt; 0)<br />
	{<br />
		set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);<br />
		allegro_message(&quot;ERROR:  Failed to install mouse.  Terminating program.\n&quot;);<br />
		allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
		exit(0);<br />
	}<br />
	<br />
	text_mode(MASK);	<br />
	reserve_voices(32,-1); ///Reserves more channels of sound for us<br />
	<br />
	//  Install Sound<br />
	if(install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL) != 0)	<br />
	{<br />
		allegro_message(&quot;ERROR:  Failure to install sound.  Attempting to run without sound.\n&quot;);<br />
		allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
		if(install_sound(DIGI_NONE, MIDI_NONE, NULL) != 0)<br />
		{<br />
			allegro_message(&quot;ERROR:  Failed to install sound.  Terminating program.\n&quot;);<br />
			allegro_message(&quot;REPORT:  %s\n&quot;, allegro_error);<br />
			exit(0);<br />
		}		<br />
	}<br />
		<br />
	srand( (unsigned) time(NULL));<br />
	<br />
	// Install Time Handler<br />
	LOCK_VARIABLE(system_time);<br />
	LOCK_VARIABLE(ticks);<br />
	LOCK_VARIABLE(framerate);<br />
	LOCK_VARIABLE(draw_ticks);<br />
	LOCK_FUNCTION(timer1);<br />
	LOCK_FUNCTION(frametimer);<br />
	iTimer_Speed = 60;<br />
	install_int_ex(timer1, BPS_TO_TIMER(iTimer_Speed));<br />
	install_int_ex(frametimer, BPS_TO_TIMER(1));<br />
	//install_int(timer1, 1000);<br />
	<br />
	// Setup the buffer<br />
	buffer = create_bitmap(GFX_W, GFX_H);<br />
	bText = create_bitmap(GFX_W, GFX_H);<br />
<br />
	// Setup translucent table<br />
	create_trans_table(&amp;trans_table, pal, 0, 0, 0, NULL);	<br />
	color_map = &amp;trans_table;	<br />
}<br />
<br />
//**************** Classes ***********************<br />
class CARD<br />
{<br />
public:<br />
	int x,y;	<br />
	int w,h;<br />
	int iValue;<br />
	int iType;<br />
	bool lock;<br />
	bool show_text;<br />
<br />
	CARD();<br />
	~CARD();<br />
<br />
	void update();<br />
	void draw(BITMAP *bDisplay);<br />
	void init();<br />
	void flip();<br />
<br />
	void pick_slogan();<br />
};<br />
<br />
CARD::CARD()<br />
{<br />
	init();<br />
}<br />
<br />
CARD::~CARD()<br />
{<br />
}<br />
<br />
void CARD::update()<br />
{<br />
	if(mouse_x &gt; x &amp;&amp; mouse_x &lt; x + w &amp;&amp;<br />
		mouse_y &gt; y &amp;&amp; mouse_y &lt; y + h &amp;&amp;<br />
		mouse_b &amp; 1 &amp;&amp; !lock)<br />
		flip();<br />
}<br />
<br />
void CARD::flip()<br />
{<br />
	show_text = true;<br />
	cards_showing++;<br />
	lock = true;<br />
	score++;<br />
<br />
	if(cards_showing &gt;= 2)<br />
		card_timer = ticks;<br />
}<br />
<br />
void CARD::draw(BITMAP *bDisplay)<br />
{<br />
	if(!show_text)<br />
	{<br />
		rectfill(bDisplay, x, y, x+w, y+h, makecol(200,0,0));<br />
		rect(bDisplay, x, y, x+w, y+h, makecol(255,0,0));<br />
		rect(bDisplay, x+1, y+1, x+w-1, y+h-1, makecol(225,0,0));<br />
	}<br />
	else<br />
		textprintf_centre(bText, font, x+(w/2), y + (h/2), makecol(255,255,255), cText[iValue][iType]);<br />
}<br />
<br />
void CARD::pick_slogan()<br />
{<br />
	int x = rand() % MAX_SLOGANS;<br />
	int y = rand() % 2;<br />
<br />
	while(iText[x][y] != 0)<br />
	{<br />
		x = rand() % MAX_SLOGANS;<br />
		y = rand() % 2;<br />
	}<br />
<br />
	iText[x][y] = 1;<br />
	iValue = x;<br />
	iType = y;<br />
}<br />
<br />
void CARD::init()<br />
{<br />
	x = 0;<br />
	y = 0;<br />
	h = 0;<br />
	w = 0;<br />
	iValue = 0;<br />
	iType = 0;<br />
	show_text = false;<br />
	lock = false;<br />
}<br />
<br />
class CARDS<br />
{<br />
public:<br />
	CARD *cCards[MAX_CARDS];<br />
	CARDS();<br />
	~CARDS();<br />
<br />
	void update();<br />
	void draw(BITMAP *bDisplay);<br />
	void init();<br />
<br />
	void clear_cards();<br />
};<br />
<br />
CARDS::CARDS()<br />
{<br />
	init();<br />
}<br />
<br />
CARDS::~CARDS()<br />
{<br />
}<br />
<br />
void CARDS::update()<br />
{<br />
	<br />
	if(cards_showing &lt; 2)<br />
	{<br />
		for(int i = 0; i &lt; MAX_CARDS; i++)<br />
			if(cCards[i] != NULL)<br />
			cCards[i]-&gt;update();<br />
	}<br />
	else<br />
	{<br />
		if(abs(ticks - card_timer) &gt; 100)<br />
		{<br />
			card_timer = INT_MAX;<br />
			clear_cards();<br />
		}<br />
	}<br />
}<br />
<br />
void CARDS::clear_cards()<br />
{<br />
	int index = -1, S1 = -1;<br />
	bool have_card = false;<br />
	for(int i = 0; i &lt; MAX_CARDS; i++)<br />
		if(cCards[i] != NULL)<br />
		{<br />
			if(S1 == -1)<br />
			{<br />
				if(cCards[i]-&gt;show_text)<br />
				{<br />
					index = i;<br />
					S1 = cCards[i]-&gt;iValue;<br />
				}<br />
			}<br />
			else<br />
			{<br />
				if(cCards[i]-&gt;show_text &amp;&amp; S1 == cCards[i]-&gt;iValue)<br />
				{<br />
					delete cCards[index];<br />
					delete cCards[i];<br />
					cCards[index] = NULL;<br />
					cCards[i] = NULL;<br />
				}<br />
			}					<br />
		}<br />
	<br />
<br />
	for(int i = 0; i &lt; MAX_CARDS; i++)<br />
		if(cCards[i] != NULL)<br />
		{<br />
			have_card = true;<br />
			cCards[i]-&gt;show_text = false;<br />
			cCards[i]-&gt;lock = false;<br />
		}<br />
		<br />
	if(have_card == false)<br />
	{<br />
		quit = true;<br />
		over = true;<br />
	}<br />
	cards_showing = 0;<br />
}<br />
<br />
void CARDS::draw(BITMAP *bDisplay)<br />
{<br />
	for(int i = 0; i &lt; MAX_CARDS; i++)<br />
		if(cCards[i] != NULL)<br />
		cCards[i]-&gt;draw(bDisplay);<br />
}<br />
<br />
void CARDS::init()<br />
{<br />
	int size = 100;<br />
	int X = 10, Y = 10, W = size, H = size;<br />
	for(int i = 0; i &lt; MAX_CARDS; i++)<br />
	{<br />
		cCards[i] = new CARD;<br />
		cCards[i]-&gt;x = X;<br />
		cCards[i]-&gt;y = Y;<br />
		cCards[i]-&gt;w = W;<br />
		cCards[i]-&gt;h = H;<br />
		cCards[i]-&gt;pick_slogan();<br />
<br />
		X += size + 10;<br />
		if(X &gt; 630 - size)<br />
		{<br />
			X = 10;<br />
			Y += size + 10;<br />
		}<br />
	}<br />
}<br />
<br />
CARDS *cCard_Deck;<br />
<br />
void create_slogans()<br />
{<br />
	strcpy(cText[0][0], &quot;We try harder.&quot;); strcpy(cText[0][1], &quot;Avis&quot;);<br />
	strcpy(cText[1][0], &quot;Go to work on an egg.&quot;); strcpy(cText[1][1], &quot;Egg Marketing Board&quot;);<br />
	strcpy(cText[2][0], &quot;Guinness is good for you.&quot;); strcpy(cText[2][1], &quot;Guinness&quot;);<br />
	strcpy(cText[3][0], &quot;Don't be vague. Ask for Haig.&quot;); strcpy(cText[3][1], &quot;Haig Scotch Whisky&quot;);<br />
	strcpy(cText[4][0], &quot;Happiness is a cigar called Hamlet.&quot;); strcpy(cText[4][1], &quot;Hamlet&quot;);<br />
	strcpy(cText[5][0], &quot;Heineken refreshes the parts other beers cannot reach.&quot;); strcpy(cText[5][1], &quot;Heineken&quot;);<br />
	strcpy(cText[6][0], &quot;Beanz Meanz Heinz.&quot;); strcpy(cText[6][1], &quot;Heinz&quot;);<br />
	strcpy(cText[7][0], &quot;It is.  Are you?&quot;); strcpy(cText[7][1], &quot;The Independent&quot;);<br />
	strcpy(cText[8][0], &quot;Just do it.&quot;); strcpy(cText[8][1], &quot;Nike&quot;);<br />
	strcpy(cText[9][0], &quot;Think small.&quot;); strcpy(cText[9][1], &quot;Volkswagen&quot;);<br />
	strcpy(cText[10][0], &quot;The ultimate driving machine.&quot;); strcpy(cText[10][1], &quot;BMW&quot;);<br />
<br />
	for(int i = 0; i &lt; MAX_SLOGANS; i++)<br />
	{<br />
		iText[i][0] = 0;<br />
		iText[i][1] = 0;<br />
	}<br />
}<br />
<br />
void game_init()<br />
{<br />
	intensity = 0;<br />
	gfx_timer = 0;<br />
	up = true;<br />
	score = 0;<br />
	card_timer = INT_MAX;<br />
	create_slogans();<br />
	cards_showing = 0;<br />
	cCard_Deck = new CARDS;<br />
	show_mouse(screen);<br />
<br />
}<br />
<br />
void game_update()<br />
{<br />
	cCard_Deck-&gt;update();<br />
	if(abs(ticks - gfx_timer) &gt; 5)<br />
	{<br />
		gfx_timer = ticks;<br />
		if(up)<br />
		{<br />
			intensity++;<br />
			if(intensity &gt; 255)<br />
				up = false;<br />
		}<br />
		else<br />
		{<br />
			intensity--;<br />
			if(intensity &lt; 0)<br />
				up = true;<br />
		}<br />
	}<br />
<br />
}<br />
<br />
void game_draw()<br />
{<br />
	clear(buffer);<br />
	rectfill(buffer, 0, 0, buffer-&gt;w, buffer-&gt;h, makecol(0, intensity,0));<br />
	rectfill(bText, 0, 0, bText-&gt;w, bText-&gt;h, makecol(255,0,255));<br />
	cCard_Deck-&gt;draw(buffer);<br />
	textprintf_centre(bText, font, GFX_W / 2, 5, makecol(255,255,255), &quot;Sloganaugh&quot;);<br />
	textprintf(bText, font, 550, 460, makecol(255,255,255), &quot;Flips:  %d&quot;, score);<br />
	textprintf(bText, font, 10, 460, makecol(255,255,255), &quot;Match the slogan with the company in the least amount of flips.&quot;);<br />
	draw_sprite(buffer, bText, 0, 0);<br />
	draw_sprite(screen, buffer, 0, 0);	<br />
}<br />
<br />
void game_shutdown()<br />
{	<br />
	destroy_bitmap(buffer);<br />
}<br />
<br />
<br />
<br />
void play_game()<br />
{	<br />
	iFrameRate = false;<br />
	game_init();<br />
	<br />
	while(!quit)<br />
	{<br />
		while(!key[KEY_ESC] &amp;&amp; !over)<br />
		{<br />
			while(system_time &amp;&amp; !over)<br />
			{<br />
				system_time--;<br />
				ticks++;<br />
				game_update();				<br />
			}		<br />
				<br />
			draw_ticks++;<br />
			game_draw();<br />
<br />
			if(iFrameRate) textprintf(screen, font, 10, 10, -1, &quot;%d&quot;, framerate);					<br />
		}<br />
		quit = true;<br />
		system_time = 0;<br />
		ticks = 0;<br />
	}<br />
<br />
	game_shutdown();<br />
}<br />
<br />
<br />
<br />
int main()<br />
{<br />
	init();	<br />
<br />
	play_game();<br />
<br />
	return 0;<br />
}<br />
END_OF_MAIN()[/code]]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:00:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I uploaded mine! <a href="http://cgamesplay.com/minorhack/entries/14">http://cgamesplay.com/minorhack/entries/14</a></p><p>Its &quot;slogan&quot; is &quot;Crikey!&quot; I&#39;m actually pretty happy with the entry as a whole. I didn&#39;t have a chance to add snapping crocs to the water, though <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 00:04:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, done. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I haven&#39;t managed to make a playable game, but my entry should be quite interesting, anyway. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> As for slogan, &quot;It can be done&quot; should fit quite well. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Again, I&#39;ve used timeGetTime(), so Linux users should grab compatibility &quot;winalleg.h&quot; to emulate it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 17 Sep 2006 00:04:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Me need binaries. <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" /></p><p>(aka, I don&#39;t think I have everything needed to compile it.)</p><p>[EDIT]<br />How do we judge them? I didn&#39;t see a button or anything...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 00:07:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is Onewing gonna put his entry on the site? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 00:09:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Here&#39;s a non-gameplay fix, just kind of makes it easier to read text (changing the offset of the cards).</p><p>On line 340 and 353 in the CARDS::init function, change the X = 10 to X = 50.  Looks a lot better. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>[edit]</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Is Onewing gonna put his entry on the site?
</p></div></div><p>
How, i thought i couldnt&#39; since time is up?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:09:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>FYI guys, you have 10 minutes to upload from the time the contest ends. I put it in the DB manually with that gameplay change.</p><p>Now I will compile them and upload binaries if nobody beats me to it. Also if you go to your entry page at any point in the future, you can upload a modified version and notes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 00:15:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Once time was over, the &quot;upload&quot; link dissappeared for me.  I&#39;m using Opera.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:16:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I look forward to getting those binaries. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 00:19:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nice game, Kikaru.  I got 40 points.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:21:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Attached. I had to change Krzysztof&#39;s entry in 2 places: #define M_PI 3.141592 and return 0; in game_logic. This is MSVC.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 00:23:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> I actually could have uploaded it about 10-15 min early, but I decided to use the time to fix some bugs, add a title screen, and make it look nicer in general. </p><p>I will probably make a full version of the game with some graphics, music, and a slightly better interface.</p><p>Also, how <i>do</i> we judge?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 00:25:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>you missed part of my fix suggested above.  That&#39;s okay.  Like I said, it&#39;s not a gameplay issue.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:26:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Huh, missed the hack -- I thought the competition was happening at 6 EDT, &#39;cause it said 6 PM without saying the time zone, and I supposed CGames could read the local time zone info from a.cc ... also, I think that time used to be in EDT?<br />It still says &quot;at 6:00 pm.&quot; without a time zone label -- you should probably label that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 17 Sep 2006 00:28:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can make it a revised version <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Also I understand your problem. The upload link went away, but the form was still active. I will fix it ASAP. In the mean time, <a href="http://cgamesplay.com/minorhack/entries/14/edit">click here</a>.</p><p>Krzysztof: You are so 1337.</p><p>Onewing: Cool game; playable.</p><p>Kikaru: Fun, and it has a title screen and lose screen. Nice. Small ambitions pay off, I suppose.</p><p>CGamesPlay: Your game is super awesome and you deserve a raise.</p><p>My ranking: Kikaru, Onewing, Krzyzstof.</p><p>It&#39;s a shame there can&#39;t be a tie, because Krzyzstof&#39;s entry is so cool that I would tie it with Onewing&#39;s. But Onewing&#39;s pulls ahead because it&#39;s got gameplay.</p><p>Oh, it looks like Derezo missed the compo again <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>[append]</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Huh, missed the hack -- I thought the competition was happening at 6 EDT, &#39;cause it said 6 PM without saying the time zone, and I supposed CGames could read the local time zone info from a.cc ... also, I think that time used to be in EDT?<br />It still says &quot;at 6:00 pm.&quot; without a time zone label -- you should probably label that.
</p></div></div><p>You never logged in, so I wouldn&#39;t be able to read time zones from Allegro.cc even if I could read time zones from Allegro.cc if you logged in <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /> The time zone info is on the site: </p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This is a list of the competitions that are currently scheduled to run. Times are in the time zone EDT. Click on the current competition for a countdown timer.</p><p>    * September 16th at 2:00 pm - Currently Judging
</p></div></div><p>Shame we didn&#39;t have you. As the competition matures these problems will hopefully go away.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 00:31:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
In the mean time, click here
</p></div></div><p>
Clicking brings me to a &quot;File Not Found&quot; page.  <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>Anywho, wow, tough choices between these four entries.  I feel everyone did exceptionally good.  Although, I think I nailed the Slogan rule pretty good.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />  </p><p>Anyway, my rankings go like this:</p><p>Kikaru, KK, CGamesPlay.</p><p>It was a tough choice.  Kikaru ftw because the game was <i>fun</i>.  I couldn&#39;t decide between KK and CG at all, in fact, I had to flip a quarter.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:37:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I would rank it: Onewing, CGamesPlay, KK.</p><p>Onewing: I liked the game! Though the top row of cards is oddly shifted...</p><p>CGamesPlay: your guy moved a little slow, and couldn&#39;t jump very high. But a cool idea nontheless.</p><p>KK: It was really neat maze-thing, but no objective or point. Nice idea though. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 00:39:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Unfortunately, I was unable to participate. I was forced to drive two hours, stand in a field for two hours, and then drive back home for two hours throughout the time of the competition. Oh well, I suppose there will be another soon enough.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (relpatseht)</author>
		<pubDate>Sun, 17 Sep 2006 00:41:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Though the top row of cards is oddly shifted...
</p></div></div><p>
that has to do with the fix I mentioned above.  <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Sun, 17 Sep 2006 00:41:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I was forced to drive two hours, stand in a field for two hours, and then drive back home for two hours throughout the time of the competition.
</p></div></div><p>Good thing you didn&#39;t participate then. You would have had 6 hours while we only had 1! <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>Onewing: That is because I am dumb and that was to edit my entry <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> <a href="http://cgamesplay.com/minorhack/entries/16/edit">Yours</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 00:48:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am not very good at picking prepositions, it seems.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (relpatseht)</author>
		<pubDate>Sun, 17 Sep 2006 00:55:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I wonder if KK is going to vote...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 00:57:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Damn, I missed it... Well, there&#39;s always the next one! When is it, really? I say not same time, because then I&#39;ll have to miss it again...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Sun, 17 Sep 2006 01:03:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Maybe a few hours earlier or later next time? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 01:05:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>relpatseht: Don&#39;t worry about it <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Kikaru: Now remember, he has a full day <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>2 more things I want to add to the site: Zip file downloads for entire competitions, and automatic generation of Windows binaries. I have XMinGW installed on my home server, it&#39;s just a matter of setting up the link. Also I need to make sure those binaries will actually work <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Ron: You name a time that is good for you! One of the future plans I have for the site is the ability to &quot;propose&quot; a competition, and if a certain number of people &quot;second&quot; the competition, it will be automatically scheduled. But that is later.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 01:16:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>People who download the binaries will make sure <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />As for a good time for the competetion... I&#39;m afraid I&#39;ll only be available in the week after this one, beginning on Monday.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Sun, 17 Sep 2006 01:28:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, so you want it on the 29th or 30th, or 1st, at what time? You can suggest a week day but people might be unavailable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 01:32:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You never logged in, so I wouldn&#39;t be able to read time zones from Allegro.cc even if I could read time zones from Allegro.cc if you logged in <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div></div><p>Hmm, I did go to the MinorHack site and click something that took me back to the allegro.cc login page, the day before the Hack, IIRC.  And I clicked login, and I believe I ended up back at the MinorHack site.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The time zone info is on the site:
</p></div></div><p>
Right now from my end the site looks like this:<br /><span class="remote-thumbnail"><span class="json">{"name":"590187","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/b\/5bec5c157cf7d26c66af40048758d922.png","w":902,"h":242,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/b\/5bec5c157cf7d26c66af40048758d922"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/5/b/5bec5c157cf7d26c66af40048758d922-240.jpg" alt="590187" width="240" height="64" /></span><br />But then, at some point I did log in and enter EDT as my time zone.</p><p>edit: also, if I log out and log back in, the site sets my time zone back to UTC.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 17 Sep 2006 01:49:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Baf: Update to php 5 <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>Zaphos: I don&#39;t know why it would do that! What it looks like is php understand EDT as a time zone but does not understand it to be UTC-4. I recommend America/New_York.</p><p>For personal clarification, right now, GMT is UTC+1, correct?</p><p>[append]<br />Thanks for telling me it happens on login, that let me fix it <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I knew something was up, but didn&#39;t know when it happened.</p><p>[append]<br />Did everyone remove their emails, or did that happen by accident? I still see a few of yours, but not all of them. I couldn&#39;t make mine disappear <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 01:57:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I wonder if KK is going to vote...
</p></div></div><p>
Why not? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> OK, I guess my entry is going to get beaten by a circle and a stickman, but something like this happened every single time I went for technology during some kind of fast coding compo, so I think I&#39;m used to it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>CGamesPlay: Nice idea, but it could have been really good if you tweaked physics a bit. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />Onewing: I&#39;m not a fan of of this type of games, but for one hour it&#39;s quite nice.<br />Kikaru: Simple ideas can often work nice, but this gets boring a bit too fast.</p><p>My vote is: CGamesPlay, Onewing, Kikaru
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 17 Sep 2006 02:21:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Why not? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> OK, I guess my entry is going to get beaten by a circle and a stickman, but something like this happened every single time I went for technology during some kind of fast coding compo, so I think I&#39;m used to it. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div></div><p>It&#39;s okay. This is my competition and I haven&#39;t won once yet <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>[append]<br />Added a &quot;Current Time&quot; display on the time zone selector. This should alleviate a lot of the problems.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 02:22:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>KK, do think you could tell me what library you are using for the 3D?</p><p>[EDIT]<br />Is someone going to do the score count?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 02:31:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
KK, do think you could tell me what library you are using for the 3D?
</p></div></div><p>
None and that&#39;s the beauty of my entry. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> It&#39;s simple raycaster with generated textures and sliding collisions 100% written during 1 hour. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>EDIT: Unless you meant my other projects, which are mostly AllegroGL+OpenGL and Direct3D from time to time. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 17 Sep 2006 03:03:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I stand in awe of your Raycasting! Probably would have been best in a 2 or 3 hour comp. Also, could someone give me a link to where I can download OpenGL?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 03:29:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Id have liked to try KK&#39;s, but sadly, It uses timeGetTime &gt;:E
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 17 Sep 2006 03:33:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Id have liked to try KK&#39;s, but sadly, It uses timeGetTime &gt;:E
</p></div></div><p>
Copy the code below, put it to a file named &quot;winalleg.h&quot; and place in the directory where you try to compile my entry. It should solve this problem.</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include &lt;sys/time.h&gt;</span>

<span class="k1">unsigned</span> <span class="k1">long</span> <span class="k1">long</span> timeGetTime<span class="k2">(</span><span class="k2">)</span>
<span class="k2">{</span>
        timeval T<span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_421.html" target="_blank">gettimeofday</a><span class="k2">(</span><span class="k3">&amp;</span>T,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <span class="k1">return</span> <span class="k2">(</span><span class="k2">(</span><span class="k1">long</span> <span class="k1">long</span><span class="k2">)</span>T.tv_sec<span class="k2">)</span><span class="k3">*</span><span class="n">1000</span><span class="k3">+</span>T.tv_usec<span class="k3">/</span><span class="n">1000</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 17 Sep 2006 03:42:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
4191.cpp:224: warning: control reaches end of non-void function
</p></div></div><p>

</p><div class="source-code snippet"><div class="inner"><pre>moose@natasha ~ $ .<span class="k3">/</span><span class="n">4191</span>
Shutting down Allegro due to <a href="http://www.delorie.com/djgpp/doc/libc/libc_724.html" target="_blank">signal</a> #<span class="n">11</span>
Segmentation fault
</pre></div></div><p>

</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">(</span>gdb<span class="k2">)</span> run
Starting program: <span class="k3">/</span>home<span class="k3">/</span>moose<span class="k3">/</span><span class="n">4191</span>

Program received <a href="http://www.delorie.com/djgpp/doc/libc/libc_724.html" target="_blank">signal</a> SIGSEGV, Segmentation fault.
<span class="n">0xb7eaf198</span> in _stub_bank_switch <span class="k2">(</span><span class="k2">)</span> from <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg.so.4.2
<span class="k2">(</span>gdb<span class="k2">)</span> bt
<span class="p">#0  0xb7eaf198 in _stub_bank_switch () from /usr/lib/liballeg.so.4.2</span>
<span class="p">#1  0x08048e7e in bmp_write_line (bmp=0x807a100, lyne=0) at al386gcc.h:46</span>
<span class="p">#2  0x08048eba in _putpixel32 (bmp=0x807a100, x=0, y=0, color=29497) at draw.inl:513</span>
<span class="p">#3  0x08049594 in trace (x=0) at 4191.cpp:163</span>
<span class="p">#4  0x080496e3 in raycast () at 4191.cpp:190</span>
<span class="p">#5  0x08049a80 in main () at 4191.cpp:247</span>
<span class="k2">(</span>gdb<span class="k2">)</span>
</pre></div></div><p>

edit: append:
</p><div class="source-code snippet"><div class="inner"><pre>Program received <a href="http://www.delorie.com/djgpp/doc/libc/libc_724.html" target="_blank">signal</a> SIGSEGV, Segmentation fault.
<span class="n">0xb7ed149d</span> in _stub_bank_switch <span class="k2">(</span>bmp<span class="k3">=</span><span class="n">0x0</span>, y<span class="k3">=</span><span class="n">134718072</span><span class="k2">)</span> at cmisc.c:29
<span class="n">29</span>         <span class="k1">return</span> <span class="k2">(</span>uintptr_t<span class="k2">)</span>bmp-&gt;line<span class="k2">[</span>y<span class="k2">]</span><span class="k2">;</span>
Current language:  <span class="k1">auto</span><span class="k2">;</span> currently c
<span class="k2">(</span>gdb<span class="k2">)</span> bt
<span class="p">#0  0xb7ed149d in _stub_bank_switch (bmp=0x0, y=134718072) at cmisc.c:29</span>
<span class="p">#1  0x08048e7e in bmp_write_line (bmp=0x807a278, lyne=0) at al386gcc.h:46</span>
<span class="p">#2  0x08048eba in _putpixel32 (bmp=0x807a278, x=0, y=0, color=29497) at draw.inl:513</span>
<span class="p">#3  0x08049594 in trace (x=0) at 4191.cpp:163</span>
<span class="p">#4  0x080496e3 in raycast () at 4191.cpp:190</span>
<span class="p">#5  0x08049a80 in main () at 4191.cpp:247</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 17 Sep 2006 03:44:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, so where do I download OpenGL? I did a Google search, but I can&#39;t find the actual download for the library.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 03:47:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OpenGL comes with your operating system. Your compiler should generally include OpenGL headers.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 17 Sep 2006 03:48:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Shutting down Allegro due to signal #11<br />Segmentation fault
</p></div></div><p>
Well, I have no idea what _putpixel32 does on your system, but for me it always behaved as &quot;(((*int)(bmp-&gt;line[y]))[x]=color)&quot; macro. Maybe I did something wrong, but I never thought you actually had to do anything extra to use _putpixel32 with memory bitmap. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 17 Sep 2006 03:56:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It should be working afaik. Maybe theres a bug in the C version? I dunno.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 17 Sep 2006 04:12:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>CGames: BAFServ has been <a href="http://bafserv.com/phpinfo.php">PHP 5.0.4</a> since the big reimage. Before that it was 5.1.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Sun, 17 Sep 2006 04:33:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It comes with windows XP?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Sun, 17 Sep 2006 04:49:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes, OpenGL comes with Windows XP, and its header files come with all respectable compilers. However, the version of OpenGL that comes with Windows XP is very old and mostly done in software. You will want to get drivers for your graphics card so that OpenGL is done in hardware, which odds are you have already done.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (relpatseht)</author>
		<pubDate>Sun, 17 Sep 2006 05:58:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think 30th same time would awesome.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ron Ofir)</author>
		<pubDate>Sun, 17 Sep 2006 19:00:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Does anyone else have a problem with 30th at 1800 UTC?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
CGames: BAFServ has been PHP 5.0.4 [bafserv.com] since the big reimage. Before that it was 5.1.
</p></div></div><p><a href="http://www.php.net/manual/en/function.date-default-timezone-get.php">http://www.php.net/manual/en/function.date-default-timezone-get.php</a> <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>Tomasu: Maybe check the linking consistency of your Allegro? Did you upgrade gcc without recompiling?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 17 Sep 2006 20:23:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Does anyone else have a problem with 30th at 1800 UTC?
</p></div></div><p>
I might be out for that weekend, but I&#39;m not completely sure at the moment. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sun, 17 Sep 2006 20:32:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sounds good! I am definitely in. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 18 Sep 2006 01:03:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc/account/login/http://cgamesplay.com/minorhack/login/competitions/6">Competition link</a>.</p><p>Why don&#39;t you guys make sure the times are right <b>before</b> the day of the compo, eh? <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I added a &quot;Current Time&quot; field on the prefs page, so it should be easier.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 18 Sep 2006 02:53:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>One problem with the &quot;trigonometric functions&quot; rule: I don&#39;t know how to use them. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>Also, is anyone going to do a score count?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kikaru)</author>
		<pubDate>Mon, 18 Sep 2006 03:35:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Onewing: 7<br />Kikaru: 7<br />CGamesPlay: 6<br />Krzysztof: 4</p><p>Two first place winners! Good job, everybody. Let&#39;s keep this thread going until the 30th <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 18 Sep 2006 03:51:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow! I&#39;m first again! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /> (counting from the other end of the list, but who cares) <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Congratulations to all entrants! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Mon, 18 Sep 2006 04:05:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">CGames said:</div><div class="quote"><p>
Did you upgrade gcc without recompiling?
</p></div></div><p>Nein. its a new install... I can try reinstalling it. but I dunno.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 18 Sep 2006 04:17:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The 30th eh?  I <i>might</i> be out of town then.  Actually, I hope I&#39;m out of town.  <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 18 Sep 2006 20:59:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Come on, you&#39;re the only other one who has been in all 3 <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Mon, 18 Sep 2006 22:01:16 +0000</pubDate>
	</item>
</rss>
