Navigation Menu

Skip to content

Commit

Permalink
Cleanup|Client|Server: Moving source files to subdirectories
Browse files Browse the repository at this point in the history
Added "misc" so generic sources don't have to be at the root level.
Added a few "base" subdirectories for future refactoring.
  • Loading branch information
skyjake committed Jul 27, 2016
1 parent f7ad2f6 commit 5e580f7
Show file tree
Hide file tree
Showing 69 changed files with 95 additions and 132 deletions.
37 changes: 20 additions & 17 deletions doomsday/apps/client/CMakeLists.txt
Expand Up @@ -27,23 +27,26 @@ file (GLOB_RECURSE HEADERS include/*)

file (GLOB SOURCES src/*.cpp src/*.c)

deng_merge_sources (audio src/audio/*.cpp)
deng_merge_sources (client src/client/*.cpp)
deng_merge_sources (network src/network/*.cpp)
deng_merge_sources (network_base src/network/base/*.cpp)
deng_merge_sources (render src/render/*.cpp)
deng_merge_sources (render_fx src/render/fx/*.cpp)
deng_merge_sources (resource src/resource/*.cpp)
deng_merge_sources (ui src/ui/*.cpp)
deng_merge_sources (ui_dialogs src/ui/dialogs/*.cpp)
deng_merge_sources (ui_editors src/ui/editors/*.cpp)
deng_merge_sources (ui_home src/ui/home/*.cpp)
deng_merge_sources (ui_infine src/ui/infine/*.cpp)
deng_merge_sources (ui_widgets src/ui/widgets/*.cpp)
deng_merge_sources (updater src/updater/*.cpp)
deng_merge_sources (world src/world/*.cpp)
deng_merge_sources (world_base src/world/base/*.cpp)
deng_merge_sources (world_bsp src/world/bsp/*.cpp)
deng_merge_sources (audio src/audio/*.cpp)
deng_merge_sources (audio_base src/audio/base/*.cpp)
deng_merge_sources (client src/client/*.cpp)
deng_merge_sources (misc src/misc/*.cpp)
deng_merge_sources (network src/network/*.cpp)
deng_merge_sources (network_base src/network/base/*.cpp)
deng_merge_sources (render src/render/*.cpp)
deng_merge_sources (render_fx src/render/fx/*.cpp)
deng_merge_sources (resource src/resource/*.cpp)
deng_merge_sources (resource_base src/resource/base/*.cpp)
deng_merge_sources (ui src/ui/*.cpp)
deng_merge_sources (ui_dialogs src/ui/dialogs/*.cpp)
deng_merge_sources (ui_editors src/ui/editors/*.cpp)
deng_merge_sources (ui_home src/ui/home/*.cpp)
deng_merge_sources (ui_infine src/ui/infine/*.cpp)
deng_merge_sources (ui_widgets src/ui/widgets/*.cpp)
deng_merge_sources (updater src/updater/*.cpp)
deng_merge_sources (world src/world/*.cpp)
deng_merge_sources (world_base src/world/base/*.cpp)
deng_merge_sources (world_bsp src/world/bsp/*.cpp)

deng_glob_sources (SOURCES src/gl/*.cpp)

Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/Face
@@ -1 +1 @@
#include "face.h"
#include "misc/face.h"
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/HEdge
@@ -1 +1 @@
#include "hedge.h"
#include "misc/hedge.h"
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/IHPlane
@@ -1 +1 @@
#include "ihplane.h"
#include "misc/ihplane.h"
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/Mesh
@@ -1 +1 @@
#include "mesh.h"
#include "misc/mesh.h"
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/gl/gl_tex.h
Expand Up @@ -25,7 +25,7 @@
#ifndef DENG_GL_IMAGE_MANIPULATION_H
#define DENG_GL_IMAGE_MANIPULATION_H

#include "color.h"
#include "misc/color.h"

#include <doomsday/resource/colorpalette.h>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -27,7 +27,7 @@
#include <de/String>
#include <doomsday/defs/ded.h>
#include <doomsday/defs/dedtypes.h>
#include "r_util.h" // LightRange
#include "misc/r_util.h" // LightRange
#include "ClientTexture"
#include "ClientMaterial"

Expand Down
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,2 @@
These sources are used by both the client and server and should be therefore
moved to libdoomsday.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/clientapp.cpp
Expand Up @@ -47,7 +47,6 @@
#include <doomsday/console/exec.h>

#include "clientplayer.h"
#include "alertmask.h"
#include "dd_main.h"
#include "dd_def.h"
#include "dd_loop.h"
Expand All @@ -66,6 +65,7 @@
#include "world/contact.h"
#include "world/p_players.h"

#include "ui/alertmask.h"
#include "ui/inputsystem.h"
#include "ui/b_main.h"
#include "ui/sys_input.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/con_config.cpp
Expand Up @@ -39,7 +39,7 @@

#include "dd_main.h"
#include "dd_def.h"
#include "m_misc.h"
#include "misc/m_misc.h"

#ifdef __CLIENT__
# include "clientapp.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/dd_main.cpp
Expand Up @@ -83,7 +83,7 @@
#include "busyrunner.h"
#include "con_config.h"
#include "sys_system.h"
#include "edit_bias.h"
#include "ui/editors/edit_bias.h"
#include "gl/svg.h"

#include "world/clientserverworld.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/gl/gl_defer.cpp
Expand Up @@ -27,7 +27,7 @@
#include <de/timer.h>
#include <doomsday/doomsdayapp.h>
#include "dd_main.h"
#include "m_misc.h"
#include "misc/m_misc.h"
#include "sys_system.h" // Sys_Sleep(), novideo

#include "gl/gl_main.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/gl/gl_main.cpp
Expand Up @@ -63,7 +63,7 @@
#include "render/rend_model.h"
#include "render/rend_particle.h"
#include "render/vr.h"
#include "r_util.h"
#include "misc/r_util.h"

#include "ui/ui_main.h"
#include "ui/clientwindowsystem.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/gl/gl_tex.cpp
Expand Up @@ -21,7 +21,7 @@
#include "gl/gl_tex.h"
#include "dd_main.h"

#include "color.h"
#include "misc/color.h"
#include "render/r_main.h"
#include "resource/clientresources.h"
#include "gl/sys_opengl.h"
Expand Down
Expand Up @@ -18,7 +18,7 @@
*/

#include "de_platform.h"
#include "color.h"
#include "misc/color.h"

float ColorRawf_AverageColor(ColorRawf* c)
{
Expand Down
Expand Up @@ -16,7 +16,7 @@
* http://www.gnu.org/licenses</small>
*/

#include "face.h"
#include "Face"
#include <de/mathutil.h>
#include <de/vector1.h> /// @todo remove me
#include <de/Log>
Expand Down
Expand Up @@ -17,7 +17,7 @@
* 02110-1301 USA</small>
*/

#include "hedge.h"
#include "HEdge"

#include <de/Log>
#include <de/String>
Expand Down
File renamed without changes.
Expand Up @@ -20,7 +20,7 @@
#define DENG_NO_API_MACROS_FILESYS

#include "de_platform.h"
#include "m_misc.h"
#include "misc/m_misc.h"

#include <sys/stat.h>
#include <sys/types.h>
Expand Down Expand Up @@ -339,7 +339,7 @@ DENG_EXTERN_C AutoStr *M_ReadFileIntoString(ddstring_t const *path, dd_bool *isC

#if defined(WIN32)
#define close _close
#define read _read
#define read _read
#define write _write
#endif

Expand Down Expand Up @@ -422,6 +422,7 @@ static size_t FileReader(const char* name, char** buffer)
return length;
}

#undef M_WriteFile
DENG_EXTERN_C dd_bool M_WriteFile(const char* name, const char* source, size_t length)
{
int handle = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);
Expand All @@ -436,36 +437,7 @@ DENG_EXTERN_C dd_bool M_WriteFile(const char* name, const char* source, size_t l
return (count >= length);
}

/*AutoStr *M_WriteCommented(const char* text)
{
char *buff = (char *) M_Malloc(strlen(text) + 1), *line;
strcpy(buff, text);
line = strtok(buff, "\n");
while(line)
{
fprintf(file, "# %s\n", line);
line = strtok(NULL, "\n");
}
M_Free(buff);
}*/

/*
* The caller must provide the opening and closing quotes.
*/
/*void M_WriteTextEsc(FILE* file, const char* text)
{
DENG_ASSERT(file && text);
size_t i;
for(i = 0; i < strlen(text) && text[i]; ++i)
{
if(text[i] == '"' || text[i] == '\\')
fprintf(file, "\\");
fprintf(file, "%c", text[i]);
}
}*/

#undef M_ScreenShot
DENG_EXTERN_C int M_ScreenShot(char const *name, int bits)
{
#ifdef __CLIENT__
Expand Down
Expand Up @@ -18,7 +18,7 @@
*/

#include "de_base.h"
#include "m_nodepile.h"
#include "misc/m_nodepile.h"

#include <de/memoryzone.h>
#include "dd_main.h"
Expand Down
Expand Up @@ -17,13 +17,12 @@
* 02110-1301 USA</small>
*/

#include <QtAlgorithms>

#include "Mesh"
#include "HEdge"
#include "Face"
#include "Vertex"

#include "mesh.h"
#include <QtAlgorithms>

namespace de {

Expand Down
Expand Up @@ -18,7 +18,7 @@
*/

#include "de_base.h"
#include "r_util.h"
#include "misc/r_util.h"

#include <cmath>
#include <de/binangle.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/network/base/masterserver.cpp
Expand Up @@ -34,7 +34,7 @@
# include "server/sv_def.h"
#endif
#include "dd_main.h"
#include "m_misc.h"
#include "misc/m_misc.h"

#include <de/App>

Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/network/base/net_main.cpp
Expand Up @@ -64,7 +64,7 @@
# include "render/viewports.h"

# include "api_fontrender.h"
# include "edit_bias.h"
# include "ui/editors/edit_bias.h"
# include "ui/ui_main.h"
# include "ui/inputdebug.h"
# include "ui/widgets/taskbarwidget.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/billboard.cpp
Expand Up @@ -25,7 +25,7 @@
#include "ClientTexture"
#include "gl/gl_main.h"
#include "MaterialVariantSpec"
#include "r_util.h"
#include "misc/r_util.h"
#include "render/rend_main.h"
#include "render/vissprite.h"
#include "world/p_players.h" // viewPlayer, ddPlayers
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/r_things.cpp
Expand Up @@ -32,7 +32,7 @@
#include "dd_main.h" // App_World()
#include "dd_loop.h" // frameTimePos
#include "def_main.h" // states
#include "r_util.h"
#include "misc/r_util.h"

#include "gl/gl_main.h"
#include "gl/gl_tex.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/rend_font.cpp
Expand Up @@ -27,7 +27,7 @@
#include <cstdlib>
#include <de/concurrency.h>
#include <de/GLState>
#include "m_misc.h"
#include "misc/m_misc.h"

#include "BitmapFont"
#include "CompositeBitmapFont"
Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/src/render/rend_main.cpp
Expand Up @@ -55,7 +55,7 @@
#include "gl/sys_opengl.h"

#include "api_fontrender.h"
#include "r_util.h"
#include "misc/r_util.h"
#include "render/fx/bloom.h"
#include "render/fx/vignette.h"
#include "render/fx/lensflares.h"
Expand All @@ -80,7 +80,7 @@
#include "ui/editors/modelasseteditor.h"
#include "ui/ui_main.h"

#include "edit_bias.h"
#include "ui/editors/edit_bias.h"

#include "sys_system.h"
#include "dd_main.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/rend_particle.cpp
Expand Up @@ -42,7 +42,7 @@
#include "render/vissprite.h"

#include "clientapp.h"
#include "r_util.h"
#include "misc/r_util.h"
#include "sys_system.h" // novideo

#include <doomsday/console/var.h>
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/rendersystem.cpp
Expand Up @@ -45,7 +45,7 @@
#include "Surface"

#include "Contact"
#include "r_util.h"
#include "misc/r_util.h"

using namespace de;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/rendpoly.cpp
Expand Up @@ -21,7 +21,7 @@
#include "de_base.h"
#include "render/rendpoly.h"

#include "color.h"
#include "misc/color.h"
#include "WallEdge"

using namespace de;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/viewports.cpp
Expand Up @@ -31,7 +31,7 @@
#include "api_console.h"
#include "dd_main.h"
#include "dd_loop.h"
#include "edit_bias.h"
#include "ui/editors/edit_bias.h"

#include "gl/gl_main.h"

Expand Down
@@ -0,0 +1,2 @@
These sources are used by both the client and server and should be therefore
moved to libdoomsday.
Expand Up @@ -34,7 +34,7 @@
#endif

#include "dd_main.h"
#include "m_misc.h"
#include "misc/m_misc.h"

#ifdef __CLIENT__
# include <doomsday/res/Composite>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/resource/framemodel.cpp
Expand Up @@ -134,7 +134,7 @@ static void *allocAndLoad(FileHandle &file, int offset, int len)
// Precalculated normal LUT for use when loading MD2/DMD format models.
#define NUMVERTEXNORMALS 162
static float avertexnormals[NUMVERTEXNORMALS][3] = {
#include "tab_anorms.h"
#include "misc/tab_anorms.h"
};

/**
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/resource/texturevariant.cpp
Expand Up @@ -20,7 +20,7 @@

#include "de_base.h"

#include "r_util.h"
#include "misc/r_util.h"

#include "gl/gl_defer.h"
#include "gl/gl_main.h"
Expand Down

0 comments on commit 5e580f7

Please sign in to comment.