The random rantings of a concerned programmer.

Archive for April, 2006

Untitled

April 29th, 2006 | Category: Uncategorized

It never fails – every fucking party there’s always at least one girl who is eyeing me, and when she leaves gives me this “you’re missing out” look. GODDAMMIT. I stopped caring years ago, either arouse me or leave me to my vodka (to roughly quote Mary Shelley).

And yes, I am drunk. And enjoying it :]

3 comments

Untitled

April 27th, 2006 | Category: Uncategorized

Why the hell did I not see this sooner -

	void killTileType( TileType type ) {
		for ( TileList::iterator i = _tiles.begin(); i != _tiles.end(); ++i ) {
			if ( (*i) == type ) {
				(*i) = NULL;

			} else {
				++i;
			}
		}
	}

And I was wondering why my iterator was falling off the edge. LOL!

Needless to say, deleting tiles from a tileset when they are currently in use no longer crashes the whole program. But it will delete those tiles from your map, which may or may not be what you wanted to have done. And thanks to matTd for kindly pointing out that I’m an idiot. Its always appreciated :D

2 comments

Untitled

April 26th, 2006 | Category: Uncategorized

Ugh, where the hell have I seen “TravelCo” before?! I distinctly remember seeing it somewhere in someone’s journal, but I can’t remember for the like of me. What I’m talking about:


(screenshot from the old adventure game, Beneath a Steel Sky)

Someone is clearly influenced by Beneath a Steel Sky :D

But GRR! Where have I seen it before?!?!

1 comment

Untitled

April 25th, 2006 | Category: Uncategorized

I can now export maps! :D

Produces -

#map
$name=1.txt
$mapWidth=5
$mapHeight=5
$tileWidth=64
$tileHeight=64
#tilesheets
%tilesheet=tileset1.bmp
%rect=64,0,64,64
%rep=1
%rect=64,64,64,64
%rep=2
%rect=192,0,64,64
%rep=3
#tiles
%1%1%1%3%2%1%1%1%3%2%1%1%1%3%2%1%1%1%3%2%1%1%1%3%2%2%0%0%0%2%0
#collision

I found a couple more annoying bugs due to bad design, namely the deletion of stuff that’s being used currently on the map. Basically, if you create a tilesheet and use the tiles on the map, then go back to edit the tilesheet and delete some tiles… *poof* the application crashes.

This is again because the map itself has pointers to tile types which can’t be destroyed without first nulling all the pointers which point to it. Which is easy enough to do, just something I should have thought of before.

Oh, and another oddity – mouse events which happen outside the bounds of the map (ie, too far right) should be ignored, not mis-parsed into tile clicks. Which is even easier to fix; can’t believe I forgot to add that in…

Mushu trips over his own stupid.

4 comments

Untitled

April 24th, 2006 | Category: Uncategorized

LOL

I just got a facebook message commenting on my display picture (Remember the time I chalked up the O RLY owl? Yeah – that’s my display picture) from a cute girl (doesn’t go to this uni though).

My faith in humanity has been restored (and I just had to explain the whole thing to a roommate to whom I was relating the same story *sigh*).

<3 teh intarweb

1 comment

Next Page »