Skip to content

Commit

Permalink
Header clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
GravisZro committed Jun 2, 2024
1 parent 3738b5a commit 552fc59
Show file tree
Hide file tree
Showing 97 changed files with 239 additions and 281 deletions.
2 changes: 0 additions & 2 deletions 2dlib/ddgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
#ifndef _DDGR_H
#define _DDGR_H

#include "pstypes.h"
#include "Macros.h"
#include "grdefs.h"

// ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion 2dlib/lib2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define LIB2D_H

#include "gr.h"
#include "renderer.h"
#include "ddgr.h"

// structures

Expand Down
9 changes: 5 additions & 4 deletions 2dlib/memsurf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@
* $NoKeywords: $
*/

#include "lib2d.h"
#include "gr.h"

#include "bitmap.h"
#include <cstring>
#include <cstdlib>

#include <string.h>
#include <stdlib.h>
#include "lib2d.h"
#include "bitmap.h"
#include "mem.h"

// ----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions 2dlib/pen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@

#include "lib2d.h"
#include "pserror.h"
#include "renderer.h"

#define CLIP_LEFT (vp_InitLeft + vp_Left)
#define CLIP_TOP (vp_InitTop + vp_Top)
Expand Down
5 changes: 0 additions & 5 deletions Descent3/Controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,16 @@

#include "controls.h"

#include "object.h"
#include "pserror.h"
#include "game.h"
#include "ddio.h"
#include "joystick.h"
#include "descent.h"
#include "mono.h"
#include "weapon.h"
#include "controller.h"
#include "Macros.h"
#include "gamesequence.h"
#include "pilot.h"
#include "hud.h"
#include "stringtable.h"
#include "TelCom.h"
#include "multi.h"
#include "args.h"

Expand Down
1 change: 0 additions & 1 deletion Descent3/CtlCfgElem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
#include "localization.h"

#include <string.h>
#include "joystick.h"

