Skip to content

Commit

Permalink
libcommon: Use common.h to include the game's headers
Browse files Browse the repository at this point in the history
For convenience.
  • Loading branch information
skyjake committed Jul 22, 2011
1 parent e971891 commit 7de69a3
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 79 deletions.
39 changes: 39 additions & 0 deletions doomsday/plugins/common/include/common.h
@@ -0,0 +1,39 @@
/**\file
*\section License
* License: GPL
* Online License Link: http://www.gnu.org/licenses/gpl.html
*
*\author Copyright © 2011 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#ifndef __COMMON_GAME_INCLUDES__
#define __COMMON_GAME_INCLUDES__

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
# include "jstrife.h"
#endif

#endif // __COMMON_GAME_INCLUDES__
12 changes: 1 addition & 11 deletions doomsday/plugins/common/include/d_netsv.h
Expand Up @@ -25,17 +25,7 @@
#ifndef __D_NETSV_H__
#define __D_NETSV_H__

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
# include "jstrife.h"
#endif
#include "common.h"

extern char cyclingMaps, mapCycleNoExit;
extern int netSvAllowCheats;
Expand Down
13 changes: 1 addition & 12 deletions doomsday/plugins/common/include/g_common.h
Expand Up @@ -31,18 +31,7 @@

#include "dd_share.h"
#include "g_controls.h"

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
# include "jstrife.h"
#endif
#include "common.h"

#define OBSOLETE CVF_HIDE|CVF_NO_ARCHIVE

Expand Down
13 changes: 1 addition & 12 deletions doomsday/plugins/common/src/am_map.c
Expand Up @@ -34,18 +34,7 @@
#include <ctype.h>
#include <string.h>

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
# include "jstrife.h"
#endif

#include "common.h"
#include "p_mapsetup.h"
#include "hu_stuff.h"
#include "hu_menu.h"
Expand Down
13 changes: 1 addition & 12 deletions doomsday/plugins/common/src/d_net.c
Expand Up @@ -32,18 +32,7 @@

// HEADER FILES ------------------------------------------------------------

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
# include "jstrife.h"
#endif

#include "common.h"
#include "g_common.h"
#include "d_net.h"
#include "p_player.h"
Expand Down
11 changes: 1 addition & 10 deletions doomsday/plugins/common/src/d_netcl.c
Expand Up @@ -32,16 +32,7 @@
#include <string.h>
#include <assert.h>

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#endif

#include "common.h"
#include "am_map.h"
#include "p_saveg.h"
#include "d_net.h"
Expand Down
11 changes: 1 addition & 10 deletions doomsday/plugins/common/src/d_netsv.c
Expand Up @@ -33,16 +33,7 @@
#include <stdio.h>
#include <string.h>

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#endif

#include "common.h"
#include "d_net.h"
#include "p_svtexarc.h"
#include "p_player.h"
Expand Down
13 changes: 1 addition & 12 deletions doomsday/plugins/common/src/dmu_lib.c
Expand Up @@ -31,18 +31,7 @@
#include <stdio.h>
#include <string.h>

#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
# include "jstrife.h"
#endif

#include "common.h"
#include "dmu_lib.h"

// MACROS ------------------------------------------------------------------
Expand Down

0 comments on commit 7de69a3

Please sign in to comment.