for some reason the code i wrote doesnt work the way i expected
it doesnt draw overlap image at all.
This is my Map and Layer class (the map contain the layers, and what i want it to do is to draw layer 1 at the bottom, and go all the way up to layer 12 at the top. Assuming that all the tiles are transparented)
The main one (which might be causing your problems) is that in DrawLayer, you specify x and y, but you don't specify a width/height. Or are you doing that in your DrawTile function?
Also, why do you have 250 maps?
The rest that I can see if just performance stuff. For example, you don't want to draw every tile of the map, you only want to draw what's going to be visible on screen. Also, you don't want to draw tiles that are fully transparent.
And, quite frankly, SDL's drawing performance kind of sucks from my experience. It's very rarely hardware accellerated because it uses really arcane drawing concepts (blitting, dirty rects), whereas modern hardware tends to be more geared towards a different style (full scene redrawing and textured polygons). 12 layers is a lot, and if you're going to get any kind of workable performance with that much drawing you're going to have to get really smart with it and only draw what's absolutely necessary.
But don't take my word for it. Do some tests for yourself and see what kind of framerate you can get with drawing 12 full layers every frame.