Browse Source

Fix broken catacombs wall tile (#8296)

* Fix broken catacombs wall tile

When tile 15 is followed by tile 1 below, change tile 1 to tile 8
(left corner) to fix a visual glitch in the catacombs.

* Silence fmt catch warnings and guard SaveHelper copy
pull/8298/head
LP 4 months ago committed by GitHub
parent
commit
16b96e2c31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CMake/Tests.cmake
  2. 3
      Source/levels/drlg_l2.cpp
  3. 5
      Source/loadsave.cpp
  4. 2
      Source/lua/modules/log.cpp
  5. 2
      Source/utils/log.hpp

1
CMake/Tests.cmake

@ -143,6 +143,7 @@ if(DEVILUTIONX_SCREENSHOT_FORMAT STREQUAL DEVILUTIONX_SCREENSHOT_FORMAT_PNG AND
DevilutionX::SDL
GTest::gmock
GTest::gtest
fmt::fmt
tl
app_fatal_for_testing
language_for_testing

3
Source/levels/drlg_l2.cpp

@ -2064,6 +2064,9 @@ void FixTilesPatterns()
if (dungeon[i][j] == 11 && dungeon[i + 1][j] == 14) {
dungeon[i + 1][j] = 16;
}
if (dungeon[i][j] == 15 && dungeon[i][j + 1] == 1) {
dungeon[i][j + 1] = 8;
}
}
}
}

5
Source/loadsave.cpp

@ -224,7 +224,10 @@ public:
if (!IsValid(len))
return;
memcpy(&m_buffer_[m_cur_], bytes, len);
const auto *src = static_cast<const std::byte *>(bytes);
for (size_t i = 0; i < len; ++i) {
m_buffer_[m_cur_ + i] = src[i];
}
m_cur_ += len;
}

2
Source/lua/modules/log.cpp

@ -56,7 +56,7 @@ void LuaLogMessage(LogPriority priority, std::string_view fmt, sol::variadic_arg
// with an `FMT_EXCEPTIONS` check.
std::string error = e.what();
#else
FMT_CATCH(const fmt::format_error)
FMT_CATCH(const fmt::format_error &)
{
std::string error = "unknown (FMT_EXCEPTIONS disabled)";
#endif

2
Source/utils/log.hpp

@ -62,7 +62,7 @@ std::string format(std::string_view fmt, Args &&...args)
// with an `FMT_EXCEPTIONS` check.
std::string error = e.what();
#else
FMT_CATCH(const fmt::format_error)
FMT_CATCH(const fmt::format_error &)
{
std::string error = "unknown (FMT_EXCEPTIONS disabled)";
#endif

Loading…
Cancel
Save