Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refactor|Client: Reduced headers included via clientapp.h
The fewer includes, the better.
  • Loading branch information
skyjake committed Oct 1, 2016
1 parent 83e104e commit 0d9e839
Show file tree
Hide file tree
Showing 55 changed files with 153 additions and 89 deletions.
25 changes: 13 additions & 12 deletions doomsday/apps/client/include/clientapp.h
Expand Up @@ -22,20 +22,21 @@

#include <de/BaseGuiApp>
#include <doomsday/doomsdayapp.h>
#include <QUrl>

#include "ConfigProfiles"
#include "network/serverlink.h"
#include "audio/system.h"
#include "ui/inputsystem.h"
#include "ui/clientwindowsystem.h"
#include "ui/infine/infinesystem.h"
#include "render/rendersystem.h"
#include "resource/clientresources.h"
#include "updater.h"
#include "busyrunner.h"
#include "world/clientserverworld.h"

class BusyRunner;
class ClientPlayer;
class ClientResources;
class ClientServerWorld;
class ClientWindowSystem;
class ConfigProfiles;
class InFineSystem;
class InputSystem;
class RenderSystem;
class ServerLink;
class Updater;

namespace audio { class System; }

/**
* The client application.
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/busyrunner.cpp
Expand Up @@ -28,6 +28,7 @@
#include "clientapp.h"
#include "gl/gl_defer.h"
#include "ui/busyvisual.h"
#include "ui/inputsystem.h"
#include "ui/widgets/busywidget.h"
#include "ui/clientwindow.h"
#include "ui/progress.h"
Expand Down
42 changes: 21 additions & 21 deletions doomsday/apps/client/src/clientapp.cpp
Expand Up @@ -18,7 +18,6 @@
*/

#include "de_platform.h"
#include "clientapp.h"

#include <cstdlib>
#include <QAction>
Expand Down Expand Up @@ -47,42 +46,43 @@

#include <doomsday/console/exec.h>

#include "audio/system.h"
#include "busyrunner.h"
#include "clientapp.h"
#include "clientplayer.h"
#include "dd_main.h"
#include "con_config.h"
#include "dd_def.h"
#include "dd_loop.h"
#include "dd_main.h"
#include "def_main.h"
#include "sys_system.h"
#include "con_config.h"

#include "audio/system.h"

#include "gl/gl_defer.h"
#include "gl/gl_main.h"
#include "gl/gl_texmanager.h"
#include "gl/gl_defer.h"
#include "gl/svg.h"

#include "world/map.h"
#include "world/contact.h"
#include "world/p_players.h"

#include "network/net_demo.h"
#include "network/net_main.h"
#include "network/serverlink.h"
#include "render/r_draw.h"
#include "render/rend_particle.h"
#include "render/rendersystem.h"
#include "sys_system.h"
#include "ui/alertmask.h"
#include "ui/inputsystem.h"
#include "ui/b_main.h"
#include "ui/sys_input.h"
#include "ui/clientwindowsystem.h"
#include "ui/clientwindow.h"
#include "ui/progress.h"
#include "ui/widgets/taskbarwidget.h"
#include "ui/clientwindowsystem.h"
#include "ui/dialogs/alertdialog.h"
#include "ui/dialogs/packagecompatibilitydialog.h"
#include "ui/inputsystem.h"
#include "ui/progress.h"
#include "ui/styledlogsinkformatter.h"
#include "ui/sys_input.h"
#include "ui/viewcompositor.h"
#include "render/rend_particle.h"
#include "render/r_draw.h"
#include "network/net_demo.h"
#include "ui/widgets/taskbarwidget.h"
#include "updater.h"
#include "updater/downloaddialog.h"
#include "world/contact.h"
#include "world/map.h"
#include "world/p_players.h"

#if WIN32
# include "dd_winit.h"
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/con_config.cpp
Expand Up @@ -18,6 +18,7 @@
*/

#include "con_config.h"
#include "ui/inputsystem.h"

#include <de/App>
#include <de/DirectoryFeed>
Expand Down
16 changes: 5 additions & 11 deletions doomsday/apps/client/src/dd_loop.cpp
Expand Up @@ -29,29 +29,23 @@
#include <doomsday/console/exec.h>
#include <doomsday/console/var.h>

