with my changes its unnessesary 

 everything will scale with current resolution.
As for a menu option one needs to be created by modifying the existing gui script in pak000.pk4 but else its perfectly controlable via the r_customwidth r_customheight variables.
I found out after some testing that all the other gunk is totally unnessesary as doom3 has a function that sets SCREEN_WIDTH and SCREEN_HEIGHT allready. the define of SCREEN_WIDTH=640 and SCREEN_HEIGHT=480 are just defaults in case no other resolution was set 

 it works like a pointer 

Productivity is a state of mind.