fuaZandroX modding reference

Actor flags

+XFLIP, +YFLIP, +SPRITEFLIP, +DONTFLIP, +ROLLCENTER, +SQUAREPIXELS, +STRETCHPIXELS, +BILLBOARDFACECAMERA, +BILLBOARDNOFACECAMERA, +INVISIBLEINMIRRORS, +ONLYVISIBLEINMIRRORS, +NODYNAMICLIGHTING, +LIGHTMULTALPHA, +ZDOOMTRANS, +FLIPSPRITEOFFSETX, +FLIPSPRITEOFFSETY, +FLATSPRITE, +WALLSPRITE

Render flags

Availability

UZDoom's, under its names. Not in Zandronum 3.3.

Works in netgames. A class's flags are the same on server and clients, and A_ChangeFlag on one reaches every client and players who join later.

Usage

Flag Effect
+XFLIP The picture is drawn mirrored left to right; which rotation shows does not change.
+YFLIP The sprite is drawn upside down.
+SPRITEFLIP The actor is drawn as its own mirror image: each rotation is picked as if seen from the other side, then mirrored.
+DONTFLIP Accepted for UZDoom's mods; its hardware renderer does not read it, and neither do ours.
+ROLLCENTER A +ROLLSPRITE roll turns about the sprite's middle instead of the actor's feet.
+SQUAREPIXELS The sprite is drawn with square pixels, undoing the map's tall-pixel stretch. A rolled sprite always is.
+STRETCHPIXELS A rolled sprite keeps the tall-pixel stretch.
+BILLBOARDFACECAMERA The sprite turns to face the camera's position, not just lie square to the view.
+BILLBOARDNOFACECAMERA The sprite stays square to the view when r_billboard_faces_camera turns every other sprite.
+INVISIBLEINMIRRORS Mirrors do not show the actor.
+ONLYVISIBLEINMIRRORS Only mirrors show the actor.
+NODYNAMICLIGHTING Dynamic lights do not light the actor's sprite or model; it takes the sector's light alone.
+LIGHTMULTALPHA A light the actor carries is dimmed by the actor's alpha.
+ZDOOMTRANS The actor's translucency came with ZDoom, so "Classic Transparency" (r_vanillatrans) can draw it opaque.
+FLIPSPRITEOFFSETX A_SpriteOffset's x moves the sprite left instead of right.
+FLIPSPRITEOFFSETY A_SpriteOffset's y moves the sprite up instead of down.
+FLATSPRITE The sprite lies flat at the actor's height, its top the way the actor faces, tilted by its pitch and turned by its roll. It shows its first rotation unless +SPRITEANGLE.
+WALLSPRITE The sprite stands square to the actor's angle instead of to the view.

r_billboard_faces_camera and r_force_cambbpref are UZDoom's gl_billboard_faces_camera and hw_force_cambbpref, under either name. r_force_cambbpref 1 ignores both billboard flags.

r_vanillatrans: 0 never draws a ZDOOMTRANS actor opaque, 1 always does, -1 only the engine's own, 2 when a DEHACKED patch kept the flag on a thing it changed, and 3 unless a mod's own class has it.

Examples

// A bat that hangs from the ceiling: the same frames as the flying one, drawn upside down.
actor HangingBat
{
    Radius 12
    Height 16
    +SPAWNCEILING
    +NOGRAVITY
    +YFLIP
    States
    {
    Spawn:
        SKUL AB 8
        Loop
    }
}
// A spinning pinwheel decoration that turns about its middle, keeping its pixels square as it turns.
actor Pinwheel
{
    Radius 8
    Height 32
    +ROLLSPRITE
    +ROLLCENTER
    +SQUAREPIXELS
    States
    {
    Spawn:
        BAR1 A 1 A_SetRoll(roll + 6)
        Loop
    }
}
// A torch pair: the left one is the right one mirrored, and neither turns as a flat card when the camera walks past.
actor RightTorch : RedTorch
{
    +BILLBOARDFACECAMERA
}

actor LeftTorch : RightTorch
{
    +XFLIP
}
// A left-handed zombie: seen from its left side it shows the right side's frames, mirrored, so its rifle is in the other hand.
actor LeftyZombie : ZombieMan
{
    +SPRITEFLIP
}
// A vampire with no reflection, and its reflection-only ghost.
actor Vampire : ZombieMan
{
    +INVISIBLEINMIRRORS
}

actor MirrorGhost : ZombieMan
{
    +ONLYVISIBLEINMIRRORS
    -SHOOTABLE
    -SOLID
}
// A ghostly light whose glow fades with it, on a sprite that ignores the room's coloured lights.
actor FadingWisp
{
    Radius 8
    Height 16
    RenderStyle Add
    Alpha 0.6
    +NOGRAVITY
    +LIGHTMULTALPHA
    +NODYNAMICLIGHTING
    States
    {
    Spawn:
        BAL1 AB 4 Bright A_FadeOut(0.01)
        Loop
    }
}
// A translucent ghost marine that "Classic Transparency" draws opaque, as vanilla Doom would have.
actor GhostMarine : ZombieMan
{
    RenderStyle Translucent
    Alpha 0.5
    +ZDOOMTRANS
}
// A rune glowing on the floor, turning slowly, and a banner standing square to the way it was placed.
actor FloorRune
{
    Radius 16
    Height 2
    +NOINTERACTION
    +FLATSPRITE
    States
    {
    Spawn:
        SOUL A 1 Bright A_SetAngle(angle + 2)
        Loop
    }
}

actor StandingBanner
{
    Radius 16
    Height 56
    +WALLSPRITE
    States
    {
    Spawn:
        COLU A -1
        Stop
    }
}

Implementation notes

src/zandronum/src/features/decorate-uzdoom/.