Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean/headers #415

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 2dlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ set(CPPS
add_library(2dlib STATIC ${HEADERS} ${CPPS})
target_link_libraries(2dlib PRIVATE
cfile
bitmap
renderer
)

target_include_directories(2dlib PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/2dlib
>
)
2 changes: 0 additions & 2 deletions lib/Ddgr.h → 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 lib/gr.h → 2dlib/gr.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#ifndef _GR_H
#define _GR_H

#include "Ddgr.h"
#include "ddgr.h"
#include "fix.h"
#include "pserror.h"
#include "pstypes.h"
Expand Down
File renamed without changes.
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
11 changes: 9 additions & 2 deletions AudioEncode/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
set(HEADERS)
set(HEADERS
audio_encode.h)
set(CPPS
encoder.cpp)
audio_encode.cpp)

add_library(AudioEncode STATIC ${HEADERS} ${CPPS})
target_link_libraries(AudioEncode libacm)

target_include_directories(AudioEncode PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/AudioEncode
>
)
2 changes: 1 addition & 1 deletion AudioEncode/encoder.cpp → AudioEncode/audio_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <string.h>
#include "audio_encode.h"
#include "mono.h"
#include "Aencode.h"
#include "aencode.h"

int32_t aenc_ReadSamp(void *data) {
FILE *f = (FILE *)data;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Descent3/AImain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@
#include "attach.h"
#include "demofile.h"
#include "matcen.h"
#include "PHYSICS.H"
#include "physics.h"
#include "difficulty.h"
#include "osiris_dll.h"
#include "multi.h"
Expand Down
3 changes: 2 additions & 1 deletion Descent3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ target_link_libraries(Descent3
fix grtext manage mem misc model module movie stream_audio
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
${PLATFORM_LIBS})
target_include_directories(Descent3 PRIVATE ${PROJECT_BINARY_DIR}/lib)
target_include_directories(Descent3 PUBLIC .
PRIVATE ${PROJECT_BINARY_DIR}/lib)
add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog HogFull NetgamesDir)
install(TARGETS Descent3 RUNTIME)

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: 1 addition & 1 deletion Descent3/CtlCfgElem.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#define CTLCFGELEM_H

#include "newui.h"
#include "Controller.h"
#include "controller.h"
#include "controls.h"
#include "stringtable.h"

Expand Down
2 changes: 1 addition & 1 deletion Descent3/Game2DLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "vclip.h"
#include "osiris_dll.h"
#include "manage.h"
#include "PHYSICS.H"
#include "physics.h"
#include "collide.h"
#include "render.h"
#include "audiotaunts.h"
Expand Down
6 changes: 3 additions & 3 deletions Descent3/GameLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,8 @@
#include "SmallViews.h"
#include "newui.h"
#include "Inventory.h"
#include "PHYSICS.H"
#include "Controller.h"
#include "physics.h"
#include "controller.h"
#include "controls.h"
#include "gamesequence.h"
#include "cockpit.h"
Expand Down Expand Up @@ -862,7 +862,7 @@
#include "pilot.h"
#include "rtperformance.h"
#include "demofile.h"
#include "d3music.h"
#include "musicapi.h"
// #include "gamespy.h"
#include "osiris_dll.h"
#include "aiambient.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/LoadLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@
#include "ambient.h"
#include "matcen.h"
#include "dedicated_server.h"
#include "PHYSICS.H"
#include "physics.h"
#include "levelgoal.h"
#include "aiambient.h"
#include "args.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
#include "mem.h"
#include "newui.h"
#include "stringtable.h"
#include "AppConsole.h"
#include "appconsole.h"
#include "pstring.h"
#include "dedicated_server.h"
#include "osiris_dll.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/ObjInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
#include "player.h"
#include "ship.h"
#include "pserror.h"
#include "PHYSICS.H"
#include "physics.h"
#include "weapon.h"
#include "AIMain.h"
#include "fireball.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@
#include "findintersection.h"
#include "hud.h"
#include "splinter.h"
#include "PHYSICS.H"
#include "physics.h"
#include "viseffect.h"
#include "damage.h"
#include "multi.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/TelCom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
#include "textaux.h"
#include "psrand.h"
#include "controls.h"
#include "d3music.h"
#include "musicapi.h"

#define FRAME_RATE 30.0f
#define TCPE_TIME 0.5f
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
21 changes: 4 additions & 17 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 "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 "d3music.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
2 changes: 1 addition & 1 deletion Descent3/controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
#define CONTROLS_H

#include "object.h"
#include "Controller.h"
#include "controller.h"

class gameController;
class pilot;
Expand Down
2 changes: 1 addition & 1 deletion Descent3/credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
#include "descent.h"
#include "mem.h"
#include "3d.h"
#include "d3music.h"
#include "musicapi.h"
#include "hlsoundlib.h"
#include <string.h>
#include <math.h>
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
2 changes: 1 addition & 1 deletion Descent3/damage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@
#include "attach.h"
#include "difficulty.h"
#include "demofile.h"
#include "d3music.h"
#include "musicapi.h"
#include "osiris_dll.h"
#include "D3ForceFeedback.h"
#include "multi_server.h"
Expand Down
8 changes: 1 addition & 7 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 "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
2 changes: 1 addition & 1 deletion Descent3/descent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
#include "Mission.h"
#include "ddio.h"
#include "controls.h"
#include "Controller.h"
#include "controller.h"
#include "gamesequence.h"
#include "stringtable.h"
#include "dedicated_server.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
Loading