From 34d71ab0ca4d6baea9c6995aafa5b411e756a5fb Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 03:51:01 +0000 Subject: [PATCH] Confirm fn_17140 (UIWindowMgr::RemoveSnapRectangle) Batch #12977 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_17140 UIWindowMgr::RemoveSnapRectangle: logic confirmed by peer review (already on main) Peer-reviewed-by: aDw, cremane, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UIWindowMgr.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 94b233b5..9e2a91ac 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -2090,6 +2090,25 @@ int UIWindowMgr::TranslateHotkey(int key, int keyData) { return 4; } +// INLINED +static __forceinline std::vector MakeReplayMarker(std::int16_t tag) { + std::vector chunk(6); + *reinterpret_cast(&chunk[0]) = tag; + *reinterpret_cast(&chunk[2]) = 0; + return chunk; +} + +// INLINED +static __forceinline std::vector MakeReplayChunk(int tag, const std::vector& state) { + std::vector chunk(state.size() + 6, 0); + *reinterpret_cast(&chunk[0]) = static_cast(tag); + *reinterpret_cast(&chunk[2]) = static_cast(state.size()); + if (state.size()) { + std::memcpy(&chunk[6], state.data(), state.size()); + } + return chunk; +} + // OFFSET: 0x00AA8660 // FUNCTION: fn_17244 std::vector UIWindowMgr::SaveReplayWindows() {