From c3a381ed9253989ed38d5f91f4b9d3c8d10b9de1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 11 Apr 2020 18:11:43 +0200 Subject: [PATCH] - moved most of the console code to 'common'. The main console.cpp file cannot be done yet, but the rest is ready to go. --- src/CMakeLists.txt | 26 +++++++++++--------- src/{ => common}/console/c_bind.cpp | 0 src/{ => common}/console/c_bind.h | 0 src/{ => common}/console/c_buttons.cpp | 0 src/{ => common}/console/c_buttons.h | 0 src/{ => common}/console/c_cmds.cpp | 0 src/{ => common}/console/c_commandline.cpp | 0 src/{ => common}/console/c_commandline.h | 0 src/{ => common}/console/c_console.h | 0 src/{ => common}/console/c_consolebuffer.cpp | 0 src/{ => common}/console/c_consolebuffer.h | 0 src/{ => common}/console/c_cvars.cpp | 0 src/{ => common}/console/c_cvars.h | 0 src/{ => common}/console/c_dispatch.cpp | 0 src/{ => common}/console/c_dispatch.h | 0 src/{ => common}/console/c_enginecmds.cpp | 0 src/{ => common}/console/c_expr.cpp | 0 src/{ => common}/console/keydef.h | 0 src/rendering/r_videoscale.cpp | 2 +- 19 files changed, 16 insertions(+), 12 deletions(-) rename src/{ => common}/console/c_bind.cpp (100%) rename src/{ => common}/console/c_bind.h (100%) rename src/{ => common}/console/c_buttons.cpp (100%) rename src/{ => common}/console/c_buttons.h (100%) rename src/{ => common}/console/c_cmds.cpp (100%) rename src/{ => common}/console/c_commandline.cpp (100%) rename src/{ => common}/console/c_commandline.h (100%) rename src/{ => common}/console/c_console.h (100%) rename src/{ => common}/console/c_consolebuffer.cpp (100%) rename src/{ => common}/console/c_consolebuffer.h (100%) rename src/{ => common}/console/c_cvars.cpp (100%) rename src/{ => common}/console/c_cvars.h (100%) rename src/{ => common}/console/c_dispatch.cpp (100%) rename src/{ => common}/console/c_dispatch.h (100%) rename src/{ => common}/console/c_enginecmds.cpp (100%) rename src/{ => common}/console/c_expr.cpp (100%) rename src/{ => common}/console/keydef.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d8671306d..02df4dd3b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -610,6 +610,7 @@ file( GLOB HEADER_FILES win32/*.h r_data/*.h r_data/models/*.h + common/console/*.h common/utility/*.h common/engine/*.h common/filesystem/*.h @@ -828,16 +829,7 @@ set (PCH_SOURCES playsim/bots/b_move.cpp playsim/bots/b_think.cpp bbannouncer.cpp - console/c_commandline.cpp - console/c_buttons.cpp - console/c_bind.cpp - console/c_cmds.cpp - console/c_enginecmds.cpp console/c_console.cpp - console/c_consolebuffer.cpp - console/c_cvars.cpp - console/c_dispatch.cpp - console/c_expr.cpp console/c_functions.cpp ct_chat.cpp d_iwad.cpp @@ -1114,6 +1106,15 @@ set (PCH_SOURCES rendering/swrenderer/textures/swcanvastexture.cpp events.cpp common/thirdparty/sfmt/SFMT.cpp + common/console/c_commandline.cpp + common/console/c_buttons.cpp + common/console/c_bind.cpp + common/console/c_cmds.cpp + common/console/c_enginecmds.cpp + common/console/c_consolebuffer.cpp + common/console/c_cvars.cpp + common/console/c_dispatch.cpp + common/console/c_expr.cpp common/utility/engineerrors.cpp common/utility/i_module.cpp common/utility/m_alloc.cpp @@ -1228,6 +1229,7 @@ include_directories( . common/thirdparty common/filesystem common/utility + common/console common/engine g_statusbar console @@ -1428,8 +1430,10 @@ source_group("Scripting\\Compiler backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_ source_group("Scripting\\VM" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/scripting/vm/.+") source_group("Scripting" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/scripting/.+") source_group("Common" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/.+") -source_group("Common\\Utility" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/utility/.+") -source_group("Common\\File System" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/filesystem/.+") +source_group("Common\\Console" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/console/.+") +source_group("Common\\Utility" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/utility/.+") +source_group("Common\\Engine" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/engine/.+") +source_group("Common\\File System" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/filesystem/.+") source_group("Common\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/.+") source_group("Common\\Third Party\\Math" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/math/.+") source_group("Common\\Third Party\\RapidJSON" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/thirdparty/rapidjson/.+") diff --git a/src/console/c_bind.cpp b/src/common/console/c_bind.cpp similarity index 100% rename from src/console/c_bind.cpp rename to src/common/console/c_bind.cpp diff --git a/src/console/c_bind.h b/src/common/console/c_bind.h similarity index 100% rename from src/console/c_bind.h rename to src/common/console/c_bind.h diff --git a/src/console/c_buttons.cpp b/src/common/console/c_buttons.cpp similarity index 100% rename from src/console/c_buttons.cpp rename to src/common/console/c_buttons.cpp diff --git a/src/console/c_buttons.h b/src/common/console/c_buttons.h similarity index 100% rename from src/console/c_buttons.h rename to src/common/console/c_buttons.h diff --git a/src/console/c_cmds.cpp b/src/common/console/c_cmds.cpp similarity index 100% rename from src/console/c_cmds.cpp rename to src/common/console/c_cmds.cpp diff --git a/src/console/c_commandline.cpp b/src/common/console/c_commandline.cpp similarity index 100% rename from src/console/c_commandline.cpp rename to src/common/console/c_commandline.cpp diff --git a/src/console/c_commandline.h b/src/common/console/c_commandline.h similarity index 100% rename from src/console/c_commandline.h rename to src/common/console/c_commandline.h diff --git a/src/console/c_console.h b/src/common/console/c_console.h similarity index 100% rename from src/console/c_console.h rename to src/common/console/c_console.h diff --git a/src/console/c_consolebuffer.cpp b/src/common/console/c_consolebuffer.cpp similarity index 100% rename from src/console/c_consolebuffer.cpp rename to src/common/console/c_consolebuffer.cpp diff --git a/src/console/c_consolebuffer.h b/src/common/console/c_consolebuffer.h similarity index 100% rename from src/console/c_consolebuffer.h rename to src/common/console/c_consolebuffer.h diff --git a/src/console/c_cvars.cpp b/src/common/console/c_cvars.cpp similarity index 100% rename from src/console/c_cvars.cpp rename to src/common/console/c_cvars.cpp diff --git a/src/console/c_cvars.h b/src/common/console/c_cvars.h similarity index 100% rename from src/console/c_cvars.h rename to src/common/console/c_cvars.h diff --git a/src/console/c_dispatch.cpp b/src/common/console/c_dispatch.cpp similarity index 100% rename from src/console/c_dispatch.cpp rename to src/common/console/c_dispatch.cpp diff --git a/src/console/c_dispatch.h b/src/common/console/c_dispatch.h similarity index 100% rename from src/console/c_dispatch.h rename to src/common/console/c_dispatch.h diff --git a/src/console/c_enginecmds.cpp b/src/common/console/c_enginecmds.cpp similarity index 100% rename from src/console/c_enginecmds.cpp rename to src/common/console/c_enginecmds.cpp diff --git a/src/console/c_expr.cpp b/src/common/console/c_expr.cpp similarity index 100% rename from src/console/c_expr.cpp rename to src/common/console/c_expr.cpp diff --git a/src/console/keydef.h b/src/common/console/keydef.h similarity index 100% rename from src/console/keydef.h rename to src/common/console/keydef.h diff --git a/src/rendering/r_videoscale.cpp b/src/rendering/r_videoscale.cpp index 0fd616580..243d42902 100644 --- a/src/rendering/r_videoscale.cpp +++ b/src/rendering/r_videoscale.cpp @@ -37,7 +37,7 @@ #include "templates.h" #include "r_videoscale.h" -#include "console/c_console.h" +#include "c_console.h" #include "menu/menu.h" #define NUMSCALEMODES countof(vScaleTable)