Just discovered some mistakes on my part. It's obvious that I lack the experience of programming because the mistakes that I've done are really freakin stupid. It's fine, there's workarounds for it but basically the my code is getting uglier and uglier as I am too far into it to revisit and make it more organized. Sigh. Good thing no one is ever going to look at this as I am rivaling the original TRI code in terms of screw ups
To sum it up, basically I declared globalPIXX = 320 and globalPIXY = 200 at the very beginning. Just so that it has some values and not 0's (to avoid the compiler giving me warnings). Then I proceeded writing code to actually read the proper input and assign the correct resolution values to globalPIXX/PIXY. So far so good. However what I didn't realize was that the code that I wrote to read the actual dynamic resolutions has been within functions that deal exclusively with the 3d rendering part of the game and with creating the game/menu window. So far still good because everything obviously works correctly on the rendering part and the mainframe part. However I also needed to make use of these values in order to manipulate the UI screens (all the buttons, boxes etc etc). These UI screens are completely separate functions in separate .cpp files and only now I have realized the values that I have been working all along with are the original 320 and 200 numbers and NOT the dynamically changing resolution (because the new values never left the 3d rendering/game window functions). Which suddenly makes HUGE sense why the boxes and windows and everything were not aligning correctly every time the resolution changed.
Ah well, it's too late now as the UI is 4/5 done and there's no way I'm going back to redoing everything as this requires me to manually change every freakin bitmap as well.