Skip to content

Combine vid.dupx and vid.dupy

vid.dupx and vid.dupy are the GUI scale, set based on the game resolution so that the GUI scales along with the game.
To avoid the GUI being stretched, these two variables are always set to have the same value (being the lesser of the two).
Some functions even go the extra mile, and themselves additionally pick the lesser of the two, despite the two already always being the same.

­

Considering that a stretched GUI seems unwanted, there's no need to store dupx and dupy separately.
This merge request therefore combines them into a single variable. The same applies to vid.meddup*, vid.smalldup*, vid.fdup*, vid.fmeddup*, and vid.fsmalldup*.

For Lua HUD stuff, v.dupx() and v.dupy() are intentionally still separate; I plan to deprecate them in a different merge request later, so there's no need to also deprecate them here too.

­

A few dup-related lines have been tweaked a little, e.g. to replace FixedMul(...) with just straight-up multiplication where it didn't have to be fixed-point math, but should stay functionally the same.

TL;DR:
For players: There should be no difference.
For hardcoders: vid.dupx and vid.dupy are now just vid.dup.

Merge request reports