diff --git a/distrib/win32/.gitignore b/distrib/win32/.gitignore new file mode 100644 index 0000000000..f9ced93c2f --- /dev/null +++ b/distrib/win32/.gitignore @@ -0,0 +1 @@ +packages diff --git a/distrib/win32/setup.iss b/distrib/win32/setup.iss index 25993fe7c0..abd94b55dc 100644 --- a/distrib/win32/setup.iss +++ b/distrib/win32/setup.iss @@ -1,10 +1,10 @@ ; Script generated by the Inno Setup Script Wizard. [Setup] -OutputBaseFilename=deng-1.9.0-beta6-setup +OutputBaseFilename=deng-1.9.0-beta6.5-setup VersionInfoVersion=1.9.0.6 AppName=Doomsday Engine -AppVerName=Doomsday Engine 1.9.0-beta6 +AppVerName=Doomsday Engine 1.9.0-beta6.5 AppPublisher=deng Team AppPublisherURL=http://sourceforge.net/projects/deng/ AppSupportURL=http://www.dengine.net/dew/ @@ -58,10 +58,10 @@ Source: "SDL.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engin Source: "SDL_net.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine Source: "SDL_mixer.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine Source: "eax.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine -Source: "ogg.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine Source: "smpeg.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine -Source: "vorbis.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine -Source: "vorbisfile.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine +Source: "libogg-0.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine +Source: "libvorbis-0.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine +Source: "libvorbisfile-3.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine Source: "..\..\external\lzss\win32\lzss.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine Source: "..\..\external\zlib\win32\zlib1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine Source: "..\..\external\libpng\win32\libpng13.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine diff --git a/doomsday/build/win32/.gitignore b/doomsday/build/win32/.gitignore index 51e8b711ff..f36a4636d3 100644 --- a/doomsday/build/win32/.gitignore +++ b/doomsday/build/win32/.gitignore @@ -1 +1,5 @@ vcconfig.bat +*.pk3 +*.dll +obj +bin diff --git a/doomsday/build/win32/vcbuild.bat b/doomsday/build/win32/vcbuild.bat index f7ee7c137c..d29a05935f 100644 --- a/doomsday/build/win32/vcbuild.bat +++ b/doomsday/build/win32/vcbuild.bat @@ -199,10 +199,10 @@ GOTO Done copy "%SDL_LIB%\SDL.dll" . copy "%SDLNET_LIB%\SDL_net.dll" . copy "%SDLMIXER_LIB%\SDL_mixer.dll" . -copy "%SDLMIXER_LIB%\ogg.dll" . copy "%SDLMIXER_LIB%\smpeg.dll" . -copy "%SDLMIXER_LIB%\vorbis.dll" . -copy "%SDLMIXER_LIB%\vorbisfile.dll" . +copy "%SDLMIXER_LIB%\libogg-0.dll" . +copy "%SDLMIXER_LIB%\libvorbis-0.dll" . +copy "%SDLMIXER_LIB%\libvorbisfile-3.dll" . copy "%EAX_DLL%\eax.dll" . copy "%DENG_ENGINE_DIR%\doc\LICENSE" license.txt GOTO Done diff --git a/doomsday/engine/api/dd_maptypes.h b/doomsday/engine/api/dd_maptypes.h index e86e029a0e..93659c0a79 100644 --- a/doomsday/engine/api/dd_maptypes.h +++ b/doomsday/engine/api/dd_maptypes.h @@ -1,79 +1,79 @@ -/* Generated by .\..\..\engine\scripts\makedmt.py */ - -#ifndef __DOOMSDAY_PLAY_PUBLIC_MAP_DATA_TYPES_H__ -#define __DOOMSDAY_PLAY_PUBLIC_MAP_DATA_TYPES_H__ - -#define DMT_VERTEX_POS DDVT_FLOAT - - -#define DMT_SEG_SIDEDEF DDVT_PTR - -#define DMT_SEG_V DDVT_PTR // [Start, End] of the segment. -#define DMT_SEG_LINEDEF DDVT_PTR -#define DMT_SEG_SEC DDVT_PTR -#define DMT_SEG_SUBSECTOR DDVT_PTR -#define DMT_SEG_BACKSEG DDVT_PTR -#define DMT_SEG_ANGLE DDVT_ANGLE -#define DMT_SEG_SIDE DDVT_BYTE // 0=front, 1=back -#define DMT_SEG_FLAGS DDVT_BYTE -#define DMT_SEG_LENGTH DDVT_FLOAT // Accurate length of the segment (v1 -> v2). -#define DMT_SEG_OFFSET DDVT_FLOAT - -#define DMT_SUBSECTOR_SEGCOUNT DDVT_UINT -#define DMT_SUBSECTOR_SEGS DDVT_PTR // [segcount] size. -#define DMT_SUBSECTOR_POLYOBJ DDVT_PTR // NULL, if there is no polyobj. -#define DMT_SUBSECTOR_SECTOR DDVT_PTR - -#define DMT_MATERIAL_MNAMESPACE DDVT_INT -#define DMT_MATERIAL_FLAGS DDVT_SHORT // MATF_* flags -#define DMT_MATERIAL_WIDTH DDVT_SHORT // Defined width & height of the material (not texture!). -#define DMT_MATERIAL_HEIGHT DDVT_SHORT - -#define DMT_SURFACE_FLAGS DDVT_INT // SUF_ flags -#define DMT_SURFACE_MATERIAL DDVT_PTR -#define DMT_SURFACE_BLENDMODE DDVT_BLENDMODE -#define DMT_SURFACE_NORMAL DDVT_FLOAT // Surface normal -#define DMT_SURFACE_OFFSET DDVT_FLOAT // [X, Y] Planar offset to surface material origin. -#define DMT_SURFACE_RGBA DDVT_FLOAT // Surface color tint - -#define DMT_PLANE_SOUNDORG DDVT_PTR // Sound origin for plane -#define DMT_PLANE_SECTOR DDVT_PTR // Owner of the plane (temp) -#define DMT_PLANE_HEIGHT DDVT_FLOAT // Current height -#define DMT_PLANE_GLOW DDVT_FLOAT // Glow amount -#define DMT_PLANE_GLOWRGB DDVT_FLOAT // Glow color -#define DMT_PLANE_TARGET DDVT_FLOAT // Target height -#define DMT_PLANE_SPEED DDVT_FLOAT // Move speed - -#define DMT_SECTOR_VALIDCOUNT DDVT_INT // if == validCount, already checked. -#define DMT_SECTOR_LIGHTLEVEL DDVT_FLOAT -#define DMT_SECTOR_RGB DDVT_FLOAT -#define DMT_SECTOR_MOBJLIST DDVT_PTR // List of mobjs in the sector. -#define DMT_SECTOR_LINEDEFCOUNT DDVT_UINT -#define DMT_SECTOR_LINEDEFS DDVT_PTR // [lineDefCount+1] size. -#define DMT_SECTOR_SSECTORCOUNT DDVT_UINT -#define DMT_SECTOR_SSECTORS DDVT_PTR // [ssectorCount+1] size. -#define DMT_SECTOR_SOUNDORG DDVT_PTR -#define DMT_SECTOR_PLANECOUNT DDVT_UINT -#define DMT_SECTOR_REVERB DDVT_FLOAT - -#define DMT_SIDEDEF_SEGCOUNT DDVT_UINT -#define DMT_SIDEDEF_SEGS DDVT_PTR // [segcount] size, segs arranged left>right -#define DMT_SIDEDEF_LINE DDVT_PTR -#define DMT_SIDEDEF_SECTOR DDVT_PTR -#define DMT_SIDEDEF_FLAGS DDVT_SHORT - -#define DMT_LINEDEF_SEC DDVT_PTR - -#define DMT_LINEDEF_V DDVT_PTR -#define DMT_LINEDEF_SIDEDEFS DDVT_PTR -#define DMT_LINEDEF_FLAGS DDVT_INT // Public DDLF_* flags. -#define DMT_LINEDEF_SLOPETYPE DDVT_INT -#define DMT_LINEDEF_VALIDCOUNT DDVT_INT -#define DMT_LINEDEF_DX DDVT_FLOAT -#define DMT_LINEDEF_DY DDVT_FLOAT -#define DMT_LINEDEF_BBOX DDVT_FLOAT - -#define DMT_NODE_BBOX DDVT_FLOAT // Bounding box for each child. -#define DMT_NODE_CHILDREN DDVT_UINT // If NF_SUBSECTOR it's a subsector. - -#endif +/* Generated by .\..\..\engine\scripts\makedmt.py */ + +#ifndef __DOOMSDAY_PLAY_PUBLIC_MAP_DATA_TYPES_H__ +#define __DOOMSDAY_PLAY_PUBLIC_MAP_DATA_TYPES_H__ + +#define DMT_VERTEX_POS DDVT_FLOAT + + +#define DMT_SEG_SIDEDEF DDVT_PTR + +#define DMT_SEG_V DDVT_PTR // [Start, End] of the segment. +#define DMT_SEG_LINEDEF DDVT_PTR +#define DMT_SEG_SEC DDVT_PTR +#define DMT_SEG_SUBSECTOR DDVT_PTR +#define DMT_SEG_BACKSEG DDVT_PTR +#define DMT_SEG_ANGLE DDVT_ANGLE +#define DMT_SEG_SIDE DDVT_BYTE // 0=front, 1=back +#define DMT_SEG_FLAGS DDVT_BYTE +#define DMT_SEG_LENGTH DDVT_FLOAT // Accurate length of the segment (v1 -> v2). +#define DMT_SEG_OFFSET DDVT_FLOAT + +#define DMT_SUBSECTOR_SEGCOUNT DDVT_UINT +#define DMT_SUBSECTOR_SEGS DDVT_PTR // [segcount] size. +#define DMT_SUBSECTOR_POLYOBJ DDVT_PTR // NULL, if there is no polyobj. +#define DMT_SUBSECTOR_SECTOR DDVT_PTR + +#define DMT_MATERIAL_MNAMESPACE DDVT_INT +#define DMT_MATERIAL_FLAGS DDVT_SHORT // MATF_* flags +#define DMT_MATERIAL_WIDTH DDVT_SHORT // Defined width & height of the material (not texture!). +#define DMT_MATERIAL_HEIGHT DDVT_SHORT + +#define DMT_SURFACE_FLAGS DDVT_INT // SUF_ flags +#define DMT_SURFACE_MATERIAL DDVT_PTR +#define DMT_SURFACE_BLENDMODE DDVT_BLENDMODE +#define DMT_SURFACE_NORMAL DDVT_FLOAT // Surface normal +#define DMT_SURFACE_OFFSET DDVT_FLOAT // [X, Y] Planar offset to surface material origin. +#define DMT_SURFACE_RGBA DDVT_FLOAT // Surface color tint + +#define DMT_PLANE_SOUNDORG DDVT_PTR // Sound origin for plane +#define DMT_PLANE_SECTOR DDVT_PTR // Owner of the plane (temp) +#define DMT_PLANE_HEIGHT DDVT_FLOAT // Current height +#define DMT_PLANE_GLOW DDVT_FLOAT // Glow amount +#define DMT_PLANE_GLOWRGB DDVT_FLOAT // Glow color +#define DMT_PLANE_TARGET DDVT_FLOAT // Target height +#define DMT_PLANE_SPEED DDVT_FLOAT // Move speed + +#define DMT_SECTOR_VALIDCOUNT DDVT_INT // if == validCount, already checked. +#define DMT_SECTOR_LIGHTLEVEL DDVT_FLOAT +#define DMT_SECTOR_RGB DDVT_FLOAT +#define DMT_SECTOR_MOBJLIST DDVT_PTR // List of mobjs in the sector. +#define DMT_SECTOR_LINEDEFCOUNT DDVT_UINT +#define DMT_SECTOR_LINEDEFS DDVT_PTR // [lineDefCount+1] size. +#define DMT_SECTOR_SSECTORCOUNT DDVT_UINT +#define DMT_SECTOR_SSECTORS DDVT_PTR // [ssectorCount+1] size. +#define DMT_SECTOR_SOUNDORG DDVT_PTR +#define DMT_SECTOR_PLANECOUNT DDVT_UINT +#define DMT_SECTOR_REVERB DDVT_FLOAT + +#define DMT_SIDEDEF_SEGCOUNT DDVT_UINT +#define DMT_SIDEDEF_SEGS DDVT_PTR // [segcount] size, segs arranged left>right +#define DMT_SIDEDEF_LINE DDVT_PTR +#define DMT_SIDEDEF_SECTOR DDVT_PTR +#define DMT_SIDEDEF_FLAGS DDVT_SHORT + +#define DMT_LINEDEF_SEC DDVT_PTR + +#define DMT_LINEDEF_V DDVT_PTR +#define DMT_LINEDEF_SIDEDEFS DDVT_PTR +#define DMT_LINEDEF_FLAGS DDVT_INT // Public DDLF_* flags. +#define DMT_LINEDEF_SLOPETYPE DDVT_INT +#define DMT_LINEDEF_VALIDCOUNT DDVT_INT +#define DMT_LINEDEF_DX DDVT_FLOAT +#define DMT_LINEDEF_DY DDVT_FLOAT +#define DMT_LINEDEF_BBOX DDVT_FLOAT + +#define DMT_NODE_BBOX DDVT_FLOAT // Bounding box for each child. +#define DMT_NODE_CHILDREN DDVT_UINT // If NF_SUBSECTOR it's a subsector. + +#endif diff --git a/doomsday/engine/portable/include/p_maptypes.h b/doomsday/engine/portable/include/p_maptypes.h index f8ca5ce46b..60da67f1c6 100644 --- a/doomsday/engine/portable/include/p_maptypes.h +++ b/doomsday/engine/portable/include/p_maptypes.h @@ -1,492 +1,492 @@ -/* Generated by .\..\..\engine\scripts\makedmt.py */ - -#ifndef __DOOMSDAY_PLAY_MAP_DATA_TYPES_H__ -#define __DOOMSDAY_PLAY_MAP_DATA_TYPES_H__ - -#include "p_mapdata.h" - -#define LO_prev link[0] -#define LO_next link[1] - -typedef struct shadowvert_s { - float inner[2]; - float extended[2]; -} shadowvert_t; - -typedef struct lineowner_s { - struct linedef_s *lineDef; - struct lineowner_s *link[2]; // {prev, next} (i.e. {anticlk, clk}). - binangle_t angle; // between this and next clockwise. - shadowvert_t shadowOffsets; -} lineowner_t; - -#define V_pos v.pos - -typedef struct mvertex_s { - // Vertex index. Always valid after loading and pruning of unused - // vertices has occurred. - int index; - - // Reference count. When building normal node info, unused vertices - // will be pruned. - int refCount; - - // Usually NULL, unless this vertex occupies the same location as a - // previous vertex. Only used during the pruning phase. - struct vertex_s *equiv; - - struct edgetip_s *tipSet; // Set of wall_tips. - -// Final data. - double pos[2]; -} mvertex_t; - -typedef struct vertex_s { - runtime_mapdata_header_t header; - unsigned int numLineOwners; // Number of line owners. - lineowner_t* lineOwners; // Lineowner base ptr [numlineowners] size. A doubly, circularly linked list. The base is the line with the lowest angle and the next-most with the largest angle. - fvertex_t v; - mvertex_t buildData; -} vertex_t; - -// Helper macros for accessing seg data elements. -#define FRONT 0 -#define BACK 1 - -#define SG_v(n) v[(n)] -#define SG_vpos(n) SG_v(n)->V_pos - -#define SG_v1 SG_v(0) -#define SG_v1pos SG_v(0)->V_pos - -#define SG_v2 SG_v(1) -#define SG_v2pos SG_v(1)->V_pos - -#define SG_sector(n) sec[(n)] -#define SG_frontsector SG_sector(FRONT) -#define SG_backsector SG_sector(BACK) - -#define SEG_SIDEDEF(s) ((s)->lineDef->sideDefs[(s)->side]) - -// Seg flags -#define SEGF_POLYOBJ 0x1 // Seg is part of a poly object. - -// Seg frame flags -#define SEGINF_FACINGFRONT 0x0001 -#define SEGINF_BACKSECSKYFIX 0x0002 - -typedef struct seg_s { - runtime_mapdata_header_t header; - struct vertex_s* v[2]; // [Start, End] of the segment. - struct linedef_s* lineDef; - struct sector_s* sec[2]; - struct subsector_s* subsector; - struct seg_s* backSeg; - angle_t angle; - byte side; // 0=front, 1=back - byte flags; - float length; // Accurate length of the segment (v1 -> v2). - float offset; - biassurface_t* bsuf[3]; // 0=middle, 1=top, 2=bottom - short frameFlags; -} seg_t; - -#define SUBF_MIDPOINT 0x80 // Midpoint is tri-fan centre. - -typedef struct subsector_s { - runtime_mapdata_header_t header; - unsigned int segCount; - struct seg_s** segs; // [segcount] size. - struct polyobj_s* polyObj; // NULL, if there is no polyobj. - struct sector_s* sector; - int addSpriteCount; // frame number of last R_AddSprites - unsigned int inSectorID; - int flags; - int validCount; - unsigned int reverb[NUM_REVERB_DATA]; - fvertex_t bBox[2]; // Min and max points. - float worldGridOffset[2]; // Offset to align the top left of the bBox to the world grid. - fvertex_t midPoint; // Center of vertices. - unsigned short numVertices; - struct fvertex_s** vertices; // [numvertices] size - struct shadowlink_s* shadows; - struct biassurface_s** bsuf; // [sector->planeCount] size. -} subsector_t; - -typedef struct materiallayer_s { - int stage; // -1 => layer not in use. - short tics; - gltextureid_t tex; -} material_layer_t; - -typedef enum { - MEC_UNKNOWN = -1, - MEC_METAL = 0, - MEC_ROCK, - MEC_WOOD, - MEC_CLOTH, - NUM_MATERIAL_ENV_CLASSES -} material_env_class_t; - -typedef struct material_s { - runtime_mapdata_header_t header; - material_namespace_t mnamespace; - struct ded_material_s* def; // Can be NULL (was generated automatically). - short flags; // MATF_* flags - short width; // Defined width & height of the material (not texture!). - short height; - material_layer_t layers[DDMAX_MATERIAL_LAYERS]; - unsigned int numLayers; - material_env_class_t envClass; // Used for environmental sound properties. - struct ded_detailtexture_s* detail; - struct ded_decor_s* decoration; - struct ded_ptcgen_s* ptcGen; - struct ded_reflection_s* reflection; - boolean inAnimGroup; // True if belongs to some animgroup. - struct material_s* current; - struct material_s* next; - float inter; - struct material_s* globalNext; // Linear list linking all materials. -} material_t; - -// Internal surface flags: -#define SUIF_PVIS 0x0001 -#define SUIF_MATERIAL_FIX 0x0002 // Current texture is a fix replacement - // (not sent to clients, returned via DMU etc). -#define SUIF_BLEND 0x0004 // Surface possibly has a blended texture. -#define SUIF_NO_RADIO 0x0008 // No fakeradio for this surface. - -#define SUIF_UPDATE_FLAG_MASK 0xff00 -#define SUIF_UPDATE_DECORATIONS 0x8000 - -// Decoration types. -typedef enum { - DT_LIGHT, - DT_MODEL, - NUM_DECORTYPES -} decortype_t; - -// Helper macros for accessing decor data. -#define DEC_LIGHT(x) (&((x)->data.light)) -#define DEC_MODEL(x) (&((x)->data.model)) - -typedef struct surfacedecor_s { - float pos[3]; // World coordinates of the decoration. - decortype_t type; - subsector_t* subsector; - union surfacedecor_data_u { - struct surfacedecor_light_s { - const struct ded_decorlight_s* def; - } light; - struct surfacedecor_model_s { - const struct ded_decormodel_s* def; - struct modeldef_s* mf; - float pitch, yaw; - } model; - } data; -} surfacedecor_t; - -typedef struct surface_s { - runtime_mapdata_header_t header; - void* owner; // Either @c DMU_SIDEDEF, or @c DMU_PLANE - int flags; // SUF_ flags - int oldFlags; - material_t* material; - blendmode_t blendMode; - float normal[3]; // Surface normal - float oldNormal[3]; - float offset[2]; // [X, Y] Planar offset to surface material origin. - float oldOffset[2][2]; - float visOffset[2]; - float visOffsetDelta[2]; - float rgba[4]; // Surface color tint - short inFlags; // SUIF_* flags - unsigned int numDecorations; - surfacedecor_t *decorations; -} surface_t; - -typedef enum { - PLN_FLOOR, - PLN_CEILING, - PLN_MID, - NUM_PLANE_TYPES -} planetype_t; - -#define PS_normal surface.normal -#define PS_material surface.material -#define PS_offset surface.offset -#define PS_visoffset surface.visOffset -#define PS_rgba surface.rgba -#define PS_flags surface.flags -#define PS_inflags surface.inFlags - -typedef struct plane_s { - runtime_mapdata_header_t header; - ddmobj_base_t soundOrg; // Sound origin for plane - struct sector_s* sector; // Owner of the plane (temp) - surface_t surface; - float height; // Current height - float oldHeight[2]; - float glow; // Glow amount - float glowRGB[3]; // Glow color - float target; // Target height - float speed; // Move speed - float visHeight; // Visible plane height (smoothed) - float visHeightDelta; - planetype_t type; // PLN_* type. - int planeID; -} plane_t; - -// Helper macros for accessing sector floor/ceiling plane data elements. -#define SP_plane(n) planes[(n)] - -#define SP_planesurface(n) SP_plane(n)->surface -#define SP_planeheight(n) SP_plane(n)->height -#define SP_planenormal(n) SP_plane(n)->surface.normal -#define SP_planematerial(n) SP_plane(n)->surface.material -#define SP_planeoffset(n) SP_plane(n)->surface.offset -#define SP_planergb(n) SP_plane(n)->surface.rgba -#define SP_planeglow(n) SP_plane(n)->glow -#define SP_planeglowrgb(n) SP_plane(n)->glowRGB -#define SP_planetarget(n) SP_plane(n)->target -#define SP_planespeed(n) SP_plane(n)->speed -#define SP_planesoundorg(n) SP_plane(n)->soundOrg -#define SP_planevisheight(n) SP_plane(n)->visHeight - -#define SP_ceilsurface SP_planesurface(PLN_CEILING) -#define SP_ceilheight SP_planeheight(PLN_CEILING) -#define SP_ceilnormal SP_planenormal(PLN_CEILING) -#define SP_ceilmaterial SP_planematerial(PLN_CEILING) -#define SP_ceiloffset SP_planeoffset(PLN_CEILING) -#define SP_ceilrgb SP_planergb(PLN_CEILING) -#define SP_ceilglow SP_planeglow(PLN_CEILING) -#define SP_ceilglowrgb SP_planeglowrgb(PLN_CEILING) -#define SP_ceiltarget SP_planetarget(PLN_CEILING) -#define SP_ceilspeed SP_planespeed(PLN_CEILING) -#define SP_ceilsoundorg SP_planesoundorg(PLN_CEILING) -#define SP_ceilvisheight SP_planevisheight(PLN_CEILING) - -#define SP_floorsurface SP_planesurface(PLN_FLOOR) -#define SP_floorheight SP_planeheight(PLN_FLOOR) -#define SP_floornormal SP_planenormal(PLN_FLOOR) -#define SP_floormaterial SP_planematerial(PLN_FLOOR) -#define SP_flooroffset SP_planeoffset(PLN_FLOOR) -#define SP_floorrgb SP_planergb(PLN_FLOOR) -#define SP_floorglow SP_planeglow(PLN_FLOOR) -#define SP_floorglowrgb SP_planeglowrgb(PLN_FLOOR) -#define SP_floortarget SP_planetarget(PLN_FLOOR) -#define SP_floorspeed SP_planespeed(PLN_FLOOR) -#define SP_floorsoundorg SP_planesoundorg(PLN_FLOOR) -#define SP_floorvisheight SP_planevisheight(PLN_FLOOR) - -#define S_skyfix(n) skyFix[(n)] -#define S_floorskyfix S_skyfix(PLN_FLOOR) -#define S_ceilskyfix S_skyfix(PLN_CEILING) - -// Sector frame flags -#define SIF_VISIBLE 0x1 // Sector is visible on this frame. -#define SIF_FRAME_CLEAR 0x1 // Flags to clear before each frame. -#define SIF_LIGHT_CHANGED 0x2 - -// Sector flags. -#define SECF_UNCLOSED 0x1 // An unclosed sector (some sort of fancy hack). - -typedef struct msector_s { - // Sector index. Always valid after loading & pruning. - int index; - - // Suppress superfluous mini warnings. - int warnedFacing; - int refCount; -} msector_t; - -typedef struct sector_s { - runtime_mapdata_header_t header; - int frameFlags; - int validCount; // if == validCount, already checked. - int flags; - float bBox[4]; // Bounding box for the sector. - float approxArea; // Rough approximation of sector area. - float lightLevel; - float oldLightLevel; - float rgb[3]; - float oldRGB[3]; - struct mobj_s* mobjList; // List of mobjs in the sector. - unsigned int lineDefCount; - struct linedef_s** lineDefs; // [lineDefCount+1] size. - unsigned int ssectorCount; - struct subsector_s** ssectors; // [ssectorCount+1] size. - unsigned int numReverbSSecAttributors; - struct subsector_s** reverbSSecs; // [numReverbSSecAttributors] size. - ddmobj_base_t soundOrg; - unsigned int planeCount; - struct plane_s** planes; // [planeCount+1] size. - struct sector_s* lightSource; // Main sky light source. - unsigned int blockCount; // Number of gridblocks in the sector. - unsigned int changedBlockCount; // Number of blocks to mark changed. - unsigned short* blocks; // Light grid block indices. - float reverb[NUM_REVERB_DATA]; - msector_t buildData; -} sector_t; - -// Parts of a wall segment. -typedef enum segsection_e { - SEG_MIDDLE, - SEG_TOP, - SEG_BOTTOM -} segsection_t; - -// Helper macros for accessing sidedef top/middle/bottom section data elements. -#define SW_surface(n) sections[(n)] -#define SW_surfaceflags(n) SW_surface(n).flags -#define SW_surfaceinflags(n) SW_surface(n).inFlags -#define SW_surfacematerial(n) SW_surface(n).material -#define SW_surfacenormal(n) SW_surface(n).normal -#define SW_surfaceoffset(n) SW_surface(n).offset -#define SW_surfacevisoffset(n) SW_surface(n).visOffset -#define SW_surfacergba(n) SW_surface(n).rgba -#define SW_surfaceblendmode(n) SW_surface(n).blendMode - -#define SW_middlesurface SW_surface(SEG_MIDDLE) -#define SW_middleflags SW_surfaceflags(SEG_MIDDLE)0 -#define SW_middleinflags SW_surfaceinflags(SEG_MIDDLE) -#define SW_middlematerial SW_surfacematerial(SEG_MIDDLE) -#define SW_middlenormal SW_surfacenormal(SEG_MIDDLE) -#define SW_middletexmove SW_surfacetexmove(SEG_MIDDLE) -#define SW_middleoffset SW_surfaceoffset(SEG_MIDDLE) -#define SW_middlevisoffset SW_surfacevisoffset(SEG_MIDDLE) -#define SW_middlergba SW_surfacergba(SEG_MIDDLE) -#define SW_middleblendmode SW_surfaceblendmode(SEG_MIDDLE) - -#define SW_topsurface SW_surface(SEG_TOP) -#define SW_topflags SW_surfaceflags(SEG_TOP) -#define SW_topinflags SW_surfaceinflags(SEG_TOP) -#define SW_topmaterial SW_surfacematerial(SEG_TOP) -#define SW_topnormal SW_surfacenormal(SEG_TOP) -#define SW_toptexmove SW_surfacetexmove(SEG_TOP) -#define SW_topoffset SW_surfaceoffset(SEG_TOP) -#define SW_topvisoffset SW_surfacevisoffset(SEG_TOP) -#define SW_toprgba SW_surfacergba(SEG_TOP) - -#define SW_bottomsurface SW_surface(SEG_BOTTOM) -#define SW_bottomflags SW_surfaceflags(SEG_BOTTOM) -#define SW_bottominflags SW_surfaceinflags(SEG_BOTTOM) -#define SW_bottommaterial SW_surfacematerial(SEG_BOTTOM) -#define SW_bottomnormal SW_surfacenormal(SEG_BOTTOM) -#define SW_bottomtexmove SW_surfacetexmove(SEG_BOTTOM) -#define SW_bottomoffset SW_surfaceoffset(SEG_BOTTOM) -#define SW_bottomvisoffset SW_surfacevisoffset(SEG_BOTTOM) -#define SW_bottomrgba SW_surfacergba(SEG_BOTTOM) - -#define FRONT 0 -#define BACK 1 - -typedef struct msidedef_s { - // Sidedef index. Always valid after loading & pruning. - int index; - int refCount; -} msidedef_t; - -typedef struct sidedef_s { - runtime_mapdata_header_t header; - surface_t sections[3]; - unsigned int segCount; - struct seg_s** segs; // [segcount] size, segs arranged left>right - struct linedef_s* line; - struct sector_s* sector; - short flags; - msidedef_t buildData; - int fakeRadioUpdateCount; // frame number of last update - shadowcorner_t topCorners[2]; - shadowcorner_t bottomCorners[2]; - shadowcorner_t sideCorners[2]; - edgespan_t spans[2]; // [left, right] -} sidedef_t; - -// Helper macros for accessing linedef data elements. -#define L_v(n) v[(n)] -#define L_vpos(n) v[(n)]->V_pos - -#define L_v1 L_v(0) -#define L_v1pos L_v(0)->V_pos - -#define L_v2 L_v(1) -#define L_v2pos L_v(1)->V_pos - -#define L_vo(n) vo[(n)] -#define L_vo1 L_vo(0) -#define L_vo2 L_vo(1) - -#define L_side(n) sideDefs[(n)] -#define L_frontside L_side(FRONT) -#define L_backside L_side(BACK) -#define L_sector(n) sideDefs[(n)]->sector -#define L_frontsector L_sector(FRONT) -#define L_backsector L_sector(BACK) - -// Is this line self-referencing (front sec == back sec)? -#define LINE_SELFREF(l) ((l)->L_frontside && (l)->L_backside && \ - (l)->L_frontsector == (l)->L_backsector) - -// Internal flags: -#define LF_POLYOBJ 0x1 // Line is part of a polyobject. - -#define MLF_TWOSIDED 0x1 // Line is marked two-sided. -#define MLF_ZEROLENGTH 0x2 // Zero length (line should be totally ignored). -#define MLF_SELFREF 0x4 // Sector is the same on both sides. -#define MLF_POLYOBJ 0x8 // Line is part of a polyobj. - -typedef struct mlinedef_s { - // Linedef index. Always valid after loading & pruning of zero - // length lines has occurred. - int index; - int mlFlags; // MLF_* flags. - - // One-sided linedef used for a special effect (windows). - // The value refers to the opposite sector on the back side. - struct sector_s *windowEffect; - - // Normally NULL, except when this linedef directly overlaps an earlier - // one (a rarely-used trick to create higher mid-masked textures). - // No segs should be created for these overlapping linedefs. - struct linedef_s *overlap; -} mlinedef_t; - -typedef struct linedef_s { - runtime_mapdata_header_t header; - struct vertex_s* v[2]; - struct lineowner_s* vo[2]; // Links to vertex line owner nodes [left, right] - struct sidedef_s* sideDefs[2]; - int flags; // Public DDLF_* flags. - byte inFlags; // Internal LF_* flags - slopetype_t slopeType; - int validCount; - binangle_t angle; // Calculated from front side's normal - float dX; - float dY; - float length; // Accurate length - float bBox[4]; - boolean mapped[DDMAXPLAYERS]; // Whether the line has been mapped by each player yet. - mlinedef_t buildData; - unsigned short shadowVisFrame[2]; // Framecount of last time shadows were drawn for this line, for each side [right, left]. -} linedef_t; - -#define RIGHT 0 -#define LEFT 1 - -/** - * An infinite line of the form point + direction vectors. - */ -typedef struct partition_s { - float x, y; - float dX, dY; -} partition_t; - -typedef struct node_s { - runtime_mapdata_header_t header; - partition_t partition; - float bBox[2][4]; // Bounding box for each child. - unsigned int children[2]; // If NF_SUBSECTOR it's a subsector. -} node_t; - -#endif +/* Generated by .\..\..\engine\scripts\makedmt.py */ + +#ifndef __DOOMSDAY_PLAY_MAP_DATA_TYPES_H__ +#define __DOOMSDAY_PLAY_MAP_DATA_TYPES_H__ + +#include "p_mapdata.h" + +#define LO_prev link[0] +#define LO_next link[1] + +typedef struct shadowvert_s { + float inner[2]; + float extended[2]; +} shadowvert_t; + +typedef struct lineowner_s { + struct linedef_s *lineDef; + struct lineowner_s *link[2]; // {prev, next} (i.e. {anticlk, clk}). + binangle_t angle; // between this and next clockwise. + shadowvert_t shadowOffsets; +} lineowner_t; + +#define V_pos v.pos + +typedef struct mvertex_s { + // Vertex index. Always valid after loading and pruning of unused + // vertices has occurred. + int index; + + // Reference count. When building normal node info, unused vertices + // will be pruned. + int refCount; + + // Usually NULL, unless this vertex occupies the same location as a + // previous vertex. Only used during the pruning phase. + struct vertex_s *equiv; + + struct edgetip_s *tipSet; // Set of wall_tips. + +// Final data. + double pos[2]; +} mvertex_t; + +typedef struct vertex_s { + runtime_mapdata_header_t header; + unsigned int numLineOwners; // Number of line owners. + lineowner_t* lineOwners; // Lineowner base ptr [numlineowners] size. A doubly, circularly linked list. The base is the line with the lowest angle and the next-most with the largest angle. + fvertex_t v; + mvertex_t buildData; +} vertex_t; + +// Helper macros for accessing seg data elements. +#define FRONT 0 +#define BACK 1 + +#define SG_v(n) v[(n)] +#define SG_vpos(n) SG_v(n)->V_pos + +#define SG_v1 SG_v(0) +#define SG_v1pos SG_v(0)->V_pos + +#define SG_v2 SG_v(1) +#define SG_v2pos SG_v(1)->V_pos + +#define SG_sector(n) sec[(n)] +#define SG_frontsector SG_sector(FRONT) +#define SG_backsector SG_sector(BACK) + +#define SEG_SIDEDEF(s) ((s)->lineDef->sideDefs[(s)->side]) + +// Seg flags +#define SEGF_POLYOBJ 0x1 // Seg is part of a poly object. + +// Seg frame flags +#define SEGINF_FACINGFRONT 0x0001 +#define SEGINF_BACKSECSKYFIX 0x0002 + +typedef struct seg_s { + runtime_mapdata_header_t header; + struct vertex_s* v[2]; // [Start, End] of the segment. + struct linedef_s* lineDef; + struct sector_s* sec[2]; + struct subsector_s* subsector; + struct seg_s* backSeg; + angle_t angle; + byte side; // 0=front, 1=back + byte flags; + float length; // Accurate length of the segment (v1 -> v2). + float offset; + biassurface_t* bsuf[3]; // 0=middle, 1=top, 2=bottom + short frameFlags; +} seg_t; + +#define SUBF_MIDPOINT 0x80 // Midpoint is tri-fan centre. + +typedef struct subsector_s { + runtime_mapdata_header_t header; + unsigned int segCount; + struct seg_s** segs; // [segcount] size. + struct polyobj_s* polyObj; // NULL, if there is no polyobj. + struct sector_s* sector; + int addSpriteCount; // frame number of last R_AddSprites + unsigned int inSectorID; + int flags; + int validCount; + unsigned int reverb[NUM_REVERB_DATA]; + fvertex_t bBox[2]; // Min and max points. + float worldGridOffset[2]; // Offset to align the top left of the bBox to the world grid. + fvertex_t midPoint; // Center of vertices. + unsigned short numVertices; + struct fvertex_s** vertices; // [numvertices] size + struct shadowlink_s* shadows; + struct biassurface_s** bsuf; // [sector->planeCount] size. +} subsector_t; + +typedef struct materiallayer_s { + int stage; // -1 => layer not in use. + short tics; + gltextureid_t tex; +} material_layer_t; + +typedef enum { + MEC_UNKNOWN = -1, + MEC_METAL = 0, + MEC_ROCK, + MEC_WOOD, + MEC_CLOTH, + NUM_MATERIAL_ENV_CLASSES +} material_env_class_t; + +typedef struct material_s { + runtime_mapdata_header_t header; + material_namespace_t mnamespace; + struct ded_material_s* def; // Can be NULL (was generated automatically). + short flags; // MATF_* flags + short width; // Defined width & height of the material (not texture!). + short height; + material_layer_t layers[DDMAX_MATERIAL_LAYERS]; + unsigned int numLayers; + material_env_class_t envClass; // Used for environmental sound properties. + struct ded_detailtexture_s* detail; + struct ded_decor_s* decoration; + struct ded_ptcgen_s* ptcGen; + struct ded_reflection_s* reflection; + boolean inAnimGroup; // True if belongs to some animgroup. + struct material_s* current; + struct material_s* next; + float inter; + struct material_s* globalNext; // Linear list linking all materials. +} material_t; + +// Internal surface flags: +#define SUIF_PVIS 0x0001 +#define SUIF_MATERIAL_FIX 0x0002 // Current texture is a fix replacement + // (not sent to clients, returned via DMU etc). +#define SUIF_BLEND 0x0004 // Surface possibly has a blended texture. +#define SUIF_NO_RADIO 0x0008 // No fakeradio for this surface. + +#define SUIF_UPDATE_FLAG_MASK 0xff00 +#define SUIF_UPDATE_DECORATIONS 0x8000 + +// Decoration types. +typedef enum { + DT_LIGHT, + DT_MODEL, + NUM_DECORTYPES +} decortype_t; + +// Helper macros for accessing decor data. +#define DEC_LIGHT(x) (&((x)->data.light)) +#define DEC_MODEL(x) (&((x)->data.model)) + +typedef struct surfacedecor_s { + float pos[3]; // World coordinates of the decoration. + decortype_t type; + subsector_t* subsector; + union surfacedecor_data_u { + struct surfacedecor_light_s { + const struct ded_decorlight_s* def; + } light; + struct surfacedecor_model_s { + const struct ded_decormodel_s* def; + struct modeldef_s* mf; + float pitch, yaw; + } model; + } data; +} surfacedecor_t; + +typedef struct surface_s { + runtime_mapdata_header_t header; + void* owner; // Either @c DMU_SIDEDEF, or @c DMU_PLANE + int flags; // SUF_ flags + int oldFlags; + material_t* material; + blendmode_t blendMode; + float normal[3]; // Surface normal + float oldNormal[3]; + float offset[2]; // [X, Y] Planar offset to surface material origin. + float oldOffset[2][2]; + float visOffset[2]; + float visOffsetDelta[2]; + float rgba[4]; // Surface color tint + short inFlags; // SUIF_* flags + unsigned int numDecorations; + surfacedecor_t *decorations; +} surface_t; + +typedef enum { + PLN_FLOOR, + PLN_CEILING, + PLN_MID, + NUM_PLANE_TYPES +} planetype_t; + +#define PS_normal surface.normal +#define PS_material surface.material +#define PS_offset surface.offset +#define PS_visoffset surface.visOffset +#define PS_rgba surface.rgba +#define PS_flags surface.flags +#define PS_inflags surface.inFlags + +typedef struct plane_s { + runtime_mapdata_header_t header; + ddmobj_base_t soundOrg; // Sound origin for plane + struct sector_s* sector; // Owner of the plane (temp) + surface_t surface; + float height; // Current height + float oldHeight[2]; + float glow; // Glow amount + float glowRGB[3]; // Glow color + float target; // Target height + float speed; // Move speed + float visHeight; // Visible plane height (smoothed) + float visHeightDelta; + planetype_t type; // PLN_* type. + int planeID; +} plane_t; + +// Helper macros for accessing sector floor/ceiling plane data elements. +#define SP_plane(n) planes[(n)] + +#define SP_planesurface(n) SP_plane(n)->surface +#define SP_planeheight(n) SP_plane(n)->height +#define SP_planenormal(n) SP_plane(n)->surface.normal +#define SP_planematerial(n) SP_plane(n)->surface.material +#define SP_planeoffset(n) SP_plane(n)->surface.offset +#define SP_planergb(n) SP_plane(n)->surface.rgba +#define SP_planeglow(n) SP_plane(n)->glow +#define SP_planeglowrgb(n) SP_plane(n)->glowRGB +#define SP_planetarget(n) SP_plane(n)->target +#define SP_planespeed(n) SP_plane(n)->speed +#define SP_planesoundorg(n) SP_plane(n)->soundOrg +#define SP_planevisheight(n) SP_plane(n)->visHeight + +#define SP_ceilsurface SP_planesurface(PLN_CEILING) +#define SP_ceilheight SP_planeheight(PLN_CEILING) +#define SP_ceilnormal SP_planenormal(PLN_CEILING) +#define SP_ceilmaterial SP_planematerial(PLN_CEILING) +#define SP_ceiloffset SP_planeoffset(PLN_CEILING) +#define SP_ceilrgb SP_planergb(PLN_CEILING) +#define SP_ceilglow SP_planeglow(PLN_CEILING) +#define SP_ceilglowrgb SP_planeglowrgb(PLN_CEILING) +#define SP_ceiltarget SP_planetarget(PLN_CEILING) +#define SP_ceilspeed SP_planespeed(PLN_CEILING) +#define SP_ceilsoundorg SP_planesoundorg(PLN_CEILING) +#define SP_ceilvisheight SP_planevisheight(PLN_CEILING) + +#define SP_floorsurface SP_planesurface(PLN_FLOOR) +#define SP_floorheight SP_planeheight(PLN_FLOOR) +#define SP_floornormal SP_planenormal(PLN_FLOOR) +#define SP_floormaterial SP_planematerial(PLN_FLOOR) +#define SP_flooroffset SP_planeoffset(PLN_FLOOR) +#define SP_floorrgb SP_planergb(PLN_FLOOR) +#define SP_floorglow SP_planeglow(PLN_FLOOR) +#define SP_floorglowrgb SP_planeglowrgb(PLN_FLOOR) +#define SP_floortarget SP_planetarget(PLN_FLOOR) +#define SP_floorspeed SP_planespeed(PLN_FLOOR) +#define SP_floorsoundorg SP_planesoundorg(PLN_FLOOR) +#define SP_floorvisheight SP_planevisheight(PLN_FLOOR) + +#define S_skyfix(n) skyFix[(n)] +#define S_floorskyfix S_skyfix(PLN_FLOOR) +#define S_ceilskyfix S_skyfix(PLN_CEILING) + +// Sector frame flags +#define SIF_VISIBLE 0x1 // Sector is visible on this frame. +#define SIF_FRAME_CLEAR 0x1 // Flags to clear before each frame. +#define SIF_LIGHT_CHANGED 0x2 + +// Sector flags. +#define SECF_UNCLOSED 0x1 // An unclosed sector (some sort of fancy hack). + +typedef struct msector_s { + // Sector index. Always valid after loading & pruning. + int index; + + // Suppress superfluous mini warnings. + int warnedFacing; + int refCount; +} msector_t; + +typedef struct sector_s { + runtime_mapdata_header_t header; + int frameFlags; + int validCount; // if == validCount, already checked. + int flags; + float bBox[4]; // Bounding box for the sector. + float approxArea; // Rough approximation of sector area. + float lightLevel; + float oldLightLevel; + float rgb[3]; + float oldRGB[3]; + struct mobj_s* mobjList; // List of mobjs in the sector. + unsigned int lineDefCount; + struct linedef_s** lineDefs; // [lineDefCount+1] size. + unsigned int ssectorCount; + struct subsector_s** ssectors; // [ssectorCount+1] size. + unsigned int numReverbSSecAttributors; + struct subsector_s** reverbSSecs; // [numReverbSSecAttributors] size. + ddmobj_base_t soundOrg; + unsigned int planeCount; + struct plane_s** planes; // [planeCount+1] size. + struct sector_s* lightSource; // Main sky light source. + unsigned int blockCount; // Number of gridblocks in the sector. + unsigned int changedBlockCount; // Number of blocks to mark changed. + unsigned short* blocks; // Light grid block indices. + float reverb[NUM_REVERB_DATA]; + msector_t buildData; +} sector_t; + +// Parts of a wall segment. +typedef enum segsection_e { + SEG_MIDDLE, + SEG_TOP, + SEG_BOTTOM +} segsection_t; + +// Helper macros for accessing sidedef top/middle/bottom section data elements. +#define SW_surface(n) sections[(n)] +#define SW_surfaceflags(n) SW_surface(n).flags +#define SW_surfaceinflags(n) SW_surface(n).inFlags +#define SW_surfacematerial(n) SW_surface(n).material +#define SW_surfacenormal(n) SW_surface(n).normal +#define SW_surfaceoffset(n) SW_surface(n).offset +#define SW_surfacevisoffset(n) SW_surface(n).visOffset +#define SW_surfacergba(n) SW_surface(n).rgba +#define SW_surfaceblendmode(n) SW_surface(n).blendMode + +#define SW_middlesurface SW_surface(SEG_MIDDLE) +#define SW_middleflags SW_surfaceflags(SEG_MIDDLE)0 +#define SW_middleinflags SW_surfaceinflags(SEG_MIDDLE) +#define SW_middlematerial SW_surfacematerial(SEG_MIDDLE) +#define SW_middlenormal SW_surfacenormal(SEG_MIDDLE) +#define SW_middletexmove SW_surfacetexmove(SEG_MIDDLE) +#define SW_middleoffset SW_surfaceoffset(SEG_MIDDLE) +#define SW_middlevisoffset SW_surfacevisoffset(SEG_MIDDLE) +#define SW_middlergba SW_surfacergba(SEG_MIDDLE) +#define SW_middleblendmode SW_surfaceblendmode(SEG_MIDDLE) + +#define SW_topsurface SW_surface(SEG_TOP) +#define SW_topflags SW_surfaceflags(SEG_TOP) +#define SW_topinflags SW_surfaceinflags(SEG_TOP) +#define SW_topmaterial SW_surfacematerial(SEG_TOP) +#define SW_topnormal SW_surfacenormal(SEG_TOP) +#define SW_toptexmove SW_surfacetexmove(SEG_TOP) +#define SW_topoffset SW_surfaceoffset(SEG_TOP) +#define SW_topvisoffset SW_surfacevisoffset(SEG_TOP) +#define SW_toprgba SW_surfacergba(SEG_TOP) + +#define SW_bottomsurface SW_surface(SEG_BOTTOM) +#define SW_bottomflags SW_surfaceflags(SEG_BOTTOM) +#define SW_bottominflags SW_surfaceinflags(SEG_BOTTOM) +#define SW_bottommaterial SW_surfacematerial(SEG_BOTTOM) +#define SW_bottomnormal SW_surfacenormal(SEG_BOTTOM) +#define SW_bottomtexmove SW_surfacetexmove(SEG_BOTTOM) +#define SW_bottomoffset SW_surfaceoffset(SEG_BOTTOM) +#define SW_bottomvisoffset SW_surfacevisoffset(SEG_BOTTOM) +#define SW_bottomrgba SW_surfacergba(SEG_BOTTOM) + +#define FRONT 0 +#define BACK 1 + +typedef struct msidedef_s { + // Sidedef index. Always valid after loading & pruning. + int index; + int refCount; +} msidedef_t; + +typedef struct sidedef_s { + runtime_mapdata_header_t header; + surface_t sections[3]; + unsigned int segCount; + struct seg_s** segs; // [segcount] size, segs arranged left>right + struct linedef_s* line; + struct sector_s* sector; + short flags; + msidedef_t buildData; + int fakeRadioUpdateCount; // frame number of last update + shadowcorner_t topCorners[2]; + shadowcorner_t bottomCorners[2]; + shadowcorner_t sideCorners[2]; + edgespan_t spans[2]; // [left, right] +} sidedef_t; + +// Helper macros for accessing linedef data elements. +#define L_v(n) v[(n)] +#define L_vpos(n) v[(n)]->V_pos + +#define L_v1 L_v(0) +#define L_v1pos L_v(0)->V_pos + +#define L_v2 L_v(1) +#define L_v2pos L_v(1)->V_pos + +#define L_vo(n) vo[(n)] +#define L_vo1 L_vo(0) +#define L_vo2 L_vo(1) + +#define L_side(n) sideDefs[(n)] +#define L_frontside L_side(FRONT) +#define L_backside L_side(BACK) +#define L_sector(n) sideDefs[(n)]->sector +#define L_frontsector L_sector(FRONT) +#define L_backsector L_sector(BACK) + +// Is this line self-referencing (front sec == back sec)? +#define LINE_SELFREF(l) ((l)->L_frontside && (l)->L_backside && \ + (l)->L_frontsector == (l)->L_backsector) + +// Internal flags: +#define LF_POLYOBJ 0x1 // Line is part of a polyobject. + +#define MLF_TWOSIDED 0x1 // Line is marked two-sided. +#define MLF_ZEROLENGTH 0x2 // Zero length (line should be totally ignored). +#define MLF_SELFREF 0x4 // Sector is the same on both sides. +#define MLF_POLYOBJ 0x8 // Line is part of a polyobj. + +typedef struct mlinedef_s { + // Linedef index. Always valid after loading & pruning of zero + // length lines has occurred. + int index; + int mlFlags; // MLF_* flags. + + // One-sided linedef used for a special effect (windows). + // The value refers to the opposite sector on the back side. + struct sector_s *windowEffect; + + // Normally NULL, except when this linedef directly overlaps an earlier + // one (a rarely-used trick to create higher mid-masked textures). + // No segs should be created for these overlapping linedefs. + struct linedef_s *overlap; +} mlinedef_t; + +typedef struct linedef_s { + runtime_mapdata_header_t header; + struct vertex_s* v[2]; + struct lineowner_s* vo[2]; // Links to vertex line owner nodes [left, right] + struct sidedef_s* sideDefs[2]; + int flags; // Public DDLF_* flags. + byte inFlags; // Internal LF_* flags + slopetype_t slopeType; + int validCount; + binangle_t angle; // Calculated from front side's normal + float dX; + float dY; + float length; // Accurate length + float bBox[4]; + boolean mapped[DDMAXPLAYERS]; // Whether the line has been mapped by each player yet. + mlinedef_t buildData; + unsigned short shadowVisFrame[2]; // Framecount of last time shadows were drawn for this line, for each side [right, left]. +} linedef_t; + +#define RIGHT 0 +#define LEFT 1 + +/** + * An infinite line of the form point + direction vectors. + */ +typedef struct partition_s { + float x, y; + float dX, dY; +} partition_t; + +typedef struct node_s { + runtime_mapdata_header_t header; + partition_t partition; + float bBox[2][4]; // Bounding box for each child. + unsigned int children[2]; // If NF_SUBSECTOR it's a subsector. +} node_t; + +#endif diff --git a/snowberry/.cvsignore b/snowberry/.cvsignore deleted file mode 100644 index 0d20b6487c..0000000000 --- a/snowberry/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc diff --git a/snowberry/.gitignore b/snowberry/.gitignore new file mode 100644 index 0000000000..9d0b71a3c7 --- /dev/null +++ b/snowberry/.gitignore @@ -0,0 +1,2 @@ +build +dist diff --git a/snowberry/build.bat b/snowberry/build.bat index 5057819ec5..6b30332f2d 100644 --- a/snowberry/build.bat +++ b/snowberry/build.bat @@ -14,4 +14,5 @@ REM -- Make the executable. REM -- Additional binary dependencies. ECHO Copying dependencies to ./dist... -copy "%PYTHON_DIR%"\DLLs\MSVCP90.dll dist \ No newline at end of file +copy "%PYTHON_DIR%"\DLLs\MSVCP90.dll dist +copy "%PYTHON_DIR%"\DLLs\MSVCR90.dll dist diff --git a/snowberry/setup.py b/snowberry/setup.py index 97a1294e3b..19d0531fe4 100644 --- a/snowberry/setup.py +++ b/snowberry/setup.py @@ -45,6 +45,17 @@ /> + + + + + """