From 9dd7d9cb6c03c6fceb7fd33db25fdc3bc0b8383f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 03:50:27 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Navigation/NavigationRoute.cpp, Source/UI/Party/UIRegisterPartyWnd.cpp Batch #17785 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_19614 CNavigationManager::DrawRoute: logic confirmed by peer review - fn_09300 UIRegisterPartyWnd::OnCreate: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/Navigation/NavigationRoute.cpp | 19 +++++++++---------- Source/UI/Party/UIRegisterPartyWnd.cpp | 7 ++++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/Contents/Navigation/NavigationRoute.cpp b/Source/Contents/Navigation/NavigationRoute.cpp index 2af9297b4..c29c7ddd2 100644 --- a/Source/Contents/Navigation/NavigationRoute.cpp +++ b/Source/Contents/Navigation/NavigationRoute.cpp @@ -68,7 +68,7 @@ void CNavigationManager::DrawRoute(const float* matrix) { const int lastX = last.x; const int lastY = last.y; - if (minX < lastX && lastX < maxX && minY < lastY && lastY < maxY) { + if (minX < lastX && maxX > lastX && minY < lastY && maxY > lastY) { visible = 1; std::uint32_t color; if (this->drawDestination && std::strcmp(g_session.m_navigationPlayerMap, this->data.GetInfo()->GetName()) == 0) { @@ -88,27 +88,26 @@ void CNavigationManager::DrawRoute(const float* matrix) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode && mode->scene && mode->scene->ground) { GroundGeometry* ground = mode->scene->ground; - const std::string name = FormatOwnedString("유저인터페이스\\navigation_interface3\\location%d.tga", g_locationFrame); - CTexture* texture = g_texMgr.Load(name.c_str(), 0, false, true, false); - ground->DrawTerrainOverlay(matrix, lastX, lastY, color, texture); + ground->DrawTerrainOverlay( + matrix, lastX, lastY, color, + g_texMgr.Load(FormatOwnedString("유저인터페이스\\navigation_interface3\\location%d.tga", g_locationFrame).c_str(), 0, false, true, false) + ); } } - const DWORD now = timeGetTime(); - const int blink = static_cast((now % 1000) / 100); + const int blink = static_cast(timeGetTime() % 1000 / 100); auto& points = this->movementRoute.points; if (points.size() - 1 != 0) { - CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); for (unsigned index = 0; index < points.size() - 1; index += 2) { const int x = points[index].x; const int y = points[index].y; - if (minX < x && x < maxX && minY < y && y < maxY) { + if (minX < x && maxX > x && minY < y && maxY > y) { ++visible; CTexture* texture = g_texMgr.Load(this->labels[points[index + 1].metadata].c_str(), 0, false, true, false); - constexpr float uv[8] = {0, 0, 1, 0, 0, 1, 1, 1}; + constexpr float uv[8] = {0, 0, 1, 0, 0, 1, 1, 1}; const std::uint32_t color = blink == static_cast(index) % 10 ? 0xEEFFFFFF : 0x99FFFFFF; - this->ground->DrawGridDecal(matrix, x, y, color, *texture, uv); + this->ground->DrawCellDecal(matrix, x, y, color, *texture, uv); } } } diff --git a/Source/UI/Party/UIRegisterPartyWnd.cpp b/Source/UI/Party/UIRegisterPartyWnd.cpp index 3619c78b3..3cfae26e9 100644 --- a/Source/UI/Party/UIRegisterPartyWnd.cpp +++ b/Source/UI/Party/UIRegisterPartyWnd.cpp @@ -90,7 +90,7 @@ void UIRegisterPartyWnd::OnCreate(int, int) { this->minimum->maximum = 3; this->minimum->Background(232, 232, 232); char number[10] = {}; - StringFormat(number, sizeof(number), _TRUNCATE, "%d", std::max((level - 5), 1)); + StringFormat(number, sizeof(number), _TRUNCATE, "%d", level - 5 > 1 ? level - 5 : 1); this->minimum->SetText(number); this->AddChild(this->minimum); @@ -100,8 +100,9 @@ void UIRegisterPartyWnd::OnCreate(int, int) { this->maximum->invalidatesParent = 1; this->maximum->maximum = 3; this->maximum->Background(232, 232, 232); - StringFormat(number, sizeof(number), _TRUNCATE, "%d", level + 5); - this->maximum->SetText(number); + char maximumNumber[10] = {}; + StringFormat(maximumNumber, sizeof(maximumNumber), _TRUNCATE, "%d", level + 5); + this->maximum->SetText(maximumNumber); this->AddChild(this->maximum); auto* typeLabel = new UIStaticText();