From c84f31cf79f19efca70b5e5f0bb1fb9f21b638a1 Mon Sep 17 00:00:00 2001 From: GravisZro Date: Fri, 31 May 2024 18:10:32 -0400 Subject: [PATCH 1/5] Moved header files out of `lib` I moved several include files out of the `lib` directory and back to their own modules. The `CMakeList.txt` files have been updated accordingly. Some filenames were normalize to match their implementation or header counterparts. --- 2dlib/CMakeLists.txt | 9 +++++ AudioEncode/CMakeLists.txt | 11 ++++-- AudioEncode/{encoder.cpp => audio_encode.cpp} | 0 {lib => AudioEncode}/audio_encode.h | 0 Descent3/AImain.cpp | 2 +- Descent3/CMakeLists.txt | 29 ++++++++++++++- Descent3/Game2DLL.cpp | 2 +- Descent3/GameLoop.cpp | 4 +-- Descent3/LoadLevel.cpp | 2 +- Descent3/ObjInit.cpp | 2 +- Descent3/Player.cpp | 2 +- Descent3/TelCom.cpp | 2 +- Descent3/config.cpp | 4 +-- Descent3/credits.cpp | 2 +- Descent3/damage.cpp | 2 +- Descent3/fireball.cpp | 2 +- Descent3/gamecinematics.cpp | 2 +- Descent3/gamesave.cpp | 2 +- Descent3/gamesequence.cpp | 2 +- Descent3/hud.cpp | 2 +- Descent3/init.cpp | 4 +-- Descent3/loadstate.cpp | 2 +- Descent3/matcen.cpp | 2 +- Descent3/menu.cpp | 2 +- Descent3/mmItem.cpp | 2 +- Descent3/multi.cpp | 2 +- Descent3/multisafe.cpp | 2 +- Descent3/newui_core.cpp | 2 +- Descent3/object.cpp | 2 +- Descent3/osiris_predefs.cpp | 2 +- Descent3/robotfire.cpp | 2 +- Descent3/tests/CMakeLists.txt | 21 +++++++++++ Descent3/viseffect.cpp | 2 +- bitmap/CMakeLists.txt | 14 +++++--- bitmap/{bitmain.cpp => bitmap.cpp} | 0 {lib => bitmap}/bitmap.h | 0 {lib => bitmap}/bumpmap.h | 0 {lib => bitmap}/lightmap.h | 0 cfile/CMakeLists.txt | 12 +++++-- czip/CMakeLists.txt | 2 +- {lib => czip}/CZip.h | 0 d3music/CMakeLists.txt | 3 +- d3music/musicapi.cpp | 2 +- lib/d3music.h => d3music/musicapi.h | 0 ddebug/CMakeLists.txt | 13 +++++-- grtext/CMakeLists.txt | 14 +++++++- {lib => grtext}/grtext.h | 0 legacy/editor/gameeditor.cpp | 2 +- {lib => libacm}/Adecode.h | 0 {lib => libacm}/Aencode.h | 0 libacm/CMakeLists.txt | 5 ++- linux/CMakeLists.txt | 23 ++++++++++-- manage/CMakeLists.txt | 12 +++++++ {lib => manage}/manage.h | 0 {lib => manage}/manage_external.h | 0 model/CMakeLists.txt | 22 +++++++++++- {lib => model}/polymodel.h | 0 {lib => model}/polymodel_external.h | 0 module/CMakeLists.txt | 3 +- {lib => module}/module.h | 0 movie/CMakeLists.txt | 23 ++++++++++-- movie/{d3movie.cpp => movie.cpp} | 0 {lib => movie}/movie.h | 0 music/CMakeLists.txt | 5 ++- netcon/{includes => inetfile}/CFtp.h | 0 netcon/inetfile/CMakeLists.txt | 11 +++++- netcon/{includes => inetfile}/Chttpget.h | 0 netcon/{includes => inetfile}/inetgetfile.h | 0 netcon/lanclient/CMakeLists.txt | 30 +++++++++++++++- netgames/dmfc/CMakeLists.txt | 27 ++++++++++++++ networking/CMakeLists.txt | 28 ++++++++++++--- {lib => networking}/directplay.h | 0 {lib => networking}/networking.h | 0 physics/CMakeLists.txt | 22 ++++++++++-- physics/{Collide.cpp => collide.cpp} | 2 +- {lib => physics}/collide.h | 0 ...dIntersection.cpp => findintersection.cpp} | 2 +- {lib => physics}/findintersection.h | 0 {lib => physics}/findintersection_external.h | 0 physics/physics.cpp | 2 +- lib/PHYSICS.H => physics/physics.h | 0 renderer/CMakeLists.txt | 13 +++++++ {lib => renderer}/lnxscreenmode.h | 0 {lib => renderer}/rend_d3d.h | 0 {lib => renderer}/rend_opengl.h | 0 {lib => renderer}/renderer.h | 0 rtperformance/CMakeLists.txt | 13 ++++++- {lib => rtperformance}/rtperformance.h | 0 scripts/CMakeLists.txt | 11 ++++++ sndlib/CMakeLists.txt | 35 +++++++++++++++++-- stream_audio/CMakeLists.txt | 5 +-- ui/CMakeLists.txt | 21 ++++++++++- {lib => ui}/ui.h | 0 {lib => ui}/uidraw.h | 0 {lib => ui}/uires.h | 0 {lib => ui}/uisys.h | 0 unzip/CMakeLists.txt | 2 +- {lib => unzip}/unzip.h | 0 win32/CMakeLists.txt | 23 +++++++++++- 99 files changed, 457 insertions(+), 75 deletions(-) rename AudioEncode/{encoder.cpp => audio_encode.cpp} (100%) rename {lib => AudioEncode}/audio_encode.h (100%) rename bitmap/{bitmain.cpp => bitmap.cpp} (100%) rename {lib => bitmap}/bitmap.h (100%) rename {lib => bitmap}/bumpmap.h (100%) rename {lib => bitmap}/lightmap.h (100%) rename {lib => czip}/CZip.h (100%) rename lib/d3music.h => d3music/musicapi.h (100%) rename {lib => grtext}/grtext.h (100%) rename {lib => libacm}/Adecode.h (100%) rename {lib => libacm}/Aencode.h (100%) rename {lib => manage}/manage.h (100%) rename {lib => manage}/manage_external.h (100%) rename {lib => model}/polymodel.h (100%) rename {lib => model}/polymodel_external.h (100%) rename {lib => module}/module.h (100%) rename movie/{d3movie.cpp => movie.cpp} (100%) rename {lib => movie}/movie.h (100%) rename netcon/{includes => inetfile}/CFtp.h (100%) rename netcon/{includes => inetfile}/Chttpget.h (100%) rename netcon/{includes => inetfile}/inetgetfile.h (100%) rename {lib => networking}/directplay.h (100%) rename {lib => networking}/networking.h (100%) rename physics/{Collide.cpp => collide.cpp} (99%) rename {lib => physics}/collide.h (100%) rename physics/{FindIntersection.cpp => findintersection.cpp} (99%) rename {lib => physics}/findintersection.h (100%) rename {lib => physics}/findintersection_external.h (100%) rename lib/PHYSICS.H => physics/physics.h (100%) rename {lib => renderer}/lnxscreenmode.h (100%) rename {lib => renderer}/rend_d3d.h (100%) rename {lib => renderer}/rend_opengl.h (100%) rename {lib => renderer}/renderer.h (100%) rename {lib => rtperformance}/rtperformance.h (100%) rename {lib => ui}/ui.h (100%) rename {lib => ui}/uidraw.h (100%) rename {lib => ui}/uires.h (100%) rename {lib => ui}/uisys.h (100%) rename {lib => unzip}/unzip.h (100%) diff --git a/2dlib/CMakeLists.txt b/2dlib/CMakeLists.txt index 038ebe05c..a5ebc25da 100644 --- a/2dlib/CMakeLists.txt +++ b/2dlib/CMakeLists.txt @@ -13,3 +13,12 @@ add_library(2dlib STATIC ${HEADERS} ${CPPS}) target_link_libraries(2dlib PRIVATE cfile ) + +target_include_directories(2dlib PUBLIC + $ + $ +) diff --git a/AudioEncode/CMakeLists.txt b/AudioEncode/CMakeLists.txt index 8415e67b1..350f7be4d 100644 --- a/AudioEncode/CMakeLists.txt +++ b/AudioEncode/CMakeLists.txt @@ -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 + $ +) diff --git a/AudioEncode/encoder.cpp b/AudioEncode/audio_encode.cpp similarity index 100% rename from AudioEncode/encoder.cpp rename to AudioEncode/audio_encode.cpp diff --git a/lib/audio_encode.h b/AudioEncode/audio_encode.h similarity index 100% rename from lib/audio_encode.h rename to AudioEncode/audio_encode.h diff --git a/Descent3/AImain.cpp b/Descent3/AImain.cpp index 6f780df99..478e8c4e8 100644 --- a/Descent3/AImain.cpp +++ b/Descent3/AImain.cpp @@ -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" diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index b2561fce8..2b302e085 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -301,7 +301,34 @@ 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) diff --git a/Descent3/Game2DLL.cpp b/Descent3/Game2DLL.cpp index f84a50348..2f999f418 100644 --- a/Descent3/Game2DLL.cpp +++ b/Descent3/Game2DLL.cpp @@ -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" diff --git a/Descent3/GameLoop.cpp b/Descent3/GameLoop.cpp index cd6676e07..45177767d 100644 --- a/Descent3/GameLoop.cpp +++ b/Descent3/GameLoop.cpp @@ -833,7 +833,7 @@ #include "SmallViews.h" #include "newui.h" #include "Inventory.h" -#include "PHYSICS.H" +#include "physics.h" #include "Controller.h" #include "controls.h" #include "gamesequence.h" @@ -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" diff --git a/Descent3/LoadLevel.cpp b/Descent3/LoadLevel.cpp index 976b86dae..5055e4989 100644 --- a/Descent3/LoadLevel.cpp +++ b/Descent3/LoadLevel.cpp @@ -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" diff --git a/Descent3/ObjInit.cpp b/Descent3/ObjInit.cpp index d1612ea31..06e19b4c6 100644 --- a/Descent3/ObjInit.cpp +++ b/Descent3/ObjInit.cpp @@ -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" diff --git a/Descent3/Player.cpp b/Descent3/Player.cpp index ac7b6de3a..171077618 100644 --- a/Descent3/Player.cpp +++ b/Descent3/Player.cpp @@ -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" diff --git a/Descent3/TelCom.cpp b/Descent3/TelCom.cpp index bdbce3de5..6fb953972 100644 --- a/Descent3/TelCom.cpp +++ b/Descent3/TelCom.cpp @@ -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 diff --git a/Descent3/config.cpp b/Descent3/config.cpp index a4ca9b4dd..29848dc3b 100644 --- a/Descent3/config.cpp +++ b/Descent3/config.cpp @@ -299,7 +299,7 @@ #include "cfile.h" #include "mem.h" #include "lighting.h" -#include "PHYSICS.H" +#include "physics.h" #include "pilot.h" #include "hud.h" #include "voice.h" @@ -315,7 +315,7 @@ #include "soundload.h" #include "sounds.h" #include "ctlconfig.h" -#include "d3music.h" +#include "musicapi.h" #include #include diff --git a/Descent3/credits.cpp b/Descent3/credits.cpp index 0277dc097..da5534141 100644 --- a/Descent3/credits.cpp +++ b/Descent3/credits.cpp @@ -88,7 +88,7 @@ #include "descent.h" #include "mem.h" #include "3d.h" -#include "d3music.h" +#include "musicapi.h" #include "hlsoundlib.h" #include #include diff --git a/Descent3/damage.cpp b/Descent3/damage.cpp index 72ff26c8d..6d5347d86 100644 --- a/Descent3/damage.cpp +++ b/Descent3/damage.cpp @@ -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" diff --git a/Descent3/fireball.cpp b/Descent3/fireball.cpp index b82aa27a8..115b1da5c 100644 --- a/Descent3/fireball.cpp +++ b/Descent3/fireball.cpp @@ -593,7 +593,7 @@ #include "objinfo.h" #include "gametexture.h" #include "splinter.h" -#include "PHYSICS.H" +#include "physics.h" #include "damage.h" #include "gameevent.h" #include "weapon.h" diff --git a/Descent3/gamecinematics.cpp b/Descent3/gamecinematics.cpp index fd723ba2e..b48e0bb82 100644 --- a/Descent3/gamecinematics.cpp +++ b/Descent3/gamecinematics.cpp @@ -207,7 +207,7 @@ #include "gamefont.h" #include "AIMain.h" #include "controls.h" -#include "d3music.h" +#include "musicapi.h" #include "gamesequence.h" #include "demofile.h" #include "osiris_dll.h" diff --git a/Descent3/gamesave.cpp b/Descent3/gamesave.cpp index 0e308b7d6..35ec9bd28 100644 --- a/Descent3/gamesave.cpp +++ b/Descent3/gamesave.cpp @@ -295,7 +295,7 @@ #include "matcen.h" #include "hud.h" #include "marker.h" -#include "d3music.h" +#include "musicapi.h" #include "weather.h" // function prototypes. diff --git a/Descent3/gamesequence.cpp b/Descent3/gamesequence.cpp index 877bb829b..97908ef59 100644 --- a/Descent3/gamesequence.cpp +++ b/Descent3/gamesequence.cpp @@ -1075,7 +1075,7 @@ #include "lightmap_info.h" #include "lightmap.h" #include "fireball.h" -#include "d3music.h" +#include "musicapi.h" #include "TelComAutoMap.h" #include "aiambient.h" #include "ObjScript.h" diff --git a/Descent3/hud.cpp b/Descent3/hud.cpp index 214d5667e..46674ecc3 100644 --- a/Descent3/hud.cpp +++ b/Descent3/hud.cpp @@ -426,7 +426,7 @@ #include "ship.h" #include "pilot.h" #include "mem.h" -#include "d3music.h" +#include "musicapi.h" #include "demofile.h" #include "stringtable.h" #include "pstring.h" diff --git a/Descent3/init.cpp b/Descent3/init.cpp index 0dd013409..92ecbd369 100644 --- a/Descent3/init.cpp +++ b/Descent3/init.cpp @@ -960,7 +960,7 @@ #include "pilot.h" #include "gameloop.h" #include "trigger.h" -#include "PHYSICS.H" +#include "physics.h" #include "special_face.h" #include "streamaudio.h" #include "voice.h" @@ -977,7 +977,7 @@ #include "SmallViews.h" #include "uisys.h" #include "rtperformance.h" -#include "d3music.h" +#include "musicapi.h" #include "PilotPicsAPI.h" #include "osiris_dll.h" #include "mem.h" diff --git a/Descent3/loadstate.cpp b/Descent3/loadstate.cpp index 9100d47f9..c925a8715 100644 --- a/Descent3/loadstate.cpp +++ b/Descent3/loadstate.cpp @@ -212,7 +212,7 @@ #include "matcen.h" #include "pilot.h" #include "marker.h" -#include "d3music.h" +#include "musicapi.h" #include "weather.h" #include "cockpit.h" #include "hud.h" diff --git a/Descent3/matcen.cpp b/Descent3/matcen.cpp index 85f896f05..35b931564 100644 --- a/Descent3/matcen.cpp +++ b/Descent3/matcen.cpp @@ -165,7 +165,7 @@ #include "viseffect.h" #include "viseffect_external.h" #include "damage.h" -#include "PHYSICS.H" +#include "physics.h" #include "mem.h" #include "ObjScript.h" #ifndef NEWEDITOR diff --git a/Descent3/menu.cpp b/Descent3/menu.cpp index f8db290f9..248f97f39 100644 --- a/Descent3/menu.cpp +++ b/Descent3/menu.cpp @@ -682,7 +682,7 @@ bool Directplay_lobby_launched_game = false; #endif #include "multi_dll_mgr.h" -#include "d3music.h" +#include "musicapi.h" #include "newui_core.h" #define IDV_QUIT 0xff diff --git a/Descent3/mmItem.cpp b/Descent3/mmItem.cpp index e5a692ef6..2512bf40b 100644 --- a/Descent3/mmItem.cpp +++ b/Descent3/mmItem.cpp @@ -116,7 +116,7 @@ #include "cinematics.h" #include "hlsoundlib.h" #include "soundload.h" -#include "d3music.h" +#include "musicapi.h" #include "ddio.h" // #include diff --git a/Descent3/multi.cpp b/Descent3/multi.cpp index 093798836..b5e0bb34a 100644 --- a/Descent3/multi.cpp +++ b/Descent3/multi.cpp @@ -1692,7 +1692,7 @@ #include "doorway.h" #include "object_lighting.h" #include "spew.h" -#include "PHYSICS.H" +#include "physics.h" #include "SmallViews.h" #include "demofile.h" #include "debuggraph.h" diff --git a/Descent3/multisafe.cpp b/Descent3/multisafe.cpp index 37f924a1a..f335fe9d0 100644 --- a/Descent3/multisafe.cpp +++ b/Descent3/multisafe.cpp @@ -665,7 +665,7 @@ #include "door.h" #include "demofile.h" #include "stringtable.h" -#include "d3music.h" +#include "musicapi.h" #include "multi_world_state.h" #include "osiris_predefs.h" #include "viseffect.h" diff --git a/Descent3/newui_core.cpp b/Descent3/newui_core.cpp index 235f6e752..4fef644fd 100644 --- a/Descent3/newui_core.cpp +++ b/Descent3/newui_core.cpp @@ -197,7 +197,7 @@ #include "stringtable.h" #include "gamefont.h" #include "textaux.h" -#include "d3music.h" +#include "musicapi.h" #include "hlsoundlib.h" #include diff --git a/Descent3/object.cpp b/Descent3/object.cpp index 20f827995..1ee64deae 100644 --- a/Descent3/object.cpp +++ b/Descent3/object.cpp @@ -1144,7 +1144,7 @@ #include "slew.h" #include "game.h" #include "trigger.h" -#include "PHYSICS.H" +#include "physics.h" #include "collide.h" #include "door.h" #include "controls.h" diff --git a/Descent3/osiris_predefs.cpp b/Descent3/osiris_predefs.cpp index fcef38ad9..b113ead10 100644 --- a/Descent3/osiris_predefs.cpp +++ b/Descent3/osiris_predefs.cpp @@ -460,7 +460,7 @@ #include "polymodel.h" #include "multi.h" #include "viseffect.h" -#include "PHYSICS.H" +#include "physics.h" #include "levelgoal.h" #include "BOA.h" #include "marker.h" diff --git a/Descent3/robotfire.cpp b/Descent3/robotfire.cpp index 87b6fa920..6e7328c33 100644 --- a/Descent3/robotfire.cpp +++ b/Descent3/robotfire.cpp @@ -32,7 +32,7 @@ #include "player.h" #include "demofile.h" #include "SmallViews.h" -#include "PHYSICS.H" +#include "physics.h" #include "AIMain.h" #include diff --git a/Descent3/tests/CMakeLists.txt b/Descent3/tests/CMakeLists.txt index 38cf2a563..9db0321e8 100644 --- a/Descent3/tests/CMakeLists.txt +++ b/Descent3/tests/CMakeLists.txt @@ -8,4 +8,25 @@ target_link_libraries( GTest::gtest_main ) +target_include_directories(porting-tests PUBLIC + $ + $ + $ + $ + $ + $ +) + gtest_discover_tests(porting-tests) diff --git a/Descent3/viseffect.cpp b/Descent3/viseffect.cpp index 3fb40e6d9..2741a350b 100644 --- a/Descent3/viseffect.cpp +++ b/Descent3/viseffect.cpp @@ -448,7 +448,7 @@ #include "object.h" #include #include -#include "PHYSICS.H" +#include "physics.h" #include "weapon.h" #include "lighting.h" #include "dedicated_server.h" diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index c3c592027..8e1149152 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -1,9 +1,14 @@ -set(HEADERS iff.h) +set(HEADERS + bitmap.h + bumpmap.h + iff.h + lightmap.h + NewBitmap.h) + set(CPPS NewBitmap.cpp NewBitmap.h - - bitmain.cpp + bitmap.cpp bumpmap.cpp iff.cpp lightmap.cpp @@ -17,8 +22,9 @@ target_link_libraries(bitmap PRIVATE ddio stb ) + target_include_directories(bitmap PUBLIC $ ) diff --git a/bitmap/bitmain.cpp b/bitmap/bitmap.cpp similarity index 100% rename from bitmap/bitmain.cpp rename to bitmap/bitmap.cpp diff --git a/lib/bitmap.h b/bitmap/bitmap.h similarity index 100% rename from lib/bitmap.h rename to bitmap/bitmap.h diff --git a/lib/bumpmap.h b/bitmap/bumpmap.h similarity index 100% rename from lib/bumpmap.h rename to bitmap/bumpmap.h diff --git a/lib/lightmap.h b/bitmap/lightmap.h similarity index 100% rename from lib/lightmap.h rename to bitmap/lightmap.h diff --git a/cfile/CMakeLists.txt b/cfile/CMakeLists.txt index 61959fa30..603ec37b8 100644 --- a/cfile/CMakeLists.txt +++ b/cfile/CMakeLists.txt @@ -1,15 +1,23 @@ +set(HEADERS + cfile.h + hogfile.h + inffile.h +) + set(CPPS cfile.cpp hogfile.cpp inffile.cpp ) -add_library(cfile STATIC ${CPPS}) +add_library(cfile STATIC ${HEADERS} ${CPPS}) target_link_libraries(cfile PRIVATE ddio ) + + target_include_directories(cfile PUBLIC $ ) diff --git a/czip/CMakeLists.txt b/czip/CMakeLists.txt index a107960bb..d3db3beb6 100644 --- a/czip/CMakeLists.txt +++ b/czip/CMakeLists.txt @@ -1,4 +1,4 @@ -set(HEADERS) +set(HEADERS CZip.h) set(CPPS BitIO.cpp CZip.cpp diff --git a/lib/CZip.h b/czip/CZip.h similarity index 100% rename from lib/CZip.h rename to czip/CZip.h diff --git a/d3music/CMakeLists.txt b/d3music/CMakeLists.txt index 7e25415d3..f6f084add 100644 --- a/d3music/CMakeLists.txt +++ b/d3music/CMakeLists.txt @@ -1,4 +1,5 @@ -set(HEADERS) +set(HEADERS + musicapi.h) set(CPPS musicapi.cpp) diff --git a/d3music/musicapi.cpp b/d3music/musicapi.cpp index f5b4fcfab..6c54e1409 100644 --- a/d3music/musicapi.cpp +++ b/d3music/musicapi.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "d3music.h" +#include "musicapi.h" #include "music.h" #include "Macros.h" #include diff --git a/lib/d3music.h b/d3music/musicapi.h similarity index 100% rename from lib/d3music.h rename to d3music/musicapi.h diff --git a/ddebug/CMakeLists.txt b/ddebug/CMakeLists.txt index 555e027e2..01d900373 100644 --- a/ddebug/CMakeLists.txt +++ b/ddebug/CMakeLists.txt @@ -1,3 +1,8 @@ +set(HEADERS + debug.h + mono.h +) + set(CPPS $<$: lnxdebug.cpp @@ -9,11 +14,15 @@ set(CPPS > ) -add_library(ddebug STATIC ${CPPS}) +add_library(ddebug STATIC ${HEADERS} ${CPPS}) add_dependencies(ddebug get_git_hash) target_include_directories(ddebug PUBLIC $ PRIVATE ${PROJECT_BINARY_DIR}/lib # For d3_version.h ) + +target_include_directories(bitmap PUBLIC + +) diff --git a/grtext/CMakeLists.txt b/grtext/CMakeLists.txt index 6f55b4e2c..f32f0d8e2 100644 --- a/grtext/CMakeLists.txt +++ b/grtext/CMakeLists.txt @@ -1,4 +1,7 @@ -set(HEADERS grtextlib.h) +set(HEADERS + grtext.h + grtextlib.h) + set(CPPS grfont.cpp grtext.cpp @@ -8,3 +11,12 @@ add_library(grtext STATIC ${HEADERS} ${CPPS}) target_link_libraries(grtext PRIVATE ddio ) + +target_include_directories(grtext PUBLIC + $ + $ +) diff --git a/lib/grtext.h b/grtext/grtext.h similarity index 100% rename from lib/grtext.h rename to grtext/grtext.h diff --git a/legacy/editor/gameeditor.cpp b/legacy/editor/gameeditor.cpp index 93a4a82b9..00ae2f7b0 100644 --- a/legacy/editor/gameeditor.cpp +++ b/legacy/editor/gameeditor.cpp @@ -521,7 +521,7 @@ #include "pilot.h" #include "streamaudio.h" #include "D3ForceFeedback.h" -#include "d3music.h" +#include "musicapi.h" #include "osiris_dll.h" #include "d3edit.h" #include "editordoc.h" diff --git a/lib/Adecode.h b/libacm/Adecode.h similarity index 100% rename from lib/Adecode.h rename to libacm/Adecode.h diff --git a/lib/Aencode.h b/libacm/Aencode.h similarity index 100% rename from lib/Aencode.h rename to libacm/Aencode.h diff --git a/libacm/CMakeLists.txt b/libacm/CMakeLists.txt index fbd4e5136..ab562028b 100644 --- a/libacm/CMakeLists.txt +++ b/libacm/CMakeLists.txt @@ -1,4 +1,7 @@ -set(HEADERS) +set(HEADERS + Adecode.h + Aencode.h) + set(CPPS aencode.cpp adecode.cpp) diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 73f91b6a1..ea69c2d7e 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,3 +1,10 @@ +set(HEADERS + linux_fix.h + lnxapp.h + lnxcontroller.h + registry.h +) + set(CPPS lnxcon.cpp lnxcon_raw.cpp @@ -8,13 +15,25 @@ set(CPPS registry.cpp ) -add_library(linux STATIC ${CPPS}) +add_library(linux STATIC ${HEADERS} ${CPPS}) target_link_libraries(linux PRIVATE cfile ) target_include_directories(linux PUBLIC $ + $ + $ + $ + $ ) target_link_libraries(linux PRIVATE diff --git a/manage/CMakeLists.txt b/manage/CMakeLists.txt index de9e6866f..63c92556e 100644 --- a/manage/CMakeLists.txt +++ b/manage/CMakeLists.txt @@ -2,6 +2,8 @@ set(HEADERS doorpage.h gamefilepage.h genericpage.h + manage_external.h + manage.h megapage.h powerpage.h robotpage.h @@ -9,6 +11,7 @@ set(HEADERS soundpage.h texpage.h weaponpage.h) + set(CPPS doorpage.cpp gamefilepage.cpp @@ -28,3 +31,12 @@ target_link_libraries(manage PRIVATE sndlib stream_audio ) + +target_include_directories(manage PUBLIC + $ + $ +) diff --git a/lib/manage.h b/manage/manage.h similarity index 100% rename from lib/manage.h rename to manage/manage.h diff --git a/lib/manage_external.h b/manage/manage_external.h similarity index 100% rename from lib/manage_external.h rename to manage/manage_external.h diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index 6496b505d..0ff2b35b9 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -1,4 +1,7 @@ -set(HEADERS) +set(HEADERS + polymodel_external.h + polymodel.h) + set(CPPS newstyle.cpp polymodel.cpp) @@ -7,3 +10,20 @@ add_library(model STATIC ${HEADERS} ${CPPS}) target_link_libraries(model PRIVATE ddio ) +target_include_directories(model PUBLIC + $ + $ + $ + $ + $ +) diff --git a/lib/polymodel.h b/model/polymodel.h similarity index 100% rename from lib/polymodel.h rename to model/polymodel.h diff --git a/lib/polymodel_external.h b/model/polymodel_external.h similarity index 100% rename from lib/polymodel_external.h rename to model/polymodel_external.h diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index a608438a8..c0089f926 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -1,4 +1,5 @@ -set(HEADERS) +set(HEADERS + module.h) set(CPPS module.cpp) diff --git a/lib/module.h b/module/module.h similarity index 100% rename from lib/module.h rename to module/module.h diff --git a/movie/CMakeLists.txt b/movie/CMakeLists.txt index 0fae401c2..ecc5bc7ff 100644 --- a/movie/CMakeLists.txt +++ b/movie/CMakeLists.txt @@ -1,9 +1,28 @@ -set(HEADERS) +set(HEADERS + movie.h) set(CPPS - d3movie.cpp) + movie.cpp) add_library(movie STATIC ${HEADERS} ${CPPS}) target_link_libraries(movie PRIVATE ddio libmve ) + +target_include_directories(movie PUBLIC + $ + $ + $ + $ + $ +) diff --git a/movie/d3movie.cpp b/movie/movie.cpp similarity index 100% rename from movie/d3movie.cpp rename to movie/movie.cpp diff --git a/lib/movie.h b/movie/movie.h similarity index 100% rename from lib/movie.h rename to movie/movie.h diff --git a/music/CMakeLists.txt b/music/CMakeLists.txt index 7799f629c..3e80fb167 100644 --- a/music/CMakeLists.txt +++ b/music/CMakeLists.txt @@ -1,4 +1,7 @@ -set(HEADERS) +set(HEADERS + music.h + musiclib.h) + set(CPPS omflex.cpp sequencer.cpp diff --git a/netcon/includes/CFtp.h b/netcon/inetfile/CFtp.h similarity index 100% rename from netcon/includes/CFtp.h rename to netcon/inetfile/CFtp.h diff --git a/netcon/inetfile/CMakeLists.txt b/netcon/inetfile/CMakeLists.txt index 2e2edb714..ebe4660ca 100644 --- a/netcon/inetfile/CMakeLists.txt +++ b/netcon/inetfile/CMakeLists.txt @@ -1,4 +1,7 @@ -set(HEADERS) +set(HEADERS + CFtp.h + Chttpget.h + inetgetfile.h) set(CPPS CFtp.cpp @@ -6,3 +9,9 @@ set(CPPS inetgetfile.cpp) add_library(inetfile STATIC ${HEADERS} ${CPPS}) + +target_include_directories(inetfile PUBLIC + $ +) diff --git a/netcon/includes/Chttpget.h b/netcon/inetfile/Chttpget.h similarity index 100% rename from netcon/includes/Chttpget.h rename to netcon/inetfile/Chttpget.h diff --git a/netcon/includes/inetgetfile.h b/netcon/inetfile/inetgetfile.h similarity index 100% rename from netcon/includes/inetgetfile.h rename to netcon/inetfile/inetgetfile.h diff --git a/netcon/lanclient/CMakeLists.txt b/netcon/lanclient/CMakeLists.txt index ed24ed2a7..0c283ce96 100644 --- a/netcon/lanclient/CMakeLists.txt +++ b/netcon/lanclient/CMakeLists.txt @@ -1,6 +1,9 @@ +set(HEADERS + lanclient.h + lanstrings.h) set(CPPS lanclient.cpp) -add_library(Direct_TCP_IP MODULE ${CPPS}) +add_library(Direct_TCP_IP MODULE ${HEADERS} ${CPPS}) set_target_properties(Direct_TCP_IP PROPERTIES PREFIX "") set_target_properties(Direct_TCP_IP PROPERTIES CXX_VISIBILITY_PRESET "hidden") set_target_properties(Direct_TCP_IP PROPERTIES OUTPUT_NAME "Direct TCP~IP") @@ -12,6 +15,30 @@ target_link_libraries(Direct_TCP_IP PRIVATE > ) +target_include_directories(Direct_TCP_IP PUBLIC + $ + $ + $ + $ + $ + $ + $ +) + add_custom_target(Direct_TCP_IP_Hog COMMAND $ "$/online/Direct TCP~IP.d3c" @@ -23,3 +50,4 @@ add_custom_target(Direct_TCP_IP_Hog COMMENT "Generate 'Direct TCP~IP.d3c'" ) install(FILES "$/online/Direct TCP~IP.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online) + diff --git a/netgames/dmfc/CMakeLists.txt b/netgames/dmfc/CMakeLists.txt index 7f75f3724..03c7282e9 100644 --- a/netgames/dmfc/CMakeLists.txt +++ b/netgames/dmfc/CMakeLists.txt @@ -28,3 +28,30 @@ set(CPPS add_definitions(-DOUTRAGE_VERSION -DDMFC_DLL) add_library(dmfc STATIC ${HEADERS} ${CPPS}) + +target_include_directories(dmfc PUBLIC + $ + $ + $ + $ + $ + $ + $ + $ +) diff --git a/networking/CMakeLists.txt b/networking/CMakeLists.txt index 509284773..df630de39 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -1,14 +1,32 @@ -set(HEADERS) +set(HEADERS + networking.h) set(CPPS networking.cpp) -set(PLATFORMCPPS) - if(WIN32) - set(PLATFORMCPPS "directplay.cpp") + set(HEADERS ${HEADERS} directplay.h) + set(CPPS ${CPPS} directplay.cpp) endif() -add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) +add_library(networking STATIC ${HEADERS} ${CPPS}) target_link_libraries(networking PRIVATE ddio ) + +target_include_directories(networking PUBLIC + $ + $ + $ + $ + $ +) diff --git a/lib/directplay.h b/networking/directplay.h similarity index 100% rename from lib/directplay.h rename to networking/directplay.h diff --git a/lib/networking.h b/networking/networking.h similarity index 100% rename from lib/networking.h rename to networking/networking.h diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt index 6a6fd011e..aca146e8f 100644 --- a/physics/CMakeLists.txt +++ b/physics/CMakeLists.txt @@ -1,7 +1,11 @@ -set(HEADERS) +set(HEADERS + collide.h + findintersection.h + physics.h) + set(CPPS - Collide.cpp - FindIntersection.cpp + collide.cpp + findintersection.cpp newstyle_fi.cpp physics.cpp) @@ -10,3 +14,15 @@ target_link_libraries(physics PRIVATE ddio sndlib ) + +target_include_directories(physics PUBLIC + $ + $ + $ +) diff --git a/physics/Collide.cpp b/physics/collide.cpp similarity index 99% rename from physics/Collide.cpp rename to physics/collide.cpp index 37651f9c1..99c1cd8b2 100644 --- a/physics/Collide.cpp +++ b/physics/collide.cpp @@ -831,7 +831,7 @@ #include #include "collide.h" -#include "PHYSICS.H" +#include "physics.h" #include "pserror.h" #include "mono.h" #include "object.h" diff --git a/lib/collide.h b/physics/collide.h similarity index 100% rename from lib/collide.h rename to physics/collide.h diff --git a/physics/FindIntersection.cpp b/physics/findintersection.cpp similarity index 99% rename from physics/FindIntersection.cpp rename to physics/findintersection.cpp index c959ffa5e..1f3ce9cc6 100644 --- a/physics/FindIntersection.cpp +++ b/physics/findintersection.cpp @@ -876,7 +876,7 @@ #include "BOA.h" #include "polymodel.h" -#include "PHYSICS.H" +#include "physics.h" #include "player.h" #include "doorway.h" #include "renderer.h" diff --git a/lib/findintersection.h b/physics/findintersection.h similarity index 100% rename from lib/findintersection.h rename to physics/findintersection.h diff --git a/lib/findintersection_external.h b/physics/findintersection_external.h similarity index 100% rename from lib/findintersection_external.h rename to physics/findintersection_external.h diff --git a/physics/physics.cpp b/physics/physics.cpp index 15fb84ee7..380e64201 100644 --- a/physics/physics.cpp +++ b/physics/physics.cpp @@ -22,7 +22,7 @@ #include #include "object.h" -#include "PHYSICS.H" +#include "physics.h" #include "collide.h" #include "findintersection.h" #include "vecmat.h" diff --git a/lib/PHYSICS.H b/physics/physics.h similarity index 100% rename from lib/PHYSICS.H rename to physics/physics.h diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index 636a09559..4ad54e2d5 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -1,6 +1,9 @@ set(HEADERS dyna_gl.h HardwareInternal.h + rend_d3d.h + renderer.h + rend_opengl.h ) set(CPPS HardwareClipper.cpp @@ -15,6 +18,7 @@ set(CPPS ) if(UNIX) + set(HEADERS ${HEADERS} lnxscreenmode.h) set(CPPS ${CPPS} lnxscreenmode.cpp) endif() @@ -28,3 +32,12 @@ target_link_libraries(renderer PRIVATE bitmap ddio ) + +target_include_directories(renderer PUBLIC + $ + $ +) diff --git a/lib/lnxscreenmode.h b/renderer/lnxscreenmode.h similarity index 100% rename from lib/lnxscreenmode.h rename to renderer/lnxscreenmode.h diff --git a/lib/rend_d3d.h b/renderer/rend_d3d.h similarity index 100% rename from lib/rend_d3d.h rename to renderer/rend_d3d.h diff --git a/lib/rend_opengl.h b/renderer/rend_opengl.h similarity index 100% rename from lib/rend_opengl.h rename to renderer/rend_opengl.h diff --git a/lib/renderer.h b/renderer/renderer.h similarity index 100% rename from lib/renderer.h rename to renderer/renderer.h diff --git a/rtperformance/CMakeLists.txt b/rtperformance/CMakeLists.txt index ea06642a0..70290bf13 100644 --- a/rtperformance/CMakeLists.txt +++ b/rtperformance/CMakeLists.txt @@ -1,4 +1,5 @@ -set(HEADERS) +set(HEADERS + rtperformance.h) set(CPPS rtperformance.cpp) @@ -6,3 +7,13 @@ add_library(rtperformance STATIC ${HEADERS} ${CPPS}) target_link_libraries(rtperformance PRIVATE ddio ) + + +target_include_directories(rtperformance PUBLIC + $ + $ +) diff --git a/lib/rtperformance.h b/rtperformance/rtperformance.h similarity index 100% rename from lib/rtperformance.h rename to rtperformance/rtperformance.h diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 25229309a..894416d2d 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -73,6 +73,17 @@ foreach(SCRIPT ${SCRIPTS}) target_link_libraries(${SCRIPT} fix) set_target_properties(${SCRIPT} PROPERTIES PREFIX "") set_target_properties(${SCRIPT} PROPERTIES CXX_VISIBILITY_PRESET "hidden") + target_include_directories(${SCRIPT} PUBLIC + $ + $ + $ + ) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(${SCRIPT} PROPERTIES SUFFIX ".dylib") endif() diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index b9d8dc441..bf8acefea 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -1,3 +1,19 @@ +set(HEADERS + auddev.h + ddsndgeometry.h + ds3dlib.h + ds3dlib_internal.h + eax2.h + eax.h + hlsoundlib.h + mixer.h + sdlsound.h + sndrender.h + soundload.h + ssl_lib.h + vmanpset.h +) + set(CPPS hlsoundlib.cpp sndrender.cpp @@ -17,7 +33,7 @@ set(CPPS > ) -add_library(sndlib STATIC ${CPPS}) +add_library(sndlib STATIC ${HEADERS} ${CPPS}) target_link_libraries(sndlib PRIVATE cfile ddio @@ -25,6 +41,21 @@ target_link_libraries(sndlib PRIVATE ) target_include_directories(sndlib PUBLIC $ + $ + $ + $ + $ + $ ) diff --git a/stream_audio/CMakeLists.txt b/stream_audio/CMakeLists.txt index fc5dd3f19..38395368f 100644 --- a/stream_audio/CMakeLists.txt +++ b/stream_audio/CMakeLists.txt @@ -1,4 +1,5 @@ -set(HEADERS) +set(HEADERS + streamaudio.h) set(CPPS osfarchive.cpp streamaudio.cpp) @@ -11,6 +12,6 @@ target_link_libraries(stream_audio PRIVATE ) target_include_directories(stream_audio PUBLIC $ ) diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 0350db8c9..8bf2eccac 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -1,4 +1,10 @@ -set(HEADERS UIlib.h) +set(HEADERS + uidraw.h + ui.h + UIlib.h + uires.h + uisys.h) + set(CPPS UIButton.cpp UICombo.cpp @@ -20,3 +26,16 @@ add_library(ui STATIC ${HEADERS} ${CPPS}) target_link_libraries(ui PRIVATE ddio ) + +target_include_directories(ui PUBLIC + $ + $ + $ +) + diff --git a/lib/ui.h b/ui/ui.h similarity index 100% rename from lib/ui.h rename to ui/ui.h diff --git a/lib/uidraw.h b/ui/uidraw.h similarity index 100% rename from lib/uidraw.h rename to ui/uidraw.h diff --git a/lib/uires.h b/ui/uires.h similarity index 100% rename from lib/uires.h rename to ui/uires.h diff --git a/lib/uisys.h b/ui/uisys.h similarity index 100% rename from lib/uisys.h rename to ui/uisys.h diff --git a/unzip/CMakeLists.txt b/unzip/CMakeLists.txt index cc071a39e..bf07b898b 100644 --- a/unzip/CMakeLists.txt +++ b/unzip/CMakeLists.txt @@ -1,4 +1,4 @@ -set(HEADERS) +set(HEADERS unzip.h) set(CPPS unzip.cpp) add_library(unzip STATIC ${HEADERS} ${CPPS}) diff --git a/lib/unzip.h b/unzip/unzip.h similarity index 100% rename from lib/unzip.h rename to unzip/unzip.h diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index 359aa6214..f3f10b955 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -8,7 +8,28 @@ set(CPPS add_library(win32 STATIC ${CPPS}) add_dependencies(win32 get_git_hash) -target_include_directories(win32 PRIVATE ${PROJECT_BINARY_DIR}/lib) +target_include_directories(win32 PUBLIC + $ + $ + $ + $ + $ + $ + PRIVATE ${PROJECT_BINARY_DIR}/lib +) + target_link_libraries(win32 PRIVATE ddio ) From c6dbb5194c87653b9eb122a6f415e36ca7fcb0f6 Mon Sep 17 00:00:00 2001 From: GravisZro Date: Sat, 1 Jun 2024 09:18:15 -0400 Subject: [PATCH 2/5] More file moving --- Descent3/CMakeLists.txt | 3 +++ Descent3/Controls.cpp | 2 +- Descent3/CtlCfgElem.h | 2 +- Descent3/GameLoop.cpp | 2 +- Descent3/Mission.cpp | 2 +- Descent3/controls.h | 2 +- Descent3/dedicated_server.cpp | 2 +- Descent3/descent.cpp | 2 +- Descent3/hudmessage.cpp | 2 +- Descent3/init.cpp | 2 +- Descent3/osiris_predefs.cpp | 2 +- Descent3/pilot.h | 2 +- Descent3/pilot_class.h | 2 +- Descent3/tests/CMakeLists.txt | 9 +++++++ bitmap/CMakeLists.txt | 3 +++ cfile/CMakeLists.txt | 4 ++- dd_grwin32/CMakeLists.txt | 9 +++++++ dd_grwin32/ddgrWin32DX.cpp | 2 +- dd_grwin32/ddgrWin32GDI.cpp | 2 +- dd_video/CMakeLists.txt | 19 +++++++++++++- {lib => dd_video}/ddvid.h | 0 dd_video/vidWin32Win.cpp | 2 +- dd_video/video_win32.cpp | 2 +- ddio/CMakeLists.txt | 26 ++++++++++++++++--- lib/AppConsole.h => ddio/appconsole.h | 0 {lib => ddio}/appdatabase.h | 4 +-- {lib => ddio}/application.h | 2 +- lib/Controller.h => ddio/controller.h | 2 +- {lib => ddio}/forcefeedback.h | 0 {lib => ddio}/joystick.h | 0 ddio/winforcefeedback.cpp | 2 +- ddio/winio.cpp | 2 +- ddio/winkey.cpp | 2 +- ddio/winmouse.cpp | 2 +- grtext/CMakeLists.txt | 8 +++++- legacy/editor/MainFrm.cpp | 2 +- legacy/editor/editor_lighting.cpp | 2 +- legacy/editor/gameeditor.cpp | 2 +- legacy/musicutils/musicutils.cpp | 2 +- legacy/musicutils/musicutilsDlg.cpp | 2 +- legacy/renderer/Direct3D.cpp | 2 +- linux/lnxcon.cpp | 2 +- linux/lnxcon_null.cpp | 2 +- linux/lnxcon_raw.cpp | 2 +- linux/lnxcontroller.cpp | 2 +- linux/lnxcontroller.h | 2 +- linux/lnxdata.cpp | 2 +- {lib/linux => linux}/lnxdatabase.h | 0 {lib/linux => linux}/lnxdraw.h | 0 {lib/linux => linux}/oelnx_os.h | 0 manage/manage.cpp | 2 +- misc/CMakeLists.txt | 12 +++++++++ model/CMakeLists.txt | 3 +++ module/CMakeLists.txt | 6 +++++ movie/CMakeLists.txt | 6 +++++ netcon/lanclient/CMakeLists.txt | 3 +++ netgames/dmfc/CMakeLists.txt | 9 +++++++ networking/CMakeLists.txt | 3 +++ physics/CMakeLists.txt | 3 +++ {lib => renderer}/3d.h | 0 renderer/CMakeLists.txt | 6 +++++ rtperformance/CMakeLists.txt | 5 +++- sndlib/CMakeLists.txt | 2 +- stream_audio/CMakeLists.txt | 3 +++ ui/CMakeLists.txt | 8 +++++- win32/CMakeLists.txt | 8 +++++- {lib/win => win32}/win32app.h | 0 {lib/win => win32}/win32database.h | 0 win32/winapp.cpp | 4 +-- win32/wincon.cpp | 4 +-- .../{WinController.cpp => wincontroller.cpp} | 2 +- {lib/win => win32}/wincontroller.h | 2 +- 72 files changed, 190 insertions(+), 54 deletions(-) rename {lib => dd_video}/ddvid.h (100%) rename lib/AppConsole.h => ddio/appconsole.h (100%) rename {lib => ddio}/appdatabase.h (98%) rename {lib => ddio}/application.h (99%) rename lib/Controller.h => ddio/controller.h (99%) rename {lib => ddio}/forcefeedback.h (100%) rename {lib => ddio}/joystick.h (100%) rename {lib/linux => linux}/lnxdatabase.h (100%) rename {lib/linux => linux}/lnxdraw.h (100%) rename {lib/linux => linux}/oelnx_os.h (100%) rename {lib => renderer}/3d.h (100%) rename {lib/win => win32}/win32app.h (100%) rename {lib/win => win32}/win32database.h (100%) rename win32/{WinController.cpp => wincontroller.cpp} (99%) rename {lib/win => win32}/wincontroller.h (99%) diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index 2b302e085..b749ef5a5 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -327,6 +327,9 @@ target_include_directories(Descent3 $ + $ PRIVATE ${PROJECT_BINARY_DIR}/lib) add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog HogFull NetgamesDir) diff --git a/Descent3/Controls.cpp b/Descent3/Controls.cpp index f2ae05546..0423c84b5 100644 --- a/Descent3/Controls.cpp +++ b/Descent3/Controls.cpp @@ -414,7 +414,7 @@ #include "descent.h" #include "mono.h" #include "weapon.h" -#include "Controller.h" +#include "controller.h" #include "Macros.h" #include "gamesequence.h" #include "pilot.h" diff --git a/Descent3/CtlCfgElem.h b/Descent3/CtlCfgElem.h index aa8e30235..2e5f34cff 100644 --- a/Descent3/CtlCfgElem.h +++ b/Descent3/CtlCfgElem.h @@ -78,7 +78,7 @@ #define CTLCFGELEM_H #include "newui.h" -#include "Controller.h" +#include "controller.h" #include "controls.h" #include "stringtable.h" diff --git a/Descent3/GameLoop.cpp b/Descent3/GameLoop.cpp index 45177767d..4fc58dc0a 100644 --- a/Descent3/GameLoop.cpp +++ b/Descent3/GameLoop.cpp @@ -834,7 +834,7 @@ #include "newui.h" #include "Inventory.h" #include "physics.h" -#include "Controller.h" +#include "controller.h" #include "controls.h" #include "gamesequence.h" #include "cockpit.h" diff --git a/Descent3/Mission.cpp b/Descent3/Mission.cpp index 2d23b19f8..586bf94fa 100644 --- a/Descent3/Mission.cpp +++ b/Descent3/Mission.cpp @@ -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" diff --git a/Descent3/controls.h b/Descent3/controls.h index 0d1e2d4b4..9f577868c 100644 --- a/Descent3/controls.h +++ b/Descent3/controls.h @@ -169,7 +169,7 @@ #define CONTROLS_H #include "object.h" -#include "Controller.h" +#include "controller.h" class gameController; class pilot; diff --git a/Descent3/dedicated_server.cpp b/Descent3/dedicated_server.cpp index 904888384..1f7623201 100644 --- a/Descent3/dedicated_server.cpp +++ b/Descent3/dedicated_server.cpp @@ -120,7 +120,7 @@ typedef int socklen_t; #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" diff --git a/Descent3/descent.cpp b/Descent3/descent.cpp index 23968a5f0..de4c75cf8 100644 --- a/Descent3/descent.cpp +++ b/Descent3/descent.cpp @@ -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" diff --git a/Descent3/hudmessage.cpp b/Descent3/hudmessage.cpp index da3161b1d..23249c7b6 100644 --- a/Descent3/hudmessage.cpp +++ b/Descent3/hudmessage.cpp @@ -339,7 +339,7 @@ #include "game2dll.h" #include "stringtable.h" #include "dedicated_server.h" -#include "AppConsole.h" +#include "appconsole.h" #include "demofile.h" #include "mem.h" #include "textaux.h" diff --git a/Descent3/init.cpp b/Descent3/init.cpp index 92ecbd369..b28647ecd 100644 --- a/Descent3/init.cpp +++ b/Descent3/init.cpp @@ -944,7 +944,7 @@ #include "Mission.h" #include "findintersection.h" #include "appdatabase.h" -#include "AppConsole.h" +#include "appconsole.h" #include "room.h" #include "game.h" #include "render.h" diff --git a/Descent3/osiris_predefs.cpp b/Descent3/osiris_predefs.cpp index b113ead10..0779bebc8 100644 --- a/Descent3/osiris_predefs.cpp +++ b/Descent3/osiris_predefs.cpp @@ -451,7 +451,7 @@ #include "matcen.h" #include "findintersection.h" #include "controls.h" -#include "Controller.h" +#include "controller.h" #include "ship.h" #include "Mission.h" #include "osiris_share.h" diff --git a/Descent3/pilot.h b/Descent3/pilot.h index ba86ac57d..39f14b45b 100644 --- a/Descent3/pilot.h +++ b/Descent3/pilot.h @@ -186,7 +186,7 @@ /* #include "controls.h" -#include "Controller.h" +#include "controller.h" #include "ship.h" #define PILOT_STRING_SIZE 20 diff --git a/Descent3/pilot_class.h b/Descent3/pilot_class.h index 352048c0c..caca48cf7 100644 --- a/Descent3/pilot_class.h +++ b/Descent3/pilot_class.h @@ -89,7 +89,7 @@ #include "pstypes.h" #include "controls.h" -#include "Controller.h" +#include "controller.h" #include "cfile.h" #include "weapon.h" #include "config.h" diff --git a/Descent3/tests/CMakeLists.txt b/Descent3/tests/CMakeLists.txt index 9db0321e8..ac8680bbb 100644 --- a/Descent3/tests/CMakeLists.txt +++ b/Descent3/tests/CMakeLists.txt @@ -27,6 +27,15 @@ target_include_directories(porting-tests PUBLIC $ + $ + $ + $ ) gtest_discover_tests(porting-tests) diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index 8e1149152..8781aa7f2 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -27,4 +27,7 @@ target_include_directories(bitmap PUBLIC $ + $ ) diff --git a/cfile/CMakeLists.txt b/cfile/CMakeLists.txt index 603ec37b8..86595369f 100644 --- a/cfile/CMakeLists.txt +++ b/cfile/CMakeLists.txt @@ -15,9 +15,11 @@ target_link_libraries(cfile PRIVATE ddio ) - target_include_directories(cfile PUBLIC $ + $ ) diff --git a/dd_grwin32/CMakeLists.txt b/dd_grwin32/CMakeLists.txt index 64c350692..546bc819b 100644 --- a/dd_grwin32/CMakeLists.txt +++ b/dd_grwin32/CMakeLists.txt @@ -9,3 +9,12 @@ set(CPPS ddgrWin32Init.cpp) add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS}) + +target_include_directories(dd_grwin32 PUBLIC + $ + $ +) diff --git a/dd_grwin32/ddgrWin32DX.cpp b/dd_grwin32/ddgrWin32DX.cpp index 9e4fdb5be..cfed4de52 100644 --- a/dd_grwin32/ddgrWin32DX.cpp +++ b/dd_grwin32/ddgrWin32DX.cpp @@ -35,7 +35,7 @@ #include "ddgrWin32.h" #include "ddgrWin32DX.h" -#include "Application.h" +#include "application.h" #include "mono.h" #include "pserror.h" diff --git a/dd_grwin32/ddgrWin32GDI.cpp b/dd_grwin32/ddgrWin32GDI.cpp index 512f6ab5a..b2c53c2c1 100644 --- a/dd_grwin32/ddgrWin32GDI.cpp +++ b/dd_grwin32/ddgrWin32GDI.cpp @@ -75,7 +75,7 @@ #include "ddgrWin32.h" #include "ddgrWin32GDI.h" -#include "Application.h" +#include "application.h" #include "mono.h" #include "pserror.h" #include "gr.h" diff --git a/dd_video/CMakeLists.txt b/dd_video/CMakeLists.txt index bea4a244c..ee6fdf7d4 100644 --- a/dd_video/CMakeLists.txt +++ b/dd_video/CMakeLists.txt @@ -1,3 +1,8 @@ +set(HEADERS + ddvid.h + ddvidlib.h +) + set(CPPS $<$: video_win32.cpp @@ -9,9 +14,21 @@ set(CPPS > ) -add_library(dd_video STATIC ${CPPS}) +add_library(dd_video STATIC ${HEADERS} ${CPPS}) target_link_libraries(dd_video PRIVATE $<$: linux > ) + +target_include_directories(dd_video PUBLIC + $ + $ + $ +) diff --git a/lib/ddvid.h b/dd_video/ddvid.h similarity index 100% rename from lib/ddvid.h rename to dd_video/ddvid.h diff --git a/dd_video/vidWin32Win.cpp b/dd_video/vidWin32Win.cpp index 522ad9ef8..5ac25bd45 100644 --- a/dd_video/vidWin32Win.cpp +++ b/dd_video/vidWin32Win.cpp @@ -47,7 +47,7 @@ #include "ddvidlib.h" #include "pserror.h" -#include "Application.h" +#include "application.h" ////////////////////////////////////////////////////////////////////////////// // Variables diff --git a/dd_video/video_win32.cpp b/dd_video/video_win32.cpp index fd0c239b5..b40966ce1 100644 --- a/dd_video/video_win32.cpp +++ b/dd_video/video_win32.cpp @@ -50,7 +50,7 @@ #include "ddvidlib.h" #include "pserror.h" -#include "Application.h" +#include "application.h" #include diff --git a/ddio/CMakeLists.txt b/ddio/CMakeLists.txt index 629540f48..bd1e7a236 100644 --- a/ddio/CMakeLists.txt +++ b/ddio/CMakeLists.txt @@ -1,17 +1,31 @@ +set(HEADERS + appconsole.h + appdatabase.h + application.h + chrono_timer.h + controller.h + ddio_common.h + ddio.h + ddio_lnx.h + ddio_win.h + forcefeedback.h + joystick.h +) + set(CPPS chrono_timer.cpp ddio.cpp key.cpp $<$: + lnxcdrom.cpp lnxfile.cpp lnxforcefeedback.cpp lnxio.cpp - sdljoy.cpp lnxkey.cpp lnxkey_null.cpp - lnxmouse.cpp - lnxcdrom.cpp lnxkey_sdl.cpp + lnxmouse.cpp + sdljoy.cpp > $<$: winfile.cpp @@ -26,8 +40,12 @@ add_library(ddio STATIC ${CPPS}) target_link_libraries(ddio ddebug ) + target_include_directories(ddio PUBLIC $ + $ ) diff --git a/lib/AppConsole.h b/ddio/appconsole.h similarity index 100% rename from lib/AppConsole.h rename to ddio/appconsole.h diff --git a/lib/appdatabase.h b/ddio/appdatabase.h similarity index 98% rename from lib/appdatabase.h rename to ddio/appdatabase.h index a29e1d0e3..8acfcbd2b 100644 --- a/lib/appdatabase.h +++ b/ddio/appdatabase.h @@ -101,9 +101,9 @@ class oeAppDatabase { */ #if defined(WIN32) -#include "win\Win32Database.h" +#include "win32database.h" #elif defined(__LINUX__) -#include "linux/lnxdatabase.h" +#include "lnxdatabase.h" #endif #endif diff --git a/lib/application.h b/ddio/application.h similarity index 99% rename from lib/application.h rename to ddio/application.h index 7dcc45ad1..ccf7cc12e 100644 --- a/lib/application.h +++ b/ddio/application.h @@ -110,7 +110,7 @@ class oeApplication { Win32 Samir Win32App.h 06/97 */ #if defined(WIN32) -#include "win\win32app.h" +#include "win32app.h" #elif defined(__LINUX__) #include "lnxapp.h" #endif diff --git a/lib/Controller.h b/ddio/controller.h similarity index 99% rename from lib/Controller.h rename to ddio/controller.h index 29381d85e..2843e0384 100644 --- a/lib/Controller.h +++ b/ddio/controller.h @@ -265,7 +265,7 @@ gameController *CreateController(int num_funcs, ct_function *funcs, char *remote void DestroyController(gameController *ctl); #if defined(WIN32) -#include "win\WinController.h" +#include "wincontroller.h" #elif defined(__LINUX__) #include "lnxcontroller.h" #endif diff --git a/lib/forcefeedback.h b/ddio/forcefeedback.h similarity index 100% rename from lib/forcefeedback.h rename to ddio/forcefeedback.h diff --git a/lib/joystick.h b/ddio/joystick.h similarity index 100% rename from lib/joystick.h rename to ddio/joystick.h diff --git a/ddio/winforcefeedback.cpp b/ddio/winforcefeedback.cpp index 05f80b9fb..24f176890 100644 --- a/ddio/winforcefeedback.cpp +++ b/ddio/winforcefeedback.cpp @@ -101,7 +101,7 @@ #include "mono.h" #include "ddio.h" #include "ddio_win.h" -#include "Application.h" +#include "application.h" #include "forcefeedback.h" #include "mem.h" #include "dinput.h" diff --git a/ddio/winio.cpp b/ddio/winio.cpp index 5edc69f97..14d025849 100644 --- a/ddio/winio.cpp +++ b/ddio/winio.cpp @@ -112,7 +112,7 @@ #include #include "pserror.h" -#include "Application.h" +#include "application.h" #include "ddio_win.h" #include "ddio.h" #include "dinput.h" diff --git a/ddio/winkey.cpp b/ddio/winkey.cpp index 77ffa3dd9..edb063f5d 100644 --- a/ddio/winkey.cpp +++ b/ddio/winkey.cpp @@ -180,7 +180,7 @@ #include "mono.h" #include "ddio.h" #include "ddio_win.h" -#include "Application.h" +#include "application.h" #include "TaskSystem.h" #include diff --git a/ddio/winmouse.cpp b/ddio/winmouse.cpp index eb474fc74..f59ce69e4 100644 --- a/ddio/winmouse.cpp +++ b/ddio/winmouse.cpp @@ -27,7 +27,7 @@ #include "mono.h" #include "ddio.h" #include "ddio_win.h" -#include "Application.h" +#include "application.h" #include "psclass.h" #include "Macros.h" diff --git a/grtext/CMakeLists.txt b/grtext/CMakeLists.txt index f32f0d8e2..1dc539bcc 100644 --- a/grtext/CMakeLists.txt +++ b/grtext/CMakeLists.txt @@ -1,4 +1,4 @@ -set(HEADERS +set(HEADERS grtext.h grtextlib.h) @@ -19,4 +19,10 @@ target_include_directories(grtext PUBLIC $ + $ + $ ) diff --git a/legacy/editor/MainFrm.cpp b/legacy/editor/MainFrm.cpp index 89dad323f..3736cce00 100644 --- a/legacy/editor/MainFrm.cpp +++ b/legacy/editor/MainFrm.cpp @@ -806,7 +806,7 @@ // D3 EDITOR HEADERS #include "pserror.h" -#include "Application.h" +#include "application.h" #include "AppDatabase.h" #include "program.h" #include "gr.h" diff --git a/legacy/editor/editor_lighting.cpp b/legacy/editor/editor_lighting.cpp index e7f1c6ce0..c737a5ebf 100644 --- a/legacy/editor/editor_lighting.cpp +++ b/legacy/editor/editor_lighting.cpp @@ -45,7 +45,7 @@ #include "d3edit.h" #include "ddio.h" #include "bsp.h" -#include "Application.h" +#include "application.h" #include "AppDatabase.h" #include "program.h" #include "loadlevel.h" diff --git a/legacy/editor/gameeditor.cpp b/legacy/editor/gameeditor.cpp index 00ae2f7b0..960787f55 100644 --- a/legacy/editor/gameeditor.cpp +++ b/legacy/editor/gameeditor.cpp @@ -496,7 +496,7 @@ #include "init.h" #include "game.h" #include "descent.h" -#include "Application.h" +#include "application.h" #include "AppDatabase.h" #include "program.h" #include "ddio.h" diff --git a/legacy/musicutils/musicutils.cpp b/legacy/musicutils/musicutils.cpp index 43e8b099e..46ede94eb 100644 --- a/legacy/musicutils/musicutils.cpp +++ b/legacy/musicutils/musicutils.cpp @@ -24,7 +24,7 @@ #include "musicutilsDlg.h" #include "musicplay.h" -#include "Application.h" +#include "application.h" #ifdef _DEBUG #define new DEBUG_NEW diff --git a/legacy/musicutils/musicutilsDlg.cpp b/legacy/musicutils/musicutilsDlg.cpp index 9e7254d79..5d787d7e5 100644 --- a/legacy/musicutils/musicutilsDlg.cpp +++ b/legacy/musicutils/musicutilsDlg.cpp @@ -31,7 +31,7 @@ #include "musicplay.h" #include "pserror.h" -#include "Application.h" +#include "application.h" #include "streamaudio.h" #include "ddio.h" #include "macros.h" diff --git a/legacy/renderer/Direct3D.cpp b/legacy/renderer/Direct3D.cpp index 08b10423d..ea90de752 100644 --- a/legacy/renderer/Direct3D.cpp +++ b/legacy/renderer/Direct3D.cpp @@ -20,7 +20,7 @@ #include "DDAccess.h" // This module has access to machine-dependent variables. #include "pstypes.h" #include "pserror.h" -#include "Application.h" +#include "application.h" #include "renderer.h" #include "3d.h" #include "bitmap.h" diff --git a/linux/lnxcon.cpp b/linux/lnxcon.cpp index f0738f417..d6d5c4c25 100644 --- a/linux/lnxcon.cpp +++ b/linux/lnxcon.cpp @@ -63,7 +63,7 @@ #include #include "application.h" -#include "AppConsole.h" +#include "appconsole.h" #include "TaskSystem.h" #include "mono.h" #include "pstring.h" diff --git a/linux/lnxcon_null.cpp b/linux/lnxcon_null.cpp index fc1e1e75a..140c0096b 100644 --- a/linux/lnxcon_null.cpp +++ b/linux/lnxcon_null.cpp @@ -50,7 +50,7 @@ #include #include "application.h" -#include "AppConsole.h" +#include "appconsole.h" #include "TaskSystem.h" #include "mono.h" diff --git a/linux/lnxcon_raw.cpp b/linux/lnxcon_raw.cpp index 9b0e30942..5ecd3478e 100644 --- a/linux/lnxcon_raw.cpp +++ b/linux/lnxcon_raw.cpp @@ -48,7 +48,7 @@ #include #include "application.h" -#include "AppConsole.h" +#include "appconsole.h" #include "TaskSystem.h" #include "mono.h" // #include "local_malloc.h" diff --git a/linux/lnxcontroller.cpp b/linux/lnxcontroller.cpp index 5b49d65db..d5aae0a13 100644 --- a/linux/lnxcontroller.cpp +++ b/linux/lnxcontroller.cpp @@ -42,7 +42,7 @@ */ #include -#include "Controller.h" +#include "controller.h" #include "ddio.h" #include "pserror.h" #include "joystick.h" diff --git a/linux/lnxcontroller.h b/linux/lnxcontroller.h index d5567eb4e..eb47c9d51 100644 --- a/linux/lnxcontroller.h +++ b/linux/lnxcontroller.h @@ -19,7 +19,7 @@ #ifndef __LNXCONTROLLER_H_ #define __LNXCONTROLLER_H_ -#include "Controller.h" +#include "controller.h" #include "joystick.h" #define NULL_LNXCONTROLLER ((int8_t)NULL_CONTROLLER) diff --git a/linux/lnxdata.cpp b/linux/lnxdata.cpp index a87655d46..9b3bc9aef 100644 --- a/linux/lnxdata.cpp +++ b/linux/lnxdata.cpp @@ -48,7 +48,7 @@ #include #include "appdatabase.h" -#include "linux/lnxdatabase.h" +#include "lnxdatabase.h" #include "pserror.h" #include "mono.h" #include "pserror.h" diff --git a/lib/linux/lnxdatabase.h b/linux/lnxdatabase.h similarity index 100% rename from lib/linux/lnxdatabase.h rename to linux/lnxdatabase.h diff --git a/lib/linux/lnxdraw.h b/linux/lnxdraw.h similarity index 100% rename from lib/linux/lnxdraw.h rename to linux/lnxdraw.h diff --git a/lib/linux/oelnx_os.h b/linux/oelnx_os.h similarity index 100% rename from lib/linux/oelnx_os.h rename to linux/oelnx_os.h diff --git a/manage/manage.cpp b/manage/manage.cpp index 25a1d5bad..7c1f513ea 100644 --- a/manage/manage.cpp +++ b/manage/manage.cpp @@ -462,7 +462,7 @@ #include "genericpage.h" #include "mem.h" #include "dedicated_server.h" -#include "AppConsole.h" +#include "appconsole.h" #include "init.h" #include "stringtable.h" #include "args.h" diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index e6e6d9304..8ca0c8ddf 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -11,6 +11,18 @@ add_library(misc STATIC ${HEADERS} ${CPPS}) target_link_libraries(misc ddebug) +target_include_directories(misc PUBLIC + $ + $ + $ +) + if(BUILD_TESTING) add_subdirectory(tests) endif() diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index 0ff2b35b9..68a2e46cb 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -26,4 +26,7 @@ target_include_directories(model PUBLIC $ + $ ) diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index c0089f926..b66d02261 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -7,3 +7,9 @@ add_library(module STATIC ${HEADERS} ${CPPS}) target_link_libraries(module PRIVATE ddio ) + +target_include_directories(module PUBLIC + $ +) diff --git a/movie/CMakeLists.txt b/movie/CMakeLists.txt index ecc5bc7ff..64f4adaaa 100644 --- a/movie/CMakeLists.txt +++ b/movie/CMakeLists.txt @@ -25,4 +25,10 @@ target_include_directories(movie PUBLIC $ + $ + $ ) diff --git a/netcon/lanclient/CMakeLists.txt b/netcon/lanclient/CMakeLists.txt index 0c283ce96..b356038e0 100644 --- a/netcon/lanclient/CMakeLists.txt +++ b/netcon/lanclient/CMakeLists.txt @@ -37,6 +37,9 @@ target_include_directories(Direct_TCP_IP PUBLIC $ + $ ) add_custom_target(Direct_TCP_IP_Hog diff --git a/netgames/dmfc/CMakeLists.txt b/netgames/dmfc/CMakeLists.txt index 03c7282e9..964945137 100644 --- a/netgames/dmfc/CMakeLists.txt +++ b/netgames/dmfc/CMakeLists.txt @@ -54,4 +54,13 @@ target_include_directories(dmfc PUBLIC $ + $ + $ + $ ) diff --git a/networking/CMakeLists.txt b/networking/CMakeLists.txt index df630de39..920f99000 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -29,4 +29,7 @@ target_include_directories(networking PUBLIC $ + $ ) diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt index aca146e8f..4ef5f8511 100644 --- a/physics/CMakeLists.txt +++ b/physics/CMakeLists.txt @@ -25,4 +25,7 @@ target_include_directories(physics PUBLIC $ + $ ) diff --git a/lib/3d.h b/renderer/3d.h similarity index 100% rename from lib/3d.h rename to renderer/3d.h diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index 4ad54e2d5..44a0183b9 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -40,4 +40,10 @@ target_include_directories(renderer PUBLIC $ + $ + $ ) diff --git a/rtperformance/CMakeLists.txt b/rtperformance/CMakeLists.txt index 70290bf13..946a4075a 100644 --- a/rtperformance/CMakeLists.txt +++ b/rtperformance/CMakeLists.txt @@ -12,8 +12,11 @@ target_link_libraries(rtperformance PRIVATE target_include_directories(rtperformance PUBLIC $ + > $ + $ ) diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index bf8acefea..94186e0c3 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -51,7 +51,7 @@ target_include_directories(sndlib PUBLIC > $ + > $ diff --git a/stream_audio/CMakeLists.txt b/stream_audio/CMakeLists.txt index 38395368f..25a993e42 100644 --- a/stream_audio/CMakeLists.txt +++ b/stream_audio/CMakeLists.txt @@ -14,4 +14,7 @@ target_include_directories(stream_audio PUBLIC $ + $ ) diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 8bf2eccac..22cd43b29 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -1,4 +1,4 @@ -set(HEADERS +set(HEADERS uidraw.h ui.h UIlib.h @@ -37,5 +37,11 @@ target_include_directories(ui PUBLIC $ + $ + $ ) diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index f3f10b955..faebcca3c 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -1,7 +1,13 @@ +set(HEADERS + win32app.h + win32database.h + wincontroller.h +) + set(CPPS winapp.cpp wincon.cpp - WinController.cpp + wincontroller.cpp windata.cpp wintask.cpp ) diff --git a/lib/win/win32app.h b/win32/win32app.h similarity index 100% rename from lib/win/win32app.h rename to win32/win32app.h diff --git a/lib/win/win32database.h b/win32/win32database.h similarity index 100% rename from lib/win/win32database.h rename to win32/win32database.h diff --git a/win32/winapp.cpp b/win32/winapp.cpp index a3bda5e9f..5dac33ba8 100644 --- a/win32/winapp.cpp +++ b/win32/winapp.cpp @@ -147,8 +147,8 @@ #define OEAPP_INTERNAL_MODULE -#include "Application.h" -#include "AppConsole.h" +#include "application.h" +#include "appconsole.h" #include "mono.h" #include "networking.h" diff --git a/win32/wincon.cpp b/win32/wincon.cpp index 5ff4f747a..c16fb3b92 100644 --- a/win32/wincon.cpp +++ b/win32/wincon.cpp @@ -67,8 +67,8 @@ #include #include -#include "Application.h" -#include "AppConsole.h" +#include "application.h" +#include "appconsole.h" #include "TaskSystem.h" #include diff --git a/win32/WinController.cpp b/win32/wincontroller.cpp similarity index 99% rename from win32/WinController.cpp rename to win32/wincontroller.cpp index af46ae11c..dca2908ee 100644 --- a/win32/WinController.cpp +++ b/win32/wincontroller.cpp @@ -309,7 +309,7 @@ * $NoKeywords: $ */ -#include "Controller.h" +#include "controller.h" #include diff --git a/lib/win/wincontroller.h b/win32/wincontroller.h similarity index 99% rename from lib/win/wincontroller.h rename to win32/wincontroller.h index f74a991a0..9ac3e8c91 100644 --- a/lib/win/wincontroller.h +++ b/win32/wincontroller.h @@ -132,7 +132,7 @@ #ifndef WINCONTROLLER_H #define WINCONTROLLER_H -#include "Controller.h" +#include "controller.h" #include "joystick.h" #define NULL_WINCONTROLLER ((int8_t)NULL_CONTROLLER) From 4b1b904eb83ac5147568ac2f78d88bf58c1b4c56 Mon Sep 17 00:00:00 2001 From: GravisZro Date: Sat, 1 Jun 2024 17:35:55 -0400 Subject: [PATCH 3/5] Another batch moved --- lib/Ddgr.h => 2dlib/ddgr.h | 0 {lib => 2dlib}/gr.h | 2 +- {lib => 2dlib}/grdefs.h | 0 AudioEncode/audio_encode.cpp | 2 +- Descent3/CMakeLists.txt | 3 +++ Descent3/lightmap_info.cpp | 2 +- Descent3/tests/CMakeLists.txt | 3 +++ acmlib/acmlib.cpp | 2 +- bitmap/CMakeLists.txt | 3 +++ dd_grwin32/CMakeLists.txt | 3 +++ dd_video/CMakeLists.txt | 3 +++ grtext/CMakeLists.txt | 3 +++ libacm/CMakeLists.txt | 4 ++-- libacm/adecode.cpp | 2 +- libacm/{Adecode.h => adecode.h} | 0 libacm/aencode.cpp | 2 +- libacm/{Aencode.h => aencode.h} | 0 linux/CMakeLists.txt | 3 +++ manage/CMakeLists.txt | 3 +++ model/CMakeLists.txt | 3 +++ movie/CMakeLists.txt | 3 +++ netcon/lanclient/CMakeLists.txt | 3 +++ netgames/dmfc/CMakeLists.txt | 6 ++++++ networking/CMakeLists.txt | 3 +++ physics/CMakeLists.txt | 3 +++ renderer/CMakeLists.txt | 3 +++ sndlib/CMakeLists.txt | 3 +++ stream_audio/streamaudio.h | 2 +- ui/CMakeLists.txt | 3 +++ win32/CMakeLists.txt | 3 +++ 30 files changed, 66 insertions(+), 9 deletions(-) rename lib/Ddgr.h => 2dlib/ddgr.h (100%) rename {lib => 2dlib}/gr.h (99%) rename {lib => 2dlib}/grdefs.h (100%) rename libacm/{Adecode.h => adecode.h} (100%) rename libacm/{Aencode.h => aencode.h} (100%) diff --git a/lib/Ddgr.h b/2dlib/ddgr.h similarity index 100% rename from lib/Ddgr.h rename to 2dlib/ddgr.h diff --git a/lib/gr.h b/2dlib/gr.h similarity index 99% rename from lib/gr.h rename to 2dlib/gr.h index 762e1a57d..105424a50 100644 --- a/lib/gr.h +++ b/2dlib/gr.h @@ -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" diff --git a/lib/grdefs.h b/2dlib/grdefs.h similarity index 100% rename from lib/grdefs.h rename to 2dlib/grdefs.h diff --git a/AudioEncode/audio_encode.cpp b/AudioEncode/audio_encode.cpp index 8e1fa36cf..dc142f4d8 100644 --- a/AudioEncode/audio_encode.cpp +++ b/AudioEncode/audio_encode.cpp @@ -22,7 +22,7 @@ #include #include "audio_encode.h" #include "mono.h" -#include "Aencode.h" +#include "aencode.h" int32_t aenc_ReadSamp(void *data) { FILE *f = (FILE *)data; diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index b749ef5a5..3780e7ba5 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -330,6 +330,9 @@ target_include_directories(Descent3 $ + $ PRIVATE ${PROJECT_BINARY_DIR}/lib) add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog HogFull NetgamesDir) diff --git a/Descent3/lightmap_info.cpp b/Descent3/lightmap_info.cpp index 19d90fec7..405f1b2c0 100644 --- a/Descent3/lightmap_info.cpp +++ b/Descent3/lightmap_info.cpp @@ -22,7 +22,7 @@ #include "lightmap_info.h" #include "lightmap.h" #include "mono.h" -#include "Ddgr.h" +#include "ddgr.h" #include "grdefs.h" #include "renderer.h" #include diff --git a/Descent3/tests/CMakeLists.txt b/Descent3/tests/CMakeLists.txt index ac8680bbb..0bf52a591 100644 --- a/Descent3/tests/CMakeLists.txt +++ b/Descent3/tests/CMakeLists.txt @@ -36,6 +36,9 @@ target_include_directories(porting-tests PUBLIC $ + $ ) gtest_discover_tests(porting-tests) diff --git a/acmlib/acmlib.cpp b/acmlib/acmlib.cpp index b585a29b7..4a15cb03e 100644 --- a/acmlib/acmlib.cpp +++ b/acmlib/acmlib.cpp @@ -18,7 +18,7 @@ -#include "Adecode.h" +#include "adecode.h" #include "mem.h" #ifdef __cplusplus diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index 8781aa7f2..fd7e434e2 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -30,4 +30,7 @@ target_include_directories(bitmap PUBLIC $ + $ ) diff --git a/dd_grwin32/CMakeLists.txt b/dd_grwin32/CMakeLists.txt index 546bc819b..ec4d4f57c 100644 --- a/dd_grwin32/CMakeLists.txt +++ b/dd_grwin32/CMakeLists.txt @@ -17,4 +17,7 @@ target_include_directories(dd_grwin32 PUBLIC $ + $ ) diff --git a/dd_video/CMakeLists.txt b/dd_video/CMakeLists.txt index ee6fdf7d4..d11cfee49 100644 --- a/dd_video/CMakeLists.txt +++ b/dd_video/CMakeLists.txt @@ -31,4 +31,7 @@ target_include_directories(dd_video PUBLIC $ + $ ) diff --git a/grtext/CMakeLists.txt b/grtext/CMakeLists.txt index 1dc539bcc..ccce4c71e 100644 --- a/grtext/CMakeLists.txt +++ b/grtext/CMakeLists.txt @@ -25,4 +25,7 @@ target_include_directories(grtext PUBLIC $ + $ ) diff --git a/libacm/CMakeLists.txt b/libacm/CMakeLists.txt index ab562028b..c38fa7b44 100644 --- a/libacm/CMakeLists.txt +++ b/libacm/CMakeLists.txt @@ -1,6 +1,6 @@ set(HEADERS - Adecode.h - Aencode.h) + adecode.h + aencode.h) set(CPPS aencode.cpp diff --git a/libacm/adecode.cpp b/libacm/adecode.cpp index d8a002404..7978a21f7 100644 --- a/libacm/adecode.cpp +++ b/libacm/adecode.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "Adecode.h" +#include "adecode.h" #include "libacm.h" diff --git a/libacm/Adecode.h b/libacm/adecode.h similarity index 100% rename from libacm/Adecode.h rename to libacm/adecode.h diff --git a/libacm/aencode.cpp b/libacm/aencode.cpp index 6c2bcb124..2020197b5 100644 --- a/libacm/aencode.cpp +++ b/libacm/aencode.cpp @@ -21,7 +21,7 @@ #include #include #include -#include "Aencode.h" +#include "aencode.h" typedef uint32_t uint32_t; typedef int32_t int32_t; diff --git a/libacm/Aencode.h b/libacm/aencode.h similarity index 100% rename from libacm/Aencode.h rename to libacm/aencode.h diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index ea69c2d7e..9996b0752 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -35,6 +35,9 @@ target_include_directories(linux PUBLIC $ + $ ) target_link_libraries(linux PRIVATE ddio diff --git a/manage/CMakeLists.txt b/manage/CMakeLists.txt index 63c92556e..0f4a837c8 100644 --- a/manage/CMakeLists.txt +++ b/manage/CMakeLists.txt @@ -39,4 +39,7 @@ target_include_directories(manage PUBLIC $ + $ ) diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index 68a2e46cb..ed9aea8f4 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -29,4 +29,7 @@ target_include_directories(model PUBLIC $ + $ ) diff --git a/movie/CMakeLists.txt b/movie/CMakeLists.txt index 64f4adaaa..111c118c6 100644 --- a/movie/CMakeLists.txt +++ b/movie/CMakeLists.txt @@ -31,4 +31,7 @@ target_include_directories(movie PUBLIC $ + $ ) diff --git a/netcon/lanclient/CMakeLists.txt b/netcon/lanclient/CMakeLists.txt index b356038e0..9c122a8db 100644 --- a/netcon/lanclient/CMakeLists.txt +++ b/netcon/lanclient/CMakeLists.txt @@ -40,6 +40,9 @@ target_include_directories(Direct_TCP_IP PUBLIC $ + $ ) add_custom_target(Direct_TCP_IP_Hog diff --git a/netgames/dmfc/CMakeLists.txt b/netgames/dmfc/CMakeLists.txt index 964945137..907e538e7 100644 --- a/netgames/dmfc/CMakeLists.txt +++ b/netgames/dmfc/CMakeLists.txt @@ -63,4 +63,10 @@ target_include_directories(dmfc PUBLIC $ + $ + $ ) diff --git a/networking/CMakeLists.txt b/networking/CMakeLists.txt index 920f99000..4bde4aad3 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -32,4 +32,7 @@ target_include_directories(networking PUBLIC $ + $ ) diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt index 4ef5f8511..2fd46f900 100644 --- a/physics/CMakeLists.txt +++ b/physics/CMakeLists.txt @@ -28,4 +28,7 @@ target_include_directories(physics PUBLIC $ + $ ) diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index 44a0183b9..fef3bd60d 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -46,4 +46,7 @@ target_include_directories(renderer PUBLIC $ + $ ) diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index 94186e0c3..c02dc0720 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -58,4 +58,7 @@ target_include_directories(sndlib PUBLIC $ + $ ) diff --git a/stream_audio/streamaudio.h b/stream_audio/streamaudio.h index 3937613b4..077ba0aaa 100644 --- a/stream_audio/streamaudio.h +++ b/stream_audio/streamaudio.h @@ -138,7 +138,7 @@ #ifndef __STREAMAUDIO_H_ #define __STREAMAUDIO_H_ -#include "Adecode.h" +#include "adecode.h" #include "ssl_lib.h" #include "TaskSystem.h" diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 22cd43b29..2127b08e8 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -43,5 +43,8 @@ target_include_directories(ui PUBLIC $ + $ ) diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index faebcca3c..6a29a8f42 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -33,6 +33,9 @@ target_include_directories(win32 PUBLIC $ + $ PRIVATE ${PROJECT_BINARY_DIR}/lib ) From 3738b5aacdfa8cb06dc2fb34d2ce859832a59f98 Mon Sep 17 00:00:00 2001 From: GravisZro Date: Sun, 2 Jun 2024 01:56:22 -0400 Subject: [PATCH 4/5] New form --- 2dlib/CMakeLists.txt | 7 ++-- AudioEncode/CMakeLists.txt | 2 +- Descent3/CMakeLists.txt | 34 +--------------- Descent3/tests/CMakeLists.txt | 46 +++++++--------------- bitmap/CMakeLists.txt | 10 ++--- cfile/CMakeLists.txt | 6 +-- czip/CMakeLists.txt | 6 +++ d3music/CMakeLists.txt | 11 ++++++ dd_grwin32/CMakeLists.txt | 18 +++++---- dd_video/CMakeLists.txt | 16 +++----- ddebug/CMakeLists.txt | 10 ++--- ddio/CMakeLists.txt | 11 ++++-- fix/CMakeLists.txt | 5 ++- grtext/CMakeLists.txt | 18 +++------ libacm/CMakeLists.txt | 6 +++ libmve/CMakeLists.txt | 5 +++ linux/CMakeLists.txt | 28 +++++-------- manage/CMakeLists.txt | 14 +++---- md5/CMakeLists.txt | 8 ++++ mem/CMakeLists.txt | 6 +++ misc/CMakeLists.txt | 20 ++++++---- model/CMakeLists.txt | 27 ++++--------- module/CMakeLists.txt | 2 +- movie/CMakeLists.txt | 31 +++++---------- music/CMakeLists.txt | 8 +++- netcon/inetfile/CMakeLists.txt | 8 ++-- netcon/lanclient/CMakeLists.txt | 38 +++++------------- netgames/anarchy/CMakeLists.txt | 15 ++++++- netgames/coop/CMakeLists.txt | 15 ++++++- netgames/ctf/CMakeLists.txt | 16 +++++++- netgames/dmfc/CMakeLists.txt | 59 ++++++++++------------------ netgames/entropy/CMakeLists.txt | 15 ++++++- netgames/hoard/CMakeLists.txt | 15 ++++++- netgames/hyperanarchy/CMakeLists.txt | 15 ++++++- netgames/monsterball/CMakeLists.txt | 15 ++++++- netgames/roboanarchy/CMakeLists.txt | 15 ++++++- netgames/tanarchy/CMakeLists.txt | 15 ++++++- networking/CMakeLists.txt | 27 ++++--------- physics/CMakeLists.txt | 23 +++++------ renderer/CMakeLists.txt | 23 +++++------ rtperformance/CMakeLists.txt | 11 ++---- scripts/CMakeLists.txt | 18 +++------ sndlib/CMakeLists.txt | 29 +++++--------- stream_audio/CMakeLists.txt | 10 ++--- ui/CMakeLists.txt | 27 +++---------- unzip/CMakeLists.txt | 2 + vecmat/CMakeLists.txt | 2 + win32/CMakeLists.txt | 34 +++++----------- 48 files changed, 387 insertions(+), 415 deletions(-) diff --git a/2dlib/CMakeLists.txt b/2dlib/CMakeLists.txt index a5ebc25da..c37667cef 100644 --- a/2dlib/CMakeLists.txt +++ b/2dlib/CMakeLists.txt @@ -12,13 +12,12 @@ set(CPPS add_library(2dlib STATIC ${HEADERS} ${CPPS}) target_link_libraries(2dlib PRIVATE cfile + bitmap + renderer ) target_include_directories(2dlib PUBLIC $ - $ ) diff --git a/AudioEncode/CMakeLists.txt b/AudioEncode/CMakeLists.txt index 350f7be4d..c298991ed 100644 --- a/AudioEncode/CMakeLists.txt +++ b/AudioEncode/CMakeLists.txt @@ -8,6 +8,6 @@ target_link_libraries(AudioEncode libacm) target_include_directories(AudioEncode PUBLIC $ ) diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index 3780e7ba5..b8dbc28f4 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -301,39 +301,7 @@ 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 - PUBLIC - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - +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) diff --git a/Descent3/tests/CMakeLists.txt b/Descent3/tests/CMakeLists.txt index 0bf52a591..14e667ece 100644 --- a/Descent3/tests/CMakeLists.txt +++ b/Descent3/tests/CMakeLists.txt @@ -6,39 +6,21 @@ add_executable( target_link_libraries( porting-tests GTest::gtest_main -) - -target_include_directories(porting-tests PUBLIC - $ - $ - $ - $ - $ - $ - $ - $ - $ - $: + linux + > + $<$: + win32 > ) + gtest_discover_tests(porting-tests) diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index fd7e434e2..614afd18d 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -21,16 +21,12 @@ target_link_libraries(bitmap PRIVATE ddebug ddio stb + renderer + 2dlib ) target_include_directories(bitmap PUBLIC $ - $ - $ ) diff --git a/cfile/CMakeLists.txt b/cfile/CMakeLists.txt index 86595369f..842f5337e 100644 --- a/cfile/CMakeLists.txt +++ b/cfile/CMakeLists.txt @@ -13,13 +13,11 @@ set(CPPS add_library(cfile STATIC ${HEADERS} ${CPPS}) target_link_libraries(cfile PRIVATE ddio + bitmap ) target_include_directories(cfile PUBLIC $ - $ ) diff --git a/czip/CMakeLists.txt b/czip/CMakeLists.txt index d3db3beb6..58ea27b1d 100644 --- a/czip/CMakeLists.txt +++ b/czip/CMakeLists.txt @@ -6,3 +6,9 @@ set(CPPS HuffmanBasic.cpp) add_library(czip STATIC ${HEADERS} ${CPPS}) + +target_include_directories(czip PUBLIC + $ +) diff --git a/d3music/CMakeLists.txt b/d3music/CMakeLists.txt index f6f084add..a1e15d187 100644 --- a/d3music/CMakeLists.txt +++ b/d3music/CMakeLists.txt @@ -6,4 +6,15 @@ set(CPPS add_library(d3music STATIC ${HEADERS} ${CPPS}) target_link_libraries(d3music PRIVATE music + stream_audio + libacm + sndlib + manage + bitmap +) + +target_include_directories(d3music PUBLIC + $ ) diff --git a/dd_grwin32/CMakeLists.txt b/dd_grwin32/CMakeLists.txt index ec4d4f57c..6bece4b33 100644 --- a/dd_grwin32/CMakeLists.txt +++ b/dd_grwin32/CMakeLists.txt @@ -10,14 +10,16 @@ set(CPPS add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS}) -target_include_directories(dd_grwin32 PUBLIC - $: + linux > - $ - $: + win32 > ) + + +target_include_directories(dd_grwin32 PUBLIC .) diff --git a/dd_video/CMakeLists.txt b/dd_video/CMakeLists.txt index d11cfee49..bbccc88e3 100644 --- a/dd_video/CMakeLists.txt +++ b/dd_video/CMakeLists.txt @@ -19,19 +19,15 @@ target_link_libraries(dd_video PRIVATE $<$: linux > + $<$: + win32 + > + ddio + 2dlib ) target_include_directories(dd_video PUBLIC $ - $ - $ - $ ) diff --git a/ddebug/CMakeLists.txt b/ddebug/CMakeLists.txt index 01d900373..208ccf23d 100644 --- a/ddebug/CMakeLists.txt +++ b/ddebug/CMakeLists.txt @@ -16,13 +16,13 @@ set(CPPS add_library(ddebug STATIC ${HEADERS} ${CPPS}) add_dependencies(ddebug get_git_hash) + +target_link_libraries(ddebug PRIVATE + networking +) target_include_directories(ddebug PUBLIC $ PRIVATE ${PROJECT_BINARY_DIR}/lib # For d3_version.h ) - -target_include_directories(bitmap PUBLIC - -) diff --git a/ddio/CMakeLists.txt b/ddio/CMakeLists.txt index bd1e7a236..fb1d680c6 100644 --- a/ddio/CMakeLists.txt +++ b/ddio/CMakeLists.txt @@ -39,13 +39,16 @@ set(CPPS add_library(ddio STATIC ${CPPS}) target_link_libraries(ddio ddebug + $<$: + linux + > + $<$: + win32 + > ) target_include_directories(ddio PUBLIC $ - $ ) diff --git a/fix/CMakeLists.txt b/fix/CMakeLists.txt index 765148ded..9bb0827d7 100644 --- a/fix/CMakeLists.txt +++ b/fix/CMakeLists.txt @@ -1,10 +1,11 @@ -set(HEADERS) +set(HEADERS + fix.h) set(CPPS fix.cpp) add_library(fix STATIC ${HEADERS} ${CPPS}) target_include_directories(fix PUBLIC $ ) diff --git a/grtext/CMakeLists.txt b/grtext/CMakeLists.txt index ccce4c71e..88915de5d 100644 --- a/grtext/CMakeLists.txt +++ b/grtext/CMakeLists.txt @@ -10,22 +10,14 @@ set(CPPS add_library(grtext STATIC ${HEADERS} ${CPPS}) target_link_libraries(grtext PRIVATE ddio + bitmap + renderer + dd_video + 2dlib ) target_include_directories(grtext PUBLIC $ - $ - $ - $ - $ ) diff --git a/libacm/CMakeLists.txt b/libacm/CMakeLists.txt index c38fa7b44..fde189fa6 100644 --- a/libacm/CMakeLists.txt +++ b/libacm/CMakeLists.txt @@ -12,3 +12,9 @@ set(LIB_SRC libacm.h) add_library(libacm STATIC ${HEADERS} ${CPPS} ${LIB_SRC}) + +target_include_directories(libacm PUBLIC + $ +) diff --git a/libmve/CMakeLists.txt b/libmve/CMakeLists.txt index 7b92311a4..aeab332e7 100644 --- a/libmve/CMakeLists.txt +++ b/libmve/CMakeLists.txt @@ -18,3 +18,8 @@ endif() add_library(libmve STATIC ${HEADERS} ${CPPS} ${PLATFORM_CPPS}) +target_include_directories(libmve PUBLIC + $ +) diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 9996b0752..bccec3a77 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -18,27 +18,17 @@ set(CPPS add_library(linux STATIC ${HEADERS} ${CPPS}) target_link_libraries(linux PRIVATE cfile + ddio + networking + renderer + model + manage + 2dlib + bitmap ) target_include_directories(linux PUBLIC $ - $ - $ - $ - $ - $ ) -target_link_libraries(linux PRIVATE - ddio -) + diff --git a/manage/CMakeLists.txt b/manage/CMakeLists.txt index 0f4a837c8..ebb4797b7 100644 --- a/manage/CMakeLists.txt +++ b/manage/CMakeLists.txt @@ -30,16 +30,16 @@ target_link_libraries(manage PRIVATE ddio sndlib stream_audio + 2dlib + model + networking + bitmap + renderer ) target_include_directories(manage PUBLIC $ - $ - $ ) + diff --git a/md5/CMakeLists.txt b/md5/CMakeLists.txt index 25ef760aa..eb772dec1 100644 --- a/md5/CMakeLists.txt +++ b/md5/CMakeLists.txt @@ -9,3 +9,11 @@ add_library(md5 STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) if(BUILD_TESTING) add_subdirectory(tests) endif() + +target_include_directories(md5 PUBLIC + $ +) + + diff --git a/mem/CMakeLists.txt b/mem/CMakeLists.txt index c36914040..221d363a4 100644 --- a/mem/CMakeLists.txt +++ b/mem/CMakeLists.txt @@ -3,3 +3,9 @@ set(CPPS mem.cpp) add_library(mem STATIC ${HEADERS} ${CPPS}) + +target_include_directories(mem PUBLIC + $ +) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index 8ca0c8ddf..be316fb14 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -9,20 +9,24 @@ set(CPPS add_library(misc STATIC ${HEADERS} ${CPPS}) -target_link_libraries(misc ddebug) - -target_include_directories(misc PUBLIC - $: + linux > - $: + win32 > +) + +target_include_directories(misc PUBLIC $ ) + if(BUILD_TESTING) add_subdirectory(tests) endif() diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index ed9aea8f4..9d1cbd899 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -9,27 +9,16 @@ set(CPPS add_library(model STATIC ${HEADERS} ${CPPS}) target_link_libraries(model PRIVATE ddio + bitmap + renderer + networking + physics + manage + 2dlib ) + target_include_directories(model PUBLIC $ - $ - $ - $ - $ - $ - $ ) diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index b66d02261..95057cc51 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -10,6 +10,6 @@ target_link_libraries(module PRIVATE target_include_directories(module PUBLIC $ ) diff --git a/movie/CMakeLists.txt b/movie/CMakeLists.txt index 111c118c6..78ff0ad1a 100644 --- a/movie/CMakeLists.txt +++ b/movie/CMakeLists.txt @@ -7,31 +7,18 @@ add_library(movie STATIC ${HEADERS} ${CPPS}) target_link_libraries(movie PRIVATE ddio libmve + renderer + grtext + bitmap + model + manage + dd_video + 2dlib ) target_include_directories(movie PUBLIC $ - $ - $ - $ - $ - $ - $ - $ ) + diff --git a/music/CMakeLists.txt b/music/CMakeLists.txt index 3e80fb167..c0ec0dcdf 100644 --- a/music/CMakeLists.txt +++ b/music/CMakeLists.txt @@ -9,14 +9,18 @@ set(CPPS tracklist.cpp) add_library(music STATIC ${HEADERS} ${CPPS}) -target_link_libraries(music +target_link_libraries(music PRIVATE cfile ddio sndlib stream_audio + libacm + manage + bitmap ) + target_include_directories(music PUBLIC $ ) diff --git a/netcon/inetfile/CMakeLists.txt b/netcon/inetfile/CMakeLists.txt index ebe4660ca..fdd983c13 100644 --- a/netcon/inetfile/CMakeLists.txt +++ b/netcon/inetfile/CMakeLists.txt @@ -10,8 +10,8 @@ set(CPPS add_library(inetfile STATIC ${HEADERS} ${CPPS}) -target_include_directories(inetfile PUBLIC - $ +target_link_libraries(inetfile PRIVATE + networking ) + +target_include_directories(inetfile PUBLIC .) diff --git a/netcon/lanclient/CMakeLists.txt b/netcon/lanclient/CMakeLists.txt index 9c122a8db..83396b932 100644 --- a/netcon/lanclient/CMakeLists.txt +++ b/netcon/lanclient/CMakeLists.txt @@ -10,40 +10,20 @@ set_target_properties(Direct_TCP_IP PROPERTIES OUTPUT_NAME "Direct TCP~IP") target_link_libraries(Direct_TCP_IP PRIVATE ddio inetfile + networking + ui + bitmap + model + module + manage + renderer + 2dlib $<$: ws2_32 > ) -target_include_directories(Direct_TCP_IP PUBLIC - $ - $ - $ - $ - $ - $ - $ - $ - $ -) +target_include_directories(Direct_TCP_IP PUBLIC .) add_custom_target(Direct_TCP_IP_Hog COMMAND $ diff --git a/netgames/anarchy/CMakeLists.txt b/netgames/anarchy/CMakeLists.txt index 98a3d04e1..32d492c2e 100644 --- a/netgames/anarchy/CMakeLists.txt +++ b/netgames/anarchy/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/coop/CMakeLists.txt b/netgames/coop/CMakeLists.txt index 651052fa8..b3d6012cf 100644 --- a/netgames/coop/CMakeLists.txt +++ b/netgames/coop/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/ctf/CMakeLists.txt b/netgames/ctf/CMakeLists.txt index f3008f2f5..97f3b704c 100644 --- a/netgames/ctf/CMakeLists.txt +++ b/netgames/ctf/CMakeLists.txt @@ -8,5 +8,19 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) + install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/dmfc/CMakeLists.txt b/netgames/dmfc/CMakeLists.txt index 907e538e7..2d07991c7 100644 --- a/netgames/dmfc/CMakeLists.txt +++ b/netgames/dmfc/CMakeLists.txt @@ -29,44 +29,25 @@ add_definitions(-DOUTRAGE_VERSION -DDMFC_DLL) add_library(dmfc STATIC ${HEADERS} ${CPPS}) -target_include_directories(dmfc PUBLIC - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $: + linux + > + $<$: + win32 > ) + +target_include_directories(dmfc PUBLIC .) diff --git a/netgames/entropy/CMakeLists.txt b/netgames/entropy/CMakeLists.txt index 77868a27d..c3538c1ac 100644 --- a/netgames/entropy/CMakeLists.txt +++ b/netgames/entropy/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/hoard/CMakeLists.txt b/netgames/hoard/CMakeLists.txt index 4c8d9d4be..fbf054fbc 100644 --- a/netgames/hoard/CMakeLists.txt +++ b/netgames/hoard/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/hyperanarchy/CMakeLists.txt b/netgames/hyperanarchy/CMakeLists.txt index c75cfef97..d3cd1f8e9 100644 --- a/netgames/hyperanarchy/CMakeLists.txt +++ b/netgames/hyperanarchy/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/monsterball/CMakeLists.txt b/netgames/monsterball/CMakeLists.txt index 76392a3d3..56a05a18b 100644 --- a/netgames/monsterball/CMakeLists.txt +++ b/netgames/monsterball/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/roboanarchy/CMakeLists.txt b/netgames/roboanarchy/CMakeLists.txt index 18268c7e8..4a2a32b83 100644 --- a/netgames/roboanarchy/CMakeLists.txt +++ b/netgames/roboanarchy/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/netgames/tanarchy/CMakeLists.txt b/netgames/tanarchy/CMakeLists.txt index 74c1732de..5c596ee4b 100644 --- a/netgames/tanarchy/CMakeLists.txt +++ b/netgames/tanarchy/CMakeLists.txt @@ -8,5 +8,18 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "") set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m") -target_link_libraries(${NETGAME_MODULE} dmfc) +target_link_libraries(${NETGAME_MODULE} + dmfc + grtext + dd_video + 2dlib + module + renderer + physics + model + manage + bitmap + networking + ddio +) install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames) diff --git a/networking/CMakeLists.txt b/networking/CMakeLists.txt index 4bde4aad3..616a85e8b 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -11,28 +11,17 @@ endif() add_library(networking STATIC ${HEADERS} ${CPPS}) target_link_libraries(networking PRIVATE ddio + renderer + bitmap + manage + module + ddio + 2dlib + model ) target_include_directories(networking PUBLIC $ - $ - $ - $ - $ - $ - $ ) diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt index 2fd46f900..8231e543c 100644 --- a/physics/CMakeLists.txt +++ b/physics/CMakeLists.txt @@ -13,22 +13,19 @@ add_library(physics STATIC ${HEADERS} ${CPPS}) target_link_libraries(physics PRIVATE ddio sndlib + rtperformance + module + model + ddio + 2dlib + manage + bitmap + renderer + networking ) target_include_directories(physics PUBLIC $ - $ - $ - $ - $ ) diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index fef3bd60d..876b26c3d 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -31,22 +31,19 @@ add_library(renderer STATIC ${HEADERS} ${CPPS}) target_link_libraries(renderer PRIVATE bitmap ddio + rtperformance + module + 2dlib + $<$: + linux + > + $<$: + win32 + > ) target_include_directories(renderer PUBLIC $ - $ - $ - $ - $ ) diff --git a/rtperformance/CMakeLists.txt b/rtperformance/CMakeLists.txt index 946a4075a..3f001e278 100644 --- a/rtperformance/CMakeLists.txt +++ b/rtperformance/CMakeLists.txt @@ -6,17 +6,14 @@ set(CPPS add_library(rtperformance STATIC ${HEADERS} ${CPPS}) target_link_libraries(rtperformance PRIVATE ddio + bitmap + manage ) target_include_directories(rtperformance PUBLIC $ - $ - $ ) + diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 894416d2d..a303ad304 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -70,20 +70,14 @@ set(SCRIPTS foreach(SCRIPT ${SCRIPTS}) add_library(${SCRIPT} MODULE ${CPPS} "${SCRIPT}.cpp") - target_link_libraries(${SCRIPT} fix) + target_link_libraries(${SCRIPT} PRIVATE + fix + module + physics + manage) set_target_properties(${SCRIPT} PROPERTIES PREFIX "") set_target_properties(${SCRIPT} PROPERTIES CXX_VISIBILITY_PRESET "hidden") - target_include_directories(${SCRIPT} PUBLIC - $ - $ - $ - ) + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(${SCRIPT} PROPERTIES SUFFIX ".dylib") endif() diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index c02dc0720..bd2c92227 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -37,28 +37,19 @@ add_library(sndlib STATIC ${HEADERS} ${CPPS}) target_link_libraries(sndlib PRIVATE cfile ddio + networking + bitmap + renderer + manage + model + physics + 2dlib stream_audio + libacm ) + target_include_directories(sndlib PUBLIC $ - $ - $ - $ - $ - $ - $ ) diff --git a/stream_audio/CMakeLists.txt b/stream_audio/CMakeLists.txt index 25a993e42..ba1d74c0b 100644 --- a/stream_audio/CMakeLists.txt +++ b/stream_audio/CMakeLists.txt @@ -6,15 +6,15 @@ set(CPPS add_library(stream_audio STATIC ${HEADERS} ${CPPS}) target_link_libraries(stream_audio PRIVATE + sndlib ddio libacm - sndlib + manage + bitmap ) + target_include_directories(stream_audio PUBLIC $ - $ ) diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 2127b08e8..a0d93c7f5 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -25,26 +25,11 @@ set(CPPS add_library(ui STATIC ${HEADERS} ${CPPS}) target_link_libraries(ui PRIVATE ddio + bitmap + grtext + renderer + dd_video + 2dlib ) -target_include_directories(ui PUBLIC - $ - $ - $ - $ - $ - $ -) - +target_include_directories(ui PUBLIC .) diff --git a/unzip/CMakeLists.txt b/unzip/CMakeLists.txt index bf07b898b..14fda0cff 100644 --- a/unzip/CMakeLists.txt +++ b/unzip/CMakeLists.txt @@ -4,3 +4,5 @@ set(CPPS unzip.cpp) add_library(unzip STATIC ${HEADERS} ${CPPS}) target_link_libraries(unzip ZLIB::ZLIB) + +target_include_directories(unzip PUBLIC .) diff --git a/vecmat/CMakeLists.txt b/vecmat/CMakeLists.txt index 6a5269ce6..46108aa7f 100644 --- a/vecmat/CMakeLists.txt +++ b/vecmat/CMakeLists.txt @@ -4,3 +4,5 @@ set(CPPS add_library(vecmat STATIC ${HEADERS} ${CPPS}) target_link_libraries(vecmat fix) + +target_include_directories(vecmat PUBLIC .) diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index 6a29a8f42..3c11f1e50 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -14,31 +14,17 @@ set(CPPS add_library(win32 STATIC ${CPPS}) add_dependencies(win32 get_git_hash) -target_include_directories(win32 PUBLIC - $ - $ - $ - $ - $ - $ - $ - PRIVATE ${PROJECT_BINARY_DIR}/lib -) target_link_libraries(win32 PRIVATE ddio + 2dlib + bitmap + manage + model + renderer + networking +) + +target_include_directories(win32 PUBLIC . + PRIVATE ${PROJECT_BINARY_DIR}/lib ) From bbe394111df4fde73d8c253f27219da09be8276a Mon Sep 17 00:00:00 2001 From: GravisZro Date: Sun, 2 Jun 2024 12:26:55 -0400 Subject: [PATCH 5/5] Header clean up --- 2dlib/ddgr.h | 2 -- 2dlib/lib2d.h | 2 +- 2dlib/memsurf.cpp | 9 +++++---- 2dlib/pen.cpp | 1 + Descent3/Controls.cpp | 5 ----- Descent3/CtlCfgElem.cpp | 1 - Descent3/TelComGoals.cpp | 2 -- Descent3/config.cpp | 17 ++--------------- Descent3/config.h | 2 ++ Descent3/ctlconfig.cpp | 11 +++++++---- Descent3/dedicated_server.cpp | 6 ------ Descent3/descent.h | 4 ++++ Descent3/init.cpp | 2 ++ Descent3/intellivibe.cpp | 1 + Descent3/lighting.cpp | 4 ---- Descent3/lnxmain.cpp | 7 ++++--- Descent3/multi_dll_mgr.h | 3 +++ Descent3/program.cpp | 5 +++++ Descent3/room.h | 2 +- Descent3/splinter.cpp | 7 ++----- Descent3/terrain.cpp | 8 ++------ Descent3/weapon.cpp | 15 ++++++--------- Descent3/winmain.cpp | 4 ++-- bitmap/bitmap.cpp | 17 +++++++++-------- bitmap/bitmap.h | 5 ----- bitmap/bumpmap.h | 2 +- bitmap/lightmap.h | 2 +- cfile/cfile.h | 3 +-- cfile/inffile.h | 12 ++++++------ czip/CZip.cpp | 8 ++++---- d3music/musicapi.cpp | 14 ++++---------- dd_grwin32/ddgrWin32DX.cpp | 2 +- dd_grwin32/ddgrWin32GDI.cpp | 2 +- dd_video/ddvid.h | 3 +-- dd_video/ddvidlib.h | 7 +++++-- dd_video/vidWin32FS.cpp | 1 + dd_video/vidWin32Win.cpp | 3 ++- dd_video/video_lnx.cpp | 1 - dd_video/video_win32.cpp | 2 +- ddio/appdatabase.h | 8 +------- ddio/application.h | 8 ++------ ddio/controller.h | 9 --------- ddio/ddio_common.h | 3 ++- ddio/ddio_lnx.h | 2 +- ddio/lnxio.cpp | 2 +- ddio/lnxkey.cpp | 2 +- ddio/winforcefeedback.cpp | 2 +- ddio/winio.cpp | 6 +++--- ddio/winkey.cpp | 3 +-- ddio/winmouse.cpp | 7 +++---- grtext/grfont.cpp | 12 +++++++----- grtext/grtext.cpp | 10 +++++----- grtext/grtext.h | 3 +-- grtext/grtextlib.h | 3 +-- lib/psclass.h | 3 +++ libacm/aencode.h | 1 - libacm/libacm.h | 2 ++ linux/linux_fix.h | 1 + linux/lnxapp.cpp | 4 +++- linux/lnxapp.h | 2 +- linux/lnxcon.cpp | 5 +---- linux/lnxcon_null.cpp | 3 --- linux/lnxcon_raw.cpp | 11 ++++------- linux/lnxcontroller.cpp | 8 +++++--- linux/lnxdata.cpp | 1 - linux/lnxdatabase.h | 4 ++-- linux/registry.cpp | 9 +++++---- linux/registry.h | 2 -- manage/manage.h | 3 +-- model/newstyle.cpp | 12 +++++------- model/polymodel.cpp | 11 ++++------- model/polymodel.h | 4 ---- model/polymodel_external.h | 2 +- module/module.cpp | 13 +++++-------- movie/movie.cpp | 1 + movie/movie.h | 5 ++++- music/music.h | 2 -- music/musiclib.h | 6 +++++- music/omflex.cpp | 7 +++++-- music/sequencer.cpp | 6 ------ music/streamer.cpp | 1 + netcon/inetfile/CFtp.h | 5 +++++ netcon/inetfile/inetgetfile.h | 2 -- networking/networking.h | 1 - renderer/HardwareOpenGL.cpp | 7 +++++-- renderer/dyna_gl.h | 3 ++- sndlib/CMakeLists.txt | 20 ++++++++++++-------- sndlib/ds3dlib.cpp | 18 ++++++++++-------- stream_audio/streamaudio.cpp | 8 +++++--- stream_audio/streamaudio.h | 1 - ui/UIEdit.cpp | 3 ++- ui/UISystem.cpp | 3 +-- win32/CMakeLists.txt | 4 ++-- win32/winapp.cpp | 13 ++++++++----- win32/{win32app.h => winapp.h} | 2 ++ win32/wincon.cpp | 11 +++++------ win32/wincontroller.cpp | 4 ++-- win32/windata.cpp | 2 +- win32/{win32database.h => windatabase.h} | 2 ++ 99 files changed, 241 insertions(+), 281 deletions(-) rename win32/{win32app.h => winapp.h} (99%) rename win32/{win32database.h => windatabase.h} (99%) diff --git a/2dlib/ddgr.h b/2dlib/ddgr.h index 820876769..7bce392ab 100644 --- a/2dlib/ddgr.h +++ b/2dlib/ddgr.h @@ -78,8 +78,6 @@ #ifndef _DDGR_H #define _DDGR_H -#include "pstypes.h" -#include "Macros.h" #include "grdefs.h" // ---------------------------------------------------------------------------- diff --git a/2dlib/lib2d.h b/2dlib/lib2d.h index 9615fb6bb..ce335dcf3 100644 --- a/2dlib/lib2d.h +++ b/2dlib/lib2d.h @@ -24,7 +24,7 @@ #define LIB2D_H #include "gr.h" -#include "renderer.h" +#include "ddgr.h" // structures diff --git a/2dlib/memsurf.cpp b/2dlib/memsurf.cpp index 6d96729a4..6e7a758a5 100644 --- a/2dlib/memsurf.cpp +++ b/2dlib/memsurf.cpp @@ -68,12 +68,13 @@ * $NoKeywords: $ */ -#include "lib2d.h" +#include "gr.h" -#include "bitmap.h" +#include +#include -#include -#include +#include "lib2d.h" +#include "bitmap.h" #include "mem.h" // ---------------------------------------------------------------------------- diff --git a/2dlib/pen.cpp b/2dlib/pen.cpp index df0b61e73..16fcce413 100644 --- a/2dlib/pen.cpp +++ b/2dlib/pen.cpp @@ -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) diff --git a/Descent3/Controls.cpp b/Descent3/Controls.cpp index 0423c84b5..5b6a00be2 100644 --- a/Descent3/Controls.cpp +++ b/Descent3/Controls.cpp @@ -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" diff --git a/Descent3/CtlCfgElem.cpp b/Descent3/CtlCfgElem.cpp index 1a69f607e..dcb693030 100644 --- a/Descent3/CtlCfgElem.cpp +++ b/Descent3/CtlCfgElem.cpp @@ -125,7 +125,6 @@ #include "localization.h" #include -#include "joystick.h" // all controller binding texts static char Ctltext_KeyBindings[][16] = {"", diff --git a/Descent3/TelComGoals.cpp b/Descent3/TelComGoals.cpp index af0ebc463..2cc0b90ad 100644 --- a/Descent3/TelComGoals.cpp +++ b/Descent3/TelComGoals.cpp @@ -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 diff --git a/Descent3/config.cpp b/Descent3/config.cpp index 29848dc3b..f893076ed 100644 --- a/Descent3/config.cpp +++ b/Descent3/config.cpp @@ -279,36 +279,21 @@ * $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" @@ -316,6 +301,8 @@ #include "sounds.h" #include "ctlconfig.h" #include "musicapi.h" +#include "Macros.h" +#include "forcefeedback.h" #include #include diff --git a/Descent3/config.h b/Descent3/config.h index e0fd088d9..d5698178a 100644 --- a/Descent3/config.h +++ b/Descent3/config.h @@ -117,6 +117,8 @@ #ifndef __CONFIG_H__ #define __CONFIG_H__ +#include + // Main menu configuration functions // ------------------------------------------------------ // ConfigForceFeedback diff --git a/Descent3/ctlconfig.cpp b/Descent3/ctlconfig.cpp index 854c2d05d..4579528ff 100644 --- a/Descent3/ctlconfig.cpp +++ b/Descent3/ctlconfig.cpp @@ -277,20 +277,23 @@ * * $NoKeywords: $ */ + #include "ctlconfig.h" + +#include + #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 +#include "Macros.h" +#include "ddio_common.h" + ////////////////////////////////////////////////////////////////////////////// #define IDV_KCONFIG 10 #define IDV_CCONFIG 11 diff --git a/Descent3/dedicated_server.cpp b/Descent3/dedicated_server.cpp index 1f7623201..7afb17488 100644 --- a/Descent3/dedicated_server.cpp +++ b/Descent3/dedicated_server.cpp @@ -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" diff --git a/Descent3/descent.h b/Descent3/descent.h index 8c233154c..64c1c1d7d 100644 --- a/Descent3/descent.h +++ b/Descent3/descent.h @@ -131,6 +131,10 @@ #include #include "application.h" +#ifdef __LINUX__ +#include "linux_fix.h" +#endif + // The name of this product #ifdef DEMO #define PRODUCT_NAME "Descent 3 Demo" diff --git a/Descent3/init.cpp b/Descent3/init.cpp index b28647ecd..00524721f 100644 --- a/Descent3/init.cpp +++ b/Descent3/init.cpp @@ -987,6 +987,8 @@ #include "debuggraph.h" #include "vibeinterface.h" +#include "ddvid.h" + // Uncomment this to allow all languages #define ALLOW_ALL_LANG 1 diff --git a/Descent3/intellivibe.cpp b/Descent3/intellivibe.cpp index 1c82acaa6..c128b5fc6 100644 --- a/Descent3/intellivibe.cpp +++ b/Descent3/intellivibe.cpp @@ -58,6 +58,7 @@ void VIBE_DoForce(vector *) {} void VIBE_DoLevelEnd(void) {} #else +#include "winapp.h" #include "intellivibe.h" #include "module.h" #include "mono.h" diff --git a/Descent3/lighting.cpp b/Descent3/lighting.cpp index f99fbe91a..601bbec4b 100644 --- a/Descent3/lighting.cpp +++ b/Descent3/lighting.cpp @@ -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 @@ -42,7 +39,6 @@ #include "config.h" #include "dedicated_server.h" #include "objinfo.h" -#include "Macros.h" #include diff --git a/Descent3/lnxmain.cpp b/Descent3/lnxmain.cpp index ca87022eb..803f43968 100644 --- a/Descent3/lnxmain.cpp +++ b/Descent3/lnxmain.cpp @@ -30,10 +30,10 @@ #include -#include "program.h" +#include "lnxapp.h" +#include "lnxdatabase.h" + #include "descent.h" -#include "application.h" -#include "appdatabase.h" #include "args.h" #include "init.h" @@ -42,6 +42,7 @@ #include "loki_utils.h" #include "log.h" +#include "d3_version.h" extern bool ddio_mouseGrabbed; int no_debug_dialog = 0; diff --git a/Descent3/multi_dll_mgr.h b/Descent3/multi_dll_mgr.h index 25c6eec80..d030b845d 100644 --- a/Descent3/multi_dll_mgr.h +++ b/Descent3/multi_dll_mgr.h @@ -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 diff --git a/Descent3/program.cpp b/Descent3/program.cpp index 4292369e5..93cee3205 100644 --- a/Descent3/program.cpp +++ b/Descent3/program.cpp @@ -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; diff --git a/Descent3/room.h b/Descent3/room.h index 4154c79ef..79fadf45c 100644 --- a/Descent3/room.h +++ b/Descent3/room.h @@ -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" diff --git a/Descent3/splinter.cpp b/Descent3/splinter.cpp index 2422154b8..647cd9d21 100644 --- a/Descent3/splinter.cpp +++ b/Descent3/splinter.cpp @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include +#include #include "fireball.h" #include "object.h" @@ -23,13 +25,8 @@ #include "polymodel.h" #include "renderer.h" #include "gametexture.h" - -#include "Macros.h" -#include - #include "psrand.h" -#include // Given an object, renders the representation of this splinter void DrawSplinterObject(object *obj) { diff --git a/Descent3/terrain.cpp b/Descent3/terrain.cpp index 494ac30ca..585e49187 100644 --- a/Descent3/terrain.cpp +++ b/Descent3/terrain.cpp @@ -16,25 +16,21 @@ * along with this program. If not, see . */ +#include + #ifdef NEWEDITOR #include "neweditor\globals.h" -#else -#include #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 #include "mem.h" -#include "Macros.h" #include "dedicated_server.h" #include "psrand.h" #ifdef EDITOR diff --git a/Descent3/weapon.cpp b/Descent3/weapon.cpp index cb845942d..d1ab1fda8 100644 --- a/Descent3/weapon.cpp +++ b/Descent3/weapon.cpp @@ -332,15 +332,16 @@ * $NoKeywords: $ */ +#include +#include +#include +#include +#include + #include "weapon.h" -#include "pstypes.h" #include "pserror.h" #include "object.h" #include "3d.h" -#include -#include -#include -#include #include "bitmap.h" #include "vclip.h" #include "game.h" @@ -348,18 +349,14 @@ #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 // #include "samirlog.h" #define LOGFILE(_s) diff --git a/Descent3/winmain.cpp b/Descent3/winmain.cpp index af2b43982..c6dbbb9a7 100644 --- a/Descent3/winmain.cpp +++ b/Descent3/winmain.cpp @@ -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" diff --git a/bitmap/bitmap.cpp b/bitmap/bitmap.cpp index ca4c92927..8437879aa 100644 --- a/bitmap/bitmap.cpp +++ b/bitmap/bitmap.cpp @@ -297,13 +297,15 @@ * * $NoKeywords: $ */ -#include -#include -#include + + +#include +#include +#include +#include + #include "cfile.h" -#include "texture.h" #include "bitmap.h" -#include "pstypes.h" #include "pserror.h" #include "mono.h" #include "iff.h" @@ -311,11 +313,10 @@ #include "lightmap.h" #include "bumpmap.h" #include "mem.h" -#include "psrand.h" -#include "Macros.h" +#include "psrand.h" +#include "grdefs.h" -#include #define BM_FILETYPE_TGA 1 #define BM_FILETYPE_PCX 2 diff --git a/bitmap/bitmap.h b/bitmap/bitmap.h index 1f5108c4d..a647e351b 100644 --- a/bitmap/bitmap.h +++ b/bitmap/bitmap.h @@ -19,13 +19,8 @@ #ifndef PSBITMAP_H #define PSBITMAP_H -#include "pstypes.h" #include "cfile.h" -#ifdef __LINUX__ -#include "linux_fix.h" //needed for stricmp's throughout bitmap lib -#endif - #define MAX_BITMAPS 5000 #define NUM_MIP_LEVELS 5 diff --git a/bitmap/bumpmap.h b/bitmap/bumpmap.h index d6f12e918..950081721 100644 --- a/bitmap/bumpmap.h +++ b/bitmap/bumpmap.h @@ -19,7 +19,7 @@ #ifndef BUMPMAP_H #define BUMPMAP_H -#include "pstypes.h" +#include #define MAX_BUMPMAPS 500 #define BAD_BUMP_INDEX 65535 diff --git a/bitmap/lightmap.h b/bitmap/lightmap.h index b0bcc1413..af979adb0 100644 --- a/bitmap/lightmap.h +++ b/bitmap/lightmap.h @@ -19,7 +19,7 @@ #ifndef LIGHTMAP_H #define LIGHTMAP_H -#include "pstypes.h" +#include #define MAX_LIGHTMAPS (65534) #define BAD_LM_INDEX 65535 diff --git a/cfile/cfile.h b/cfile/cfile.h index 2c41a1b1d..f0a54abfe 100644 --- a/cfile/cfile.h +++ b/cfile/cfile.h @@ -97,8 +97,7 @@ #include #include #include - -#include "pstypes.h" +#include struct library; diff --git a/cfile/inffile.h b/cfile/inffile.h index 22ae31dad..aa45692a5 100644 --- a/cfile/inffile.h +++ b/cfile/inffile.h @@ -23,12 +23,12 @@ #ifndef INFFILE_H #define INFFILE_H -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "pstypes.h" #include "psclass.h" +#include + +#ifdef __LINUX__ +#include "linux_fix.h" +#endif struct CFILE; @@ -71,7 +71,7 @@ class InfFile { struct sym_info // full runtime symbol { - char name[PSPATHNAME_LEN]; + char name[_MAX_PATH]; char *text; }; diff --git a/czip/CZip.cpp b/czip/CZip.cpp index 9166d74e8..25a04130e 100644 --- a/czip/CZip.cpp +++ b/czip/CZip.cpp @@ -34,12 +34,12 @@ * $NoKeywords: $ */ -#include -#include -#include +#include +#include +#include #include + #include "pserror.h" -#include "Macros.h" #include "CZip.h" CZip::CZip() { diff --git a/d3music/musicapi.cpp b/d3music/musicapi.cpp index 6c54e1409..c135b1214 100644 --- a/d3music/musicapi.cpp +++ b/d3music/musicapi.cpp @@ -16,18 +16,12 @@ * along with this program. If not, see . */ -#include "musicapi.h" -#include "music.h" -#include "Macros.h" #include -#ifdef min -#undef min -#endif - -#ifdef max -#undef max -#endif +#include "musicapi.h" +#include "music.h" +#include "mono.h" +#include "pserror.h" // generic constants #define MUSIC_IDLE_TIME 240.0f // how many seconds before background music silences. diff --git a/dd_grwin32/ddgrWin32DX.cpp b/dd_grwin32/ddgrWin32DX.cpp index cfed4de52..323965d33 100644 --- a/dd_grwin32/ddgrWin32DX.cpp +++ b/dd_grwin32/ddgrWin32DX.cpp @@ -35,7 +35,7 @@ #include "ddgrWin32.h" #include "ddgrWin32DX.h" -#include "application.h" +#include "winapp.h" #include "mono.h" #include "pserror.h" diff --git a/dd_grwin32/ddgrWin32GDI.cpp b/dd_grwin32/ddgrWin32GDI.cpp index b2c53c2c1..a2aa0969a 100644 --- a/dd_grwin32/ddgrWin32GDI.cpp +++ b/dd_grwin32/ddgrWin32GDI.cpp @@ -75,7 +75,7 @@ #include "ddgrWin32.h" #include "ddgrWin32GDI.h" -#include "application.h" +#include "winapp.h" #include "mono.h" #include "pserror.h" #include "gr.h" diff --git a/dd_video/ddvid.h b/dd_video/ddvid.h index f4a986493..4797cde7b 100644 --- a/dd_video/ddvid.h +++ b/dd_video/ddvid.h @@ -44,8 +44,7 @@ #ifndef DDVID_H #define DDVID_H -#include "pstypes.h" -#include "grdefs.h" +#include "application.h" class oeApplication; diff --git a/dd_video/ddvidlib.h b/dd_video/ddvidlib.h index d7e03ed8f..083d32084 100644 --- a/dd_video/ddvidlib.h +++ b/dd_video/ddvidlib.h @@ -44,11 +44,14 @@ #ifndef DDVIDLIB_H #define DDVIDLIB_H -#include "ddvid.h" +#include +#include #include #include -#include + +#include "ddvid.h" +#include "winapp.h" #define VM_MAX_MODES 96 diff --git a/dd_video/vidWin32FS.cpp b/dd_video/vidWin32FS.cpp index 1407a1b53..8fa28d81a 100644 --- a/dd_video/vidWin32FS.cpp +++ b/dd_video/vidWin32FS.cpp @@ -52,6 +52,7 @@ #include "ddvidlib.h" #include "pserror.h" +#include "grdefs.h" // DirectDraw Display mode enumeration callback HRESULT WINAPI DDEnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext); diff --git a/dd_video/vidWin32Win.cpp b/dd_video/vidWin32Win.cpp index 5ac25bd45..49dfcbae0 100644 --- a/dd_video/vidWin32Win.cpp +++ b/dd_video/vidWin32Win.cpp @@ -47,7 +47,8 @@ #include "ddvidlib.h" #include "pserror.h" -#include "application.h" +#include "winapp.h" +#include "grdefs.h" ////////////////////////////////////////////////////////////////////////////// // Variables diff --git a/dd_video/video_lnx.cpp b/dd_video/video_lnx.cpp index 3f568f7b7..b948dcb37 100644 --- a/dd_video/video_lnx.cpp +++ b/dd_video/video_lnx.cpp @@ -26,7 +26,6 @@ #include #include "ddvid.h" -#include "application.h" #include "lnxapp.h" struct tinfo { diff --git a/dd_video/video_win32.cpp b/dd_video/video_win32.cpp index b40966ce1..c8fdcde1b 100644 --- a/dd_video/video_win32.cpp +++ b/dd_video/video_win32.cpp @@ -50,7 +50,7 @@ #include "ddvidlib.h" #include "pserror.h" -#include "application.h" +#include "winapp.h" #include diff --git a/ddio/appdatabase.h b/ddio/appdatabase.h index 8acfcbd2b..c24d499a1 100644 --- a/ddio/appdatabase.h +++ b/ddio/appdatabase.h @@ -51,7 +51,7 @@ #ifndef APPDATABASE #define APPDATABASE -#include "pstypes.h" +#include /* oeAppDatabase to get info about the application from a managed database (or a custom info file) @@ -100,10 +100,4 @@ class oeAppDatabase { Win32 Samir Win32Database.h 06/97 */ -#if defined(WIN32) -#include "win32database.h" -#elif defined(__LINUX__) -#include "lnxdatabase.h" -#endif - #endif diff --git a/ddio/application.h b/ddio/application.h index ccf7cc12e..47bc03d8f 100644 --- a/ddio/application.h +++ b/ddio/application.h @@ -66,7 +66,7 @@ */ #ifndef APP_H #define APP_H -#include "pstypes.h" + /* Basic Application data types */ /* Application Object This object entails initialization and cleanup of all operating system @@ -109,9 +109,5 @@ class oeApplication { Add a platform to this list once implemented: Win32 Samir Win32App.h 06/97 */ -#if defined(WIN32) -#include "win32app.h" -#elif defined(__LINUX__) -#include "lnxapp.h" -#endif + #endif diff --git a/ddio/controller.h b/ddio/controller.h index 2843e0384..f1e37e6c1 100644 --- a/ddio/controller.h +++ b/ddio/controller.h @@ -118,9 +118,6 @@ #include -#include "pstypes.h" -#include "Macros.h" - enum ct_format { ctNoFormat, ctAnalog, // analog information (-1.0 to 1.0) @@ -264,10 +261,4 @@ class gameController { gameController *CreateController(int num_funcs, ct_function *funcs, char *remote_ip); void DestroyController(gameController *ctl); -#if defined(WIN32) -#include "wincontroller.h" -#elif defined(__LINUX__) -#include "lnxcontroller.h" -#endif - #endif diff --git a/ddio/ddio_common.h b/ddio/ddio_common.h index 22af91d48..837d6202e 100644 --- a/ddio/ddio_common.h +++ b/ddio/ddio_common.h @@ -117,8 +117,9 @@ #ifndef DDIO_COMMON_H #define DDIO_COMMON_H +#include + #include "application.h" -#include "pstypes.h" #define DDIO_MOUSE_LITE 2 // some ddio systems support the 'lite' extension of mice. diff --git a/ddio/ddio_lnx.h b/ddio/ddio_lnx.h index 8e96b1d80..888747f42 100644 --- a/ddio/ddio_lnx.h +++ b/ddio/ddio_lnx.h @@ -24,7 +24,7 @@ #ifndef DDIO_LNX_H #define DDIO_LNX_H -#include "application.h" +#include "lnxapp.h" extern oeLnxApplication *Lnx_app_obj; diff --git a/ddio/lnxio.cpp b/ddio/lnxio.cpp index 900764853..40cf64807 100644 --- a/ddio/lnxio.cpp +++ b/ddio/lnxio.cpp @@ -62,7 +62,7 @@ #include #endif -#include "application.h" +#include "lnxapp.h" #include "ddio.h" #include "pserror.h" diff --git a/ddio/lnxkey.cpp b/ddio/lnxkey.cpp index c6abbe368..c71fb77d5 100644 --- a/ddio/lnxkey.cpp +++ b/ddio/lnxkey.cpp @@ -49,7 +49,7 @@ // ---------------------------------------------------------------------------- // Keyboard Interface // ---------------------------------------------------------------------------- -#include "application.h" +#include "lnxapp.h" #include "ddio.h" #include "mono.h" diff --git a/ddio/winforcefeedback.cpp b/ddio/winforcefeedback.cpp index 24f176890..e8fcf96c3 100644 --- a/ddio/winforcefeedback.cpp +++ b/ddio/winforcefeedback.cpp @@ -101,7 +101,7 @@ #include "mono.h" #include "ddio.h" #include "ddio_win.h" -#include "application.h" +#include "winapp.h" #include "forcefeedback.h" #include "mem.h" #include "dinput.h" diff --git a/ddio/winio.cpp b/ddio/winio.cpp index 14d025849..3968b61dc 100644 --- a/ddio/winio.cpp +++ b/ddio/winio.cpp @@ -107,12 +107,12 @@ #include #include +#include -#include #include #include "pserror.h" -#include "application.h" +#include "winapp.h" #include "ddio_win.h" #include "ddio.h" #include "dinput.h" @@ -202,4 +202,4 @@ bool ddio_GetBinaryPath(char *exec_path, size_t len) { } exec_path[len - 1] = '\0'; return true; -} \ No newline at end of file +} diff --git a/ddio/winkey.cpp b/ddio/winkey.cpp index edb063f5d..d87597c8b 100644 --- a/ddio/winkey.cpp +++ b/ddio/winkey.cpp @@ -180,8 +180,7 @@ #include "mono.h" #include "ddio.h" #include "ddio_win.h" -#include "application.h" -#include "TaskSystem.h" +#include "winapp.h" #include #include diff --git a/ddio/winmouse.cpp b/ddio/winmouse.cpp index f59ce69e4..030284410 100644 --- a/ddio/winmouse.cpp +++ b/ddio/winmouse.cpp @@ -20,16 +20,15 @@ // Mouse Interface // ---------------------------------------------------------------------------- -#include -#include +#include +#include #include "pserror.h" #include "mono.h" #include "ddio.h" #include "ddio_win.h" -#include "application.h" +#include "winapp.h" #include "psclass.h" -#include "Macros.h" struct t_mse_button_info { bool is_down[N_MSEBTNS]; diff --git a/grtext/grfont.cpp b/grtext/grfont.cpp index a4ed9d5c4..bcc975229 100644 --- a/grtext/grfont.cpp +++ b/grtext/grfont.cpp @@ -107,18 +107,20 @@ * $NoKeywords: $ */ +#include +#include +#include +#include + +#include "grtext.h" #include "grtextlib.h" #include "cfile.h" #include "bitmap.h" #include "pserror.h" #include "renderer.h" #include "mem.h" -#include "ddio.h" +#include "ddio_common.h" -#include -#include -#include -#include const int MAX_FONTS = 16, MAX_FONT_BITMAPS = 32; diff --git a/grtext/grtext.cpp b/grtext/grtext.cpp index bcc8de0d4..7e9478506 100644 --- a/grtext/grtext.cpp +++ b/grtext/grtext.cpp @@ -146,18 +146,18 @@ * $NoKeywords: $ */ +#include "grtext.h" + #include #include +#include +#include +#include #include "grtextlib.h" #include "renderer.h" #include "pserror.h" -#include "mem.h" - -#include -#include -#include #define CLIP_LEFT Grtext_left #define CLIP_TOP Grtext_top diff --git a/grtext/grtext.h b/grtext/grtext.h index 030300163..f04d9e43c 100644 --- a/grtext/grtext.h +++ b/grtext/grtext.h @@ -108,8 +108,7 @@ #ifndef GRTEXT_H #define GRTEXT_H -#include "pstypes.h" -#include "ddvid.h" +#include "grdefs.h" #define GRTEXT_BUFLEN 16384 #define GRTEXT_FORMAT_CHAR 0x2 diff --git a/grtext/grtextlib.h b/grtext/grtextlib.h index c3d3a7c52..387d72e02 100644 --- a/grtext/grtextlib.h +++ b/grtext/grtextlib.h @@ -38,8 +38,7 @@ #ifndef GRTEXTLIB_H #define GRTEXTLIB_H -#include "grtext.h" -#include "pstypes.h" +#include struct tCharBlt { uint16_t ch; diff --git a/lib/psclass.h b/lib/psclass.h index 10aa00732..5eda92935 100644 --- a/lib/psclass.h +++ b/lib/psclass.h @@ -54,6 +54,9 @@ #ifndef PSCLASS_H #define PSCLASS_H +#include +#include + // a universal list node to use with the list type template struct tListNode { T t; diff --git a/libacm/aencode.h b/libacm/aencode.h index 51f965dde..8d14df43c 100644 --- a/libacm/aencode.h +++ b/libacm/aencode.h @@ -21,7 +21,6 @@ #include #include -#include "pstypes.h" typedef int32_t ReadSampleFunction(void *data); diff --git a/libacm/libacm.h b/libacm/libacm.h index 84fa19711..791ee102e 100644 --- a/libacm/libacm.h +++ b/libacm/libacm.h @@ -19,6 +19,8 @@ #ifndef __LIBACM_H #define __LIBACM_H +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/linux/linux_fix.h b/linux/linux_fix.h index cb1f84a2e..48dcaee76 100644 --- a/linux/linux_fix.h +++ b/linux/linux_fix.h @@ -24,6 +24,7 @@ #define LOKI_VERSION "" #define HGLOBAL void * +#define SOCKET int void GlobalFree(void *); void *GlobalAlloc(int flags, int size); diff --git a/linux/lnxapp.cpp b/linux/lnxapp.cpp index 7c3f25eaa..26cd0bad1 100644 --- a/linux/lnxapp.cpp +++ b/linux/lnxapp.cpp @@ -68,15 +68,17 @@ * $NoKeywords: $ */ +#include #include #include #include #include #include -#include "application.h" #include "lnxapp.h" +#include "linux_fix.h" + #ifdef buttons // termios.h defines buttons, but SDL's headers use that symbol. #undef buttons #endif diff --git a/linux/lnxapp.h b/linux/lnxapp.h index 4fe2eb7e5..f942a9b61 100644 --- a/linux/lnxapp.h +++ b/linux/lnxapp.h @@ -19,7 +19,7 @@ #ifndef LNXAPP_H #define LNXAPP_H -#include "linux_fix.h" +#include "application.h" // if no-display/input specifier is given, it will use defaults #define APPFLAG_USESERVICE 0x00000100 // console (run no output/input) diff --git a/linux/lnxcon.cpp b/linux/lnxcon.cpp index d6d5c4c25..dff4093f5 100644 --- a/linux/lnxcon.cpp +++ b/linux/lnxcon.cpp @@ -62,11 +62,8 @@ #include #include -#include "application.h" +#include "lnxapp.h" #include "appconsole.h" -#include "TaskSystem.h" -#include "mono.h" -#include "pstring.h" #include #include "linux/dyna_curses.h" diff --git a/linux/lnxcon_null.cpp b/linux/lnxcon_null.cpp index 140c0096b..e2cd54d47 100644 --- a/linux/lnxcon_null.cpp +++ b/linux/lnxcon_null.cpp @@ -49,9 +49,6 @@ #include #include -#include "application.h" -#include "appconsole.h" -#include "TaskSystem.h" #include "mono.h" diff --git a/linux/lnxcon_raw.cpp b/linux/lnxcon_raw.cpp index 5ecd3478e..e55cddee7 100644 --- a/linux/lnxcon_raw.cpp +++ b/linux/lnxcon_raw.cpp @@ -39,21 +39,18 @@ * $NoKeywords: $ */ +#include + +#include #include #include #include #include #include -#include +#include -#include "application.h" #include "appconsole.h" -#include "TaskSystem.h" -#include "mono.h" -// #include "local_malloc.h" -#include "pstring.h" -#include static char *Con_raw_read_buf = NULL; // The next buffer of text from user input static char *Con_raw_inp_buf = NULL, Con_raw_inp_pos = 0; // Currently updating input buffer of text (and it's position) diff --git a/linux/lnxcontroller.cpp b/linux/lnxcontroller.cpp index d5aae0a13..13a7057c7 100644 --- a/linux/lnxcontroller.cpp +++ b/linux/lnxcontroller.cpp @@ -41,13 +41,15 @@ * $NoKeywords: $ */ +#include "lnxcontroller.h" + #include -#include "controller.h" + #include "ddio.h" #include "pserror.h" #include "joystick.h" #include "inffile.h" -#include "lnxcontroller.h" +#include "Macros.h" // Sorry! This is needed for the semi-hacky mouselook support #include "descent.h" @@ -409,7 +411,7 @@ ct_config_data lnxgameController::get_controller_value(ct_type type_req) { } for (i = 2; i < m_NumControls; i++) { float pos; - int ctl = CONTROLLER_CTL_INFO(i, -1); + int ctl = CONTROLLER_CTL_INFO(i, 0xFF); if (m_ControlList[i].flags & (CTF_POV << pov_n)) { pos = get_pov_value(i, ctDigital, pov_n, JOYPOV_RIGHT); diff --git a/linux/lnxdata.cpp b/linux/lnxdata.cpp index 9b3bc9aef..7d5f4ec6c 100644 --- a/linux/lnxdata.cpp +++ b/linux/lnxdata.cpp @@ -47,7 +47,6 @@ #include #include -#include "appdatabase.h" #include "lnxdatabase.h" #include "pserror.h" #include "mono.h" diff --git a/linux/lnxdatabase.h b/linux/lnxdatabase.h index 32f839ca2..2b8fe98ab 100644 --- a/linux/lnxdatabase.h +++ b/linux/lnxdatabase.h @@ -28,9 +28,9 @@ #include #include -class CRegistry; +#include "appdatabase.h" -#include "Macros.h" +class CRegistry; /* oeLnxAppDatabase to get info about the application from a managed database (or a custom info file) diff --git a/linux/registry.cpp b/linux/registry.cpp index 7068abe6d..1aeedcf62 100644 --- a/linux/registry.cpp +++ b/linux/registry.cpp @@ -47,10 +47,11 @@ * $NoKeywords: $ */ -#include -#include -#include -#include +#include +#include +#include +#include + // #include "local_malloc.h" #include "registry.h" #include "mono.h" diff --git a/linux/registry.h b/linux/registry.h index fd4ef9ada..c051be018 100644 --- a/linux/registry.h +++ b/linux/registry.h @@ -49,8 +49,6 @@ #define REGT_STRING 0 #define REGT_DWORD 1 -#include - struct tRecord { char name[MAX_RECORD_NAME]; char type; diff --git a/manage/manage.h b/manage/manage.h index dda17a87d..8fa76c7f4 100644 --- a/manage/manage.h +++ b/manage/manage.h @@ -22,7 +22,6 @@ #include #include "cfile.h" -#include "bitmap.h" #include "manage_external.h" #if defined(__LINUX__) @@ -39,7 +38,7 @@ // Tracklocks are for keeping track of what pages the local user is working on or has locked #define PAGELOCK_NAME_LEN 30 -#define TABLE_NAME_LEN PSPATHNAME_LEN +#define TABLE_NAME_LEN _MAX_PATH #define INFO_STRING_LEN 100 #define MAX_PAGELOCKS 1000 #define MAX_TRACKLOCKS 5000 diff --git a/model/newstyle.cpp b/model/newstyle.cpp index 89eded770..e059aec1e 100644 --- a/model/newstyle.cpp +++ b/model/newstyle.cpp @@ -77,15 +77,18 @@ * */ + +#include +#include + #include "pserror.h" -#include "pstypes.h" +#include "psrand.h" #include "3d.h" #include "vecmat.h" #include "grdefs.h" #include "polymodel.h" #include "gametexture.h" -#include "byteswap.h" #include "renderer.h" #include "lighting.h" #include "game.h" @@ -96,11 +99,6 @@ #include "lighting.h" #include "findintersection.h" -#include -#include - -#include "psrand.h" - static float face_depth[MAX_POLYGON_VECS]; static uint8_t triangulated_faces[MAX_FACES_PER_ROOM]; diff --git a/model/polymodel.cpp b/model/polymodel.cpp index 799eadab1..96f55094a 100644 --- a/model/polymodel.cpp +++ b/model/polymodel.cpp @@ -598,26 +598,23 @@ * $NoKeywords: $ */ +#include +#include +#include + #include "objinfo.h" #include "polymodel.h" #include "pserror.h" #include "3d.h" #include "mono.h" -#include "bitmap.h" #include "renderer.h" #include "manage.h" #include "gametexture.h" -#include "lighting.h" #include "ddio.h" #include "game.h" -#include -#include -#include "robotfire.h" #include "mem.h" #include "gamesequence.h" -#include - int Num_poly_models = 0; poly_model Poly_models[MAX_POLY_MODELS]; diff --git a/model/polymodel.h b/model/polymodel.h index 0203437cd..104917eba 100644 --- a/model/polymodel.h +++ b/model/polymodel.h @@ -294,11 +294,7 @@ #ifndef POLYMODEL_H #define POLYMODEL_H -#include "manage.h" -#include "pstypes.h" -#include "vecmat.h" #include "3d.h" -#include "robotfirestruct.h" #include "polymodel_external.h" #include "object_external_struct.h" diff --git a/model/polymodel_external.h b/model/polymodel_external.h index 0b8caea91..d66168aef 100644 --- a/model/polymodel_external.h +++ b/model/polymodel_external.h @@ -56,8 +56,8 @@ #ifndef __POLYMODEL_EXTERNAL_H_ #define __POLYMODEL_EXTERNAL_H_ +#include "robotfirestruct.h" #include "vecmat_external.h" -#include "pstypes.h" #include "grdefs.h" #include "manage_external.h" diff --git a/module/module.cpp b/module/module.cpp index 2deb46bdb..3b8f1835e 100644 --- a/module/module.cpp +++ b/module/module.cpp @@ -92,9 +92,12 @@ * $NoKeywords: $ */ #include "module.h" -#include "pstypes.h" + +#include +#include +#include + #include "pserror.h" -#include "ddio.h" #ifdef __LINUX__ #include @@ -102,12 +105,6 @@ static bool mod_FindRealFileNameCaseInsenstive(const char *directory, const char *filename, char *new_filename); #endif -#include "module.h" -#include "pstypes.h" -#include "pserror.h" -#include -#include -#include #if defined(__LINUX__) #include "linux_fix.h" #endif diff --git a/movie/movie.cpp b/movie/movie.cpp index 2524a9772..fc3c8cf92 100644 --- a/movie/movie.cpp +++ b/movie/movie.cpp @@ -32,6 +32,7 @@ #include #include #include "dsound.h" +#include "winapp.h" #endif #include diff --git a/movie/movie.h b/movie/movie.h index 53d666125..7ea79ff9b 100644 --- a/movie/movie.h +++ b/movie/movie.h @@ -19,9 +19,12 @@ #ifndef MOVIE_H__ #define MOVIE_H__ +#include + +#include "application.h" +#include "grdefs.h" #include "renderer.h" -#include #define MVELIB_NOERROR 0 #define MVELIB_FILE_ERROR -1 diff --git a/music/music.h b/music/music.h index cfc30fe0b..3086e92ae 100644 --- a/music/music.h +++ b/music/music.h @@ -99,8 +99,6 @@ #ifndef MUSIC_H #define MUSIC_H -#include "pstypes.h" -#include "pserror.h" #include "psclass.h" #include "streamaudio.h" diff --git a/music/musiclib.h b/music/musiclib.h index 705cf1dc7..9d5018bcc 100644 --- a/music/musiclib.h +++ b/music/musiclib.h @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#ifndef MUSICLIB_H +#define MUSICLIB_H #define OMFCMD_NUM 22 @@ -44,4 +46,6 @@ // undocumented codes. #define OMFCMD_MPLAY 200 // internal code. -#define OMFCMD_ENDIFI 201 // end of ifi conditional. \ No newline at end of file +#define OMFCMD_ENDIFI 201 // end of ifi conditional. + +#endif diff --git a/music/omflex.cpp b/music/omflex.cpp index fe06a18ab..df54223c8 100644 --- a/music/omflex.cpp +++ b/music/omflex.cpp @@ -71,13 +71,16 @@ * $NoKeywords: $ */ +#include +#include + #include "music.h" #include "musiclib.h" #include "inffile.h" #include "mem.h" +#include "mono.h" +#include "pserror.h" -#include -#include // OMF INF FILE READ #define OMFFILEERR_ADDSECTION INFFILE_CUSTOM // error adding section to list. diff --git a/music/sequencer.cpp b/music/sequencer.cpp index 6f27b1526..3ac131a30 100644 --- a/music/sequencer.cpp +++ b/music/sequencer.cpp @@ -144,13 +144,7 @@ #include "music.h" #include "musiclib.h" -#include "ssl_lib.h" -#include "soundload.h" -#include "textaux.h" #include "pserror.h" -#include "ddio.h" -#include "Macros.h" -#include "inffile.h" #include "streamaudio.h" #include "mem.h" #include diff --git a/music/streamer.cpp b/music/streamer.cpp index 43acb96c1..8b9cd1442 100644 --- a/music/streamer.cpp +++ b/music/streamer.cpp @@ -62,6 +62,7 @@ #include "music.h" #include "streamaudio.h" +#include "pserror.h" oms_stream::oms_stream() {} diff --git a/netcon/inetfile/CFtp.h b/netcon/inetfile/CFtp.h index f29d6f9d6..9d95acaf1 100644 --- a/netcon/inetfile/CFtp.h +++ b/netcon/inetfile/CFtp.h @@ -58,6 +58,11 @@ #define _CFTP_HEADER_ #include +#include + +#ifdef __LINUX__ +#include "linux_fix.h" +#endif #define FTP_STATE_INTERNAL_ERROR 0 #define FTP_STATE_SOCKET_ERROR 1 diff --git a/netcon/inetfile/inetgetfile.h b/netcon/inetfile/inetgetfile.h index b466589fd..6e4a7b59f 100644 --- a/netcon/inetfile/inetgetfile.h +++ b/netcon/inetfile/inetgetfile.h @@ -97,8 +97,6 @@ #include #include -#include "linux_fix.h" - // Linux includes/defines #if !MACOSX #include diff --git a/networking/networking.h b/networking/networking.h index 1b33bf1c3..424b317f7 100644 --- a/networking/networking.h +++ b/networking/networking.h @@ -214,7 +214,6 @@ static inline void INADDR_GET_SUN_SUNB(struct in_addr *st, uint8_t *s_b1, uint8_ #include "linux_fix.h" -#define SOCKET int #define BOOL bool #define SOCKADDR_IN sockaddr_in #define SOCKADDR sockaddr diff --git a/renderer/HardwareOpenGL.cpp b/renderer/HardwareOpenGL.cpp index 633a7e2ad..c4c9e4a84 100644 --- a/renderer/HardwareOpenGL.cpp +++ b/renderer/HardwareOpenGL.cpp @@ -20,7 +20,9 @@ #if defined(WIN32) #include #elif defined(__LINUX__) -#include "lnxscreenmode.h" +#include "lnxapp.h" +#include +#include #else #endif @@ -39,7 +41,7 @@ #include #include #include "HardwareInternal.h" -#include "../Descent3/args.h" +#include "args.h" #include @@ -48,6 +50,7 @@ #if defined(WIN32) #include "win/arb_extensions.h" +#include "winapp.h" #endif #include diff --git a/renderer/dyna_gl.h b/renderer/dyna_gl.h index 429e763ea..ed1699e84 100644 --- a/renderer/dyna_gl.h +++ b/renderer/dyna_gl.h @@ -21,7 +21,8 @@ #if defined(WIN32) #include #else -#include "SDL_opengl.h" +#include +#include #endif #include "module.h" diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index bd2c92227..a0e61070c 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -1,17 +1,21 @@ set(HEADERS - auddev.h ddsndgeometry.h - ds3dlib.h - ds3dlib_internal.h - eax2.h - eax.h hlsoundlib.h - mixer.h - sdlsound.h sndrender.h soundload.h ssl_lib.h - vmanpset.h + $<$: + auddev.h + ds3dlib.h + ds3dlib_internal.h + eax2.h + eax.h + vmanpset.h + > + $<$: + mixer.h + sdlsound.h + > ) set(CPPS diff --git a/sndlib/ds3dlib.cpp b/sndlib/ds3dlib.cpp index 93e9ee5e4..3ce73fffc 100644 --- a/sndlib/ds3dlib.cpp +++ b/sndlib/ds3dlib.cpp @@ -213,14 +213,14 @@ #include "mono.h" #include "soundload.h" #include "mem.h" -#include "application.h" +#include "winapp.h" #include "auddev.h" #include "Macros.h" #include "ddio.h" // Hacked window handle -- chrishack -static oeWin32Application *SoundApp = NULL; -static void *GameWindowHandle; +static oeApplication* SoundApp = nullptr; +static void* GameWindowHandle = nullptr; #define MIN_SOUND_MIX_VOLUME 0.0 #define MAX_WRITE_AHEAD .04 // Seconds to write ahead of the play position (in seconds) @@ -385,7 +385,7 @@ inline void opti_16s_mix(int16_t *cur_sample_16bit, const int num_write, int &sa *mb = l_sample; mb++; *mb = r_sample; - *mb++; + mb++; } samples_played += (i / 2); } @@ -1395,10 +1395,12 @@ int win_llsSystem::InitSoundLib(char mixer_type, oeApplication *sos, uint8_t Max // reset error system. SetError(SSL_OK); - SoundApp = (oeWin32Application *)sos; + SoundApp = sos; + + if (sos != nullptr) { + oeWin32Application *obj = dynamic_cast(sos); + ASSERT(obj != nullptr); - if (sos) { - oeWin32Application *obj = (oeWin32Application *)sos; // If the the library if already init'ed, then return o.k. if (m_f_sound_lib_init) @@ -1406,7 +1408,7 @@ int win_llsSystem::InitSoundLib(char mixer_type, oeApplication *sos, uint8_t Max GameWindowHandle = (void *)obj->m_hWnd; } else { - ASSERT(GameWindowHandle); + ASSERT(GameWindowHandle != nullptr); } ll_sound_ptr = this; diff --git a/stream_audio/streamaudio.cpp b/stream_audio/streamaudio.cpp index 66e7734cf..c48b2f868 100644 --- a/stream_audio/streamaudio.cpp +++ b/stream_audio/streamaudio.cpp @@ -165,13 +165,15 @@ * $NoKeywords: $ */ #include "streamaudio.h" + +#include +#include + #include "pserror.h" -#include "cfile.h" #include "mem.h" #include "Macros.h" #include "ddio.h" -#include -#include + // #include "samirlog.h" #define LOGFILE(_s) // this stream is for everyone (used by the StreamPlay interface) diff --git a/stream_audio/streamaudio.h b/stream_audio/streamaudio.h index 077ba0aaa..9fc9fe4eb 100644 --- a/stream_audio/streamaudio.h +++ b/stream_audio/streamaudio.h @@ -141,7 +141,6 @@ #include "adecode.h" #include "ssl_lib.h" -#include "TaskSystem.h" void *AudioStreamCB(void *user_data, int handle, int *size); int ADecodeFileRead(void *data, void *buf, uint32_t qty); diff --git a/ui/UIEdit.cpp b/ui/UIEdit.cpp index 910818b38..71030120b 100644 --- a/ui/UIEdit.cpp +++ b/ui/UIEdit.cpp @@ -136,7 +136,8 @@ #include #include -#include "UIlib.h" +#include "ui.h" +#include "ddio_common.h" #include "grtext.h" #include "Macros.h" #include "mem.h" diff --git a/ui/UISystem.cpp b/ui/UISystem.cpp index ae518f96f..cfa6825f7 100644 --- a/ui/UISystem.cpp +++ b/ui/UISystem.cpp @@ -168,10 +168,9 @@ #include "UIlib.h" #include "application.h" #include "bitmap.h" -#include "ddvid.h" #include "renderer.h" -#include "psclass.h" #include "Macros.h" + #define UI_MOUSE_HOTX 2 #define UI_MOUSE_HOTY 2 #define UI_FRAMETIME 0.05 diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index 3c11f1e50..ca2d9164b 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -1,6 +1,6 @@ set(HEADERS - win32app.h - win32database.h + winapp.h + windatabase.h wincontroller.h ) diff --git a/win32/winapp.cpp b/win32/winapp.cpp index 5dac33ba8..53599e557 100644 --- a/win32/winapp.cpp +++ b/win32/winapp.cpp @@ -146,16 +146,19 @@ */ #define OEAPP_INTERNAL_MODULE +#include "winapp.h" + +#include +#include + +#include +#include +#include -#include "application.h" #include "appconsole.h" #include "mono.h" #include "networking.h" -#include -#include -#include -#include // taken from winuser.h #ifndef WHEEL_DELTA diff --git a/win32/win32app.h b/win32/winapp.h similarity index 99% rename from win32/win32app.h rename to win32/winapp.h index 71c189478..be12597cd 100644 --- a/win32/win32app.h +++ b/win32/winapp.h @@ -83,6 +83,8 @@ #include #include +#include "application.h" + /* Basic Application Win32 data types, to prevent include of windows.h */ typedef uintptr_t HWnd; typedef uintptr_t HInstance; diff --git a/win32/wincon.cpp b/win32/wincon.cpp index c16fb3b92..60da0bee0 100644 --- a/win32/wincon.cpp +++ b/win32/wincon.cpp @@ -64,18 +64,17 @@ * $NoKeywords: $ */ +#include "appconsole.h" + +#include #include #include - -#include "application.h" -#include "appconsole.h" -#include "TaskSystem.h" +#include #include -#include #include -#include +#include "winapp.h" #define CON_SCROLL_ROWS 25 #define CON_SCROLL_COLS 80 diff --git a/win32/wincontroller.cpp b/win32/wincontroller.cpp index dca2908ee..43830f953 100644 --- a/win32/wincontroller.cpp +++ b/win32/wincontroller.cpp @@ -309,9 +309,9 @@ * $NoKeywords: $ */ -#include "controller.h" +#include "wincontroller.h" -#include +#include #include "pserror.h" #include "ddio.h" diff --git a/win32/windata.cpp b/win32/windata.cpp index 43761e0e3..0c71bdfdb 100644 --- a/win32/windata.cpp +++ b/win32/windata.cpp @@ -68,7 +68,7 @@ * $NoKeywords: $ */ -#include "AppDatabase.h" +#include "windatabase.h" #include #include diff --git a/win32/win32database.h b/win32/windatabase.h similarity index 99% rename from win32/win32database.h rename to win32/windatabase.h index b77fd7afa..b449bff8b 100644 --- a/win32/win32database.h +++ b/win32/windatabase.h @@ -51,6 +51,8 @@ #ifndef WIN32DATABASE #define WIN32DATABASE +#include "appdatabase.h" + /* oeWin32AppDatabase to get info about the application from a managed database (or a custom info file) we get our information from the registry!