Merge branch 'master' into sdl2-branch
This commit is contained in:
commit
a28f58da05
27 changed files with 162 additions and 209 deletions
13
configure.ac
13
configure.ac
|
|
@ -113,15 +113,16 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|||
|
||||
WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION | sed 's/-.*//; s/\./, /g; s/$/, 0/'`
|
||||
|
||||
# This controls the prefix added to the start of program names. For example,
|
||||
# if this is changed to "lemon-", the programs generated will be named
|
||||
# lemon-doom, lemon-heretic, etc.
|
||||
dnl Without a hyphen. This is used for the bash-completion scripts.
|
||||
PROGRAM_SPREFIX=$(echo $PACKAGE_SHORTNAME | tr A-Z a-z)
|
||||
|
||||
PROGRAM_PREFIX=chocolate-
|
||||
dnl With a hyphen, used almost everywhere else.
|
||||
PROGRAM_PREFIX=${PROGRAM_SPREFIX}-
|
||||
|
||||
AC_SUBST(PROGRAM_PREFIX)
|
||||
AC_DEFINE_UNQUOTED(PROGRAM_PREFIX, "$PROGRAM_PREFIX",
|
||||
Change this when you create your awesome forked version)
|
||||
AC_SUBST(PROGRAM_SPREFIX)
|
||||
|
||||
AM_CONFIG_HEADER(config.h:config.hin)
|
||||
|
||||
|
|
@ -151,6 +152,10 @@ AC_OUTPUT([
|
|||
Makefile
|
||||
man/Makefile
|
||||
man/bash-completion/Makefile
|
||||
man/bash-completion/doom.template
|
||||
man/bash-completion/heretic.template
|
||||
man/bash-completion/hexen.template
|
||||
man/bash-completion/strife.template
|
||||
opl/Makefile
|
||||
opl/examples/Makefile
|
||||
pcsound/Makefile
|
||||
|
|
|
|||
|
|
@ -23,8 +23,13 @@ import re
|
|||
try:
|
||||
import Image
|
||||
except ImportError:
|
||||
print("WARNING: Could not update %s. Please install the Python Imaging library." % sys.argv[2])
|
||||
sys.exit(0)
|
||||
try:
|
||||
from PIL import Image
|
||||
except ImportError:
|
||||
print("WARNING: Could not update %s. "
|
||||
"Please install the Python Imaging library or Pillow."
|
||||
% sys.argv[2])
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def convert_image(filename, output_filename):
|
||||
|
|
|
|||
1
man/bash-completion/.gitignore
vendored
1
man/bash-completion/.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
|||
*heretic
|
||||
*hexen
|
||||
*strife
|
||||
*.template
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# bash completion for Chocolate Doom -*- shell-script -*-
|
||||
# bash completion for @PACKAGE_SHORTNAME@ Doom -*- shell-script -*-
|
||||
|
||||
_chocolate_doom()
|
||||
_@PROGRAM_SPREFIX@_doom()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
|
@ -46,6 +46,6 @@ _chocolate_doom()
|
|||
fi
|
||||
} &&
|
||||
|
||||
complete -F _chocolate_doom chocolate-doom
|
||||
complete -F _@PROGRAM_SPREFIX@_doom @PROGRAM_PREFIX@doom
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# bash completion for Chocolate Heretic -*- shell-script -*-
|
||||
# bash completion for @PACKAGE_SHORTNAME@ Heretic -*- shell-script -*-
|
||||
|
||||
_chocolate_heretic()
|
||||
_@PROGRAM_SPREFIX@_heretic()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
|
@ -43,6 +43,6 @@ _chocolate_heretic()
|
|||
fi
|
||||
} &&
|
||||
|
||||
complete -F _chocolate_heretic chocolate-heretic
|
||||
complete -F _@PROGRAM_SPREFIX@_heretic @PROGRAM_PREFIX@heretic
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# bash completion for Chocolate Hexen -*- shell-script -*-
|
||||
# bash completion for @PACKAGE_SHORTNAME@ Hexen -*- shell-script -*-
|
||||
|
||||
_chocolate_hexen()
|
||||
_@PROGRAM_SPREFIX@_hexen()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
|
@ -37,6 +37,6 @@ _chocolate_hexen()
|
|||
fi
|
||||
} &&
|
||||
|
||||
complete -F _chocolate_hexen chocolate-hexen
|
||||
complete -F _@PROGRAM_SPREFIX@_hexen @PROGRAM_PREFIX@hexen
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# bash completion for Chocolate Strife -*- shell-script -*-
|
||||
# bash completion for @PACKAGE_SHORTNAME@ Strife -*- shell-script -*-
|
||||
|
||||
_chocolate_strife()
|
||||
_@PROGRAM_SPREFIX@_strife()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
|
@ -43,6 +43,6 @@ _chocolate_strife()
|
|||
fi
|
||||
} &&
|
||||
|
||||
complete -F _chocolate_strife chocolate-strife
|
||||
complete -F _@PROGRAM_SPREFIX@_strife @PROGRAM_PREFIX@strife
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
|
|
@ -650,6 +650,11 @@ static void AddXdgDirs(void)
|
|||
// source ports is /usr/share/games/doom - we support this through the
|
||||
// XDG_DATA_DIRS mechanism, through which it can be overridden.
|
||||
AddIWADPath(env, "/games/doom");
|
||||
|
||||
// The convention set by RBDOOM-3-BFG is to install Doom 3: BFG
|
||||
// Edition into this directory, under which includes the Doom
|
||||
// Classic WADs.
|
||||
AddIWADPath(env, "/games/doom3bfg/base/wads");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -54,16 +54,16 @@ enum
|
|||
|
||||
|
||||
// A single Vertex.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
} PACKEDATTR mapvertex_t;
|
||||
}) mapvertex_t;
|
||||
|
||||
|
||||
// A SideDef, defining the visual appearance of a wall,
|
||||
// by setting textures and offsets.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short textureoffset;
|
||||
short rowoffset;
|
||||
|
|
@ -72,13 +72,13 @@ typedef struct
|
|||
char midtexture[8];
|
||||
// Front sector, towards viewer.
|
||||
short sector;
|
||||
} PACKEDATTR mapsidedef_t;
|
||||
}) mapsidedef_t;
|
||||
|
||||
|
||||
|
||||
// A LineDef, as used for editing, and as input
|
||||
// to the BSP builder.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
|
|
@ -87,7 +87,7 @@ typedef struct
|
|||
short tag;
|
||||
// sidenum[1] will be -1 if one sided
|
||||
short sidenum[2];
|
||||
} PACKEDATTR maplinedef_t;
|
||||
}) maplinedef_t;
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -135,7 +135,7 @@ typedef struct
|
|||
|
||||
|
||||
// Sector definition, from editing.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short floorheight;
|
||||
short ceilingheight;
|
||||
|
|
@ -144,20 +144,20 @@ typedef struct
|
|||
short lightlevel;
|
||||
short special;
|
||||
short tag;
|
||||
} PACKEDATTR mapsector_t;
|
||||
}) mapsector_t;
|
||||
|
||||
// SubSector, as generated by BSP.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short numsegs;
|
||||
// Index of first one, segs are stored sequentially.
|
||||
short firstseg;
|
||||
} PACKEDATTR mapsubsector_t;
|
||||
}) mapsubsector_t;
|
||||
|
||||
|
||||
// LineSeg, generated by splitting LineDefs
|
||||
// using partition lines selected by BSP builder.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
|
|
@ -165,7 +165,7 @@ typedef struct
|
|||
short linedef;
|
||||
short side;
|
||||
short offset;
|
||||
} PACKEDATTR mapseg_t;
|
||||
}) mapseg_t;
|
||||
|
||||
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ typedef struct
|
|||
// Indicate a leaf.
|
||||
#define NF_SUBSECTOR 0x8000
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
// Partition line from (x,y) to x+dx,y+dy)
|
||||
short x;
|
||||
|
|
@ -190,21 +190,21 @@ typedef struct
|
|||
// else it's a node of another subtree.
|
||||
unsigned short children[2];
|
||||
|
||||
} PACKEDATTR mapnode_t;
|
||||
}) mapnode_t;
|
||||
|
||||
|
||||
|
||||
|
||||
// Thing definition, position, orientation and type,
|
||||
// plus skill/visibility flags and attributes.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
short angle;
|
||||
short type;
|
||||
short options;
|
||||
} PACKEDATTR mapthing_t;
|
||||
}) mapthing_t;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -677,12 +677,14 @@ static void PadRejectArray(byte *array, unsigned int len)
|
|||
|
||||
unsigned int rejectpad[4] =
|
||||
{
|
||||
((totallines * 4 + 3) & ~3) + 24, // Size
|
||||
0, // Size
|
||||
0, // Part of z_zone block header
|
||||
50, // PU_LEVEL
|
||||
0x1d4a11 // DOOM_CONST_ZONEID
|
||||
};
|
||||
|
||||
rejectpad[0] = ((totallines * 4 + 3) & ~3) + 24;
|
||||
|
||||
// Copy values from rejectpad into the destination array.
|
||||
|
||||
dest = array;
|
||||
|
|
|
|||
|
|
@ -56,14 +56,14 @@
|
|||
// into the rectangular texture space using origin
|
||||
// and possibly other attributes.
|
||||
//
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short originx;
|
||||
short originy;
|
||||
short patch;
|
||||
short stepdir;
|
||||
short colormap;
|
||||
} PACKEDATTR mappatch_t;
|
||||
}) mappatch_t;
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -71,7 +71,7 @@ typedef struct
|
|||
// A DOOM wall texture is a list of patches
|
||||
// which are to be combined in a predefined order.
|
||||
//
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
char name[8];
|
||||
int masked;
|
||||
|
|
@ -80,7 +80,7 @@ typedef struct
|
|||
int obsolete;
|
||||
short patchcount;
|
||||
mappatch_t patches[1];
|
||||
} PACKEDATTR maptexture_t;
|
||||
}) maptexture_t;
|
||||
|
||||
|
||||
// A single patch from a texture definition,
|
||||
|
|
|
|||
|
|
@ -63,6 +63,14 @@
|
|||
#define PACKEDATTR
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#define PACKEDPREFIX _Packed
|
||||
#else
|
||||
#define PACKEDPREFIX
|
||||
#endif
|
||||
|
||||
#define PACKED_STRUCT(...) PACKEDPREFIX struct __VA_ARGS__ PACKEDATTR
|
||||
|
||||
// C99 integer types; with gcc we just use this. Other compilers
|
||||
// should add conditional statements that define the C99 types.
|
||||
|
||||
|
|
|
|||
|
|
@ -456,15 +456,6 @@ void wadprintf(void)
|
|||
{
|
||||
return;
|
||||
}
|
||||
// haleyjd FIXME: convert to textscreen code?
|
||||
#ifdef __WATCOMC__
|
||||
_settextposition(23, 2);
|
||||
_setbkcolor(1);
|
||||
_settextcolor(0);
|
||||
_outtext(exrnwads);
|
||||
_settextposition(24, 2);
|
||||
_outtext(exrnwads2);
|
||||
#endif
|
||||
}
|
||||
|
||||
boolean D_AddFile(char *file)
|
||||
|
|
@ -550,41 +541,6 @@ void DrawThermo(void)
|
|||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
progress = (98 * thermCurrent) / thermMax;
|
||||
screen = (char *) 0xb8000 + (THERM_Y * 160 + THERM_X * 2);
|
||||
for (i = 0; i < progress / 2; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 4:
|
||||
case 9:
|
||||
case 14:
|
||||
case 19:
|
||||
case 29:
|
||||
case 34:
|
||||
case 39:
|
||||
case 44:
|
||||
*screen++ = 0xb3;
|
||||
*screen++ = (THERMCOLOR << 4) + 15;
|
||||
break;
|
||||
case 24:
|
||||
*screen++ = 0xba;
|
||||
*screen++ = (THERMCOLOR << 4) + 15;
|
||||
break;
|
||||
default:
|
||||
*screen++ = 0xdb;
|
||||
*screen++ = 0x40 + THERMCOLOR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (progress & 1)
|
||||
{
|
||||
*screen++ = 0xdd;
|
||||
*screen++ = 0x40 + THERMCOLOR;
|
||||
}
|
||||
#else
|
||||
|
||||
// No progress? Don't update the screen.
|
||||
|
||||
progress = (50 * thermCurrent) / thermMax + 2;
|
||||
|
|
@ -607,7 +563,6 @@ void DrawThermo(void)
|
|||
}
|
||||
|
||||
TXT_UpdateScreen();
|
||||
#endif
|
||||
}
|
||||
|
||||
void initStartup(void)
|
||||
|
|
@ -658,39 +613,7 @@ static void finishStartup(void)
|
|||
char tmsg[300];
|
||||
void tprintf(char *msg, int initflag)
|
||||
{
|
||||
// haleyjd FIXME: convert to textscreen code?
|
||||
#ifdef __WATCOMC__
|
||||
char temp[80];
|
||||
int start;
|
||||
int add;
|
||||
int i;
|
||||
|
||||
if (initflag)
|
||||
tmsg[0] = 0;
|
||||
M_StringConcat(tmsg, msg, sizeof(tmsg));
|
||||
blitStartup();
|
||||
DrawThermo();
|
||||
_setbkcolor(4);
|
||||
_settextcolor(15);
|
||||
for (add = start = i = 0; i <= strlen(tmsg); i++)
|
||||
if ((tmsg[i] == '\n') || (!tmsg[i]))
|
||||
{
|
||||
memset(temp, 0, 80);
|
||||
M_StringCopy(temp, tmsg + start, sizeof(temp));
|
||||
if (i - start < sizeof(temp))
|
||||
{
|
||||
temp[i - start] = '\0';
|
||||
}
|
||||
_settextposition(MSG_Y + add, 40 - strlen(temp) / 2);
|
||||
_outtext(temp);
|
||||
start = i + 1;
|
||||
add++;
|
||||
}
|
||||
_settextposition(25, 1);
|
||||
drawstatus();
|
||||
#else
|
||||
printf("%s", msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
// haleyjd: moved up, removed WATCOMC code
|
||||
|
|
|
|||
|
|
@ -48,26 +48,26 @@ enum
|
|||
};
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x, y;
|
||||
} PACKEDATTR mapvertex_t;
|
||||
}) mapvertex_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short textureoffset;
|
||||
short rowoffset;
|
||||
char toptexture[8], bottomtexture[8], midtexture[8];
|
||||
short sector; // on viewer's side
|
||||
} PACKEDATTR mapsidedef_t;
|
||||
}) mapsidedef_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1, v2;
|
||||
short flags;
|
||||
short special, tag;
|
||||
short sidenum[2]; // sidenum[1] will be -1 if one sided
|
||||
} PACKEDATTR maplinedef_t;
|
||||
}) maplinedef_t;
|
||||
|
||||
#define ML_BLOCKING 1
|
||||
#define ML_BLOCKMONSTERS 2
|
||||
|
|
@ -88,43 +88,43 @@ typedef struct
|
|||
#define ML_MAPPED 256 // set if allready drawn in automap
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short floorheight, ceilingheight;
|
||||
char floorpic[8], ceilingpic[8];
|
||||
short lightlevel;
|
||||
short special, tag;
|
||||
} PACKEDATTR mapsector_t;
|
||||
}) mapsector_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short numsegs;
|
||||
short firstseg; // segs are stored sequentially
|
||||
} PACKEDATTR mapsubsector_t;
|
||||
}) mapsubsector_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1, v2;
|
||||
short angle;
|
||||
short linedef, side;
|
||||
short offset;
|
||||
} PACKEDATTR mapseg_t;
|
||||
}) mapseg_t;
|
||||
|
||||
#define NF_SUBSECTOR 0x8000
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x, y, dx, dy; // partition line
|
||||
short bbox[2][4]; // bounding box for each child
|
||||
unsigned short children[2]; // if NF_SUBSECTOR its a subsector
|
||||
} PACKEDATTR mapnode_t;
|
||||
}) mapnode_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x, y;
|
||||
short angle;
|
||||
short type;
|
||||
short options;
|
||||
} PACKEDATTR mapthing_t;
|
||||
}) mapthing_t;
|
||||
|
||||
#define MTF_EASY 1
|
||||
#define MTF_NORMAL 2
|
||||
|
|
@ -139,16 +139,16 @@ typedef struct
|
|||
===============================================================================
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short originx;
|
||||
short originy;
|
||||
short patch;
|
||||
short stepdir;
|
||||
short colormap;
|
||||
} PACKEDATTR mappatch_t;
|
||||
}) mappatch_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
char name[8];
|
||||
boolean masked;
|
||||
|
|
@ -157,7 +157,7 @@ typedef struct
|
|||
int obsolete;
|
||||
short patchcount;
|
||||
mappatch_t patches[1];
|
||||
} PACKEDATTR maptexture_t;
|
||||
}) maptexture_t;
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ static void D_SetDefaultSavePath(void)
|
|||
{
|
||||
// only get hexen.cfg path if one is not already found
|
||||
|
||||
if (!strcmp(SavePathConfig, ""))
|
||||
if (SavePathConfig == NULL || !strcmp(SavePathConfig, ""))
|
||||
{
|
||||
// If we are not using a savegame path (probably because we are on
|
||||
// Windows and not using a config dir), behave like Vanilla Hexen
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@
|
|||
|
||||
// TYPES -------------------------------------------------------------------
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
int marker;
|
||||
int infoOffset;
|
||||
int code;
|
||||
} PACKEDATTR acsHeader_t;
|
||||
}) acsHeader_t;
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ enum
|
|||
ML_BEHAVIOR
|
||||
};
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
} PACKEDATTR mapvertex_t;
|
||||
}) mapvertex_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short textureoffset;
|
||||
short rowoffset;
|
||||
|
|
@ -58,9 +58,9 @@ typedef struct
|
|||
char bottomtexture[8];
|
||||
char midtexture[8];
|
||||
short sector; // on viewer's side
|
||||
} PACKEDATTR mapsidedef_t;
|
||||
}) mapsidedef_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
|
|
@ -72,7 +72,7 @@ typedef struct
|
|||
byte arg4;
|
||||
byte arg5;
|
||||
short sidenum[2]; // sidenum[1] will be -1 if one sided
|
||||
} PACKEDATTR maplinedef_t;
|
||||
}) maplinedef_t;
|
||||
|
||||
#define ML_BLOCKING 0x0001
|
||||
#define ML_BLOCKMONSTERS 0x0002
|
||||
|
|
@ -96,7 +96,7 @@ typedef struct
|
|||
#define SPAC_PUSH 4 // when player/monster pushes line
|
||||
#define SPAC_PCROSS 5 // when projectile crosses line
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short floorheight;
|
||||
short ceilingheight;
|
||||
|
|
@ -105,15 +105,15 @@ typedef struct
|
|||
short lightlevel;
|
||||
short special;
|
||||
short tag;
|
||||
} PACKEDATTR mapsector_t;
|
||||
}) mapsector_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short numsegs;
|
||||
short firstseg; // segs are stored sequentially
|
||||
} PACKEDATTR mapsubsector_t;
|
||||
}) mapsubsector_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
|
|
@ -121,17 +121,17 @@ typedef struct
|
|||
short linedef;
|
||||
short side;
|
||||
short offset;
|
||||
} PACKEDATTR mapseg_t;
|
||||
}) mapseg_t;
|
||||
|
||||
#define NF_SUBSECTOR 0x8000
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x, y, dx, dy; // partition line
|
||||
short bbox[2][4]; // bounding box for each child
|
||||
unsigned short children[2]; // if NF_SUBSECTOR its a subsector
|
||||
} PACKEDATTR mapnode_t;
|
||||
}) mapnode_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short tid;
|
||||
short x;
|
||||
|
|
@ -146,7 +146,7 @@ typedef struct
|
|||
byte arg3;
|
||||
byte arg4;
|
||||
byte arg5;
|
||||
} PACKEDATTR mapthing_t;
|
||||
}) mapthing_t;
|
||||
|
||||
#define MTF_EASY 1
|
||||
#define MTF_NORMAL 2
|
||||
|
|
@ -166,16 +166,16 @@ typedef struct
|
|||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short originx;
|
||||
short originy;
|
||||
short patch;
|
||||
short stepdir;
|
||||
short colormap;
|
||||
} PACKEDATTR mappatch_t;
|
||||
}) mappatch_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
char name[8];
|
||||
boolean masked;
|
||||
|
|
@ -184,6 +184,6 @@ typedef struct
|
|||
int obsolete;
|
||||
short patchcount;
|
||||
mappatch_t patches[1];
|
||||
} PACKEDATTR maptexture_t;
|
||||
}) maptexture_t;
|
||||
|
||||
#endif // __XDDEFS__
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
#define PERCUSSION_LOG_LEN 16
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
byte tremolo;
|
||||
byte attack;
|
||||
|
|
@ -54,25 +54,25 @@ typedef struct
|
|||
byte waveform;
|
||||
byte scale;
|
||||
byte level;
|
||||
} PACKEDATTR genmidi_op_t;
|
||||
}) genmidi_op_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
genmidi_op_t modulator;
|
||||
byte feedback;
|
||||
genmidi_op_t carrier;
|
||||
byte unused;
|
||||
short base_note_offset;
|
||||
} PACKEDATTR genmidi_voice_t;
|
||||
}) genmidi_voice_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
unsigned short flags;
|
||||
byte fine_tuning;
|
||||
byte fixed_note;
|
||||
|
||||
genmidi_voice_t voices[2];
|
||||
} PACKEDATTR genmidi_instr_t;
|
||||
}) genmidi_instr_t;
|
||||
|
||||
// Data associated with a channel of a track that is currently playing.
|
||||
|
||||
|
|
|
|||
|
|
@ -33,19 +33,19 @@
|
|||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
byte chunk_id[4];
|
||||
unsigned int chunk_size;
|
||||
} PACKEDATTR chunk_header_t;
|
||||
}) chunk_header_t;
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
chunk_header_t chunk_header;
|
||||
unsigned short format_type;
|
||||
unsigned short num_tracks;
|
||||
unsigned short time_division;
|
||||
} PACKEDATTR midi_header_t;
|
||||
}) midi_header_t;
|
||||
|
||||
// haleyjd 09/09/10: packing off.
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ typedef enum
|
|||
} midievent;
|
||||
|
||||
// Structure to hold MUS file header
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
byte id[4];
|
||||
unsigned short scorelength;
|
||||
|
|
@ -61,7 +61,7 @@ typedef struct
|
|||
unsigned short primarychannels;
|
||||
unsigned short secondarychannels;
|
||||
unsigned short instrumentcount;
|
||||
} PACKEDATTR musheader;
|
||||
}) musheader;
|
||||
|
||||
// Standard MIDI type 0 header + track header
|
||||
static const byte midiheader[] =
|
||||
|
|
|
|||
|
|
@ -54,16 +54,16 @@ enum
|
|||
|
||||
|
||||
// A single Vertex.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
} PACKEDATTR mapvertex_t;
|
||||
}) mapvertex_t;
|
||||
|
||||
|
||||
// A SideDef, defining the visual appearance of a wall,
|
||||
// by setting textures and offsets.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short textureoffset;
|
||||
short rowoffset;
|
||||
|
|
@ -72,13 +72,13 @@ typedef struct
|
|||
char midtexture[8];
|
||||
// Front sector, towards viewer.
|
||||
short sector;
|
||||
} PACKEDATTR mapsidedef_t;
|
||||
}) mapsidedef_t;
|
||||
|
||||
|
||||
|
||||
// A LineDef, as used for editing, and as input
|
||||
// to the BSP builder.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
|
|
@ -87,7 +87,7 @@ typedef struct
|
|||
short tag;
|
||||
// sidenum[1] will be -1 if one sided
|
||||
short sidenum[2];
|
||||
} PACKEDATTR maplinedef_t;
|
||||
}) maplinedef_t;
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -147,7 +147,7 @@ typedef struct
|
|||
|
||||
|
||||
// Sector definition, from editing.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short floorheight;
|
||||
short ceilingheight;
|
||||
|
|
@ -156,20 +156,20 @@ typedef struct
|
|||
short lightlevel;
|
||||
short special;
|
||||
short tag;
|
||||
} PACKEDATTR mapsector_t;
|
||||
}) mapsector_t;
|
||||
|
||||
// SubSector, as generated by BSP.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short numsegs;
|
||||
// Index of first one, segs are stored sequentially.
|
||||
short firstseg;
|
||||
} PACKEDATTR mapsubsector_t;
|
||||
}) mapsubsector_t;
|
||||
|
||||
|
||||
// LineSeg, generated by splitting LineDefs
|
||||
// using partition lines selected by BSP builder.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
|
|
@ -177,7 +177,7 @@ typedef struct
|
|||
short linedef;
|
||||
short side;
|
||||
short offset;
|
||||
} PACKEDATTR mapseg_t;
|
||||
}) mapseg_t;
|
||||
|
||||
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ typedef struct
|
|||
// Indicate a leaf.
|
||||
#define NF_SUBSECTOR 0x8000
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
// Partition line from (x,y) to x+dx,y+dy)
|
||||
short x;
|
||||
|
|
@ -202,21 +202,21 @@ typedef struct
|
|||
// else it's a node of another subtree.
|
||||
unsigned short children[2];
|
||||
|
||||
} PACKEDATTR mapnode_t;
|
||||
}) mapnode_t;
|
||||
|
||||
|
||||
|
||||
|
||||
// Thing definition, position, orientation and type,
|
||||
// plus skill/visibility flags and attributes.
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
short angle;
|
||||
short type;
|
||||
short options;
|
||||
} PACKEDATTR mapthing_t;
|
||||
}) mapthing_t;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#include <win_opendir.h>
|
||||
#elif defined(__GNUC__) || defined(POSIX)
|
||||
#include <dirent.h>
|
||||
#elif defined(__WATCOMC__)
|
||||
#include <direct.h>
|
||||
#else
|
||||
#error Need an include for dirent.h!
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -670,12 +670,14 @@ static void PadRejectArray(byte *array, unsigned int len)
|
|||
|
||||
unsigned int rejectpad[4] =
|
||||
{
|
||||
((totallines * 4 + 3) & ~3) + 24, // Size
|
||||
0, // Size
|
||||
0, // Part of z_zone block header
|
||||
50, // PU_LEVEL
|
||||
0x1d4a11 // DOOM_CONST_ZONEID
|
||||
};
|
||||
|
||||
rejectpad[0] = ((totallines * 4 + 3) & ~3) + 24;
|
||||
|
||||
// Copy values from rejectpad into the destination array.
|
||||
|
||||
dest = array;
|
||||
|
|
|
|||
|
|
@ -52,14 +52,14 @@
|
|||
// into the rectangular texture space using origin
|
||||
// and possibly other attributes.
|
||||
//
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short originx;
|
||||
short originy;
|
||||
short patch;
|
||||
//short stepdir; // villsa [STRIFE] removed
|
||||
//short colormap; // villsa [STRIFE] removed
|
||||
} PACKEDATTR mappatch_t;
|
||||
}) mappatch_t;
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -67,7 +67,7 @@ typedef struct
|
|||
// A DOOM wall texture is a list of patches
|
||||
// which are to be combined in a predefined order.
|
||||
//
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
char name[8];
|
||||
int masked;
|
||||
|
|
@ -76,7 +76,7 @@ typedef struct
|
|||
//int obsolete; // villsa [STRIFE] removed
|
||||
short patchcount;
|
||||
mappatch_t patches[1];
|
||||
} PACKEDATTR maptexture_t;
|
||||
}) maptexture_t;
|
||||
|
||||
|
||||
// A single patch from a texture definition,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
// and we compose textures from the TEXTURE1/2 lists
|
||||
// of patches.
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
short width; // bounding box size
|
||||
short height;
|
||||
|
|
@ -34,14 +34,14 @@ typedef struct
|
|||
short topoffset; // pixels below the origin
|
||||
int columnofs[8]; // only [width] used
|
||||
// the [0] is &columnofs[width]
|
||||
} PACKEDATTR patch_t;
|
||||
}) patch_t;
|
||||
|
||||
// posts are runs of non masked source pixels
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
byte topdelta; // -1 is the last post in a column
|
||||
byte length; // length data bytes follows
|
||||
} PACKEDATTR post_t;
|
||||
}) post_t;
|
||||
|
||||
// column_t is a list of 0 or more post_t, (byte)-1 terminated
|
||||
typedef post_t column_t;
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ void V_RestoreBuffer(void)
|
|||
// SCREEN SHOTS
|
||||
//
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
char manufacturer;
|
||||
char version;
|
||||
|
|
@ -648,7 +648,7 @@ typedef struct
|
|||
|
||||
char filler[58];
|
||||
unsigned char data; // unbounded
|
||||
} PACKEDATTR pcx_t;
|
||||
}) pcx_t;
|
||||
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -35,21 +35,21 @@
|
|||
|
||||
#include "w_wad.h"
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
// Should be "IWAD" or "PWAD".
|
||||
char identification[4];
|
||||
int numlumps;
|
||||
int infotableofs;
|
||||
} PACKEDATTR wadinfo_t;
|
||||
}) wadinfo_t;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef PACKED_STRUCT (
|
||||
{
|
||||
int filepos;
|
||||
int size;
|
||||
char name[8];
|
||||
} PACKEDATTR filelump_t;
|
||||
}) filelump_t;
|
||||
|
||||
//
|
||||
// GLOBALS
|
||||
|
|
|
|||
Loading…
Reference in a new issue