// all controller binding texts
static char Ctltext_KeyBindings[][16] = {"",
Expand Down
2 changes: 0 additions & 2 deletions Descent3/TelComGoals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@
#include "game.h"
#include "mem.h"
#include "stringtable.h"
#include "gametexture.h"
#include "textaux.h"
#include "TelComEfxStructs.h"
#include "TelComEffects.h"
#include "levelgoal.h"
#include "textaux.h"
#include "Mission.h"
#include "Macros.h"
#include "hlsoundlib.h"

#include <algorithm>
Expand Down
17 changes: 2 additions & 15 deletions Descent3/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,43 +279,30 @@
* $NoKeywords: $
*/

#include "ConfigItem.h"
#include "player.h"
#include "config.h"
#include "ddio.h"
#include "newui.h"
#include "3d.h"
#include "polymodel.h"
#include "application.h"
#include "descent.h"
#include "mono.h"
#include "Mission.h"
#include "ddio.h"
#include "gamefont.h"
#include "multi_ui.h"
#include "cinematics.h"
#include "hlsoundlib.h"
#include "terrain.h"
#include "cfile.h"
#include "mem.h"
#include "lighting.h"
#include "physics.h"
#include "pilot.h"
#include "hud.h"
#include "voice.h"
#include "bitmap.h"
#include "game.h"
#include "render.h"
#include "stringtable.h"
#include "SmallViews.h"
#include "D3ForceFeedback.h"
#include "descent.h"
#include "appdatabase.h"
#include "hlsoundlib.h"
#include "soundload.h"
#include "sounds.h"
#include "ctlconfig.h"
#include "musicapi.h"
#include "Macros.h"
#include "forcefeedback.h"

#include <string.h>
#include <stdlib.h>
Expand Down
2 changes: 2 additions & 0 deletions Descent3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
#ifndef __CONFIG_H__
#define __CONFIG_H__

#include <cstdint>

// Main menu configuration functions
// ------------------------------------------------------
// ConfigForceFeedback
Expand Down
11 changes: 7 additions & 4 deletions Descent3/ctlconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,20 +277,23 @@
*
* $NoKeywords: $
*/

#include "ctlconfig.h"

#include <cstring>

#include "CtlCfgElem.h"
#include "ctlconfigtxt.h"
#include "game.h"
#include "weapon.h"
#include "pilot.h"
#include "bitmap.h"
#include "multi.h"
#include "gameloop.h"
#include "gamefont.h"
#include "D3ForceFeedback.h"
#include "hlsoundlib.h"
#include "ddio.h"
#include <string.h>
#include "Macros.h"
#include "ddio_common.h"

//////////////////////////////////////////////////////////////////////////////
#define IDV_KCONFIG 10
#define IDV_CCONFIG 11
Expand Down
6 changes: 0 additions & 6 deletions Descent3/dedicated_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,18 @@
typedef int socklen_t;
#endif

#include "pstypes.h"
#include "pserror.h"
#include "pstring.h"
#include "cfile.h"
#include "inffile.h"
#include "dedicated_server.h"
#include "multi.h"
#include "args.h"
#include "appconsole.h"
#include "ddio.h"
#include "newui.h"
#include "ui.h"
#include "multi_dll_mgr.h"
#include "multi_ui.h"
#include "Mission.h"
#include "multi_server.h"
#include "Macros.h"
#include "game.h"
#include "mem.h"
#include "stringtable.h"
#include "multi_save_settings.h"
Expand Down
4 changes: 4 additions & 0 deletions Descent3/descent.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@
#include <stdlib.h>
#include "application.h"

#ifdef __LINUX__
#include "linux_fix.h"
#endif

// The name of this product
#ifdef DEMO
#define PRODUCT_NAME "Descent 3 Demo"
Expand Down
2 changes: 2 additions & 0 deletions Descent3/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,8 @@
#include "debuggraph.h"
#include "vibeinterface.h"

#include "ddvid.h"

// Uncomment this to allow all languages
#define ALLOW_ALL_LANG 1

Expand Down
4 changes: 0 additions & 4 deletions Descent3/lighting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@
* $NoKeywords: $
*/

#include "3d.h"
#include "texture.h"
#include "gametexture.h"
#include "lighting.h"
#include "lightmap.h"
#include "descent.h"
#include "game.h"
#include "room.h"
#include <string.h>
Expand All @@ -42,7 +39,6 @@
#include "config.h"
#include "dedicated_server.h"
#include "objinfo.h"
#include "Macros.h"

#include <algorithm>

Expand Down
7 changes: 4 additions & 3 deletions Descent3/lnxmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

#include <SDL.h>

#include "program.h"
#include "lnxapp.h"
#include "lnxdatabase.h"

#include "descent.h"
#include "application.h"
#include "appdatabase.h"
#include "args.h"
#include "init.h"

Expand All @@ -42,6 +42,7 @@
#include "loki_utils.h"

#include "log.h"
#include "d3_version.h"

extern bool ddio_mouseGrabbed;
int no_debug_dialog = 0;
Expand Down
3 changes: 3 additions & 0 deletions Descent3/multi_dll_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
#ifndef _multi_dll_header
#define _multi_dll_header

#include "ui.h"
#include "newui.h"

#define MT_EVT_LOGIN 1
#define MT_EVT_FIRST_FRAME 2
#define MT_EVT_FRAME 3
Expand Down
5 changes: 5 additions & 0 deletions Descent3/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
#include "descent.h"

#include "appdatabase.h"
#if defined(WIN32)
#include "windatabase.h"
#elif defined(__LINUX__)
#include "lnxdatabase.h"
#endif

program_version Program_version;

Expand Down
2 changes: 1 addition & 1 deletion Descent3/room.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@
#ifndef _ROOM_H
#define _ROOM_H

#include "pstypes.h"
#include "vecmat_external.h"
#include "gametexture.h"
#include "bitmap.h"

#ifdef NEWEDITOR
#include "..\neweditor\ned_GameTexture.h"
Expand Down
7 changes: 2 additions & 5 deletions Descent3/splinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <algorithm>
#include <cstdlib>

#include "fireball.h"
#include "object.h"
#include "splinter.h"
#include "polymodel.h"
#include "renderer.h"
#include "gametexture.h"

#include "Macros.h"
#include <stdlib.h>

#include "psrand.h"

#include <algorithm>

// Given an object, renders the representation of this splinter
void DrawSplinterObject(object *obj) {
Expand Down
8 changes: 2 additions & 6 deletions Descent3/terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <cstdlib>

#ifdef NEWEDITOR
#include "neweditor\globals.h"
#else
#include <stdlib.h>
#endif
#include "vecmat.h"
#include "object.h"
#include "mono.h"
#include "terrain.h"
#include "pserror.h"
#include "texture.h"
#include "bitmap.h"
#include "gametexture.h"
#include "lighting.h"
#include "lightmap.h"
#include "weather.h"
#include <string.h>
#include "mem.h"
#include "Macros.h"
#include "dedicated_server.h"
#include "psrand.h"
#ifdef EDITOR
Expand Down
15 changes: 6 additions & 9 deletions Descent3/weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,34 +332,31 @@
* $NoKeywords: $
*/

#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
#include <cstring>

#include "weapon.h"
#include "pstypes.h"
#include "pserror.h"
#include "object.h"
#include "3d.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "bitmap.h"
#include "vclip.h"
#include "game.h"
#include "polymodel.h"
#include "player.h"
#include "hud.h"
#include "hlsoundlib.h"
#include "soundload.h"
#include "objinfo.h"
#include "gametexture.h"
#include "ship.h"
#include "gauges.h"
#include "sounds.h"
#include "stringtable.h"
#include "Macros.h"
#include "cfile.h"
#include "AIMain.h"

#include <algorithm>

// #include "samirlog.h"
#define LOGFILE(_s)
Expand Down
4 changes: 2 additions & 2 deletions Descent3/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "mono.h"
#include "descent.h"
#include "texture.h"
#include "application.h"
#include "appdatabase.h"
#include "winapp.h"
#include "windatabase.h"
#include "pserror.h"
#include "args.h"
#include "init.h"
Expand Down
Loading

0 comments on commit 552fc59

Please sign in to comment.