Jump to content

Cstat (wall)

From EDukeWiki

A bitfield for how to draw a wall, as well as a few flags for interaction. Add all together all wanted flag values.

Unused bits are NOT free for user programming, but are rather reserved for potential future EDuke32 features.

Not to be confused with sprite cstat.

If the wall has cstat 2 applied to it (CSTAT_WALL_BOTTOM_SWAP) than the bottom half's attributes are applied to the current wall's nextwall

Flags

The following values are used with wall cstat.

ExposedValueLabelDescription
No1CSTAT_WALL_BLOCKMake wall blockable
No2CSTAT_WALL_BOTTOM_SWAPMake bottoms of invisible walls swapped
No4CSTAT_WALL_ALIGN_BOTTOMAlign picture on bottom
No8CSTAT_WALL_XFLIPFlip wall around x-axis
No16CSTAT_WALL_MASKEDMake wall masking, two-sided
No32CSTAT_WALL_1WAYMake wall masking, one-sided. This disables rendering on the other side, meaning it can be used to avoid SOS glitches. However it also disables transparency on the masked wall.
No64CSTAT_WALL_BLOCK_HITSCANMake wall able to be hit by weapons
No128CSTAT_WALL_TRANSLUCENTMake wall transparent
No256CSTAT_WALL_YFLIPFlip wall around y-axis
No512CSTAT_WALL_TRANS_FLIPSecond transparency level (combine with cstat 128)
No1024CSTAT_WALL_YAX_UPWALL
No2048CSTAT_WALL_YAX_DOWNWALL
No4096CSTAT_WALL_ROTATE_90Rotate texture by 90 degrees counter-clockwise. (3D-mode hotkey 'R' in mapster32)
No16384CSTAT_WALL_BLOCK_ACTOROnly used in Shadow Warrior
No32768CSTAT_WALL_WARP_HITSCANOnly used in Shadow Warrior
Defines
define CSTAT_WALL_BLOCK                 0x00000001
define CSTAT_WALL_BOTTOM_SWAP           0x00000002
define CSTAT_WALL_ALIGN_BOTTOM          0x00000004
define CSTAT_WALL_XFLIP                 0x00000008
define CSTAT_WALL_MASKED                0x00000010
define CSTAT_WALL_1WAY                  0x00000020
define CSTAT_WALL_BLOCK_HITSCAN         0x00000040
define CSTAT_WALL_TRANSLUCENT           0x00000080
define CSTAT_WALL_YFLIP                 0x00000100
define CSTAT_WALL_TRANS_FLIP            0x00000200
define CSTAT_WALL_YAX_UPWALL            0x00000400
define CSTAT_WALL_YAX_DOWNWALL          0x00000800
define CSTAT_WALL_ROTATE_90             0x00001000
define CSTAT_WALL_BLOCK_ACTOR           0x00004000
define CSTAT_WALL_WARP_HITSCAN          0x00008000