User:Quasar/Sandbox/Doom 64 info

Map structures
 struct maplights_t {   byte    r;    byte    g;    byte    b;    byte    a;    int16_t tag; };

struct mapsidedef_t {   int16_t     textureoffset; int16_t    rowoffset; uint16_t   toptexture; uint16_t   bottomtexture; uint16_t   midtexture; int16_t    sector; };

struct maplinedef_t {   uint16_t    v1; uint16_t   v2; int        flags; int16_t    special; int16_t    tag; uint16_t   sidenum[2]; };

// Line flags
 * 1) define ML_BLOCKING            1               // Solid, is an obstacle.
 * 2) define ML_BLOCKMONSTERS       2               // Blocks monsters only.
 * 3) define ML_TWOSIDED            4               // Backside will not be present at all if not two sided.
 * 4) define ML_DONTPEGTOP          8               // upper texture unpegged
 * 5) define ML_DONTPEGBOTTOM       16              // lower texture unpegged
 * 6) define ML_SECRET              32              // In AutoMap: don't map as two sided: IT'S A SECRET!
 * 7) define ML_SOUNDBLOCK          64              // Sound rendering: don't let sound cross two of these.
 * 8) define ML_DONTDRAW            128             // Don't draw on the automap at all.
 * 9) define ML_MAPPED              256             // Set if already seen, thus drawn in automap.
 * 10) define ML_DRAWMASKED          0x200           // Draw middle texture on sidedef
 * 11) define ML_DONTOCCLUDE         0x400           // Don't add to occlusion buffer
 * 12) define ML_BLOCKPROJECTILES    0x800           // blocks projectiles
 * 13) define ML_THINGTRIGGER        0x1000          // Line is triggered by dead thing (flagged as ondeathtrigger)
 * 14) define ML_SWITCHX02           0x2000          // Switch flag 1
 * 15) define ML_SWITCHX04           0x4000          // Switch flag 2
 * 16) define ML_SWITCHX08           0x8000          // Switch flag 3
 * 17) define ML_CHECKFLOORHEIGHT    0x10000         // if true then check the switch's floor height, else use the ceiling height
 * 18) define ML_SCROLLRIGHT         0x20000         // scroll texture to the right
 * 19) define ML_SCROLLLEFT          0x40000         // scroll texture to the left
 * 20) define ML_SCROLLUP            0x80000         // scroll texture up
 * 21) define ML_SCROLLDOWN          0x100000        // scroll texture down
 * 22) define ML_BLENDFULLTOP        0x200000        // do not extend blending for top texture
 * 23) define ML_BLENDFULLBOTTOM     0x400000        // do not extend blending for bottom texture
 * 24) define ML_BLENDING            0x800000        // use sector color blending (top/lower, ceiling, floor colors).
 * 25) define ML_TRIGGERFRONT        0x1000000       // can only trigger from the front of the line
 * 26) define ML_HIDEAUTOMAPTRIGGER  0x2000000       // don't display as yellow line special in automap
 * 27) define ML_INVERSEBLEND        0x4000000       // reverse the blending of the sector colors
 * 28) define ML_UNKNOWN8000000      0x8000000       // reserved
 * 29) define ML_UNKNOWN10000000     0x10000000      // reserved
 * 30) define ML_UNKNOWN20000000     0x20000000      // reserved
 * 31) define ML_HMIRROR             0x40000000      // horizontal mirror the texture
 * 32) define ML_VMIRROR             0x80000000      // vertical mirror the texture

// Special attributes
 * 1) define MLU_MACRO              0x100           // line is set to be used as a macro
 * 2) define MLU_RED                0x200           // requires red key
 * 3) define MLU_BLUE               0x400           // requires blue key
 * 4) define MLU_YELLOW             0x800           // requires yellow key
 * 5) define MLU_CROSS              0x1000          // must cross to trigger
 * 6) define MLU_SHOOT              0x2000          // must shoot the line to trigger
 * 7) define MLU_USE                0x4000          // must press use on the line to trigger
 * 8) define MLU_REPEAT             0x8000          // line can be reactivated again

// Sector light indices enum {   LIGHT_FLOOR, LIGHT_CEILING, LIGHT_THING, LIGHT_UPRWALL, LIGHT_LWRWALL };

struct mapsector_t {   int16_t     floorheight; int16_t    ceilingheight; uint16_t   floorpic; uint16_t   ceilingpic; uint16_t   colors[5]; int16_t    special; int16_t    tag; uint16_t   flags; };

// Sector flags
 * 1) define MS_REVERB              1       // sounds are echoed in this sector
 * 2) define MS_REVERBHEAVY         2       // heavier echo effect
 * 3) define MS_LIQUIDFLOOR         4       // water effect (blitting two flats together)
 * 4) define MS_SYNCSPECIALS        8       // sync light special with multiple sectors
 * 5) define MS_SCROLLFAST          16      // faster ceiling/floor scrolling
 * 6) define MS_SECRET              32      // count secret when entering and display message
 * 7) define MS_DAMAGEX5            64      // damage player x5
 * 8) define MS_DAMAGEX10           128     // damage player x10
 * 9) define MS_DAMAGEX20           256     // damage player x20
 * 10) define MS_HIDESSECTOR         512     // hide subsectors in automap (textured mode)
 * 11) define MS_SCROLLCEILING       1024    // enable ceiling scrolling
 * 12) define MS_SCROLLFLOOR         2048    // enable floor scrolling
 * 13) define MS_SCROLLLEFT          4096    // scroll flat to the left
 * 14) define MS_SCROLLRIGHT         8192    // scroll flat to the right
 * 15) define MS_SCROLLUP            16384   // scroll flat to the north
 * 16) define MS_SCROLLDOWN          32768   // scroll flat to the south

// Thing flags // Skill flags.
 * 1) define MTF_EASY           1
 * 2) define MTF_NORMAL         2
 * 3) define MTF_HARD           4
 * 4) define MTF_AMBUSH         8      // Deaf monsters/do not react to sound.
 * 5) define MTF_MULTI          16     // Multiplayer specific
 * 6) define MTF_SPAWN          32     // Don't spawn until triggered in level
 * 7) define MTF_ONTOUCH        64     // Trigger something when picked up
 * 8) define MTF_ONDEATH        128    // Trigger something when killed
 * 9) define MTF_SECRET         256    // Count as secret for intermission when picked up
 * 10) define MTF_NOINFIGHTING   512    // Ignore other attackers
 * 11) define MTF_NODEATHMATCH   1024   // Don't spawn in deathmatch games
 * 12) define MTF_NONETGAME      2048   // Don't spawn in standard netgame mode (coop)
 * 13) define MTF_NIGHTMARE      4096   // [kex] Nightmare thing

struct mapthing_t {   int16_t     x;    int16_t     y;    int16_t     z;    int16_t     angle; int16_t    type; int16_t    options; int16_t    tid; };