From 0254feefe381227709f5a0ace05fb1f704d3e3fe Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 20:32:49 +0300 Subject: [PATCH 01/13] Rename bsa_file.cpp/hpp to follow naming conventions --- CI/file_name_exceptions.txt | 2 -- components/CMakeLists.txt | 2 +- components/bsa/ba2dx10file.hpp | 2 +- components/bsa/ba2gnrlfile.hpp | 2 +- components/bsa/{bsa_file.cpp => bsafile.cpp} | 4 ++-- components/bsa/{bsa_file.hpp => bsafile.hpp} | 2 +- components/bsa/compressedbsafile.hpp | 4 ++-- components/vfs/bsaarchive.hpp | 2 +- 8 files changed, 9 insertions(+), 11 deletions(-) rename components/bsa/{bsa_file.cpp => bsafile.cpp} (99%) rename components/bsa/{bsa_file.hpp => bsafile.hpp} (98%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 14d106169b..f1dcf0f38f 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -28,8 +28,6 @@ apps/openmw_tests/mwdialogue/test_keywordsearch.cpp apps/openmw_tests/mwscript/test_scripts.cpp apps/openmw_tests/mwscript/test_utils.hpp apps/openmw_tests/mwworld/test_store.cpp -components/bsa/bsa_file.cpp -components/bsa/bsa_file.hpp components/crashcatcher/windows_crashcatcher.cpp components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index b6734e6fc6..83270f3c6f 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -111,7 +111,7 @@ add_component_dir (bgsm ) add_component_dir (bsa - bsa_file compressedbsafile ba2gnrlfile ba2dx10file ba2file memorystream + bsafile compressedbsafile ba2gnrlfile ba2dx10file ba2file memorystream ) add_component_dir (bullethelpers diff --git a/components/bsa/ba2dx10file.hpp b/components/bsa/ba2dx10file.hpp index 59db10745b..5d4249365b 100644 --- a/components/bsa/ba2dx10file.hpp +++ b/components/bsa/ba2dx10file.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include "bsafile.hpp" namespace Bsa { diff --git a/components/bsa/ba2gnrlfile.hpp b/components/bsa/ba2gnrlfile.hpp index 6a212c5e81..5f1f21dec9 100644 --- a/components/bsa/ba2gnrlfile.hpp +++ b/components/bsa/ba2gnrlfile.hpp @@ -6,7 +6,7 @@ #include #include -#include +#include "bsafile.hpp" namespace Bsa { diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsafile.cpp similarity index 99% rename from components/bsa/bsa_file.cpp rename to components/bsa/bsafile.cpp index 46639a729e..03ee185e9e 100644 --- a/components/bsa/bsa_file.cpp +++ b/components/bsa/bsafile.cpp @@ -4,7 +4,7 @@ Email: < korslund@gmail.com > WWW: https://openmw.org/ - This file (bsa_file.cpp) is part of the OpenMW package. + This file (bsafile.cpp) is part of the OpenMW package. OpenMW is distributed as free software: you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -21,7 +21,7 @@ */ -#include "bsa_file.hpp" +#include "bsafile.hpp" #include #include diff --git a/components/bsa/bsa_file.hpp b/components/bsa/bsafile.hpp similarity index 98% rename from components/bsa/bsa_file.hpp rename to components/bsa/bsafile.hpp index 03a0703885..9e79df85a1 100644 --- a/components/bsa/bsa_file.hpp +++ b/components/bsa/bsafile.hpp @@ -4,7 +4,7 @@ Email: < korslund@gmail.com > WWW: https://openmw.org/ - This file (bsa_file.h) is part of the OpenMW package. + This file (bsafile.hpp) is part of the OpenMW package. OpenMW is distributed as free software: you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/components/bsa/compressedbsafile.hpp b/components/bsa/compressedbsafile.hpp index 8fa5c9a62a..1179dcc00b 100644 --- a/components/bsa/compressedbsafile.hpp +++ b/components/bsa/compressedbsafile.hpp @@ -26,11 +26,11 @@ #ifndef BSA_COMPRESSED_BSA_FILE_H #define BSA_COMPRESSED_BSA_FILE_H +#include #include #include -#include -#include +#include "bsafile.hpp" namespace Bsa { diff --git a/components/vfs/bsaarchive.hpp b/components/vfs/bsaarchive.hpp index 664466fa40..2e6fac6558 100644 --- a/components/vfs/bsaarchive.hpp +++ b/components/vfs/bsaarchive.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include From 8b911ce3eb29002f7b4c3eaf921066cccad32a26 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 21:00:40 +0300 Subject: [PATCH 02/13] Rename components/fx files to follow naming conventions --- CI/file_name_exceptions.txt | 2 -- components/CMakeLists.txt | 2 +- components/fx/lexer.cpp | 1 - components/fx/lexer.hpp | 2 +- components/fx/{lexer_types.hpp => lexertypes.hpp} | 6 +++--- components/fx/{parse_constants.hpp => parseconstants.hpp} | 4 ++-- components/fx/technique.cpp | 2 +- 7 files changed, 8 insertions(+), 11 deletions(-) rename components/fx/{lexer_types.hpp => lexertypes.hpp} (98%) rename components/fx/{parse_constants.hpp => parseconstants.hpp} (98%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index f1dcf0f38f..0923a70567 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -33,8 +33,6 @@ components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp components/crashcatcher/windows_crashmonitor.hpp components/crashcatcher/windows_crashshm.hpp -components/fx/lexer_types.hpp -components/fx/parse_constants.hpp components/platform/file.posix.cpp components/platform/file.stdio.cpp components/platform/file.win32.cpp diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 83270f3c6f..ccf3a329b3 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -173,7 +173,7 @@ add_component_dir(esm attr common defs esmcommon records util luascripts format exteriorcelllocation ) -add_component_dir(fx pass technique lexer lexer_types parse_constants widgets stateupdater) +add_component_dir(fx pass technique lexer lexertypes parseconstants widgets stateupdater) add_component_dir(std140 ubo) diff --git a/components/fx/lexer.cpp b/components/fx/lexer.cpp index 6140c7375c..2fc25e44f1 100644 --- a/components/fx/lexer.cpp +++ b/components/fx/lexer.cpp @@ -6,7 +6,6 @@ #include #include -#include #include namespace fx diff --git a/components/fx/lexer.hpp b/components/fx/lexer.hpp index fc7d4ec9d7..adc8974904 100644 --- a/components/fx/lexer.hpp +++ b/components/fx/lexer.hpp @@ -7,7 +7,7 @@ #include #include -#include "lexer_types.hpp" +#include "lexertypes.hpp" namespace fx { diff --git a/components/fx/lexer_types.hpp b/components/fx/lexertypes.hpp similarity index 98% rename from components/fx/lexer_types.hpp rename to components/fx/lexertypes.hpp index 9fe13ac827..c0df1a9da8 100644 --- a/components/fx/lexer_types.hpp +++ b/components/fx/lexertypes.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_LEXER_TYPES_H -#define OPENMW_COMPONENTS_FX_LEXER_TYPES_H +#ifndef OPENMW_COMPONENTS_FX_LEXERTYPES_H +#define OPENMW_COMPONENTS_FX_LEXERTYPES_H #include #include @@ -165,4 +165,4 @@ namespace fx } } -#endif \ No newline at end of file +#endif diff --git a/components/fx/parse_constants.hpp b/components/fx/parseconstants.hpp similarity index 98% rename from components/fx/parse_constants.hpp rename to components/fx/parseconstants.hpp index 2057476f3e..412a19980b 100644 --- a/components/fx/parse_constants.hpp +++ b/components/fx/parseconstants.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_PARSE_CONSTANTS_H -#define OPENMW_COMPONENTS_FX_PARSE_CONSTANTS_H +#ifndef OPENMW_COMPONENTS_FX_PARSECONSTANTS_H +#define OPENMW_COMPONENTS_FX_PARSECONSTANTS_H #include #include diff --git a/components/fx/technique.cpp b/components/fx/technique.cpp index 5963e274ec..b0b7f282aa 100644 --- a/components/fx/technique.cpp +++ b/components/fx/technique.cpp @@ -17,7 +17,7 @@ #include #include -#include "parse_constants.hpp" +#include "parseconstants.hpp" namespace { From 5d5595cc5ba130b9c8326b6e7ec776ce01d667f0 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 21:12:28 +0300 Subject: [PATCH 03/13] Standardize components/bsa file include guards and order --- components/bsa/ba2dx10file.cpp | 6 ++++-- components/bsa/ba2dx10file.hpp | 4 ++-- components/bsa/ba2file.hpp | 4 ++-- components/bsa/ba2gnrlfile.cpp | 6 ++++-- components/bsa/ba2gnrlfile.hpp | 4 ++-- components/bsa/bsafile.cpp | 6 +++--- components/bsa/bsafile.hpp | 4 ++-- components/bsa/compressedbsafile.cpp | 4 +++- components/bsa/compressedbsafile.hpp | 4 ++-- components/bsa/memorystream.hpp | 7 ++++--- 10 files changed, 28 insertions(+), 21 deletions(-) diff --git a/components/bsa/ba2dx10file.cpp b/components/bsa/ba2dx10file.cpp index 502ca043ab..a438121d5b 100644 --- a/components/bsa/ba2dx10file.cpp +++ b/components/bsa/ba2dx10file.cpp @@ -24,13 +24,15 @@ #endif #include -#include -#include + #include #include #include #include +#include "ba2file.hpp" +#include "memorystream.hpp" + namespace Bsa { BA2DX10File::BA2DX10File() {} diff --git a/components/bsa/ba2dx10file.hpp b/components/bsa/ba2dx10file.hpp index 5d4249365b..cd1f822179 100644 --- a/components/bsa/ba2dx10file.hpp +++ b/components/bsa/ba2dx10file.hpp @@ -1,5 +1,5 @@ -#ifndef BSA_BA2_DX10_FILE_H -#define BSA_BA2_DX10_FILE_H +#ifndef OPENMW_COMPONENTS_BSA_BA2DX10FILE_HPP +#define OPENMW_COMPONENTS_BSA_BA2DX10FILE_HPP #include #include diff --git a/components/bsa/ba2file.hpp b/components/bsa/ba2file.hpp index 9a68d3afd0..0d51be4c0e 100644 --- a/components/bsa/ba2file.hpp +++ b/components/bsa/ba2file.hpp @@ -1,5 +1,5 @@ -#ifndef BSA_BA2_FILE_H -#define BSA_BA2_FILE_H +#ifndef OPENMW_COMPONENTS_BSA_BA2FILE_HPP +#define OPENMW_COMPONENTS_BSA_BA2FILE_HPP #include #include diff --git a/components/bsa/ba2gnrlfile.cpp b/components/bsa/ba2gnrlfile.cpp index 63dd3d1d50..75e7305245 100644 --- a/components/bsa/ba2gnrlfile.cpp +++ b/components/bsa/ba2gnrlfile.cpp @@ -22,13 +22,15 @@ #endif #include -#include -#include + #include #include #include #include +#include "ba2file.hpp" +#include "memorystream.hpp" + namespace Bsa { // special marker for invalid records, diff --git a/components/bsa/ba2gnrlfile.hpp b/components/bsa/ba2gnrlfile.hpp index 5f1f21dec9..0bc94eae0e 100644 --- a/components/bsa/ba2gnrlfile.hpp +++ b/components/bsa/ba2gnrlfile.hpp @@ -1,5 +1,5 @@ -#ifndef BSA_BA2_GNRL_FILE_H -#define BSA_BA2_GNRL_FILE_H +#ifndef OPENMW_COMPONENTS_BSA_BA2GNRLFILE_HPP +#define OPENMW_COMPONENTS_BSA_BA2GNRLFILE_HPP #include #include diff --git a/components/bsa/bsafile.cpp b/components/bsa/bsafile.cpp index 03ee185e9e..948b9dac8d 100644 --- a/components/bsa/bsafile.cpp +++ b/components/bsa/bsafile.cpp @@ -23,15 +23,15 @@ #include "bsafile.hpp" -#include -#include - #include #include #include #include #include +#include +#include + using namespace Bsa; /// Error handling diff --git a/components/bsa/bsafile.hpp b/components/bsa/bsafile.hpp index 9e79df85a1..ad7acdad17 100644 --- a/components/bsa/bsafile.hpp +++ b/components/bsa/bsafile.hpp @@ -21,8 +21,8 @@ */ -#ifndef BSA_BSA_FILE_H -#define BSA_BSA_FILE_H +#ifndef OPENMW_COMPONENTS_BSA_BSAFILE_HPP +#define OPENMW_COMPONENTS_BSA_BSAFILE_HPP #include #include diff --git a/components/bsa/compressedbsafile.cpp b/components/bsa/compressedbsafile.cpp index 14d90f5d91..8426c5965c 100644 --- a/components/bsa/compressedbsafile.cpp +++ b/components/bsa/compressedbsafile.cpp @@ -45,11 +45,13 @@ #endif #include -#include + #include #include #include +#include "memorystream.hpp" + namespace Bsa { /// Read header information from the input source diff --git a/components/bsa/compressedbsafile.hpp b/components/bsa/compressedbsafile.hpp index 1179dcc00b..83620f11bc 100644 --- a/components/bsa/compressedbsafile.hpp +++ b/components/bsa/compressedbsafile.hpp @@ -23,8 +23,8 @@ */ -#ifndef BSA_COMPRESSED_BSA_FILE_H -#define BSA_COMPRESSED_BSA_FILE_H +#ifndef OPENMW_COMPONENTS_BSA_COMPRESSEDBSAFILE_HPP +#define OPENMW_COMPONENTS_BSA_COMPRESSEDBSAFILE_HPP #include #include diff --git a/components/bsa/memorystream.hpp b/components/bsa/memorystream.hpp index 5662dde8ff..945d0b33d9 100644 --- a/components/bsa/memorystream.hpp +++ b/components/bsa/memorystream.hpp @@ -23,13 +23,14 @@ */ -#ifndef BSA_MEMORY_STREAM_H -#define BSA_MEMORY_STREAM_H +#ifndef OPENMW_COMPONENTS_BSA_MEMORYSTREAM_HPP +#define OPENMW_COMPONENTS_BSA_MEMORYSTREAM_HPP -#include #include #include +#include + namespace Bsa { /** From 3793ff8be882da974e654789c4f6808faafab62d Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 21:14:58 +0300 Subject: [PATCH 04/13] Standardize components/fx file include guards --- components/fx/lexer.hpp | 4 ++-- components/fx/lexertypes.hpp | 4 ++-- components/fx/parseconstants.hpp | 4 ++-- components/fx/pass.hpp | 4 ++-- components/fx/technique.hpp | 4 ++-- components/fx/types.hpp | 4 ++-- components/fx/widgets.hpp | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/fx/lexer.hpp b/components/fx/lexer.hpp index adc8974904..dda6b3a0f6 100644 --- a/components/fx/lexer.hpp +++ b/components/fx/lexer.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_LEXER_H -#define OPENMW_COMPONENTS_FX_LEXER_H +#ifndef OPENMW_COMPONENTS_FX_LEXER_HPP +#define OPENMW_COMPONENTS_FX_LEXER_HPP #include #include diff --git a/components/fx/lexertypes.hpp b/components/fx/lexertypes.hpp index c0df1a9da8..2a56a84a1a 100644 --- a/components/fx/lexertypes.hpp +++ b/components/fx/lexertypes.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_LEXERTYPES_H -#define OPENMW_COMPONENTS_FX_LEXERTYPES_H +#ifndef OPENMW_COMPONENTS_FX_LEXERTYPES_HPP +#define OPENMW_COMPONENTS_FX_LEXERTYPES_HPP #include #include diff --git a/components/fx/parseconstants.hpp b/components/fx/parseconstants.hpp index 412a19980b..3ad9abd959 100644 --- a/components/fx/parseconstants.hpp +++ b/components/fx/parseconstants.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_PARSECONSTANTS_H -#define OPENMW_COMPONENTS_FX_PARSECONSTANTS_H +#ifndef OPENMW_COMPONENTS_FX_PARSECONSTANTS_HPP +#define OPENMW_COMPONENTS_FX_PARSECONSTANTS_HPP #include #include diff --git a/components/fx/pass.hpp b/components/fx/pass.hpp index e176afc699..1c417ac8cf 100644 --- a/components/fx/pass.hpp +++ b/components/fx/pass.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_PASS_H -#define OPENMW_COMPONENTS_FX_PASS_H +#ifndef OPENMW_COMPONENTS_FX_PASS_HPP +#define OPENMW_COMPONENTS_FX_PASS_HPP #include #include diff --git a/components/fx/technique.hpp b/components/fx/technique.hpp index 2778763a9a..ad5e876faa 100644 --- a/components/fx/technique.hpp +++ b/components/fx/technique.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_TECHNIQUE_H -#define OPENMW_COMPONENTS_FX_TECHNIQUE_H +#ifndef OPENMW_COMPONENTS_FX_TECHNIQUE_HPP +#define OPENMW_COMPONENTS_FX_TECHNIQUE_HPP #include #include diff --git a/components/fx/types.hpp b/components/fx/types.hpp index 596b54c217..1536cda115 100644 --- a/components/fx/types.hpp +++ b/components/fx/types.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_TYPES_H -#define OPENMW_COMPONENTS_FX_TYPES_H +#ifndef OPENMW_COMPONENTS_FX_TYPES_HPP +#define OPENMW_COMPONENTS_FX_TYPES_HPP #include #include diff --git a/components/fx/widgets.hpp b/components/fx/widgets.hpp index 6217af7fee..59787ed9aa 100644 --- a/components/fx/widgets.hpp +++ b/components/fx/widgets.hpp @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_FX_WIDGETS_H -#define OPENMW_COMPONENTS_FX_WIDGETS_H +#ifndef OPENMW_COMPONENTS_FX_WIDGETS_HPP +#define OPENMW_COMPONENTS_FX_WIDGETS_HPP #include #include From 7df74664e43cca949e1c57230e34f1bbc2747030 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 21:44:58 +0300 Subject: [PATCH 05/13] Rename gl4es-init.cpp/h to follow naming conventions --- CI/file_name_exceptions.txt | 2 -- components/CMakeLists.txt | 2 +- components/sdlutil/{gl4es_init.cpp => gl4esinit.cpp} | 2 +- components/sdlutil/{gl4es_init.h => gl4esinit.h} | 6 +++--- components/sdlutil/sdlgraphicswindow.cpp | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) rename components/sdlutil/{gl4es_init.cpp => gl4esinit.cpp} (97%) rename components/sdlutil/{gl4es_init.h => gl4esinit.h} (67%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 0923a70567..6ae56912dd 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -36,8 +36,6 @@ components/crashcatcher/windows_crashshm.hpp components/platform/file.posix.cpp components/platform/file.stdio.cpp components/platform/file.win32.cpp -components/sdlutil/gl4es_init.cpp -components/sdlutil/gl4es_init.h components/to_utf8/gen_iconv.cpp components/to_utf8/tables_gen.hpp components/to_utf8/to_utf8.cpp diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index ccf3a329b3..da91cec7ef 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -362,7 +362,7 @@ add_component_dir (fontloader add_component_dir (sdlutil events - gl4es_init + gl4esinit imagetosurface sdlcursormanager sdlgraphicswindow diff --git a/components/sdlutil/gl4es_init.cpp b/components/sdlutil/gl4esinit.cpp similarity index 97% rename from components/sdlutil/gl4es_init.cpp rename to components/sdlutil/gl4esinit.cpp index 044b54ce02..13015dee82 100644 --- a/components/sdlutil/gl4es_init.cpp +++ b/components/sdlutil/gl4esinit.cpp @@ -1,7 +1,7 @@ // EGL does not work reliably for feature detection. // Instead, we initialize gl4es manually. #ifdef OPENMW_GL4ES_MANUAL_INIT -#include "gl4es_init.h" +#include "gl4esinit.h" // For glHint #include diff --git a/components/sdlutil/gl4es_init.h b/components/sdlutil/gl4esinit.h similarity index 67% rename from components/sdlutil/gl4es_init.h rename to components/sdlutil/gl4esinit.h index 6a19d3dfe5..8916d50a7e 100644 --- a/components/sdlutil/gl4es_init.h +++ b/components/sdlutil/gl4esinit.h @@ -1,5 +1,5 @@ -#ifndef OPENMW_COMPONENTS_SDLUTIL_GL4ES_INIT_H -#define OPENMW_COMPONENTS_SDLUTIL_GL4ES_INIT_H +#ifndef OPENMW_COMPONENTS_SDLUTIL_GL4ESINIT_H +#define OPENMW_COMPONENTS_SDLUTIL_GL4ESINIT_H #ifdef OPENMW_GL4ES_MANUAL_INIT #include @@ -10,4 +10,4 @@ extern "C" void openmw_gl4es_init(SDL_Window* window); #endif // OPENMW_GL4ES_MANUAL_INIT -#endif // OPENMW_COMPONENTS_SDLUTIL_GL4ES_INIT_H +#endif // OPENMW_COMPONENTS_SDLUTIL_GL4ESINIT_H diff --git a/components/sdlutil/sdlgraphicswindow.cpp b/components/sdlutil/sdlgraphicswindow.cpp index 36947460df..9ff0545930 100644 --- a/components/sdlutil/sdlgraphicswindow.cpp +++ b/components/sdlutil/sdlgraphicswindow.cpp @@ -3,7 +3,7 @@ #include #ifdef OPENMW_GL4ES_MANUAL_INIT -#include "gl4es_init.h" +#include "gl4esinit.h" #endif namespace SDLUtil From b997386cd3865c181ba14e41da15565f7af97cd5 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 21:53:24 +0300 Subject: [PATCH 06/13] Rename android-main.cpp to follow naming conventions --- CI/file_name_exceptions.txt | 1 - apps/openmw/CMakeLists.txt | 4 ++-- apps/openmw/{android_main.cpp => androidmain.cpp} | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename apps/openmw/{android_main.cpp => androidmain.cpp} (100%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 6ae56912dd..f4c12f19a3 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -1,4 +1,3 @@ -apps/openmw/android_main.cpp apps/openmw/mwsound/efx-presets.h apps/openmw/mwsound/ffmpeg_decoder.cpp apps/openmw/mwsound/ffmpeg_decoder.hpp diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 37de0abeab..37e9b39a01 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -15,7 +15,7 @@ set(OPENMW_HEADERS profile.hpp ) -source_group(apps/openmw FILES main.cpp android_main.cpp ${OPENMW_SOURCES} ${OPENMW_HEADERS} ${OPENMW_RESOURCES}) +source_group(apps/openmw FILES main.cpp androidmain.cpp ${OPENMW_SOURCES} ${OPENMW_HEADERS} ${OPENMW_RESOURCES}) add_openmw_dir (mwrender actors objects renderingmanager animation rotatecontroller sky skyutil npcanimation esm4npcanimation vismask @@ -127,7 +127,7 @@ if(BUILD_OPENMW) if (ANDROID) add_library(openmw SHARED main.cpp - android_main.cpp + androidmain.cpp ) else() openmw_add_executable(openmw diff --git a/apps/openmw/android_main.cpp b/apps/openmw/androidmain.cpp similarity index 100% rename from apps/openmw/android_main.cpp rename to apps/openmw/androidmain.cpp From dd16c870808997867d757538d91ca47c654c6bd2 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 21:59:55 +0300 Subject: [PATCH 07/13] Rename components/platform files to follow naming conventions --- CI/file_name_exceptions.txt | 3 --- components/CMakeLists.txt | 6 +++--- components/platform/{file.posix.cpp => fileposix.cpp} | 0 components/platform/{file.stdio.cpp => filestdio.cpp} | 0 components/platform/{file.win32.cpp => filewin32.cpp} | 0 5 files changed, 3 insertions(+), 6 deletions(-) rename components/platform/{file.posix.cpp => fileposix.cpp} (100%) rename components/platform/{file.stdio.cpp => filestdio.cpp} (100%) rename components/platform/{file.win32.cpp => filewin32.cpp} (100%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index f4c12f19a3..185b4ba995 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -32,9 +32,6 @@ components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp components/crashcatcher/windows_crashmonitor.hpp components/crashcatcher/windows_crashshm.hpp -components/platform/file.posix.cpp -components/platform/file.stdio.cpp -components/platform/file.win32.cpp components/to_utf8/gen_iconv.cpp components/to_utf8/tables_gen.hpp components/to_utf8/to_utf8.cpp diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index da91cec7ef..d57b0ed823 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -500,15 +500,15 @@ add_component_dir(platform if (WIN32) add_component_dir(platform - file.win32 + filewin32 ) elseif (UNIX) add_component_dir(platform - file.posix + fileposix ) else () add_component_dir(platform - file.stdio + filestdio ) endif() diff --git a/components/platform/file.posix.cpp b/components/platform/fileposix.cpp similarity index 100% rename from components/platform/file.posix.cpp rename to components/platform/fileposix.cpp diff --git a/components/platform/file.stdio.cpp b/components/platform/filestdio.cpp similarity index 100% rename from components/platform/file.stdio.cpp rename to components/platform/filestdio.cpp diff --git a/components/platform/file.win32.cpp b/components/platform/filewin32.cpp similarity index 100% rename from components/platform/file.win32.cpp rename to components/platform/filewin32.cpp From a3e19f9bb7a8192704fe5297c2f98d99f068746b Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 22:04:27 +0300 Subject: [PATCH 08/13] Rename apps/openmw_tests files to follow naming conventions --- CI/file_name_exceptions.txt | 4 ---- apps/openmw_tests/CMakeLists.txt | 6 +++--- .../{test_keywordsearch.cpp => testkeywordsearch.cpp} | 0 .../mwscript/{test_scripts.cpp => testscripts.cpp} | 4 ++-- .../openmw_tests/mwscript/{test_utils.hpp => testutils.hpp} | 0 apps/openmw_tests/mwworld/{test_store.cpp => teststore.cpp} | 0 6 files changed, 5 insertions(+), 9 deletions(-) rename apps/openmw_tests/mwdialogue/{test_keywordsearch.cpp => testkeywordsearch.cpp} (100%) rename apps/openmw_tests/mwscript/{test_scripts.cpp => testscripts.cpp} (99%) rename apps/openmw_tests/mwscript/{test_utils.hpp => testutils.hpp} (100%) rename apps/openmw_tests/mwworld/{test_store.cpp => teststore.cpp} (100%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 185b4ba995..424dc3f691 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -23,10 +23,6 @@ apps/components_tests/lua/test_yaml.cpp apps/components_tests/misc/test_endianness.cpp apps/components_tests/misc/test_resourcehelpers.cpp apps/components_tests/misc/test_stringops.cpp -apps/openmw_tests/mwdialogue/test_keywordsearch.cpp -apps/openmw_tests/mwscript/test_scripts.cpp -apps/openmw_tests/mwscript/test_utils.hpp -apps/openmw_tests/mwworld/test_store.cpp components/crashcatcher/windows_crashcatcher.cpp components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp diff --git a/apps/openmw_tests/CMakeLists.txt b/apps/openmw_tests/CMakeLists.txt index 9b57113110..4e57d610a3 100644 --- a/apps/openmw_tests/CMakeLists.txt +++ b/apps/openmw_tests/CMakeLists.txt @@ -6,14 +6,14 @@ file(GLOB UNITTEST_SRC_FILES options.cpp - mwworld/test_store.cpp + mwworld/teststore.cpp mwworld/testduration.cpp mwworld/testtimestamp.cpp mwworld/testptr.cpp - mwdialogue/test_keywordsearch.cpp + mwdialogue/testkeywordsearch.cpp - mwscript/test_scripts.cpp + mwscript/testscripts.cpp ) source_group(apps\\openmw-tests FILES ${UNITTEST_SRC_FILES}) diff --git a/apps/openmw_tests/mwdialogue/test_keywordsearch.cpp b/apps/openmw_tests/mwdialogue/testkeywordsearch.cpp similarity index 100% rename from apps/openmw_tests/mwdialogue/test_keywordsearch.cpp rename to apps/openmw_tests/mwdialogue/testkeywordsearch.cpp diff --git a/apps/openmw_tests/mwscript/test_scripts.cpp b/apps/openmw_tests/mwscript/testscripts.cpp similarity index 99% rename from apps/openmw_tests/mwscript/test_scripts.cpp rename to apps/openmw_tests/mwscript/testscripts.cpp index 0de542bdc6..b9e422daed 100644 --- a/apps/openmw_tests/mwscript/test_scripts.cpp +++ b/apps/openmw_tests/mwscript/testscripts.cpp @@ -1,7 +1,7 @@ #include #include -#include "test_utils.hpp" +#include "testutils.hpp" namespace { @@ -935,4 +935,4 @@ End)mwscript"; registerExtensions(); EXPECT_FALSE(!compile(sIssue6807)); } -} \ No newline at end of file +} diff --git a/apps/openmw_tests/mwscript/test_utils.hpp b/apps/openmw_tests/mwscript/testutils.hpp similarity index 100% rename from apps/openmw_tests/mwscript/test_utils.hpp rename to apps/openmw_tests/mwscript/testutils.hpp diff --git a/apps/openmw_tests/mwworld/test_store.cpp b/apps/openmw_tests/mwworld/teststore.cpp similarity index 100% rename from apps/openmw_tests/mwworld/test_store.cpp rename to apps/openmw_tests/mwworld/teststore.cpp From 89426af94a6467225bf15197dd3901e631fd228a Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 22:16:47 +0300 Subject: [PATCH 09/13] Rename apps/components_tests files to follow naming conventions --- CI/file_name_exceptions.txt | 16 --------- apps/components_tests/CMakeLists.txt | 35 +++++++++---------- ...t_fixed_string.cpp => testfixedstring.cpp} | 0 ...nversion_tests.cpp => conversiontests.cpp} | 0 .../lua/{test_async.cpp => testasync.cpp} | 0 ...onfiguration.cpp => testconfiguration.cpp} | 0 ..._inputactions.cpp => testinputactions.cpp} | 0 .../lua/{test_l10n.cpp => testl10n.cpp} | 0 .../lua/{test_lua.cpp => testlua.cpp} | 0 ...container.cpp => testscriptscontainer.cpp} | 0 ...erialization.cpp => testserialization.cpp} | 0 .../lua/{test_storage.cpp => teststorage.cpp} | 0 ...{test_ui_content.cpp => testuicontent.cpp} | 0 ...st_utilpackage.cpp => testutilpackage.cpp} | 0 .../lua/{test_yaml.cpp => testyaml.cpp} | 0 ...test_endianness.cpp => testendianness.cpp} | 0 ...rcehelpers.cpp => testresourcehelpers.cpp} | 0 .../{test_stringops.cpp => teststringops.cpp} | 0 18 files changed, 17 insertions(+), 34 deletions(-) rename apps/components_tests/esm/{test_fixed_string.cpp => testfixedstring.cpp} (100%) rename apps/components_tests/files/{conversion_tests.cpp => conversiontests.cpp} (100%) rename apps/components_tests/lua/{test_async.cpp => testasync.cpp} (100%) rename apps/components_tests/lua/{test_configuration.cpp => testconfiguration.cpp} (100%) rename apps/components_tests/lua/{test_inputactions.cpp => testinputactions.cpp} (100%) rename apps/components_tests/lua/{test_l10n.cpp => testl10n.cpp} (100%) rename apps/components_tests/lua/{test_lua.cpp => testlua.cpp} (100%) rename apps/components_tests/lua/{test_scriptscontainer.cpp => testscriptscontainer.cpp} (100%) rename apps/components_tests/lua/{test_serialization.cpp => testserialization.cpp} (100%) rename apps/components_tests/lua/{test_storage.cpp => teststorage.cpp} (100%) rename apps/components_tests/lua/{test_ui_content.cpp => testuicontent.cpp} (100%) rename apps/components_tests/lua/{test_utilpackage.cpp => testutilpackage.cpp} (100%) rename apps/components_tests/lua/{test_yaml.cpp => testyaml.cpp} (100%) rename apps/components_tests/misc/{test_endianness.cpp => testendianness.cpp} (100%) rename apps/components_tests/misc/{test_resourcehelpers.cpp => testresourcehelpers.cpp} (100%) rename apps/components_tests/misc/{test_stringops.cpp => teststringops.cpp} (100%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 424dc3f691..92fca5c11f 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -7,22 +7,6 @@ apps/openmw/mwsound/sound_buffer.cpp apps/openmw/mwsound/sound_buffer.hpp apps/openmw/mwsound/sound_decoder.hpp apps/openmw/mwsound/sound_output.hpp -apps/components_tests/esm/test_fixed_string.cpp -apps/components_tests/files/conversion_tests.cpp -apps/components_tests/lua/test_async.cpp -apps/components_tests/lua/test_configuration.cpp -apps/components_tests/lua/test_l10n.cpp -apps/components_tests/lua/test_lua.cpp -apps/components_tests/lua/test_scriptscontainer.cpp -apps/components_tests/lua/test_serialization.cpp -apps/components_tests/lua/test_storage.cpp -apps/components_tests/lua/test_ui_content.cpp -apps/components_tests/lua/test_utilpackage.cpp -apps/components_tests/lua/test_inputactions.cpp -apps/components_tests/lua/test_yaml.cpp -apps/components_tests/misc/test_endianness.cpp -apps/components_tests/misc/test_resourcehelpers.cpp -apps/components_tests/misc/test_stringops.cpp components/crashcatcher/windows_crashcatcher.cpp components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp diff --git a/apps/components_tests/CMakeLists.txt b/apps/components_tests/CMakeLists.txt index 22bb542538..7595681313 100644 --- a/apps/components_tests/CMakeLists.txt +++ b/apps/components_tests/CMakeLists.txt @@ -4,29 +4,28 @@ include_directories(SYSTEM ${GMOCK_INCLUDE_DIRS}) file(GLOB UNITTEST_SRC_FILES main.cpp - esm/test_fixed_string.cpp - esm/variant.cpp + esm/testfixedstring.cpp esm/testrefid.cpp + esm/variant.cpp - lua/test_lua.cpp - lua/test_scriptscontainer.cpp - lua/test_utilpackage.cpp - lua/test_serialization.cpp - lua/test_configuration.cpp - lua/test_l10n.cpp - lua/test_storage.cpp - lua/test_async.cpp - lua/test_inputactions.cpp - lua/test_yaml.cpp - - lua/test_ui_content.cpp + lua/testasync.cpp + lua/testconfiguration.cpp + lua/testinputactions.cpp + lua/testl10n.cpp + lua/testlua.cpp + lua/testscriptscontainer.cpp + lua/testserialization.cpp + lua/teststorage.cpp + lua/testuicontent.cpp + lua/testutilpackage.cpp + lua/testyaml.cpp misc/compression.cpp misc/progressreporter.cpp - misc/test_endianness.cpp - misc/test_resourcehelpers.cpp - misc/test_stringops.cpp + misc/testendianness.cpp misc/testmathutil.cpp + misc/testresourcehelpers.cpp + misc/teststringops.cpp nifloader/testbulletnifloader.cpp @@ -64,8 +63,8 @@ file(GLOB UNITTEST_SRC_FILES esmloader/esmdata.cpp esmloader/record.cpp + files/conversiontests.cpp files/hash.cpp - files/conversion_tests.cpp toutf8/toutf8.cpp diff --git a/apps/components_tests/esm/test_fixed_string.cpp b/apps/components_tests/esm/testfixedstring.cpp similarity index 100% rename from apps/components_tests/esm/test_fixed_string.cpp rename to apps/components_tests/esm/testfixedstring.cpp diff --git a/apps/components_tests/files/conversion_tests.cpp b/apps/components_tests/files/conversiontests.cpp similarity index 100% rename from apps/components_tests/files/conversion_tests.cpp rename to apps/components_tests/files/conversiontests.cpp diff --git a/apps/components_tests/lua/test_async.cpp b/apps/components_tests/lua/testasync.cpp similarity index 100% rename from apps/components_tests/lua/test_async.cpp rename to apps/components_tests/lua/testasync.cpp diff --git a/apps/components_tests/lua/test_configuration.cpp b/apps/components_tests/lua/testconfiguration.cpp similarity index 100% rename from apps/components_tests/lua/test_configuration.cpp rename to apps/components_tests/lua/testconfiguration.cpp diff --git a/apps/components_tests/lua/test_inputactions.cpp b/apps/components_tests/lua/testinputactions.cpp similarity index 100% rename from apps/components_tests/lua/test_inputactions.cpp rename to apps/components_tests/lua/testinputactions.cpp diff --git a/apps/components_tests/lua/test_l10n.cpp b/apps/components_tests/lua/testl10n.cpp similarity index 100% rename from apps/components_tests/lua/test_l10n.cpp rename to apps/components_tests/lua/testl10n.cpp diff --git a/apps/components_tests/lua/test_lua.cpp b/apps/components_tests/lua/testlua.cpp similarity index 100% rename from apps/components_tests/lua/test_lua.cpp rename to apps/components_tests/lua/testlua.cpp diff --git a/apps/components_tests/lua/test_scriptscontainer.cpp b/apps/components_tests/lua/testscriptscontainer.cpp similarity index 100% rename from apps/components_tests/lua/test_scriptscontainer.cpp rename to apps/components_tests/lua/testscriptscontainer.cpp diff --git a/apps/components_tests/lua/test_serialization.cpp b/apps/components_tests/lua/testserialization.cpp similarity index 100% rename from apps/components_tests/lua/test_serialization.cpp rename to apps/components_tests/lua/testserialization.cpp diff --git a/apps/components_tests/lua/test_storage.cpp b/apps/components_tests/lua/teststorage.cpp similarity index 100% rename from apps/components_tests/lua/test_storage.cpp rename to apps/components_tests/lua/teststorage.cpp diff --git a/apps/components_tests/lua/test_ui_content.cpp b/apps/components_tests/lua/testuicontent.cpp similarity index 100% rename from apps/components_tests/lua/test_ui_content.cpp rename to apps/components_tests/lua/testuicontent.cpp diff --git a/apps/components_tests/lua/test_utilpackage.cpp b/apps/components_tests/lua/testutilpackage.cpp similarity index 100% rename from apps/components_tests/lua/test_utilpackage.cpp rename to apps/components_tests/lua/testutilpackage.cpp diff --git a/apps/components_tests/lua/test_yaml.cpp b/apps/components_tests/lua/testyaml.cpp similarity index 100% rename from apps/components_tests/lua/test_yaml.cpp rename to apps/components_tests/lua/testyaml.cpp diff --git a/apps/components_tests/misc/test_endianness.cpp b/apps/components_tests/misc/testendianness.cpp similarity index 100% rename from apps/components_tests/misc/test_endianness.cpp rename to apps/components_tests/misc/testendianness.cpp diff --git a/apps/components_tests/misc/test_resourcehelpers.cpp b/apps/components_tests/misc/testresourcehelpers.cpp similarity index 100% rename from apps/components_tests/misc/test_resourcehelpers.cpp rename to apps/components_tests/misc/testresourcehelpers.cpp diff --git a/apps/components_tests/misc/test_stringops.cpp b/apps/components_tests/misc/teststringops.cpp similarity index 100% rename from apps/components_tests/misc/test_stringops.cpp rename to apps/components_tests/misc/teststringops.cpp From ac9505b53672f4097b471a955353be351821c49a Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 22:35:33 +0300 Subject: [PATCH 10/13] Rename components/to_utf8 directory and files to follow naming conventions --- CI/file_name_exceptions.txt | 4 ---- apps/bulletobjecttool/main.cpp | 2 +- apps/components_tests/esmloader/load.cpp | 2 +- apps/components_tests/toutf8/toutf8.cpp | 2 +- apps/esmtool/tes4.cpp | 2 +- apps/essimporter/importer.cpp | 2 +- apps/mwiniimporter/importer.hpp | 2 +- apps/navmeshtool/main.cpp | 2 +- apps/opencs/editor.cpp | 2 +- apps/opencs/model/doc/document.hpp | 2 +- apps/opencs/model/doc/documentmanager.hpp | 2 +- apps/opencs/model/doc/saving.hpp | 2 +- apps/opencs/model/doc/savingstate.hpp | 2 +- apps/opencs/model/tools/mergeoperation.hpp | 2 +- apps/opencs/model/tools/mergestages.hpp | 2 +- apps/opencs/model/tools/tools.hpp | 2 +- apps/opencs/model/world/data.hpp | 2 +- apps/openmw/mwgui/journalbooks.hpp | 2 +- apps/openmw/mwgui/journalwindow.hpp | 2 +- apps/openmw/mwgui/windowmanagerimp.hpp | 2 +- apps/wizard/inisettings.hpp | 2 +- components/CMakeLists.txt | 6 +++--- components/esm3/esmreader.hpp | 2 +- components/esm3/esmwriter.cpp | 2 +- components/esm4/reader.cpp | 2 +- components/fontloader/fontloader.hpp | 2 +- components/nif/nifstream.cpp | 4 ++-- components/to_utf8/.gitignore | 1 - components/to_utf8/Makefile | 8 -------- components/toutf8/.gitignore | 1 + components/toutf8/Makefile | 8 ++++++++ components/{to_utf8/gen_iconv.cpp => toutf8/geniconv.cpp} | 4 ++-- .../{to_utf8/tables_gen.hpp => toutf8/tablesgen.hpp} | 4 ++-- components/{to_utf8/to_utf8.cpp => toutf8/toutf8.cpp} | 4 ++-- components/{to_utf8/to_utf8.hpp => toutf8/toutf8.hpp} | 4 ++-- components/translation/translation.hpp | 2 +- 36 files changed, 47 insertions(+), 51 deletions(-) delete mode 100644 components/to_utf8/.gitignore delete mode 100644 components/to_utf8/Makefile create mode 100644 components/toutf8/.gitignore create mode 100644 components/toutf8/Makefile rename components/{to_utf8/gen_iconv.cpp => toutf8/geniconv.cpp} (95%) rename components/{to_utf8/tables_gen.hpp => toutf8/tablesgen.hpp} (99%) rename components/{to_utf8/to_utf8.cpp => toutf8/toutf8.cpp} (99%) rename components/{to_utf8/to_utf8.hpp => toutf8/toutf8.hpp} (97%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 92fca5c11f..95ecafa856 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -12,7 +12,3 @@ components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp components/crashcatcher/windows_crashmonitor.hpp components/crashcatcher/windows_crashshm.hpp -components/to_utf8/gen_iconv.cpp -components/to_utf8/tables_gen.hpp -components/to_utf8/to_utf8.cpp -components/to_utf8/to_utf8.hpp diff --git a/apps/bulletobjecttool/main.cpp b/apps/bulletobjecttool/main.cpp index 190eb3364d..857eb357aa 100644 --- a/apps/bulletobjecttool/main.cpp +++ b/apps/bulletobjecttool/main.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/apps/components_tests/esmloader/load.cpp b/apps/components_tests/esmloader/load.cpp index 20e06507d1..e5e1b15876 100644 --- a/apps/components_tests/esmloader/load.cpp +++ b/apps/components_tests/esmloader/load.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include diff --git a/apps/components_tests/toutf8/toutf8.cpp b/apps/components_tests/toutf8/toutf8.cpp index 704ee6742d..3c84da65ee 100644 --- a/apps/components_tests/toutf8/toutf8.cpp +++ b/apps/components_tests/toutf8/toutf8.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/apps/esmtool/tes4.cpp b/apps/esmtool/tes4.cpp index 5b657da573..4ff632a217 100644 --- a/apps/esmtool/tes4.cpp +++ b/apps/esmtool/tes4.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace EsmTool { diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index 5cc9a8259b..cf04fee163 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -25,7 +25,7 @@ #include -#include +#include #include "importercontext.hpp" diff --git a/apps/mwiniimporter/importer.hpp b/apps/mwiniimporter/importer.hpp index 4c42caf5a3..342670713c 100644 --- a/apps/mwiniimporter/importer.hpp +++ b/apps/mwiniimporter/importer.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include class MwIniImporter { diff --git a/apps/navmeshtool/main.cpp b/apps/navmeshtool/main.cpp index 27f84104ac..5c7fe53126 100644 --- a/apps/navmeshtool/main.cpp +++ b/apps/navmeshtool/main.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/apps/opencs/editor.cpp b/apps/opencs/editor.cpp index 4cab88e5f2..0072a18d0d 100644 --- a/apps/opencs/editor.cpp +++ b/apps/opencs/editor.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "view/doc/viewmanager.hpp" diff --git a/apps/opencs/model/doc/document.hpp b/apps/opencs/model/doc/document.hpp index 60516cdc8c..ac8f06712c 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include "../world/data.hpp" #include "../world/idcompletionmanager.hpp" diff --git a/apps/opencs/model/doc/documentmanager.hpp b/apps/opencs/model/doc/documentmanager.hpp index 2c9ee1e98e..53caf04a0a 100644 --- a/apps/opencs/model/doc/documentmanager.hpp +++ b/apps/opencs/model/doc/documentmanager.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "loader.hpp" diff --git a/apps/opencs/model/doc/saving.hpp b/apps/opencs/model/doc/saving.hpp index 5dcdbb6803..6197798fdf 100644 --- a/apps/opencs/model/doc/saving.hpp +++ b/apps/opencs/model/doc/saving.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "operation.hpp" #include "savingstate.hpp" diff --git a/apps/opencs/model/doc/savingstate.hpp b/apps/opencs/model/doc/savingstate.hpp index c42dff0366..af8caa2c4d 100644 --- a/apps/opencs/model/doc/savingstate.hpp +++ b/apps/opencs/model/doc/savingstate.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace CSMDoc { diff --git a/apps/opencs/model/tools/mergeoperation.hpp b/apps/opencs/model/tools/mergeoperation.hpp index 2cce2bec0d..c50a7eefb0 100644 --- a/apps/opencs/model/tools/mergeoperation.hpp +++ b/apps/opencs/model/tools/mergeoperation.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../doc/operation.hpp" diff --git a/apps/opencs/model/tools/mergestages.hpp b/apps/opencs/model/tools/mergestages.hpp index 42f06858b1..40cc799c81 100644 --- a/apps/opencs/model/tools/mergestages.hpp +++ b/apps/opencs/model/tools/mergestages.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "../doc/stage.hpp" diff --git a/apps/opencs/model/tools/tools.hpp b/apps/opencs/model/tools/tools.hpp index c9e8937c90..939dea9bb8 100644 --- a/apps/opencs/model/tools/tools.hpp +++ b/apps/opencs/model/tools/tools.hpp @@ -6,7 +6,7 @@ #include -#include +#include #include diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 237b746746..c119541381 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "cell.hpp" #include "idcollection.hpp" diff --git a/apps/openmw/mwgui/journalbooks.hpp b/apps/openmw/mwgui/journalbooks.hpp index 1970830eab..792edcc070 100644 --- a/apps/openmw/mwgui/journalbooks.hpp +++ b/apps/openmw/mwgui/journalbooks.hpp @@ -4,7 +4,7 @@ #include "bookpage.hpp" #include "journalviewmodel.hpp" -#include +#include namespace MWGui { diff --git a/apps/openmw/mwgui/journalwindow.hpp b/apps/openmw/mwgui/journalwindow.hpp index 22e7048acf..f0f394156c 100644 --- a/apps/openmw/mwgui/journalwindow.hpp +++ b/apps/openmw/mwgui/journalwindow.hpp @@ -3,7 +3,7 @@ #include "windowbase.hpp" -#include +#include #include diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index 052a269188..3b85b74a8d 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "charactercreation.hpp" #include "draganddrop.hpp" diff --git a/apps/wizard/inisettings.hpp b/apps/wizard/inisettings.hpp index c8cd30c3c1..6ea8fc4adb 100644 --- a/apps/wizard/inisettings.hpp +++ b/apps/wizard/inisettings.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include namespace Wizard { diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index d57b0ed823..217839ce61 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -155,9 +155,9 @@ add_component_dir (nifbullet bulletnifloader ) -add_component_dir (to_utf8 - tables_gen - to_utf8 +add_component_dir (toutf8 + tablesgen + toutf8 ) add_component_dir(esm attr common defs esmcommon records util luascripts format refid esmbridge esmterrain diff --git a/components/esm3/esmreader.hpp b/components/esm3/esmreader.hpp index 5af5e75573..9bae5f217e 100644 --- a/components/esm3/esmreader.hpp +++ b/components/esm3/esmreader.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "components/esm/decompose.hpp" #include "components/esm/esmcommon.hpp" diff --git a/components/esm3/esmwriter.cpp b/components/esm3/esmwriter.cpp index 47c861e3ca..8bae844585 100644 --- a/components/esm3/esmwriter.cpp +++ b/components/esm3/esmwriter.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include "formatversion.hpp" diff --git a/components/esm4/reader.cpp b/components/esm4/reader.cpp index 505922601d..43a9e26418 100644 --- a/components/esm4/reader.cpp +++ b/components/esm4/reader.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include "grouptype.hpp" diff --git a/components/fontloader/fontloader.hpp b/components/fontloader/fontloader.hpp index 7e9220d58d..e5705f6af1 100644 --- a/components/fontloader/fontloader.hpp +++ b/components/fontloader/fontloader.hpp @@ -5,7 +5,7 @@ #include #include -#include +#include namespace VFS { diff --git a/components/nif/nifstream.cpp b/components/nif/nifstream.cpp index ef63bae937..6c361401e8 100644 --- a/components/nif/nifstream.cpp +++ b/components/nif/nifstream.cpp @@ -2,9 +2,9 @@ #include -#include "niffile.hpp" +#include -#include "../to_utf8/to_utf8.hpp" +#include "niffile.hpp" namespace { diff --git a/components/to_utf8/.gitignore b/components/to_utf8/.gitignore deleted file mode 100644 index 4e0357749e..0000000000 --- a/components/to_utf8/.gitignore +++ /dev/null @@ -1 +0,0 @@ -gen_iconv diff --git a/components/to_utf8/Makefile b/components/to_utf8/Makefile deleted file mode 100644 index 5234d455ae..0000000000 --- a/components/to_utf8/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -tables_gen.hpp: gen_iconv - ./gen_iconv > tables_gen.hpp - -gen_iconv: gen_iconv.cpp - g++ -Wall $^ -o $@ - -clean: - rm -f ./gen_iconv \ No newline at end of file diff --git a/components/toutf8/.gitignore b/components/toutf8/.gitignore new file mode 100644 index 0000000000..f1f54f5aea --- /dev/null +++ b/components/toutf8/.gitignore @@ -0,0 +1 @@ +geniconv diff --git a/components/toutf8/Makefile b/components/toutf8/Makefile new file mode 100644 index 0000000000..e46176d3ed --- /dev/null +++ b/components/toutf8/Makefile @@ -0,0 +1,8 @@ +tablesgen.hpp: geniconv + ./geniconv > tablesgen.hpp + +geniconv: geniconv.cpp + g++ -Wall $^ -o $@ + +clean: + rm -f ./geniconv diff --git a/components/to_utf8/gen_iconv.cpp b/components/toutf8/geniconv.cpp similarity index 95% rename from components/to_utf8/gen_iconv.cpp rename to components/toutf8/geniconv.cpp index 062b1173fc..48a7fb4627 100644 --- a/components/to_utf8/gen_iconv.cpp +++ b/components/toutf8/geniconv.cpp @@ -1,4 +1,4 @@ -// This program generates the file tables_gen.hpp +// This program generates the file tablesgen.hpp #include @@ -88,7 +88,7 @@ int write_table(const std::string& charset, const std::string& tableName) int main() { // Write header guard - std::cout << "#ifndef COMPONENTS_TOUTF8_TABLE_GEN_H\n#define COMPONENTS_TOUTF8_TABLE_GEN_H\n\n"; + std::cout << "#ifndef OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP\n#define OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP\n\n"; // Write namespace std::cout << "namespace ToUTF8\n{\n\n"; diff --git a/components/to_utf8/tables_gen.hpp b/components/toutf8/tablesgen.hpp similarity index 99% rename from components/to_utf8/tables_gen.hpp rename to components/toutf8/tablesgen.hpp index b25bb54bab..9ef5097ece 100644 --- a/components/to_utf8/tables_gen.hpp +++ b/components/toutf8/tablesgen.hpp @@ -1,5 +1,5 @@ -#ifndef COMPONENTS_TOUTF8_TABLE_GEN_H -#define COMPONENTS_TOUTF8_TABLE_GEN_H +#ifndef OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP +#define OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP namespace ToUTF8 { diff --git a/components/to_utf8/to_utf8.cpp b/components/toutf8/toutf8.cpp similarity index 99% rename from components/to_utf8/to_utf8.cpp rename to components/toutf8/toutf8.cpp index 15fb8b26c0..e9b2a7fe2f 100644 --- a/components/to_utf8/to_utf8.cpp +++ b/components/toutf8/toutf8.cpp @@ -1,4 +1,4 @@ -#include "to_utf8.hpp" +#include "toutf8.hpp" #include #include @@ -41,7 +41,7 @@ */ // Generated tables -#include "tables_gen.hpp" +#include "tablesgen.hpp" using namespace ToUTF8; diff --git a/components/to_utf8/to_utf8.hpp b/components/toutf8/toutf8.hpp similarity index 97% rename from components/to_utf8/to_utf8.hpp rename to components/toutf8/toutf8.hpp index 80af6586c9..1da4ebffbb 100644 --- a/components/to_utf8/to_utf8.hpp +++ b/components/toutf8/toutf8.hpp @@ -1,5 +1,5 @@ -#ifndef COMPONENTS_TOUTF8_H -#define COMPONENTS_TOUTF8_H +#ifndef OPENMW_COMPONENTS_TOUTF8_TOUTF8_HPP +#define OPENMW_COMPONENTS_TOUTF8_TOUTF8_HPP #include #include diff --git a/components/translation/translation.hpp b/components/translation/translation.hpp index a7b6087ac7..18e40713e5 100644 --- a/components/translation/translation.hpp +++ b/components/translation/translation.hpp @@ -2,7 +2,7 @@ #define COMPONENTS_TRANSLATION_DATA_H #include -#include +#include namespace Translation { From fc850cfe69c75482d0434255a9f38ecf91fbf3ee Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 22:56:21 +0300 Subject: [PATCH 11/13] Rename components/crashcatcher files to follow naming conventions --- CI/file_name_exceptions.txt | 5 ----- components/CMakeLists.txt | 6 +++--- components/crashcatcher/crashcatcher.hpp | 4 ++-- ...{windows_crashcatcher.cpp => windowscrashcatcher.cpp} | 9 +++++---- ...{windows_crashcatcher.hpp => windowscrashcatcher.hpp} | 9 +++++---- components/crashcatcher/windowscrashdumppathhelpers.hpp | 6 ++++-- ...{windows_crashmonitor.cpp => windowscrashmonitor.cpp} | 9 +++++---- ...{windows_crashmonitor.hpp => windowscrashmonitor.hpp} | 6 +++--- .../{windows_crashshm.hpp => windowscrashshm.hpp} | 6 +++--- components/debug/debugging.cpp | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) rename components/crashcatcher/{windows_crashcatcher.cpp => windowscrashcatcher.cpp} (98%) rename components/crashcatcher/{windows_crashcatcher.hpp => windowscrashcatcher.hpp} (94%) rename components/crashcatcher/{windows_crashmonitor.cpp => windowscrashmonitor.cpp} (99%) rename components/crashcatcher/{windows_crashmonitor.hpp => windowscrashmonitor.hpp} (90%) rename components/crashcatcher/{windows_crashshm.hpp => windowscrashshm.hpp} (89%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 95ecafa856..a388ebf630 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -7,8 +7,3 @@ apps/openmw/mwsound/sound_buffer.cpp apps/openmw/mwsound/sound_buffer.hpp apps/openmw/mwsound/sound_decoder.hpp apps/openmw/mwsound/sound_output.hpp -components/crashcatcher/windows_crashcatcher.cpp -components/crashcatcher/windows_crashcatcher.hpp -components/crashcatcher/windows_crashmonitor.cpp -components/crashcatcher/windows_crashmonitor.hpp -components/crashcatcher/windows_crashshm.hpp diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 217839ce61..2385b4ca83 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -390,10 +390,10 @@ copy_resource_file("lua_ui/content.lua" "${OPENMW_RESOURCES_ROOT}" "resources/lu if(WIN32) add_component_dir (crashcatcher - windows_crashcatcher - windows_crashmonitor - windows_crashshm + windowscrashcatcher windowscrashdumppathhelpers + windowscrashmonitor + windowscrashshm ) elseif(NOT ANDROID) add_component_dir (crashcatcher diff --git a/components/crashcatcher/crashcatcher.hpp b/components/crashcatcher/crashcatcher.hpp index 16b416cf98..60f749e57a 100644 --- a/components/crashcatcher/crashcatcher.hpp +++ b/components/crashcatcher/crashcatcher.hpp @@ -1,5 +1,5 @@ -#ifndef CRASHCATCHER_H -#define CRASHCATCHER_H +#ifndef OPENMW_COMPONENTS_CRASHCATCHER_CRASHCATCHER_HPP +#define OPENMW_COMPONENTS_CRASHCATCHER_CRASHCATCHER_HPP #include diff --git a/components/crashcatcher/windows_crashcatcher.cpp b/components/crashcatcher/windowscrashcatcher.cpp similarity index 98% rename from components/crashcatcher/windows_crashcatcher.cpp rename to components/crashcatcher/windowscrashcatcher.cpp index 23dfac549c..40c54834ac 100644 --- a/components/crashcatcher/windows_crashcatcher.cpp +++ b/components/crashcatcher/windowscrashcatcher.cpp @@ -1,17 +1,18 @@ -#include "windows_crashcatcher.hpp" +#include "windowscrashcatcher.hpp" #include #include #include #include -#include "windows_crashmonitor.hpp" -#include "windows_crashshm.hpp" -#include "windowscrashdumppathhelpers.hpp" #include #include +#include "windowscrashdumppathhelpers.hpp" +#include "windowscrashmonitor.hpp" +#include "windowscrashshm.hpp" + namespace Crash { namespace diff --git a/components/crashcatcher/windows_crashcatcher.hpp b/components/crashcatcher/windowscrashcatcher.hpp similarity index 94% rename from components/crashcatcher/windows_crashcatcher.hpp rename to components/crashcatcher/windowscrashcatcher.hpp index 89678c9ada..ea53fcb520 100644 --- a/components/crashcatcher/windows_crashcatcher.hpp +++ b/components/crashcatcher/windowscrashcatcher.hpp @@ -1,11 +1,12 @@ -#ifndef WINDOWS_CRASHCATCHER_HPP -#define WINDOWS_CRASHCATCHER_HPP +#ifndef OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHCATCHER_HPP +#define OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHCATCHER_HPP #include -#include #include +#include "crashcatcher.hpp" + namespace Crash { @@ -78,4 +79,4 @@ namespace Crash } // namespace Crash -#endif // WINDOWS_CRASHCATCHER_HPP +#endif diff --git a/components/crashcatcher/windowscrashdumppathhelpers.hpp b/components/crashcatcher/windowscrashdumppathhelpers.hpp index fa64969301..9e11c57834 100644 --- a/components/crashcatcher/windowscrashdumppathhelpers.hpp +++ b/components/crashcatcher/windowscrashdumppathhelpers.hpp @@ -1,8 +1,10 @@ -#ifndef COMPONENTS_CRASH_WINDOWSCRASHDUMPPATHHELPERS_H -#include "windows_crashshm.hpp" +#ifndef OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHDUMPPATHHELPERS_HPP +#define OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHDUMPPATHHELPERS_HPP #include +#include "windowscrashshm.hpp" + namespace Crash { std::filesystem::path getCrashDumpPath(const CrashSHM& crashShm); diff --git a/components/crashcatcher/windows_crashmonitor.cpp b/components/crashcatcher/windowscrashmonitor.cpp similarity index 99% rename from components/crashcatcher/windows_crashmonitor.cpp rename to components/crashcatcher/windowscrashmonitor.cpp index 3708283efa..a92c310f63 100644 --- a/components/crashcatcher/windows_crashmonitor.cpp +++ b/components/crashcatcher/windowscrashmonitor.cpp @@ -1,4 +1,4 @@ -#include "windows_crashmonitor.hpp" +#include "windowscrashmonitor.hpp" #include #include @@ -10,12 +10,13 @@ #include -#include "windows_crashcatcher.hpp" -#include "windows_crashshm.hpp" -#include "windowscrashdumppathhelpers.hpp" #include #include +#include "windowscrashcatcher.hpp" +#include "windowscrashdumppathhelpers.hpp" +#include "windowscrashshm.hpp" + namespace Crash { std::unordered_map CrashMonitor::smEventHookOwners{}; diff --git a/components/crashcatcher/windows_crashmonitor.hpp b/components/crashcatcher/windowscrashmonitor.hpp similarity index 90% rename from components/crashcatcher/windows_crashmonitor.hpp rename to components/crashcatcher/windowscrashmonitor.hpp index 16e173169e..cb650df6dd 100644 --- a/components/crashcatcher/windows_crashmonitor.hpp +++ b/components/crashcatcher/windowscrashmonitor.hpp @@ -1,5 +1,5 @@ -#ifndef WINDOWS_CRASHMONITOR_HPP -#define WINDOWS_CRASHMONITOR_HPP +#ifndef OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHMONITOR_HPP +#define OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHMONITOR_HPP #include @@ -60,4 +60,4 @@ namespace Crash } // namespace Crash -#endif // WINDOWS_CRASHMONITOR_HPP +#endif diff --git a/components/crashcatcher/windows_crashshm.hpp b/components/crashcatcher/windowscrashshm.hpp similarity index 89% rename from components/crashcatcher/windows_crashshm.hpp rename to components/crashcatcher/windowscrashshm.hpp index b919757890..a9357710ca 100644 --- a/components/crashcatcher/windows_crashshm.hpp +++ b/components/crashcatcher/windowscrashshm.hpp @@ -1,5 +1,5 @@ -#ifndef WINDOWS_CRASHSHM_HPP -#define WINDOWS_CRASHSHM_HPP +#ifndef OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHSHM_HPP +#define OPENMW_COMPONENTS_CRASHCATCHER_WINDOWSCRASHSHM_HPP #include @@ -44,4 +44,4 @@ namespace Crash } // namespace Crash -#endif // WINDOWS_CRASHSHM_HPP +#endif diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp index 32aec8f0fc..11d74be606 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp @@ -22,7 +22,7 @@ #include #ifdef _WIN32 -#include +#include #include #include From 72cbf61b4351e6be9ec24581b96b5471c3b6f34c Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 23:45:51 +0300 Subject: [PATCH 12/13] Rename apps/openmw/mwsound files and classes to follow naming conventions --- CI/file_name_exceptions.txt | 9 -- apps/openmw/CMakeLists.txt | 4 +- apps/openmw/mwbase/soundmanager.hpp | 4 +- .../mwsound/{efx-presets.h => efxpresets.h} | 6 +- .../{ffmpeg_decoder.cpp => ffmpegdecoder.cpp} | 40 ++++---- .../{ffmpeg_decoder.hpp => ffmpegdecoder.hpp} | 16 ++-- apps/openmw/mwsound/loudness.hpp | 2 +- apps/openmw/mwsound/movieaudiofactory.cpp | 6 +- .../{openal_output.cpp => openaloutput.cpp} | 93 +++++++++---------- .../{openal_output.hpp => openaloutput.hpp} | 16 ++-- apps/openmw/mwsound/sound.hpp | 4 +- .../{sound_buffer.cpp => soundbuffer.cpp} | 32 +++---- .../{sound_buffer.hpp => soundbuffer.hpp} | 43 ++++----- .../{sound_decoder.hpp => sounddecoder.hpp} | 14 +-- apps/openmw/mwsound/soundmanagerimp.cpp | 50 +++++----- apps/openmw/mwsound/soundmanagerimp.hpp | 22 ++--- .../{sound_output.hpp => soundoutput.hpp} | 18 ++-- 17 files changed, 185 insertions(+), 194 deletions(-) rename apps/openmw/mwsound/{efx-presets.h => efxpresets.h} (99%) rename apps/openmw/mwsound/{ffmpeg_decoder.cpp => ffmpegdecoder.cpp} (93%) rename apps/openmw/mwsound/{ffmpeg_decoder.hpp => ffmpegdecoder.hpp} (89%) rename apps/openmw/mwsound/{openal_output.cpp => openaloutput.cpp} (95%) rename apps/openmw/mwsound/{openal_output.hpp => openaloutput.hpp} (91%) rename apps/openmw/mwsound/{sound_buffer.cpp => soundbuffer.cpp} (85%) rename apps/openmw/mwsound/{sound_buffer.hpp => soundbuffer.hpp} (68%) rename apps/openmw/mwsound/{sound_decoder.hpp => sounddecoder.hpp} (80%) rename apps/openmw/mwsound/{sound_output.hpp => soundoutput.hpp} (88%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index a388ebf630..e69de29bb2 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -1,9 +0,0 @@ -apps/openmw/mwsound/efx-presets.h -apps/openmw/mwsound/ffmpeg_decoder.cpp -apps/openmw/mwsound/ffmpeg_decoder.hpp -apps/openmw/mwsound/openal_output.cpp -apps/openmw/mwsound/openal_output.hpp -apps/openmw/mwsound/sound_buffer.cpp -apps/openmw/mwsound/sound_buffer.hpp -apps/openmw/mwsound/sound_decoder.hpp -apps/openmw/mwsound/sound_output.hpp diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 37e9b39a01..7319791d87 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -71,8 +71,8 @@ add_openmw_dir (mwlua ) add_openmw_dir (mwsound - soundmanagerimp openal_output ffmpeg_decoder sound sound_buffer sound_decoder sound_output - loudness movieaudiofactory alext efx efx-presets regionsoundselector watersoundupdater + soundmanagerimp openaloutput ffmpegdecoder sound soundbuffer sounddecoder soundoutput + loudness movieaudiofactory alext efx efxpresets regionsoundselector watersoundupdater ) add_openmw_dir (mwworld diff --git a/apps/openmw/mwbase/soundmanager.hpp b/apps/openmw/mwbase/soundmanager.hpp index 5f96a4e095..532bc771ba 100644 --- a/apps/openmw/mwbase/soundmanager.hpp +++ b/apps/openmw/mwbase/soundmanager.hpp @@ -39,8 +39,8 @@ namespace MWSound class Sound; class Stream; - struct Sound_Decoder; - typedef std::shared_ptr DecoderPtr; + struct SoundDecoder; + typedef std::shared_ptr DecoderPtr; /* These must all fit together */ enum class PlayMode diff --git a/apps/openmw/mwsound/efx-presets.h b/apps/openmw/mwsound/efxpresets.h similarity index 99% rename from apps/openmw/mwsound/efx-presets.h rename to apps/openmw/mwsound/efxpresets.h index a9662936d5..a36c41db03 100644 --- a/apps/openmw/mwsound/efx-presets.h +++ b/apps/openmw/mwsound/efxpresets.h @@ -1,7 +1,7 @@ /* Reverb presets for EFX */ -#ifndef EFX_PRESETS_H -#define EFX_PRESETS_H +#ifndef GAME_SOUND_EFXPRESETS_H +#define GAME_SOUND_EFXPRESETS_H #ifndef EFXEAXREVERBPROPERTIES_DEFINED #define EFXEAXREVERBPROPERTIES_DEFINED @@ -852,4 +852,4 @@ typedef struct 0.1900f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x0 \ } -#endif /* EFX_PRESETS_H */ +#endif diff --git a/apps/openmw/mwsound/ffmpeg_decoder.cpp b/apps/openmw/mwsound/ffmpegdecoder.cpp similarity index 93% rename from apps/openmw/mwsound/ffmpeg_decoder.cpp rename to apps/openmw/mwsound/ffmpegdecoder.cpp index 54fd126c41..5a0f336a93 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.cpp +++ b/apps/openmw/mwsound/ffmpegdecoder.cpp @@ -1,4 +1,4 @@ -#include "ffmpeg_decoder.hpp" +#include "ffmpegdecoder.hpp" #include #include @@ -44,11 +44,11 @@ namespace MWSound av_frame_free(&ptr); } - int FFmpeg_Decoder::readPacket(void* user_data, uint8_t* buf, int buf_size) + int FFmpegDecoder::readPacket(void* user_data, uint8_t* buf, int buf_size) { try { - std::istream& stream = *static_cast(user_data)->mDataStream; + std::istream& stream = *static_cast(user_data)->mDataStream; stream.clear(); stream.read((char*)buf, buf_size); std::streamsize count = stream.gcount(); @@ -65,18 +65,18 @@ namespace MWSound } #if OPENMW_FFMPEG_CONST_WRITEPACKET - int FFmpeg_Decoder::writePacket(void*, const uint8_t*, int) + int FFmpegDecoder::writePacket(void*, const uint8_t*, int) #else - int FFmpeg_Decoder::writePacket(void*, uint8_t*, int) + int FFmpegDecoder::writePacket(void*, uint8_t*, int) #endif { Log(Debug::Error) << "can't write to read-only stream"; return -1; } - int64_t FFmpeg_Decoder::seek(void* user_data, int64_t offset, int whence) + int64_t FFmpegDecoder::seek(void* user_data, int64_t offset, int whence) { - std::istream& stream = *static_cast(user_data)->mDataStream; + std::istream& stream = *static_cast(user_data)->mDataStream; whence &= ~AVSEEK_FORCE; @@ -106,7 +106,7 @@ namespace MWSound /* Used by getAV*Data to search for more compressed data, and buffer it in the * correct stream. It won't buffer data for streams that the app doesn't have a * handle for. */ - bool FFmpeg_Decoder::getNextPacket() + bool FFmpegDecoder::getNextPacket() { if (!mStream) return false; @@ -129,7 +129,7 @@ namespace MWSound return false; } - bool FFmpeg_Decoder::getAVAudioData() + bool FFmpegDecoder::getAVAudioData() { bool got_frame = false; @@ -192,7 +192,7 @@ namespace MWSound return true; } - size_t FFmpeg_Decoder::readAVAudioData(void* data, size_t length) + size_t FFmpegDecoder::readAVAudioData(void* data, size_t length) { size_t dec = 0; @@ -227,7 +227,7 @@ namespace MWSound return dec; } - void FFmpeg_Decoder::open(VFS::Path::NormalizedView fname) + void FFmpegDecoder::open(VFS::Path::NormalizedView fname) { close(); mDataStream = mResourceMgr->get(fname); @@ -317,7 +317,7 @@ namespace MWSound mStream = stream; } - void FFmpeg_Decoder::close() + void FFmpegDecoder::close() { mStream = nullptr; mCodecCtx.reset(); @@ -332,7 +332,7 @@ namespace MWSound mDataStream.reset(); } - std::string FFmpeg_Decoder::getName() + std::string FFmpegDecoder::getName() { // In the FFMpeg 4.0 a "filename" field was replaced by "url" #if LIBAVCODEC_VERSION_INT < 3805796 @@ -342,7 +342,7 @@ namespace MWSound #endif } - void FFmpeg_Decoder::getInfo(int* samplerate, ChannelConfig* chans, SampleType* type) + void FFmpegDecoder::getInfo(int* samplerate, ChannelConfig* chans, SampleType* type) { if (!mStream) throw std::runtime_error("No audio stream info"); @@ -459,7 +459,7 @@ namespace MWSound } } - size_t FFmpeg_Decoder::read(char* buffer, size_t bytes) + size_t FFmpegDecoder::read(char* buffer, size_t bytes) { if (!mStream) { @@ -469,7 +469,7 @@ namespace MWSound return readAVAudioData(buffer, bytes); } - void FFmpeg_Decoder::readAll(std::vector& output) + void FFmpegDecoder::readAll(std::vector& output) { if (!mStream) { @@ -490,7 +490,7 @@ namespace MWSound } } - size_t FFmpeg_Decoder::getSampleOffset() + size_t FFmpegDecoder::getSampleOffset() { #if OPENMW_FFMPEG_5_OR_GREATER std::size_t delay = (mFrameSize - mFramePos) / mOutputChannelLayout.nb_channels @@ -501,8 +501,8 @@ namespace MWSound return static_cast(mNextPts * mCodecCtx->sample_rate) - delay; } - FFmpeg_Decoder::FFmpeg_Decoder(const VFS::Manager* vfs) - : Sound_Decoder(vfs) + FFmpegDecoder::FFmpegDecoder(const VFS::Manager* vfs) + : SoundDecoder(vfs) , mStream(nullptr) , mFrameSize(0) , mFramePos(0) @@ -534,7 +534,7 @@ namespace MWSound } } - FFmpeg_Decoder::~FFmpeg_Decoder() + FFmpegDecoder::~FFmpegDecoder() { close(); } diff --git a/apps/openmw/mwsound/ffmpeg_decoder.hpp b/apps/openmw/mwsound/ffmpegdecoder.hpp similarity index 89% rename from apps/openmw/mwsound/ffmpeg_decoder.hpp rename to apps/openmw/mwsound/ffmpegdecoder.hpp index e67b8efbf3..c71b935bc4 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.hpp +++ b/apps/openmw/mwsound/ffmpegdecoder.hpp @@ -1,5 +1,5 @@ -#ifndef GAME_SOUND_FFMPEG_DECODER_H -#define GAME_SOUND_FFMPEG_DECODER_H +#ifndef GAME_SOUND_FFMPEGDECODER_H +#define GAME_SOUND_FFMPEGDECODER_H #include @@ -31,7 +31,7 @@ extern "C" #include -#include "sound_decoder.hpp" +#include "sounddecoder.hpp" namespace MWSound { @@ -63,7 +63,7 @@ namespace MWSound using AVFramePtr = std::unique_ptr; - class FFmpeg_Decoder final : public Sound_Decoder + class FFmpegDecoder final : public SoundDecoder { AVIOContextPtr mIoCtx; AVFormatContextPtr mFormatCtx; @@ -114,13 +114,13 @@ namespace MWSound void readAll(std::vector& output) override; size_t getSampleOffset() override; - FFmpeg_Decoder& operator=(const FFmpeg_Decoder& rhs); - FFmpeg_Decoder(const FFmpeg_Decoder& rhs); + FFmpegDecoder& operator=(const FFmpegDecoder& rhs); + FFmpegDecoder(const FFmpegDecoder& rhs); public: - explicit FFmpeg_Decoder(const VFS::Manager* vfs); + explicit FFmpegDecoder(const VFS::Manager* vfs); - virtual ~FFmpeg_Decoder(); + virtual ~FFmpegDecoder(); friend class SoundManager; }; diff --git a/apps/openmw/mwsound/loudness.hpp b/apps/openmw/mwsound/loudness.hpp index 1800ec246f..edc201f38a 100644 --- a/apps/openmw/mwsound/loudness.hpp +++ b/apps/openmw/mwsound/loudness.hpp @@ -4,7 +4,7 @@ #include #include -#include "sound_decoder.hpp" +#include "sounddecoder.hpp" namespace MWSound { diff --git a/apps/openmw/mwsound/movieaudiofactory.cpp b/apps/openmw/mwsound/movieaudiofactory.cpp index 962086701a..61992bc0d5 100644 --- a/apps/openmw/mwsound/movieaudiofactory.cpp +++ b/apps/openmw/mwsound/movieaudiofactory.cpp @@ -7,17 +7,17 @@ #include "../mwbase/environment.hpp" #include "../mwbase/soundmanager.hpp" -#include "sound_decoder.hpp" +#include "sounddecoder.hpp" namespace MWSound { class MovieAudioDecoder; - class MWSoundDecoderBridge final : public Sound_Decoder + class MWSoundDecoderBridge final : public SoundDecoder { public: MWSoundDecoderBridge(MWSound::MovieAudioDecoder* decoder) - : Sound_Decoder(nullptr) + : SoundDecoder(nullptr) , mDecoder(decoder) { } diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openaloutput.cpp similarity index 95% rename from apps/openmw/mwsound/openal_output.cpp rename to apps/openmw/mwsound/openaloutput.cpp index f829ea458a..0f27524912 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openaloutput.cpp @@ -17,14 +17,13 @@ #include #include +#include "efxpresets.h" #include "loudness.hpp" -#include "openal_output.hpp" +#include "openaloutput.hpp" #include "sound.hpp" -#include "sound_decoder.hpp" +#include "sounddecoder.hpp" #include "soundmanagerimp.hpp" -#include "efx-presets.h" - #ifndef ALC_ALL_DEVICES_SPECIFIER #define ALC_ALL_DEVICES_SPECIFIER 0x1013 #endif @@ -301,7 +300,7 @@ namespace MWSound OpenAL_SoundStream(const OpenAL_SoundStream& rhs); OpenAL_SoundStream& operator=(const OpenAL_SoundStream& rhs); - friend class OpenAL_Output; + friend class OpenALOutput; public: OpenAL_SoundStream(ALuint src, DecoderPtr decoder); @@ -323,7 +322,7 @@ namespace MWSound // // A background streaming thread (keeps active streams processed) // - struct OpenAL_Output::StreamThread + struct OpenALOutput::StreamThread { std::vector mStreams; @@ -393,13 +392,13 @@ namespace MWSound StreamThread& operator=(const StreamThread& rhs) = delete; }; - class OpenAL_Output::DefaultDeviceThread + class OpenALOutput::DefaultDeviceThread { public: std::basic_string mCurrentName; private: - OpenAL_Output& mOutput; + OpenALOutput& mOutput; std::atomic mQuitNow; std::mutex mMutex; @@ -433,7 +432,7 @@ namespace MWSound } public: - DefaultDeviceThread(OpenAL_Output& output, std::basic_string_view name = {}) + DefaultDeviceThread(OpenALOutput& output, std::basic_string_view name = {}) : mCurrentName(name) , mOutput(output) , mQuitNow(false) @@ -655,7 +654,7 @@ namespace MWSound // // An OpenAL output device // - std::vector OpenAL_Output::enumerate() + std::vector OpenALOutput::enumerate() { std::vector devlist; const ALCchar* devnames; @@ -672,14 +671,14 @@ namespace MWSound return devlist; } - void OpenAL_Output::eventCallback( + void OpenALOutput::eventCallback( ALenum eventType, ALuint object, ALuint param, ALsizei length, const ALchar* message, void* userParam) { if (eventType == AL_EVENT_TYPE_DISCONNECTED_SOFT) - static_cast(userParam)->onDisconnect(); + static_cast(userParam)->onDisconnect(); } - void OpenAL_Output::onDisconnect() + void OpenALOutput::onDisconnect() { if (!mInitialized || !alcReopenDeviceSOFT) return; @@ -702,7 +701,7 @@ namespace MWSound } } - bool OpenAL_Output::init(const std::string& devname, const std::string& hrtfname, HrtfMode hrtfmode) + bool OpenALOutput::init(const std::string& devname, const std::string& hrtfname, HrtfMode hrtfmode) { deinit(); std::lock_guard lock(mReopenMutex); @@ -802,7 +801,7 @@ namespace MWSound { static const std::array events{ { AL_EVENT_TYPE_DISCONNECTED_SOFT } }; alEventControlSOFT(events.size(), events.data(), AL_TRUE); - alEventCallbackSOFT(&OpenAL_Output::eventCallback, this); + alEventCallbackSOFT(&OpenALOutput::eventCallback, this); } else Log(Debug::Warning) << "Cannot detect audio device changes"; @@ -970,7 +969,7 @@ namespace MWSound return true; } - void OpenAL_Output::deinit() + void OpenALOutput::deinit() { mStreamThread->removeAll(); mDefaultDeviceThread.reset(); @@ -1006,7 +1005,7 @@ namespace MWSound mInitialized = false; } - std::vector OpenAL_Output::enumerateHrtf() + std::vector OpenALOutput::enumerateHrtf() { std::vector ret; @@ -1028,7 +1027,7 @@ namespace MWSound return ret; } - std::pair OpenAL_Output::loadSound(VFS::Path::NormalizedView fname) + std::pair OpenALOutput::loadSound(VFS::Path::NormalizedView fname) { getALError(); @@ -1076,7 +1075,7 @@ namespace MWSound return std::make_pair(MAKE_PTRID(buf), size); } - size_t OpenAL_Output::unloadSound(Sound_Handle data) + size_t OpenALOutput::unloadSound(Sound_Handle data) { ALuint buffer = GET_PTRID(data); if (!buffer) @@ -1105,7 +1104,7 @@ namespace MWSound return size; } - void OpenAL_Output::initCommon2D( + void OpenALOutput::initCommon2D( ALuint source, const osg::Vec3f& pos, ALfloat gain, ALfloat pitch, bool loop, bool useenv) { alSourcef(source, AL_REFERENCE_DISTANCE, 1.0f); @@ -1143,7 +1142,7 @@ namespace MWSound alSource3f(source, AL_VELOCITY, 0.0f, 0.0f, 0.0f); } - void OpenAL_Output::initCommon3D(ALuint source, const osg::Vec3f& pos, ALfloat mindist, ALfloat maxdist, + void OpenALOutput::initCommon3D(ALuint source, const osg::Vec3f& pos, ALfloat mindist, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool loop, bool useenv) { alSourcef(source, AL_REFERENCE_DISTANCE, mindist); @@ -1183,7 +1182,7 @@ namespace MWSound alSource3f(source, AL_VELOCITY, 0.0f, 0.0f, 0.0f); } - void OpenAL_Output::updateCommon( + void OpenALOutput::updateCommon( ALuint source, const osg::Vec3f& pos, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool useenv) { if (useenv && mListenerEnv == Env_Underwater && !mWaterFilter) @@ -1199,7 +1198,7 @@ namespace MWSound alSource3f(source, AL_VELOCITY, 0.0f, 0.0f, 0.0f); } - bool OpenAL_Output::playSound(Sound* sound, Sound_Handle data, float offset) + bool OpenALOutput::playSound(Sound* sound, Sound_Handle data, float offset) { ALuint source; @@ -1238,7 +1237,7 @@ namespace MWSound return true; } - bool OpenAL_Output::playSound3D(Sound* sound, Sound_Handle data, float offset) + bool OpenALOutput::playSound3D(Sound* sound, Sound_Handle data, float offset) { ALuint source; @@ -1277,7 +1276,7 @@ namespace MWSound return true; } - void OpenAL_Output::finishSound(Sound* sound) + void OpenALOutput::finishSound(Sound* sound) { if (!sound->mHandle) return; @@ -1294,7 +1293,7 @@ namespace MWSound mActiveSounds.erase(std::find(mActiveSounds.begin(), mActiveSounds.end(), sound)); } - bool OpenAL_Output::isSoundPlaying(Sound* sound) + bool OpenALOutput::isSoundPlaying(Sound* sound) { if (!sound->mHandle) return false; @@ -1307,7 +1306,7 @@ namespace MWSound return state == AL_PLAYING || state == AL_PAUSED; } - void OpenAL_Output::updateSound(Sound* sound) + void OpenALOutput::updateSound(Sound* sound) { if (!sound->mHandle) return; @@ -1318,7 +1317,7 @@ namespace MWSound getALError(); } - bool OpenAL_Output::streamSound(DecoderPtr decoder, Stream* sound, bool getLoudnessData) + bool OpenALOutput::streamSound(DecoderPtr decoder, Stream* sound, bool getLoudnessData) { if (mFreeSources.empty()) { @@ -1349,7 +1348,7 @@ namespace MWSound return true; } - bool OpenAL_Output::streamSound3D(DecoderPtr decoder, Stream* sound, bool getLoudnessData) + bool OpenALOutput::streamSound3D(DecoderPtr decoder, Stream* sound, bool getLoudnessData) { if (mFreeSources.empty()) { @@ -1380,7 +1379,7 @@ namespace MWSound return true; } - void OpenAL_Output::finishStream(Stream* sound) + void OpenALOutput::finishStream(Stream* sound) { if (!sound->mHandle) return; @@ -1402,7 +1401,7 @@ namespace MWSound delete stream; } - double OpenAL_Output::getStreamDelay(Stream* sound) + double OpenALOutput::getStreamDelay(Stream* sound) { if (!sound->mHandle) return 0.0; @@ -1410,7 +1409,7 @@ namespace MWSound return stream->getStreamDelay(); } - double OpenAL_Output::getStreamOffset(Stream* sound) + double OpenALOutput::getStreamOffset(Stream* sound) { if (!sound->mHandle) return 0.0; @@ -1419,7 +1418,7 @@ namespace MWSound return stream->getStreamOffset(); } - float OpenAL_Output::getStreamLoudness(Stream* sound) + float OpenALOutput::getStreamLoudness(Stream* sound) { if (!sound->mHandle) return 0.0; @@ -1428,7 +1427,7 @@ namespace MWSound return stream->getCurrentLoudness(); } - bool OpenAL_Output::isStreamPlaying(Stream* sound) + bool OpenALOutput::isStreamPlaying(Stream* sound) { if (!sound->mHandle) return false; @@ -1437,7 +1436,7 @@ namespace MWSound return stream->isPlaying(); } - void OpenAL_Output::updateStream(Stream* sound) + void OpenALOutput::updateStream(Stream* sound) { if (!sound->mHandle) return; @@ -1449,17 +1448,17 @@ namespace MWSound getALError(); } - void OpenAL_Output::startUpdate() + void OpenALOutput::startUpdate() { alcSuspendContext(alcGetCurrentContext()); } - void OpenAL_Output::finishUpdate() + void OpenALOutput::finishUpdate() { alcProcessContext(alcGetCurrentContext()); } - void OpenAL_Output::updateListener( + void OpenALOutput::updateListener( const osg::Vec3f& pos, const osg::Vec3f& atdir, const osg::Vec3f& updir, Environment env) { if (mContext) @@ -1501,7 +1500,7 @@ namespace MWSound mListenerEnv = env; } - void OpenAL_Output::pauseSounds(int types) + void OpenALOutput::pauseSounds(int types) { std::vector sources; for (Sound* sound : mActiveSounds) @@ -1524,7 +1523,7 @@ namespace MWSound } } - void OpenAL_Output::pauseActiveDevice() + void OpenALOutput::pauseActiveDevice() { if (mDevice == nullptr) return; @@ -1540,7 +1539,7 @@ namespace MWSound alListenerf(AL_GAIN, 0.0f); } - void OpenAL_Output::resumeActiveDevice() + void OpenALOutput::resumeActiveDevice() { if (mDevice == nullptr) return; @@ -1556,7 +1555,7 @@ namespace MWSound alListenerf(AL_GAIN, 1.0f); } - void OpenAL_Output::resumeSounds(int types) + void OpenALOutput::resumeSounds(int types) { std::vector sources; for (Sound* sound : mActiveSounds) @@ -1579,8 +1578,8 @@ namespace MWSound } } - OpenAL_Output::OpenAL_Output(SoundManager& mgr) - : Sound_Output(mgr) + OpenALOutput::OpenALOutput(SoundManager& mgr) + : SoundOutput(mgr) , mDevice(nullptr) , mContext(nullptr) , mListenerPos(0.0f, 0.0f, 0.0f) @@ -1593,12 +1592,12 @@ namespace MWSound { } - OpenAL_Output::~OpenAL_Output() + OpenALOutput::~OpenALOutput() { - OpenAL_Output::deinit(); + OpenALOutput::deinit(); } - float OpenAL_Output::getTimeScaledPitch(SoundBase* sound) + float OpenALOutput::getTimeScaledPitch(SoundBase* sound) { const bool shouldScale = !(sound->mParams.mFlags & PlayMode::NoScaling); return shouldScale ? sound->getPitch() * mManager.getSimulationTimeScale() : sound->getPitch(); diff --git a/apps/openmw/mwsound/openal_output.hpp b/apps/openmw/mwsound/openaloutput.hpp similarity index 91% rename from apps/openmw/mwsound/openal_output.hpp rename to apps/openmw/mwsound/openaloutput.hpp index b419038eab..4e96dd1627 100644 --- a/apps/openmw/mwsound/openal_output.hpp +++ b/apps/openmw/mwsound/openaloutput.hpp @@ -1,5 +1,5 @@ -#ifndef GAME_SOUND_OPENAL_OUTPUT_H -#define GAME_SOUND_OPENAL_OUTPUT_H +#ifndef GAME_SOUND_OPENALOUTPUT_H +#define GAME_SOUND_OPENALOUTPUT_H #include #include @@ -13,7 +13,7 @@ #include "alc.h" #include "alext.h" -#include "sound_output.hpp" +#include "soundoutput.hpp" namespace MWSound { @@ -22,7 +22,7 @@ namespace MWSound class Sound; class Stream; - class OpenAL_Output : public Sound_Output + class OpenALOutput : public SoundOutput { ALCdevice* mDevice; ALCcontext* mContext; @@ -72,8 +72,8 @@ namespace MWSound float getTimeScaledPitch(SoundBase* sound); - OpenAL_Output& operator=(const OpenAL_Output& rhs); - OpenAL_Output(const OpenAL_Output& rhs); + OpenALOutput& operator=(const OpenALOutput& rhs); + OpenALOutput(const OpenALOutput& rhs); static void eventCallback( ALenum eventType, ALuint object, ALuint param, ALsizei length, const ALchar* message, void* userParam); @@ -117,8 +117,8 @@ namespace MWSound void pauseActiveDevice() override; void resumeActiveDevice() override; - OpenAL_Output(SoundManager& mgr); - virtual ~OpenAL_Output(); + OpenALOutput(SoundManager& mgr); + virtual ~OpenALOutput(); }; } diff --git a/apps/openmw/mwsound/sound.hpp b/apps/openmw/mwsound/sound.hpp index 48e8975340..5160b2934f 100644 --- a/apps/openmw/mwsound/sound.hpp +++ b/apps/openmw/mwsound/sound.hpp @@ -3,7 +3,7 @@ #include -#include "sound_output.hpp" +#include "soundoutput.hpp" namespace MWSound { @@ -53,7 +53,7 @@ namespace MWSound protected: Sound_Instance mHandle = nullptr; - friend class OpenAL_Output; + friend class OpenALOutput; public: void setPosition(const osg::Vec3f& pos) { mParams.mPos = pos; } diff --git a/apps/openmw/mwsound/sound_buffer.cpp b/apps/openmw/mwsound/soundbuffer.cpp similarity index 85% rename from apps/openmw/mwsound/sound_buffer.cpp rename to apps/openmw/mwsound/soundbuffer.cpp index f28b268df2..722d89f0eb 100644 --- a/apps/openmw/mwsound/sound_buffer.cpp +++ b/apps/openmw/mwsound/soundbuffer.cpp @@ -1,4 +1,4 @@ -#include "sound_buffer.hpp" +#include "soundbuffer.hpp" #include "../mwbase/environment.hpp" #include "../mwworld/esmstore.hpp" @@ -35,7 +35,7 @@ namespace MWSound } } - SoundBufferPool::SoundBufferPool(Sound_Output& output) + SoundBufferPool::SoundBufferPool(SoundOutput& output) : mOutput(&output) , mBufferCacheMax(Settings::sound().mBufferCacheMax * 1024 * 1024) , mBufferCacheMin( @@ -48,31 +48,31 @@ namespace MWSound clear(); } - Sound_Buffer* SoundBufferPool::lookup(const ESM::RefId& soundId) const + SoundBuffer* SoundBufferPool::lookup(const ESM::RefId& soundId) const { const auto it = mBufferNameMap.find(soundId); if (it != mBufferNameMap.end()) { - Sound_Buffer* sfx = it->second; + SoundBuffer* sfx = it->second; if (sfx->getHandle() != nullptr) return sfx; } return nullptr; } - Sound_Buffer* SoundBufferPool::lookup(std::string_view fileName) const + SoundBuffer* SoundBufferPool::lookup(std::string_view fileName) const { const auto it = mBufferFileNameMap.find(std::string(fileName)); if (it != mBufferFileNameMap.end()) { - Sound_Buffer* sfx = it->second; + SoundBuffer* sfx = it->second; if (sfx->getHandle() != nullptr) return sfx; } return nullptr; } - Sound_Buffer* SoundBufferPool::loadSfx(Sound_Buffer* sfx) + SoundBuffer* SoundBufferPool::loadSfx(SoundBuffer* sfx) { if (sfx->getHandle() != nullptr) return sfx; @@ -95,7 +95,7 @@ namespace MWSound return sfx; } - Sound_Buffer* SoundBufferPool::load(const ESM::RefId& soundId) + SoundBuffer* SoundBufferPool::load(const ESM::RefId& soundId) { if (mBufferNameMap.empty()) { @@ -103,7 +103,7 @@ namespace MWSound insertSound(sound.mId, sound); } - Sound_Buffer* sfx; + SoundBuffer* sfx; const auto it = mBufferNameMap.find(soundId); if (it != mBufferNameMap.end()) sfx = it->second; @@ -118,9 +118,9 @@ namespace MWSound return loadSfx(sfx); } - Sound_Buffer* SoundBufferPool::load(std::string_view fileName) + SoundBuffer* SoundBufferPool::load(std::string_view fileName) { - Sound_Buffer* sfx; + SoundBuffer* sfx; const auto it = mBufferFileNameMap.find(std::string(fileName)); if (it != mBufferFileNameMap.end()) sfx = it->second; @@ -146,7 +146,7 @@ namespace MWSound mUnusedBuffers.clear(); } - Sound_Buffer* SoundBufferPool::insertSound(std::string_view fileName) + SoundBuffer* SoundBufferPool::insertSound(std::string_view fileName) { static const AudioParams audioParams = makeAudioParams(MWBase::Environment::get().getESMStore()->get()); @@ -158,13 +158,13 @@ namespace MWSound min = std::max(min, 1.0f); max = std::max(min, max); - Sound_Buffer& sfx = mSoundBuffers.emplace_back(fileName, volume, min, max); + SoundBuffer& sfx = mSoundBuffers.emplace_back(fileName, volume, min, max); mBufferFileNameMap.emplace(fileName, &sfx); return &sfx; } - Sound_Buffer* SoundBufferPool::insertSound(const ESM::RefId& soundId, const ESM::Sound& sound) + SoundBuffer* SoundBufferPool::insertSound(const ESM::RefId& soundId, const ESM::Sound& sound) { static const AudioParams audioParams = makeAudioParams(MWBase::Environment::get().getESMStore()->get()); @@ -183,7 +183,7 @@ namespace MWSound min = std::max(min, 1.0f); max = std::max(min, max); - Sound_Buffer& sfx = mSoundBuffers.emplace_back( + SoundBuffer& sfx = mSoundBuffers.emplace_back( Misc::ResourceHelpers::correctSoundPath(VFS::Path::Normalized(sound.mSound)), volume, min, max); mBufferNameMap.emplace(soundId, &sfx); @@ -194,7 +194,7 @@ namespace MWSound { while (!mUnusedBuffers.empty() && mBufferCacheSize > mBufferCacheMin) { - Sound_Buffer* const unused = mUnusedBuffers.back(); + SoundBuffer* const unused = mUnusedBuffers.back(); mBufferCacheSize -= mOutput->unloadSound(unused->getHandle()); unused->mHandle = nullptr; diff --git a/apps/openmw/mwsound/sound_buffer.hpp b/apps/openmw/mwsound/soundbuffer.hpp similarity index 68% rename from apps/openmw/mwsound/sound_buffer.hpp rename to apps/openmw/mwsound/soundbuffer.hpp index 7de6dab9ae..f7e7639b2d 100644 --- a/apps/openmw/mwsound/sound_buffer.hpp +++ b/apps/openmw/mwsound/soundbuffer.hpp @@ -1,14 +1,15 @@ -#ifndef GAME_SOUND_SOUND_BUFFER_H -#define GAME_SOUND_SOUND_BUFFER_H +#ifndef GAME_SOUND_SOUNDBUFFER_H +#define GAME_SOUND_SOUNDBUFFER_H #include #include #include #include -#include "sound_output.hpp" #include +#include "soundoutput.hpp" + namespace ESM { struct Sound; @@ -23,11 +24,11 @@ namespace MWSound { class SoundBufferPool; - class Sound_Buffer + class SoundBuffer { public: template - Sound_Buffer(T&& resname, float volume, float mindist, float maxdist) + SoundBuffer(T&& resname, float volume, float mindist, float maxdist) : mResourceName(std::forward(resname)) , mVolume(volume) , mMinDist(mindist) @@ -59,7 +60,7 @@ namespace MWSound class SoundBufferPool { public: - SoundBufferPool(Sound_Output& output); + SoundBufferPool(SoundOutput& output); SoundBufferPool(const SoundBufferPool&) = delete; @@ -67,20 +68,20 @@ namespace MWSound /// Lookup a soundId for its sound data (resource name, local volume, /// minRange, and maxRange) - Sound_Buffer* lookup(const ESM::RefId& soundId) const; + SoundBuffer* lookup(const ESM::RefId& soundId) const; /// Lookup a sound by file name for its sound data (resource name, local volume, /// minRange, and maxRange) - Sound_Buffer* lookup(std::string_view fileName) const; + SoundBuffer* lookup(std::string_view fileName) const; /// Lookup a soundId for its sound data (resource name, local volume, /// minRange, and maxRange), and ensure it's ready for use. - Sound_Buffer* load(const ESM::RefId& soundId); + SoundBuffer* load(const ESM::RefId& soundId); // Lookup for a sound by file name, and ensure it's ready for use. - Sound_Buffer* load(std::string_view fileName); + SoundBuffer* load(std::string_view fileName); - void use(Sound_Buffer& sfx) + void use(SoundBuffer& sfx) { if (sfx.mUses++ == 0) { @@ -90,7 +91,7 @@ namespace MWSound } } - void release(Sound_Buffer& sfx) + void release(SoundBuffer& sfx) { if (--sfx.mUses == 0) mUnusedBuffers.push_front(&sfx); @@ -99,23 +100,23 @@ namespace MWSound void clear(); private: - Sound_Buffer* loadSfx(Sound_Buffer* sfx); + SoundBuffer* loadSfx(SoundBuffer* sfx); - Sound_Output* mOutput; - std::deque mSoundBuffers; - std::unordered_map mBufferNameMap; - std::unordered_map mBufferFileNameMap; + SoundOutput* mOutput; + std::deque mSoundBuffers; + std::unordered_map mBufferNameMap; + std::unordered_map mBufferFileNameMap; std::size_t mBufferCacheMax; std::size_t mBufferCacheMin; std::size_t mBufferCacheSize = 0; // NOTE: unused buffers are stored in front-newest order. - std::deque mUnusedBuffers; + std::deque mUnusedBuffers; - inline Sound_Buffer* insertSound(const ESM::RefId& soundId, const ESM::Sound& sound); - inline Sound_Buffer* insertSound(std::string_view fileName); + inline SoundBuffer* insertSound(const ESM::RefId& soundId, const ESM::Sound& sound); + inline SoundBuffer* insertSound(std::string_view fileName); inline void unloadUnused(); }; } -#endif /* GAME_SOUND_SOUND_BUFFER_H */ +#endif /* GAME_SOUND_SOUNDBUFFER_H */ diff --git a/apps/openmw/mwsound/sound_decoder.hpp b/apps/openmw/mwsound/sounddecoder.hpp similarity index 80% rename from apps/openmw/mwsound/sound_decoder.hpp rename to apps/openmw/mwsound/sounddecoder.hpp index 17f9d28909..675fad4197 100644 --- a/apps/openmw/mwsound/sound_decoder.hpp +++ b/apps/openmw/mwsound/sounddecoder.hpp @@ -1,5 +1,5 @@ -#ifndef GAME_SOUND_SOUND_DECODER_H -#define GAME_SOUND_SOUND_DECODER_H +#ifndef GAME_SOUND_SOUNDDECODER_H +#define GAME_SOUND_SOUNDDECODER_H #include @@ -34,7 +34,7 @@ namespace MWSound size_t framesToBytes(size_t frames, ChannelConfig config, SampleType type); size_t bytesToFrames(size_t bytes, ChannelConfig config, SampleType type); - struct Sound_Decoder + struct SoundDecoder { const VFS::Manager* mResourceMgr; @@ -48,15 +48,15 @@ namespace MWSound virtual void readAll(std::vector& output); virtual size_t getSampleOffset() = 0; - Sound_Decoder(const VFS::Manager* resourceMgr) + SoundDecoder(const VFS::Manager* resourceMgr) : mResourceMgr(resourceMgr) { } - virtual ~Sound_Decoder() {} + virtual ~SoundDecoder() {} private: - Sound_Decoder(const Sound_Decoder& rhs); - Sound_Decoder& operator=(const Sound_Decoder& rhs); + SoundDecoder(const SoundDecoder& rhs); + SoundDecoder& operator=(const SoundDecoder& rhs); }; } diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index 1d9a6d457c..66bdfbdbfa 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -26,12 +26,12 @@ #include "../mwmechanics/actorutil.hpp" #include "constants.hpp" -#include "ffmpeg_decoder.hpp" -#include "openal_output.hpp" +#include "ffmpegdecoder.hpp" +#include "openaloutput.hpp" #include "sound.hpp" -#include "sound_buffer.hpp" -#include "sound_decoder.hpp" -#include "sound_output.hpp" +#include "soundbuffer.hpp" +#include "sounddecoder.hpp" +#include "soundoutput.hpp" namespace MWSound { @@ -57,7 +57,7 @@ namespace MWSound return settings; } - float initialFadeVolume(float squaredDist, Sound_Buffer* sfx, Type type, PlayMode mode) + float initialFadeVolume(float squaredDist, SoundBuffer* sfx, Type type, PlayMode mode) { // If a sound is farther away than its maximum distance, start playing it with a zero fade volume. // It can still become audible once the player moves closer. @@ -111,7 +111,7 @@ namespace MWSound SoundManager::SoundManager(const VFS::Manager* vfs, bool useSound) : mVFS(vfs) - , mOutput(std::make_unique(*this)) + , mOutput(std::make_unique(*this)) , mWaterSoundUpdater(makeWaterSoundUpdaterSettings()) , mSoundBuffers(*mOutput) , mMusicType(MWSound::MusicType::Normal) @@ -169,7 +169,7 @@ namespace MWSound // Return a new decoder instance, used as needed by the output implementations DecoderPtr SoundManager::getDecoder() { - return std::make_shared(mVFS); + return std::make_shared(mVFS); } DecoderPtr SoundManager::loadVoice(VFS::Path::NormalizedView voicefile) @@ -459,7 +459,7 @@ namespace MWSound return false; } - Sound* SoundManager::playSound(Sound_Buffer* sfx, float volume, float pitch, Type type, PlayMode mode, float offset) + Sound* SoundManager::playSound(SoundBuffer* sfx, float volume, float pitch, Type type, PlayMode mode, float offset) { if (!mOutput->isInitialized()) return nullptr; @@ -495,7 +495,7 @@ namespace MWSound if (!mVFS->exists(normalizedName)) return nullptr; - Sound_Buffer* sfx = mSoundBuffers.load(normalizedName); + SoundBuffer* sfx = mSoundBuffers.load(normalizedName); if (!sfx) return nullptr; @@ -508,14 +508,14 @@ namespace MWSound if (!mOutput->isInitialized()) return nullptr; - Sound_Buffer* sfx = mSoundBuffers.load(soundId); + SoundBuffer* sfx = mSoundBuffers.load(soundId); if (!sfx) return nullptr; return playSound(sfx, volume, pitch, type, mode, offset); } - Sound* SoundManager::playSound3D(const MWWorld::ConstPtr& ptr, Sound_Buffer* sfx, float volume, float pitch, + Sound* SoundManager::playSound3D(const MWWorld::ConstPtr& ptr, SoundBuffer* sfx, float volume, float pitch, Type type, PlayMode mode, float offset) { if (!mOutput->isInitialized()) @@ -576,7 +576,7 @@ namespace MWSound return nullptr; // Look up the sound in the ESM data - Sound_Buffer* sfx = mSoundBuffers.load(soundId); + SoundBuffer* sfx = mSoundBuffers.load(soundId); if (!sfx) return nullptr; @@ -594,7 +594,7 @@ namespace MWSound if (!mVFS->exists(normalizedName)) return nullptr; - Sound_Buffer* sfx = mSoundBuffers.load(normalizedName); + SoundBuffer* sfx = mSoundBuffers.load(normalizedName); if (!sfx) return nullptr; @@ -608,7 +608,7 @@ namespace MWSound return nullptr; // Look up the sound in the ESM data - Sound_Buffer* sfx = mSoundBuffers.load(soundId); + SoundBuffer* sfx = mSoundBuffers.load(soundId); if (!sfx) return nullptr; @@ -642,7 +642,7 @@ namespace MWSound mOutput->finishSound(sound); } - void SoundManager::stopSound(Sound_Buffer* sfx, const MWWorld::ConstPtr& ptr) + void SoundManager::stopSound(SoundBuffer* sfx, const MWWorld::ConstPtr& ptr) { SoundMap::iterator snditer = mActiveSounds.find(ptr.mRef); if (snditer != mActiveSounds.end()) @@ -660,7 +660,7 @@ namespace MWSound if (!mOutput->isInitialized()) return; - Sound_Buffer* sfx = mSoundBuffers.lookup(soundId); + SoundBuffer* sfx = mSoundBuffers.lookup(soundId); if (!sfx) return; @@ -673,7 +673,7 @@ namespace MWSound return; std::string normalizedName = VFS::Path::normalizeFilename(fileName); - Sound_Buffer* sfx = mSoundBuffers.lookup(normalizedName); + SoundBuffer* sfx = mSoundBuffers.lookup(normalizedName); if (!sfx) return; @@ -725,7 +725,7 @@ namespace MWSound SoundMap::iterator snditer = mActiveSounds.find(ptr.mRef); if (snditer != mActiveSounds.end()) { - Sound_Buffer* sfx = mSoundBuffers.lookup(soundId); + SoundBuffer* sfx = mSoundBuffers.lookup(soundId); if (sfx == nullptr) return; for (SoundBufferRefPair& sndbuf : snditer->second.mList) @@ -743,7 +743,7 @@ namespace MWSound SoundMap::const_iterator snditer = mActiveSounds.find(ptr.mRef); if (snditer != mActiveSounds.end()) { - Sound_Buffer* sfx = mSoundBuffers.lookup(normalizedName); + SoundBuffer* sfx = mSoundBuffers.lookup(normalizedName); if (!sfx) return false; @@ -761,7 +761,7 @@ namespace MWSound SoundMap::const_iterator snditer = mActiveSounds.find(ptr.mRef); if (snditer != mActiveSounds.end()) { - Sound_Buffer* sfx = mSoundBuffers.lookup(soundId); + SoundBuffer* sfx = mSoundBuffers.lookup(soundId); if (!sfx) return false; @@ -846,7 +846,7 @@ namespace MWSound const auto update = mWaterSoundUpdater.update(player, *world); WaterSoundAction action; - Sound_Buffer* sfx; + SoundBuffer* sfx; std::tie(action, sfx) = getWaterSoundAction(update, curcell); switch (action) @@ -870,7 +870,7 @@ namespace MWSound mLastCell = curcell; } - std::pair SoundManager::getWaterSoundAction( + std::pair SoundManager::getWaterSoundAction( const WaterSoundUpdate& update, const MWWorld::Cell* cell) const { if (mNearWaterSound) @@ -880,7 +880,7 @@ namespace MWSound bool soundIdChanged = false; - Sound_Buffer* sfx = mSoundBuffers.lookup(update.mId); + SoundBuffer* sfx = mSoundBuffers.lookup(update.mId); if (mLastCell != cell) { const auto snditer = mActiveSounds.find(nullptr); @@ -1168,7 +1168,7 @@ namespace MWSound // Default readAll implementation, for decoders that can't do anything // better - void Sound_Decoder::readAll(std::vector& output) + void SoundDecoder::readAll(std::vector& output) { size_t total = output.size(); size_t got; diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index a5e5b2c45f..8fc7e6701f 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -15,7 +15,7 @@ #include "../mwbase/soundmanager.hpp" #include "regionsoundselector.hpp" -#include "sound_buffer.hpp" +#include "soundbuffer.hpp" #include "type.hpp" #include "watersoundupdater.hpp" @@ -37,8 +37,8 @@ namespace MWWorld namespace MWSound { - class Sound_Output; - struct Sound_Decoder; + class SoundOutput; + struct SoundDecoder; class SoundBase; class Sound; class Stream; @@ -50,7 +50,7 @@ namespace MWSound { const VFS::Manager* mVFS; - std::unique_ptr mOutput; + std::unique_ptr mOutput; WaterSoundUpdater mWaterSoundUpdater; @@ -60,7 +60,7 @@ namespace MWSound Misc::ObjectPool mStreams; - typedef std::pair SoundBufferRefPair; + typedef std::pair SoundBufferRefPair; typedef std::vector SoundBufferRefPairList; struct ActiveSound @@ -109,7 +109,7 @@ namespace MWSound Sound* mCurrentRegionSound; - Sound_Buffer* insertSound(const std::string& soundId, const ESM::Sound* sound); + SoundBuffer* insertSound(const std::string& soundId, const ESM::Sound* sound); // returns a decoder to start streaming, or nullptr if the sound was not found DecoderPtr loadVoice(VFS::Path::NormalizedView voicefile); @@ -126,9 +126,9 @@ namespace MWSound bool remove3DSoundAtDistance(PlayMode mode, const MWWorld::ConstPtr& ptr) const; - Sound* playSound(Sound_Buffer* sfx, float volume, float pitch, Type type = Type::Sfx, + Sound* playSound(SoundBuffer* sfx, float volume, float pitch, Type type = Type::Sfx, PlayMode mode = PlayMode::Normal, float offset = 0); - Sound* playSound3D(const MWWorld::ConstPtr& ptr, Sound_Buffer* sfx, float volume, float pitch, Type type, + Sound* playSound3D(const MWWorld::ConstPtr& ptr, SoundBuffer* sfx, float volume, float pitch, Type type, PlayMode mode, float offset); void updateSounds(float duration); @@ -144,7 +144,7 @@ namespace MWSound PlaySound, }; - std::pair getWaterSoundAction( + std::pair getWaterSoundAction( const WaterSoundUpdate& update, const MWWorld::Cell* cell) const; SoundManager(const SoundManager& rhs); @@ -152,9 +152,9 @@ namespace MWSound protected: DecoderPtr getDecoder(); - friend class OpenAL_Output; + friend class OpenALOutput; - void stopSound(Sound_Buffer* sfx, const MWWorld::ConstPtr& ptr); + void stopSound(SoundBuffer* sfx, const MWWorld::ConstPtr& ptr); ///< Stop the given object from playing given sound buffer. public: diff --git a/apps/openmw/mwsound/sound_output.hpp b/apps/openmw/mwsound/soundoutput.hpp similarity index 88% rename from apps/openmw/mwsound/sound_output.hpp rename to apps/openmw/mwsound/soundoutput.hpp index 5a77124985..e5c266b204 100644 --- a/apps/openmw/mwsound/sound_output.hpp +++ b/apps/openmw/mwsound/soundoutput.hpp @@ -1,5 +1,5 @@ -#ifndef GAME_SOUND_SOUND_OUTPUT_H -#define GAME_SOUND_SOUND_OUTPUT_H +#ifndef GAME_SOUND_SOUNDOUTPUT_H +#define GAME_SOUND_SOUNDOUTPUT_H #include #include @@ -13,7 +13,7 @@ namespace MWSound { class SoundManager; - struct Sound_Decoder; + struct SoundDecoder; class Sound; class Stream; @@ -30,7 +30,7 @@ namespace MWSound using HrtfMode = Settings::HrtfMode; - class Sound_Output + class SoundOutput { SoundManager& mManager; @@ -71,24 +71,24 @@ namespace MWSound virtual void pauseActiveDevice() = 0; virtual void resumeActiveDevice() = 0; - Sound_Output& operator=(const Sound_Output& rhs); - Sound_Output(const Sound_Output& rhs); + SoundOutput& operator=(const SoundOutput& rhs); + SoundOutput(const SoundOutput& rhs); protected: bool mInitialized; - Sound_Output(SoundManager& mgr) + SoundOutput(SoundManager& mgr) : mManager(mgr) , mInitialized(false) { } public: - virtual ~Sound_Output() {} + virtual ~SoundOutput() {} bool isInitialized() const { return mInitialized; } - friend class OpenAL_Output; + friend class OpenALOutput; friend class SoundManager; friend class SoundBufferPool; }; From cf7e276a6ae066464720ca2f00a1d573ec28c2b2 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 23:52:17 +0300 Subject: [PATCH 13/13] Remove file name exceptions (#7249) --- CI/check_file_names.sh | 3 +-- CI/file_name_exceptions.txt | 0 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 CI/file_name_exceptions.txt diff --git a/CI/check_file_names.sh b/CI/check_file_names.sh index b04416659e..2a0f421cc9 100755 --- a/CI/check_file_names.sh +++ b/CI/check_file_names.sh @@ -1,7 +1,6 @@ #!/bin/bash -ex git ls-files -- ':(exclude)extern/' '*.cpp' '*.hpp' '*.h' | - grep -vP '/[a-z0-9]+\.(cpp|hpp|h)$' | - grep -vFf CI/file_name_exceptions.txt && + grep -vP '/[a-z0-9]+\.(cpp|hpp|h)$' && ( echo 'File names do not follow the naming convention, see https://wiki.openmw.org/index.php?title=Naming_Conventions#Files'; exit -1 ) exit 0 diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt deleted file mode 100644 index e69de29bb2..0000000000