diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b4baa18cb..5e42d82ee 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -12,9 +12,9 @@ set(libdevilutionx_SRCS dead.cpp debug.cpp diablo.cpp + diablo_msg.cpp doom.cpp engine.cpp - error.cpp gamemenu.cpp gmenu.cpp help.cpp diff --git a/Source/control.cpp b/Source/control.cpp index 06383b873..a9dabb437 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -24,7 +24,7 @@ #include "engine/render/clx_render.hpp" #include "engine/render/text_render.hpp" #include "engine/trn.hpp" -#include "error.h" +#include "diablo_msg.hpp" #include "gamemenu.h" #include "init.h" #include "inv.h" diff --git a/Source/debug.cpp b/Source/debug.cpp index e6bc5812a..772a1a6c4 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -19,7 +19,7 @@ #include "engine/events.hpp" #include "engine/load_cel.hpp" #include "engine/point.hpp" -#include "error.h" +#include "diablo_msg.hpp" #include "inv.h" #include "levels/setmaps.h" #include "lighting.h" diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 52f772807..92af2e511 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -35,7 +35,7 @@ #include "engine/load_file.hpp" #include "engine/random.hpp" #include "engine/sound.h" -#include "error.h" +#include "diablo_msg.hpp" #include "gamemenu.h" #include "gmenu.h" #include "help.h" diff --git a/Source/error.cpp b/Source/diablo_msg.cpp similarity index 95% rename from Source/error.cpp rename to Source/diablo_msg.cpp index 9b9403eef..bf8e537a4 100644 --- a/Source/error.cpp +++ b/Source/diablo_msg.cpp @@ -1,20 +1,21 @@ /** - * @file error.cpp + * @file diablo_msg.cpp * * Implementation of in-game message functions. */ +#include #include #include -#include "error.h" +#include "diablo_msg.hpp" #include "DiabloUI/ui_flags.hpp" +#include "control.h" #include "engine/clx_sprite.hpp" #include "engine/render/clx_render.hpp" #include "engine/render/text_render.hpp" #include "panels/info_box.hpp" -#include "stores.h" #include "utils/algorithm/container.hpp" #include "utils/language.h" #include "utils/timer.hpp" @@ -31,7 +32,7 @@ struct MessageEntry { std::deque DiabloMessages; uint32_t msgStartTime = 0; std::vector TextLines; -int ErrorWindowHeight = 54; +int OuterHeight = 54; const int LineWidth = 418; int LineHeight() @@ -54,7 +55,7 @@ void InitNextLines() previous = next + 1; } - ErrorWindowHeight = std::max(54, static_cast((TextLines.size() * LineHeight()) + 42)); + OuterHeight = std::max(54, static_cast((TextLines.size() * LineHeight()) + 42)); } } // namespace @@ -175,7 +176,7 @@ void DrawDiabloMsg(const Surface &out) const int borderPartWidth = 12; const int borderPartHeight = 12; - const int outerHeight = ErrorWindowHeight; + const int outerHeight = OuterHeight; const int outerWidth = 429; const int borderThickness = 3; const int innerWidth = outerWidth - 2 * borderThickness; diff --git a/Source/error.h b/Source/diablo_msg.hpp similarity index 94% rename from Source/error.h rename to Source/diablo_msg.hpp index b939a16a4..34abaec2f 100644 --- a/Source/error.h +++ b/Source/diablo_msg.hpp @@ -1,5 +1,5 @@ /** - * @file error.h + * @file diablo_msg.hpp * * Interface of in-game message functions. */ diff --git a/Source/engine/render/scrollrt.cpp b/Source/engine/render/scrollrt.cpp index 2322ef4d4..bb6da5e89 100644 --- a/Source/engine/render/scrollrt.cpp +++ b/Source/engine/render/scrollrt.cpp @@ -21,7 +21,7 @@ #include "engine/render/text_render.hpp" #include "engine/trn.hpp" #include "engine/world_tile.hpp" -#include "error.h" +#include "diablo_msg.hpp" #include "gmenu.h" #include "help.h" #include "hwcursor.hpp" diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 940d7cab1..5ef5dc87d 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -10,7 +10,7 @@ #include "engine/events.hpp" #include "engine/sound.h" #include "engine/sound_defs.hpp" -#include "error.h" +#include "diablo_msg.hpp" #include "gmenu.h" #include "init.h" #include "loadsave.h" diff --git a/Source/levels/trigs.cpp b/Source/levels/trigs.cpp index dc3f0e5bb..e91f90b1c 100644 --- a/Source/levels/trigs.cpp +++ b/Source/levels/trigs.cpp @@ -13,7 +13,7 @@ #include "control.h" #include "controls/plrctrls.h" #include "cursor.h" -#include "error.h" +#include "diablo_msg.hpp" #include "init.h" #include "utils/algorithm/container.hpp" #include "utils/language.h" diff --git a/Source/objects.cpp b/Source/objects.cpp index 50a92a897..62cca4ec7 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -23,7 +23,7 @@ #include "engine/load_file.hpp" #include "engine/points_in_rectangle_range.hpp" #include "engine/random.hpp" -#include "error.h" +#include "diablo_msg.hpp" #include "init.h" #include "inv.h" #include "inv_iterators.hpp" diff --git a/Source/qol/chatlog.cpp b/Source/qol/chatlog.cpp index 10d725f53..cdf2cd5c1 100644 --- a/Source/qol/chatlog.cpp +++ b/Source/qol/chatlog.cpp @@ -16,7 +16,7 @@ #include "control.h" #include "doom.h" #include "engine/render/text_render.hpp" -#include "error.h" +#include "diablo_msg.hpp" #include "gamemenu.h" #include "help.h" #include "init.h"