From dc48f98a20d002a395cd36e4925389e1e00c1b87 Mon Sep 17 00:00:00 2001 From: cx384 Date: Fri, 28 Nov 2025 12:45:32 +0100 Subject: [PATCH] Rename hud.h/cpp to hud_element.h/cpp To prevent include conflicts --- src/CMakeLists.txt | 2 +- src/client/clientevent.h | 2 +- src/client/gameui.cpp | 2 +- src/client/hud.cpp | 2 +- src/client/hud.h | 2 +- src/client/inputhandler.cpp | 2 +- src/client/minimap.h | 2 +- src/{hud.cpp => hud_element.cpp} | 2 +- src/{hud.h => hud_element.h} | 0 src/player.cpp | 2 +- src/script/common/c_content.h | 4 ++-- src/script/lua_api/l_localplayer.cpp | 2 +- src/script/lua_api/l_object.cpp | 2 +- src/server.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) rename src/{hud.cpp => hud_element.cpp} (98%) rename src/{hud.h => hud_element.h} (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0813a11dc7..4d80af8785 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -417,7 +417,7 @@ set(independent_SRCS face_position_cache.cpp gettext_plural_form.cpp httpfetch.cpp - hud.cpp + hud_element.cpp inventory.cpp itemstackmetadata.cpp log.cpp diff --git a/src/client/clientevent.h b/src/client/clientevent.h index ca7e3efd1d..d78329317f 100644 --- a/src/client/clientevent.h +++ b/src/client/clientevent.h @@ -6,7 +6,7 @@ #include #include "irrlichttypes.h" -#include "../hud.h" // HudElementStat +#include "hud_element.h" // HudElementStat struct ParticleParameters; struct ParticleSpawnerParameters; diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index f24be123fe..72807e6200 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -14,7 +14,7 @@ #include "client.h" #include "clientmap.h" #include "fontengine.h" -#include "hud.h" // HUD_FLAG_* +#include "hud_element.h" // HUD_FLAG_* #include "nodedef.h" #include "localplayer.h" #include "profiler.h" diff --git a/src/client/hud.cpp b/src/client/hud.cpp index 1d36087f76..4155ce7cfa 100644 --- a/src/client/hud.cpp +++ b/src/client/hud.cpp @@ -4,7 +4,7 @@ // Copyright (C) 2010-2013 blue42u, Jonathon Anderson // Copyright (C) 2010-2013 kwolekr, Ryan Kwolek -#include "client/hud.h" +#include "hud.h" #include #include #include diff --git a/src/client/hud.h b/src/client/hud.h index 1cf4411deb..8e517d1a94 100644 --- a/src/client/hud.h +++ b/src/client/hud.h @@ -11,7 +11,7 @@ #include #include "irr_ptr.h" #include "irr_aabb3d.h" -#include "../hud.h" +#include "hud_element.h" class Client; class ITextureSource; diff --git a/src/client/inputhandler.cpp b/src/client/inputhandler.cpp index 9f7e0c36fe..3add475cb3 100644 --- a/src/client/inputhandler.cpp +++ b/src/client/inputhandler.cpp @@ -8,7 +8,7 @@ #include "inputhandler.h" #include "gui/mainmenumanager.h" #include "gui/touchcontrols.h" -#include "hud.h" +#include "hud_element.h" #include "log_internal.h" #include "client/renderingengine.h" diff --git a/src/client/minimap.h b/src/client/minimap.h index e7ba63e4fc..39c6a5ab14 100644 --- a/src/client/minimap.h +++ b/src/client/minimap.h @@ -10,7 +10,7 @@ #include "CMeshBuffer.h" #include "constants.h" -#include "../hud.h" +#include "hud_element.h" #include "mapnode.h" #include "util/thread.h" #include diff --git a/src/hud.cpp b/src/hud_element.cpp similarity index 98% rename from src/hud.cpp rename to src/hud_element.cpp index f7ea5077a0..6c8bd38f35 100644 --- a/src/hud.cpp +++ b/src/hud_element.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2010-2018 celeron55, Perttu Ahola -#include "hud.h" +#include "hud_element.h" const struct EnumString es_HudElementType[] = { diff --git a/src/hud.h b/src/hud_element.h similarity index 100% rename from src/hud.h rename to src/hud_element.h diff --git a/src/player.cpp b/src/player.cpp index 890a8c689b..2e8ff34bdb 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -5,7 +5,7 @@ #include "player.h" #include -#include "hud.h" +#include "hud_element.h" #include "constants.h" #include "gamedef.h" #include diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h index 1e1e649653..69419761f8 100644 --- a/src/script/common/c_content.h +++ b/src/script/common/c_content.h @@ -23,8 +23,8 @@ extern "C" { #include "itemgroup.h" #include "util/pointabilities.h" // We do an explicit path include because by default c_content.h include src/client/hud.h -// prior to the src/hud.h, which is not good on server only build -#include "../../hud.h" +// prior to the src/hud_element.h, which is not good on server only build +#include "hud_element.h" class IGameDef; class IItemDefManager; diff --git a/src/script/lua_api/l_localplayer.cpp b/src/script/lua_api/l_localplayer.cpp index 1ae53d7111..0a1cbe7304 100644 --- a/src/script/lua_api/l_localplayer.cpp +++ b/src/script/lua_api/l_localplayer.cpp @@ -7,7 +7,7 @@ #include "lua_api/l_item.h" #include "script/common/c_converter.h" #include "client/localplayer.h" -#include "hud.h" +#include "hud_element.h" #include "common/c_content.h" #include "client/content_cao.h" diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 8a0b419790..eaacc2258c 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -20,7 +20,7 @@ #include "server.h" #include "serverenvironment.h" #include "settings.h" -#include "hud.h" +#include "hud_element.h" #include "server/luaentity_sao.h" #include "server/player_sao.h" #include "server/serverinventorymgr.h" diff --git a/src/server.h b/src/server.h index b2ac5ac908..25673329d5 100644 --- a/src/server.h +++ b/src/server.h @@ -6,7 +6,7 @@ #include "irr_v3d.h" #include "map.h" -#include "hud.h" // HudElementStat +#include "hud_element.h" // HudElementStat #include "gamedef.h" #include "content/subgames.h" #include "network/peerhandler.h"