From 1445d6595a19e1b46658beefe276840d01ac9c17 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 7 Sep 2008 21:19:41 +0000 Subject: Move m_bbox.[ch] back to common (needed by v_video.c). Remove some common->doom header dependencies. Subversion-branch: /branches/raven-branch Subversion-revision: 1211 --- src/Makefile.am | 1 + src/doom/Makefile.am | 1 - src/doom/d_main.h | 8 ------- src/doom/m_bbox.c | 62 ---------------------------------------------------- src/doom/m_bbox.h | 55 ---------------------------------------------- src/i_joystick.c | 2 -- src/i_main.c | 9 +++++++- src/i_video.c | 1 - src/m_bbox.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/m_bbox.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++ src/m_misc.c | 1 - src/v_video.c | 3 +-- 12 files changed, 127 insertions(+), 133 deletions(-) delete mode 100644 src/doom/m_bbox.c delete mode 100644 src/doom/m_bbox.h create mode 100644 src/m_bbox.c create mode 100644 src/m_bbox.h diff --git a/src/Makefile.am b/src/Makefile.am index 9e751dd9..81fbc16e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -39,6 +39,7 @@ i_system.c i_system.h \ i_timer.c i_timer.h \ i_video.c i_video.h \ m_argv.c m_argv.h \ +m_bbox.c m_bbox.h \ m_cheat.c m_cheat.h \ m_config.c m_config.h \ m_fixed.c m_fixed.h \ diff --git a/src/doom/Makefile.am b/src/doom/Makefile.am index 3e142f93..a24aa7f2 100644 --- a/src/doom/Makefile.am +++ b/src/doom/Makefile.am @@ -22,7 +22,6 @@ g_game.c g_game.h \ hu_lib.c hu_lib.h \ hu_stuff.c hu_stuff.h \ info.c info.h \ -m_bbox.c m_bbox.h \ m_menu.c m_menu.h \ p_ceilng.c \ p_doors.c \ diff --git a/src/doom/d_main.h b/src/doom/d_main.h index 79f7c7e3..da59d59d 100644 --- a/src/doom/d_main.h +++ b/src/doom/d_main.h @@ -33,14 +33,6 @@ -// -// D_DoomMain() -// Not a globally visible function, just included for source reference, -// calls all startup code, parses command line options. -// If not overrided by user input, calls N_AdvanceDemo. -// -void D_DoomMain (void); - // Read events from all input devices void D_ProcessEvents (void); diff --git a/src/doom/m_bbox.c b/src/doom/m_bbox.c deleted file mode 100644 index 02389209..00000000 --- a/src/doom/m_bbox.c +++ /dev/null @@ -1,62 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright(C) 1993-1996 Id Software, Inc. -// Copyright(C) 2005 Simon Howard -// -// 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., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -// -// DESCRIPTION: -// Main loop menu stuff. -// Random number LUT. -// Default Config File. -// PCX Screenshots. -// -//----------------------------------------------------------------------------- - - - -#include "m_bbox.h" - - - - -void M_ClearBox (fixed_t *box) -{ - box[BOXTOP] = box[BOXRIGHT] = INT_MIN; - box[BOXBOTTOM] = box[BOXLEFT] = INT_MAX; -} - -void -M_AddToBox -( fixed_t* box, - fixed_t x, - fixed_t y ) -{ - if (xbox[BOXRIGHT]) - box[BOXRIGHT] = x; - if (ybox[BOXTOP]) - box[BOXTOP] = y; -} - - - - - diff --git a/src/doom/m_bbox.h b/src/doom/m_bbox.h deleted file mode 100644 index 3788044b..00000000 --- a/src/doom/m_bbox.h +++ /dev/null @@ -1,55 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright(C) 1993-1996 Id Software, Inc. -// Copyright(C) 2005 Simon Howard -// -// 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., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -// -// DESCRIPTION: -// Nil. -// -//----------------------------------------------------------------------------- - - -#ifndef __M_BBOX__ -#define __M_BBOX__ - -#include - -#include "m_fixed.h" - - -// Bounding box coordinate storage. -enum -{ - BOXTOP, - BOXBOTTOM, - BOXLEFT, - BOXRIGHT -}; // bbox coordinates - -// Bounding box functions. -void M_ClearBox (fixed_t* box); - -void -M_AddToBox -( fixed_t* box, - fixed_t x, - fixed_t y ); - - -#endif diff --git a/src/i_joystick.c b/src/i_joystick.c index 06d3679b..1547e569 100644 --- a/src/i_joystick.c +++ b/src/i_joystick.c @@ -31,10 +31,8 @@ #include #include -#include "doomdef.h" #include "doomtype.h" #include "d_event.h" -#include "d_main.h" #include "i_joystick.h" // When an axis is within the dead zone, it is set to zero. diff --git a/src/i_main.c b/src/i_main.c index 0ba37d11..ac4a68e3 100644 --- a/src/i_main.c +++ b/src/i_main.c @@ -37,7 +37,14 @@ #include "doomtype.h" #include "i_system.h" #include "m_argv.h" -#include "d_main.h" + +// +// D_DoomMain() +// Not a globally visible function, just included for source reference, +// calls all startup code, parses command line options. +// + +void D_DoomMain (void); int main(int argc, char **argv) { diff --git a/src/i_video.c b/src/i_video.c index 4c70c48c..8b7f6892 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -43,7 +43,6 @@ #include "i_video.h" #include "i_scale.h" #include "m_argv.h" -#include "s_sound.h" #include "v_video.h" #include "w_wad.h" #include "z_zone.h" diff --git a/src/m_bbox.c b/src/m_bbox.c new file mode 100644 index 00000000..02389209 --- /dev/null +++ b/src/m_bbox.c @@ -0,0 +1,62 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// Copyright(C) 1993-1996 Id Software, Inc. +// Copyright(C) 2005 Simon Howard +// +// 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., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. +// +// DESCRIPTION: +// Main loop menu stuff. +// Random number LUT. +// Default Config File. +// PCX Screenshots. +// +//----------------------------------------------------------------------------- + + + +#include "m_bbox.h" + + + + +void M_ClearBox (fixed_t *box) +{ + box[BOXTOP] = box[BOXRIGHT] = INT_MIN; + box[BOXBOTTOM] = box[BOXLEFT] = INT_MAX; +} + +void +M_AddToBox +( fixed_t* box, + fixed_t x, + fixed_t y ) +{ + if (xbox[BOXRIGHT]) + box[BOXRIGHT] = x; + if (ybox[BOXTOP]) + box[BOXTOP] = y; +} + + + + + diff --git a/src/m_bbox.h b/src/m_bbox.h new file mode 100644 index 00000000..3788044b --- /dev/null +++ b/src/m_bbox.h @@ -0,0 +1,55 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// Copyright(C) 1993-1996 Id Software, Inc. +// Copyright(C) 2005 Simon Howard +// +// 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., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. +// +// DESCRIPTION: +// Nil. +// +//----------------------------------------------------------------------------- + + +#ifndef __M_BBOX__ +#define __M_BBOX__ + +#include + +#include "m_fixed.h" + + +// Bounding box coordinate storage. +enum +{ + BOXTOP, + BOXBOTTOM, + BOXLEFT, + BOXRIGHT +}; // bbox coordinates + +// Bounding box functions. +void M_ClearBox (fixed_t* box); + +void +M_AddToBox +( fixed_t* box, + fixed_t x, + fixed_t y ); + + +#endif diff --git a/src/m_misc.c b/src/m_misc.c index db62fd42..a42d6b89 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -43,7 +43,6 @@ #endif #include "doomtype.h" -#include "doomstat.h" #include "deh_str.h" diff --git a/src/v_video.c b/src/v_video.c index 918e64e1..a9294cf6 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -32,12 +32,11 @@ #include "i_system.h" #include "doomtype.h" -#include "doomdata.h" #include "deh_str.h" -#include "m_bbox.h" #include "i_swap.h" #include "i_video.h" +#include "m_bbox.h" #include "m_misc.h" #include "v_video.h" #include "w_wad.h" -- cgit v1.2.3