#include "network/net_event.h"
#include "sys_system.h"
#include "world/p_ticker.h"

#ifdef __CLIENT__
# include "clientapp.h"
# include "client/cl_def.h"
#endif
#ifdef __SERVER__
# include "server/sv_def.h"
#endif

#ifdef __CLIENT__
# include "client/cl_def.h"
# include "clientapp.h"
# include "network/net_demo.h"
#endif
#include "network/net_event.h"

#include "world/p_ticker.h"

#ifdef __CLIENT__
# include "render/rend_font.h"
# include "render/viewports.h"

# include "ui/busyvisual.h"
# include "ui/clientwindow.h"
# include "ui/inputsystem.h"
#endif

using namespace de;
Expand Down
18 changes: 10 additions & 8 deletions doomsday/apps/client/src/dd_main.cpp
Expand Up @@ -77,12 +77,10 @@
#include <doomsday/library.h>
#include <doomsday/world/entitydef.h>

#ifdef __CLIENT__
# include "clientapp.h"
#endif
#ifdef __SERVER__
# include "serverapp.h"
#endif

#include "dd_loop.h"
#include "def_main.h"
#include "busyrunner.h"
Expand All @@ -94,29 +92,32 @@
#include "world/clientserverworld.h"
#include "world/map.h"
#include "world/p_players.h"
#ifdef __CLIENT__
# include "client/cledgeloop.h"
# include "client/clientsubsector.h"
#endif

#include "ui/infine/infinesystem.h"
#include "ui/nativeui.h"
#include "ui/progress.h"

#ifdef __CLIENT__
# include "clientapp.h"
# include "ui/clientwindowsystem.h"

# include "client/cledgeloop.h"
# include "client/clientsubsector.h"
# include "client/cl_def.h"
# include "client/cl_infine.h"

# include "gl/gl_main.h"
# include "gl/gl_defer.h"
# include "gl/gl_texmanager.h"

# include "network/net_main.h"
# include "network/net_demo.h"

# include "render/rend_main.h"
# include "render/rendersystem.h"
# include "render/cameralensfx.h"
# include "render/r_draw.h" // R_InitViewWindow
# include "render/r_main.h" // pspOffset
# include "render/rend_main.h"
# include "render/rend_font.h"
# include "render/rend_particle.h" // Rend_ParticleLoadSystemTextures
# include "render/vr.h"
Expand All @@ -126,6 +127,7 @@
# include "Sector"

# include "ui/ui_main.h"
# include "ui/inputsystem.h"
# include "ui/busyvisual.h"
# include "ui/sys_input.h"
# include "ui/widgets/taskbarwidget.h"
Expand Down
7 changes: 2 additions & 5 deletions doomsday/apps/client/src/dd_pinit.cpp
Expand Up @@ -35,9 +35,6 @@
#include <doomsday/console/knownword.h>
#include <doomsday/filesys/fs_main.h>
#include <doomsday/world/MaterialArchive>
#ifdef __CLIENT__
# include "clientapp.h"
#endif
#ifdef __SERVER__
# include "server/sv_def.h"
#endif
Expand All @@ -61,12 +58,12 @@
#include "world/p_players.h"

#ifdef __CLIENT__
# include "clientapp.h"
# include "network/net_demo.h"

# include "render/r_draw.h"
# include "render/r_main.h"
# include "render/rend_main.h"

# include "render/rendersystem.h"
# include "updater.h"
#endif

Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/gl/gl_main.cpp
Expand Up @@ -59,6 +59,7 @@
#include "render/rend_main.h"
#include "render/r_main.h"
#include "render/cameralensfx.h"
#include "render/rendersystem.h"
#include "render/rend_font.h"
#include "render/rend_model.h"
#include "render/rend_particle.h"
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/main_client.cpp
Expand Up @@ -44,6 +44,7 @@

#include "clientapp.h"
#include "dd_loop.h"
#include "dd_version.h"

#include <QDebug>
#include <QMessageBox>
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/billboard.cpp
Expand Up @@ -27,6 +27,7 @@
#include "MaterialVariantSpec"
#include "misc/r_util.h"
#include "render/rend_main.h"
#include "render/rendersystem.h"
#include "render/vissprite.h"
#include "world/p_players.h" // viewPlayer, ddPlayers

