For some reason, polys keep "corrupting" and appearing in random areas.
I'm 100% sure it's not my map loader - I've dumped data from map.c to a file and map.c IS functioning 100%.
I've reduced my 3D engine into a set of VERY small files so you guys can examine it to help me.

Here's the source to examine:
http://sanik.hacking-cult.org/WTF.zip
To simplify the code I've removed the camera code - so the camera's stuck in place, but don't worry - it's placed in an area where one can see the flickering.
This is what's happening in the full engine:

Also, a little note, my map data has UVs and Verteces in seperate lists.
The function that puts the lists together and sends the data to drawArray is in sgl.c at the bottom.
Hopefully someone can help =/
Also, this is what happens in the full engine if I send only vertex data (without intertwining the UV list)

(note glitches still happen but not as much as when sending both UVs and Verteces intertwined)
It's either the way I intertwine the lists or it might be some kind of GE buffer overflow...?
HILFEN!