that tilemapping program looks really cool. can you post the source code for that?
there's really no need, it's very simple
just store your twelve different sprites for each tile type one after the other and then check the surrounding tile values and add 1, 2, 4, 8(1 for each surrounding tile) multiplied by whether that tile is the same as the tile being drawn, multiply that number by eight to get the right spot in the sprite set, and draw the sprite pointed to. i'll attach the code if you really want to look at it, though
oh, and there's going to be a single bit reading code? that could be really helpful with my contest entry; it does a LOT of pixel testing on the back buffer
*shmibs should really be finishing that, but is looking for reasons to procrastinate