Still haven't managed to get it working

But at the moment that's no problem to me.

I've got the masking thing going and for now that's enough for me...

Next is to find out how to load a part of a bitmap onto a texture or to show part of a texture on a quad.

I now have a mario type guy running around.
I'm using a seperate folder for each character containing 16 bmp images.
8 for each animation frame and 8 for the masks.

I have come across a problem on that, though...
The program seems to have a slight problem rounding off the textured polygons. When scrolling a very thin black line sometimes appears above my mario dude.
Any idea of what's causing this?

A second question... Anyone have any ideas how to put a maximum FPS on the game? I can't do an infinite loop, but there's probably a way to find the time of the CPU's internal clock or something.