Browse Source

Rename error -> diablo_msg

pull/6701/head
Gleb Mazovetskiy 2 years ago
parent
commit
d1d27c8368
  1. 2
      Source/CMakeLists.txt
  2. 2
      Source/control.cpp
  3. 2
      Source/debug.cpp
  4. 2
      Source/diablo.cpp
  5. 13
      Source/diablo_msg.cpp
  6. 2
      Source/diablo_msg.hpp
  7. 2
      Source/engine/render/scrollrt.cpp
  8. 2
      Source/gamemenu.cpp
  9. 2
      Source/levels/trigs.cpp
  10. 2
      Source/objects.cpp
  11. 2
      Source/qol/chatlog.cpp

2
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

2
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"

2
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"

2
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"

13
Source/error.cpp → Source/diablo_msg.cpp

@ -1,20 +1,21 @@
/**
* @file error.cpp
* @file diablo_msg.cpp
*
* Implementation of in-game message functions.
*/
#include <algorithm>
#include <cstdint>
#include <deque>
#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<MessageEntry> DiabloMessages;
uint32_t msgStartTime = 0;
std::vector<std::string> 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<int>((TextLines.size() * LineHeight()) + 42));
OuterHeight = std::max(54, static_cast<int>((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;

2
Source/error.h → Source/diablo_msg.hpp

@ -1,5 +1,5 @@
/**
* @file error.h
* @file diablo_msg.hpp
*
* Interface of in-game message functions.
*/

2
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"

2
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"

2
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"

2
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"

2
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"

Loading…
Cancel
Save