Skip to content

Commit

Permalink
Merge branch 'master' into sdl2-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Apr 24, 2017
2 parents 7b128dc + 429fa57 commit a28f58d
Show file tree
Hide file tree
Showing 27 changed files with 162 additions and 209 deletions.
13 changes: 9 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions data/convert-icon
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions man/bash-completion/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*heretic
*hexen
*strife
*.template
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
5 changes: 5 additions & 0 deletions src/d_iwad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
32 changes: 16 additions & 16 deletions src/doom/doomdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -87,7 +87,7 @@ typedef struct
short tag;
// sidenum[1] will be -1 if one sided
short sidenum[2];
} PACKEDATTR maplinedef_t;
}) maplinedef_t;


//
Expand Down Expand Up @@ -135,7 +135,7 @@ typedef struct


// Sector definition, from editing.
typedef struct
typedef PACKED_STRUCT (
{
short floorheight;
short ceilingheight;
Expand All @@ -144,28 +144,28 @@ 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;
short angle;
short linedef;
short side;
short offset;
} PACKEDATTR mapseg_t;
}) mapseg_t;



Expand All @@ -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;
Expand All @@ -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;



Expand Down
4 changes: 3 additions & 1 deletion src/doom/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/doom/r_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@
// 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;


//
// Texture definition.
// 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;
Expand All @@ -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,
Expand Down
10 changes: 9 additions & 1 deletion src/doomtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@
#define PACKEDATTR
#endif

// C99 integer types; with gcc we just use this. Other compilers
#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.

// What is really wanted here is stdint.h; however, some old versions
Expand Down
Loading

0 comments on commit a28f58d

Please sign in to comment.