DrawImage

From ZDoom Wiki
Jump to navigation Jump to search

DrawImage [translatable] <image>, <x>, <y> [, {none|center|centerbottom}[, <max-width>, <max-height>[, <flags>]]]

Draws image image to the screen at the specified x and y coordinates, which are absolute coordinates on a scaled screen. By default the coordinates are referenced by the top left corner of the image. Specifying center will change this behavior to be the very center of the image (taking the image offsets into consideration).

If translatable is specified the image will translate itself to the player's color.

In addition to an image lump name a few special values can be used.

playericon
Draws the Player.ScoreIcon for the user's player class.
armoricon
Draws an image of the armor type currently in-use. If the amount of armor the player has is 0, nothing will be displayed.
weaponicon
Draws the Inventory.Icon of the currently selected weapon.
ammoicon1
Draws the primary ammo icon.
ammoicon2
Draws the secondary ammo icon.
sigil
Draws the proper icon for the Sigil.
hexenarmor <armor>, <image>
Fades the image based on the availability of the specified Hexen armor (armor, shield, helm, amulet).

Large images can be forced to draw with a specified max width or height (preserving the image's aspect ratio) by using the max-width and max-height parameters.

Valid flags are:

alticonfirst
When drawing icons, check for an alticon via ALTHUDCF before the normal icon.
alternateonfail
Executes the sub block if the command can not draw an image.
forcescale
Scale up images that are less than max-width/max-height.
skipalticon
Skip checking ALTHUDCF when drawing icons.
skipicon
Skip checking the inventory's icon when drawing icons.
skipready
For weapons, do not use the Ready state.
skipspawn
Do not use the item's spawn state when drawing icons.