Nahuel wrote:what is the best way to adjust the images (in scale and position) for any screen resolution
not hard-coding the position.
vector hudtopleft = [(vidsize_x - 320)/2, vidsize_y-24, 0];
drawpic(hudtopleft+'xpos ypos 0', ...);
note: doesn't rescale the image, just moves it in line with a centered hud region that is 320 wide, 24 high.
rescaling is nasty when it comes to aspect ratios - if you code your hud to use some 4:3 virtual resolution then things get really nasty when you then display it at a 16:9 physical resolution.
to rescale properly, you'll need to use the concept of origins (ie: hudtopleft being the origin of the main hud region), and to come up with some way to scale that properly (either with a wrapper for drawpic+friends, or by scaling all the origins+sizes in each call).
DP's vid_conwidth and vid_conheight cvars are nasty. they define the 2d virtual size, but their values are often saved into configs and set to 640*480 or whatever instead of the actual screen resolution, which messes up screen aspect. I guess you'll just have to make sure that the user sets them properly.