is Tomi trying to write a game map editor?
Exactly, Handoko!
I would like make a small application which can help me create a nice background image from small various images. Besides this application must be able to create a "terrain map" based on this background image.
My plan with this as follows: the background image can be assembled from tiles (it's pretty much done) and the user can save this as a common BMP image. This background has an array and its elements represent the tiles with values 0 or 1, depend on the user which value set on it with mouse click from a menu list.
This is the "terrain map", which can save as a common TXT file with the background BMP. Now, I working on making the selected tiles visible on the source images with a rectangle, when the user clicking on it.
So, the expected result the big BMP background and a TXT file, which contains the terrain map, for example:
0,0,0,1,0,0,0,0
0,0,0,1,0,0,0,0
0,0,1,1,0,0,0,0
0,1,1,0,0,0,0,0
0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0
0,1,1,0,0,0,0,0
0,0,1,0,0,0,0,0
where the 1 numbers represent e.g. a river, which are obstacles in the game.
So far I made my games from set of numbers like that, but to build up on a terrain and the background in a game the basis of it gives a rather ugly result, because the river looks like an artificial canal because of the square bends. But now, I will make a nice backround image separated from this terrain map.
But I will also check your code, Handoko; maybe your application does a similar thing.
And special thanks to you too, TRon, for your example. I will download it now.