Gfx draw sprite

I've started work on this function but it's not finished. It does at present draw the correct sprite on the title screen. It doesn't seem to be drawing sprites correct on tabs. Currently the tab related sprite drawing is skipped but you can try out what i have so far (backgrounds are wrong). I've got tired of looking at this code so if anyone wants to try finish it your welcome.