Expand Down
2 changes: 2 additions & 0 deletions doomsday/apps/client/src/render/modelrenderer.cpp
Expand Up @@ -21,8 +21,10 @@
#include "render/rend_main.h"
#include "render/vissprite.h"
#include "render/environ.h"
#include "render/rendersystem.h"
#include "gl/gl_main.h"
#include "world/p_players.h"
#include "world/p_object.h"
#include "world/bspleaf.h"
#include "world/clientmobjthinkerdata.h"
#include "world/convexsubspace.h"
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/playerweaponanimator.cpp
Expand Up @@ -24,6 +24,7 @@
#include "client/cl_def.h"
#include "def_main.h"
#include "render/r_main.h"
#include "render/rendersystem.h"

#include <de/timer.h>
#include <de/Garbage>
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/r_draw.cpp
Expand Up @@ -27,6 +27,7 @@
#include "sys_system.h"
#include "render/r_main.h"
#include "render/r_draw.h"
#include "resource/clientresources.h"
#include "gl/gl_draw.h"
#include "gl/gl_main.h"
#include "gl/sys_opengl.h"
Expand Down
8 changes: 5 additions & 3 deletions doomsday/apps/client/src/render/r_main.cpp
Expand Up @@ -19,23 +19,25 @@
*/

#include "de_platform.h"
#include "render/r_main.h"

#include <de/vector1.h>
#include <de/GLInfo>
#include <de/GLState>
#include <de/GLFramebuffer>
#include <doomsday/defs/sprite.h>
#include <doomsday/world/Materials>
#include <doomsday/res/Sprites>

#include "dd_def.h" // finesine
#include "clientapp.h"

#include "render/billboard.h"
#include "render/modelrenderer.h"
#include "render/r_main.h"
#include "render/rend_main.h"
#include "render/rend_model.h"
#include "render/rendersystem.h"
#include "render/vissprite.h"

#include "resource/clientresources.h"
#include "world/map.h"
#include "world/p_players.h"
#include "BspLeaf"
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/r_things.cpp
Expand Up @@ -40,6 +40,7 @@

#include "network/net_main.h" // clients[]

#include "render/rendersystem.h"
#include "render/r_main.h"
#include "render/angleclipper.h"
#include "render/stateanimator.h"
Expand Down
2 changes: 2 additions & 0 deletions doomsday/apps/client/src/render/rend_fakeradio.cpp
Expand Up @@ -40,7 +40,9 @@
#include "WallEdge"

#include "render/rend_main.h"
#include "render/rendersystem.h"
#include "render/r_main.h" // levelFullBright
#include "render/drawlist.h"
#include "render/shadowedge.h"
#include "render/viewports.h" // R_FrameCount()
#include "render/store.h"
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/rend_main.cpp
Expand Up @@ -66,6 +66,7 @@
#include "render/modelrenderer.h"
#include "render/r_main.h"
#include "render/r_things.h"
#include "render/rendersystem.h"
#include "render/rend_fakeradio.h"
#include "render/rend_halo.h"
#include "render/rend_particle.h"
Expand Down
2 changes: 2 additions & 0 deletions doomsday/apps/client/src/render/rend_model.cpp
Expand Up @@ -32,7 +32,9 @@
#include "world/clientmobjthinkerdata.h"
#include "render/rend_model.h"
#include "render/rend_main.h"
#include "render/rendersystem.h"
#include "render/vissprite.h"
#include "render/vectorlightdata.h"
#include "render/modelrenderer.h"
#include "gl/gl_main.h"
#include "gl/gl_texmanager.h"
Expand Down
1 change: 1 addition & 0 deletions doomsday/apps/client/src/render/skydrawable.cpp
Expand Up @@ -25,6 +25,7 @@
#include "gl/gl_main.h"
#include "gl/gl_tex.h"
#include "MaterialVariantSpec"
#include "resource/clientresources.h"
#include "resource/framemodeldef.h"
#include "render/rend_main.h"
#include "render/rend_model.h"
Expand Down

0 comments on commit 0d9e839

Please sign in to comment.