Widescreen support

These function enable true widescreen support in HUD scripts.

Calculating screen boundaries

Actual screen boundaries in widescreen are outside the HUD coordinate system's rectangle. These functions can calculate true screen boundaries in HUD coordinate system.

Sets the HUD Library's HUD coordinate system size. Default is 640×480. After that, actual screen boundaries in HUD coordinate system for current aspect ratio can be retrieved using the following functions:

Example:

// draw this item in the upper left corner of the screen
// uses 640x480 HUD coordinate system
DRAW_ITEM(HudTop(), HudLeft());

Screen boundaries in current aspect ratio can be calculated for any HUD coordinate system size without calling HudSetVirtualSize: