ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:widescreen

This is an old revision of the document!


Widescreen support functions

GetAspectRatio

int GetAspectRatio()

Returns the aspect ratio that ZDoom is currently using for HudMessages.

  • ASPECT_4_3
  • ASPECT_16_9
  • ASPECT_16_10
  • ASPECT_17_10
  • ASPECT_5_4

Every aspect ratio constant is a fixed-point number equal to the corresponding ratio, for example, ASPECT_4_3 is equal to 1.333333333333333.

Hud boundaries

fixed HudLeftFor (fixed width)

fixed HudRightFor (fixed width)

fixed HudTopFor (fixed height)

fixed HudBottomFor(fixed height)

Return the boundaries of the screen for the given virtual width or height, accounting for current aspect ratio. Equivalent to adding or subtracting a hud border manually.

Hud borders

fixed HudBorderXFor(fixed width)

fixed HudBorderYFor(fixed width)

Return hud borders for the given virtual width or height.

See also

Variants of the same functions operating on currently set size, instead of receiving it every time, are available in hudlib and have the same name, except without the For prefix.

functions/widescreen.1483392938.txt.gz ยท Last modified: 2017/01/02 23:35 (external edit)