2014-03-15 16:59:03 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
2023-03-31 12:53:31 +00:00
|
|
|
// Copyright (C) 1999-2023 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// This program is free software distributed under the
|
|
|
|
// terms of the GNU General Public License, version 2.
|
|
|
|
// See the 'LICENSE' file for more details.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file doomdata.h
|
|
|
|
/// \brief all external data is defined here
|
|
|
|
///
|
|
|
|
/// most of the data is loaded into different structures at run time
|
|
|
|
/// some internal structures shared by many modules are here
|
|
|
|
|
|
|
|
#ifndef __DOOMDATA__
|
|
|
|
#define __DOOMDATA__
|
|
|
|
|
|
|
|
// The most basic types we use, portability.
|
|
|
|
#include "doomtype.h"
|
|
|
|
|
|
|
|
// Some global defines, that configure the game.
|
|
|
|
#include "doomdef.h"
|
|
|
|
|
2020-04-12 09:56:36 +00:00
|
|
|
#include "taglist.h"
|
2020-04-19 16:34:00 +00:00
|
|
|
#include "m_fixed.h" // See the mapthing_t scale.
|
2020-04-12 09:56:36 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
//
|
|
|
|
// Map level types.
|
|
|
|
// The following data structures define the persistent format
|
|
|
|
// used in the lumps of the WAD files.
|
|
|
|
//
|
|
|
|
|
|
|
|
// Lump order in a map WAD: each map needs a couple of lumps
|
|
|
|
// to provide a complete scene geometry description.
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ML_LABEL, // A separator, name, MAPxx
|
|
|
|
ML_THINGS, // Enemies, rings, monitors, scenery, etc.
|
|
|
|
ML_LINEDEFS, // Linedefs, from editing
|
|
|
|
ML_SIDEDEFS, // Sidedefs, from editing
|
|
|
|
ML_VERTEXES, // Vertices, edited and BSP splits generated
|
|
|
|
ML_SEGS, // Linesegs, from linedefs split by BSP
|
|
|
|
ML_SSECTORS, // Subsectors, list of linesegs
|
|
|
|
ML_NODES, // BSP nodes
|
|
|
|
ML_SECTORS, // Sectors, from editing
|
|
|
|
ML_REJECT, // LUT, sector-sector visibility
|
|
|
|
ML_BLOCKMAP, // LUT, motion clipping, walls/grid element
|
|
|
|
};
|
|
|
|
|
2018-04-28 14:13:44 +00:00
|
|
|
// Extra flag for objects.
|
|
|
|
#define MTF_EXTRA 1
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
// Reverse gravity flag for objects.
|
|
|
|
#define MTF_OBJECTFLIP 2
|
|
|
|
|
|
|
|
// Special flag used with certain objects.
|
|
|
|
#define MTF_OBJECTSPECIAL 4
|
|
|
|
|
|
|
|
// Deaf monsters/do not react to sound.
|
|
|
|
#define MTF_AMBUSH 8
|
|
|
|
|
|
|
|
// Do not use bit five or after, as they are used for object z-offsets.
|
2023-06-10 10:12:41 +00:00
|
|
|
// Unless it's exclusive to UDMF.
|
|
|
|
|
|
|
|
// Flag to use Z as absolute spawn height, ignoring the floor and ceiling.
|
|
|
|
#define MTF_ABSOLUTEZ 16
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#pragma pack(1)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// A single Vertex.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 x, y;
|
|
|
|
}ATTRPACK mapvertex_t;
|
|
|
|
|
|
|
|
// A SideDef, defining the visual appearance of a wall,
|
|
|
|
// by setting textures and offsets.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 textureoffset, rowoffset;
|
|
|
|
char toptexture[8], bottomtexture[8], midtexture[8];
|
|
|
|
// Front sector, towards viewer.
|
|
|
|
INT16 sector;
|
|
|
|
} ATTRPACK mapsidedef_t;
|
|
|
|
|
|
|
|
// A LineDef, as used for editing, and as input
|
|
|
|
// to the BSP builder.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 v1, v2;
|
|
|
|
INT16 flags;
|
|
|
|
INT16 special;
|
|
|
|
INT16 tag;
|
|
|
|
// sidenum[1] will be 0xffff if one sided
|
|
|
|
UINT16 sidenum[2];
|
|
|
|
} ATTRPACK maplinedef_t;
|
|
|
|
|
|
|
|
//
|
|
|
|
// LineDef attributes.
|
|
|
|
//
|
|
|
|
|
|
|
|
// Solid, is an obstacle.
|
|
|
|
#define ML_IMPASSIBLE 1
|
|
|
|
|
|
|
|
// Blocks monsters only.
|
|
|
|
#define ML_BLOCKMONSTERS 2
|
|
|
|
|
|
|
|
// Backside will not be present at all if not two sided.
|
|
|
|
#define ML_TWOSIDED 4
|
|
|
|
|
|
|
|
// If a texture is pegged, the texture will have
|
|
|
|
// the end exposed to air held constant at the
|
|
|
|
// top or bottom of the texture (stairs or pulled
|
|
|
|
// down things) and will move with a height change
|
|
|
|
// of one of the neighbor sectors.
|
|
|
|
// Unpegged textures allways have the first row of
|
|
|
|
// the texture at the top pixel of the line for both
|
|
|
|
// top and bottom textures (use next to windows).
|
|
|
|
|
|
|
|
// upper texture unpegged
|
|
|
|
#define ML_DONTPEGTOP 8
|
|
|
|
|
|
|
|
// lower texture unpegged
|
|
|
|
#define ML_DONTPEGBOTTOM 16
|
|
|
|
|
2022-01-05 17:40:02 +00:00
|
|
|
#define ML_SKEWTD 32
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
// Don't let Knuckles climb on this line
|
|
|
|
#define ML_NOCLIMB 64
|
|
|
|
|
2022-01-05 17:40:02 +00:00
|
|
|
#define ML_NOSKEW 128
|
|
|
|
#define ML_MIDPEG 256
|
|
|
|
#define ML_MIDSOLID 512
|
|
|
|
#define ML_WRAPMIDTEX 1024
|
2014-03-15 16:59:03 +00:00
|
|
|
|
2019-07-02 22:10:22 +00:00
|
|
|
#define ML_NETONLY 2048 // Apply effect only in netgames
|
|
|
|
#define ML_NONET 4096 // Apply effect only in single player games
|
|
|
|
#define ML_EFFECT6 8192
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
// Bounce off walls!
|
|
|
|
#define ML_BOUNCY 16384
|
|
|
|
|
|
|
|
#define ML_TFERLINE 32768
|
|
|
|
|
|
|
|
// Sector definition, from editing.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 floorheight;
|
|
|
|
INT16 ceilingheight;
|
|
|
|
char floorpic[8];
|
|
|
|
char ceilingpic[8];
|
|
|
|
INT16 lightlevel;
|
|
|
|
INT16 special;
|
|
|
|
INT16 tag;
|
|
|
|
} ATTRPACK mapsector_t;
|
|
|
|
|
|
|
|
// SubSector, as generated by BSP.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
UINT16 numsegs;
|
|
|
|
// Index of first one, segs are stored sequentially.
|
|
|
|
UINT16 firstseg;
|
|
|
|
} ATTRPACK mapsubsector_t;
|
|
|
|
|
|
|
|
|
|
|
|
// LineSeg, generated by splitting LineDefs
|
|
|
|
// using partition lines selected by BSP builder.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 v1, v2;
|
|
|
|
INT16 angle;
|
|
|
|
INT16 linedef;
|
|
|
|
INT16 side;
|
|
|
|
INT16 offset;
|
|
|
|
} ATTRPACK mapseg_t;
|
|
|
|
|
|
|
|
// BSP node structure.
|
|
|
|
|
|
|
|
// Indicate a leaf.
|
|
|
|
#define NF_SUBSECTOR 0x8000
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
// Partition line from (x,y) to x+dx,y+dy)
|
|
|
|
INT16 x, y;
|
|
|
|
INT16 dx, dy;
|
|
|
|
|
|
|
|
// Bounding box for each child, clip against view frustum.
|
|
|
|
INT16 bbox[2][4];
|
|
|
|
|
|
|
|
// If NF_SUBSECTOR it's a subsector, else it's a node of another subtree.
|
|
|
|
UINT16 children[2];
|
|
|
|
} ATTRPACK mapnode_t;
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#pragma pack()
|
|
|
|
#endif
|
|
|
|
|
2021-12-14 05:43:06 +00:00
|
|
|
#define NUMMAPTHINGARGS 10
|
2020-04-11 10:54:34 +00:00
|
|
|
#define NUMMAPTHINGSTRINGARGS 2
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
// Thing definition, position, orientation and type,
|
|
|
|
// plus visibility flags and attributes.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
INT16 x, y;
|
2020-04-19 12:39:16 +00:00
|
|
|
INT16 angle, pitch, roll;
|
2014-03-15 16:59:03 +00:00
|
|
|
UINT16 type;
|
|
|
|
UINT16 options;
|
|
|
|
INT16 z;
|
|
|
|
UINT8 extrainfo;
|
2020-04-12 09:56:36 +00:00
|
|
|
taglist_t tags;
|
2020-04-19 16:34:00 +00:00
|
|
|
fixed_t scale;
|
2023-08-04 20:05:35 +00:00
|
|
|
fixed_t spritexscale, spriteyscale;
|
2020-04-11 10:54:34 +00:00
|
|
|
INT32 args[NUMMAPTHINGARGS];
|
|
|
|
char *stringargs[NUMMAPTHINGSTRINGARGS];
|
2014-03-15 16:59:03 +00:00
|
|
|
struct mobj_s *mobj;
|
|
|
|
} mapthing_t;
|
|
|
|
|
|
|
|
#define ZSHIFT 4
|
|
|
|
|
|
|
|
#define NUMMAPS 1035
|
|
|
|
|
|
|
|
#endif // __DOOMDATA__
|