From d3728c16fbf2f4fb3dbe8cf82e89df56643f009b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 07:34:29 +0000 Subject: [PATCH] Decompile fn_08062 (CSprRes::ReduceSprite) Batch #14120 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_08062 CSprRes::ReduceSprite: logic confirmed by peer review Peer-reviewed-by: secret, Toshiro, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Resource/Sprites/SpriteEncoding.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Resource/Sprites/SpriteEncoding.cpp b/Source/Resource/Sprites/SpriteEncoding.cpp index fdf5d9ec7..f786e2e5d 100644 --- a/Source/Resource/Sprites/SpriteEncoding.cpp +++ b/Source/Resource/Sprites/SpriteEncoding.cpp @@ -56,14 +56,10 @@ std::uint8_t* CSprRes::ReduceSprite(const std::uint8_t* pixels, int width, int h const int outputWidth = halfWidth != 0 ? width / 2 : width; const int outputHeight = halfHeight != 0 ? height / 2 : height; auto* output = new std::uint8_t[outputWidth * outputHeight]; - std::uint8_t* destination = output; for (int y = 0; y < outputHeight; ++y) { - const auto* source = pixels + width * y * (halfHeight + 1); - for (int x = 0; x < outputWidth; ++x) { - *destination++ = *source; - source += halfWidth + 1; + output[y * outputWidth + x] = pixels[(halfHeight + 1) * y * width + (halfWidth + 1) * x]; } }