fixed a bunch of compalation errors in LibDirect3D