added 3dsx support

This adds 3dsx support
Declare these variables where you use them