From ZDoom Wiki
Jump to navigation Jump to search

A_OverlayFlags (int layer, int flags, bool set)


Modifies an overlay's behavior, adding or subtracting flags.


  • layer - The layer to modify.
  • flags - Flags can be combined using '|' (without ' '):
    • PSPF_ADDWEAPON - The overlay will follow the weapon's offsets. Note this makes A_OverlayOffset use relative X and Y offsets, not absolute.
    • PSPF_ADDBOB - The overlay will follow the weapon's bobbing.
    • PSPF_POWDOUBLE - The overlay will have its speed doubled if a PowerDoubleFiringSpeed is active in the player's inventory.
    • PSPF_CVARFAST - The overlay will respect sv_fastweapons if enabled.
    • PSPF_FLIP - Flips the overlay on the X axis.
    • PSPF_MIRROR - Flips the offset of the overlay. Use in conjunction with PSPF_FLIP to alter the sprite's handedness. Does not imply PSPF_FLIP by itself.
    • PSPF_ALPHA - Enables alpha changing.
    • PSPF_RENDERSTYLE - Enables renderstyle changing.
    • PSPF_FORCEALPHA - Some renderstyles have an alpha setting of their own. Use this to override it.
    • PSPF_FORCESTYLE - Some powerup effects like the Blursphere will set all overlays to the same as the players while in effect, applying its renderstyle on the player as well. Enabling this overrides the effect for the specified layer.
    • PSPF_PLAYERTRANSLATED - Translates the overlay according to the same rules as the player's sprite. It seems to use Player.ColorRange property for translation (which by default covers the green hues) and translate it according to player's settings in GZDoom.
    • PSPF_PIVOTPERCENT - Given to weapons by default. When added, the A_OverlayPivot's XY position is based on a scalar between 0.0 (X: Left, Y: Top) to 1.0 (X: Right, Y: Bottom) of the graphic. Otherwise, the coordinates are based on coordinate offsets in pixels.
    • PSPF_INTERPOLATE - Enables interpolation constantly for the overlay. For backwards compatibility however, A_OverlayOffset called in any tic without the add and interpolate flags will temporarily disable interpolation for that tic.
  • set - If true, enables the flags on the layer. If false, disables them.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.

See Also