From 38653197628b29dbb90687cc9e2e3434b5b6f65c Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:31:58 +0100 Subject: [PATCH 1/9] headers: PencilRenderCore::currentX and currentY are int setupPencil (0x00468C80) stores the clipped left and top into them (mov [ebp + 0x10], edi and mov [ebp + 0x14], edx at 0x00468D8A / 0x00468D8D) after signed clamps (test edi, edi; jge at 0x00468C9F; cmp edi, 0xFD8; jl at 0x00468CB8). drawPixelPattern4x4OverWholeScreen (0x004712E0) steps both over the screen and compares them signed with the resolution (jl at 0x0047132B for currentX, at 0x00471339 for currentY), and passes them to drawPixelPattern4x4(int drawX, int drawY). With dword the loops need (int) casts to keep the jl. No function on main uses either field. Co-Authored-By: Claude Opus 5.5 --- src/OpenSHC/UI/Rendering/PencilRenderCore.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp b/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp index e7551c8369..060d66f999 100644 --- a/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp @@ -30,8 +30,8 @@ namespace UI { ushort* surfacePtr; // 0x00000004 length: 4 dword horizontalByteSize; // 0x00000008 length: 4 RenderTargetInt surfaceTarget; // 0x0000000C length: 4 - dword currentX; // 0x00000010 length: 4 - dword currentY; // 0x00000014 length: 4 + int currentX; // 0x00000010 length: 4 + int currentY; // 0x00000014 length: 4 dword field_0x18; // 0x00000018 length: 4 dword field_0x1c; // 0x0000001C length: 4 dword moveDirectionXUnk_0x20; // 0x00000020 length: 4 From 3871ce2301f239ecbafd18ee5af984f8a3b78dfd Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:49:12 +0100 Subject: [PATCH 2/9] headers: PencilRenderCore::moveDirectionXUnk_0x20 and moveDirectionYUnk_0x24 are int setupPencil (0x00468C80) sets both to +1 or -1: xor ecx, ecx; cmp edi, esi; setle cl; lea ecx, [ecx + ecx - 1]; mov [ebp + 0x20], ecx at 0x00468D83-0x00468D94, and the same from the top / bottom compare into +0x24 at 0x00468D97-0x00468DA4. The two Bresenham functions add them to currentX / currentY, which are int. No function on main uses either field. Co-Authored-By: Claude Opus 5.5 --- src/OpenSHC/UI/Rendering/PencilRenderCore.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp b/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp index 060d66f999..6182457854 100644 --- a/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp @@ -34,8 +34,8 @@ namespace UI { int currentY; // 0x00000014 length: 4 dword field_0x18; // 0x00000018 length: 4 dword field_0x1c; // 0x0000001C length: 4 - dword moveDirectionXUnk_0x20; // 0x00000020 length: 4 - dword moveDirectionYUnk_0x24; // 0x00000024 length: 4 + int moveDirectionXUnk_0x20; // 0x00000020 length: 4 + int moveDirectionYUnk_0x24; // 0x00000024 length: 4 int currentWidth_0x28; // 0x00000028 length: 4 int currentHeight_0x2c; // 0x0000002C length: 4 dword drawStartX; // 0x00000030 length: 4 From 2dbac2d722d9cdb6a98e052d0d808cbc5045ff4e Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:49:12 +0100 Subject: [PATCH 3/9] headers: PencilRenderCore::drawStartX/Y and drawEndX/Y are int setupPencil (0x00468C80) clamps left, top, right and bottom with signed compares (test edi, edi; jge at 0x00468C9F; cmp edi, 0xFD8; jl at 0x00468CB8, and the same for the others), then stores the smaller of left / right into drawStartX and the larger into drawEndX after a signed jle (0x00468D9E-0x00468DB4), and the same for top / bottom into drawStartY / drawEndY (0x00468DB7-0x00468DD2). No function on main uses these fields; gynt's open #294 casts them to (int), and those casts become no-ops with this. Co-Authored-By: Claude Opus 5.5 --- src/OpenSHC/UI/Rendering/PencilRenderCore.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp b/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp index 6182457854..3662c6c609 100644 --- a/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore.hpp @@ -38,10 +38,10 @@ namespace UI { int moveDirectionYUnk_0x24; // 0x00000024 length: 4 int currentWidth_0x28; // 0x00000028 length: 4 int currentHeight_0x2c; // 0x0000002C length: 4 - dword drawStartX; // 0x00000030 length: 4 - dword drawStartY; // 0x00000034 length: 4 - dword drawEndX; // 0x00000038 length: 4 - dword drawEndY; // 0x0000003C length: 4 + int drawStartX; // 0x00000030 length: 4 + int drawStartY; // 0x00000034 length: 4 + int drawEndX; // 0x00000038 length: 4 + int drawEndY; // 0x0000003C length: 4 ushort drawColor; // 0x00000040 length: 2 private: From 6eb84856cd270439cda767018b545cbe23d4d5cb Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:31:58 +0100 Subject: [PATCH 4/9] reimplement: SHC_3BB0A8C1_0x00470E90 100.0% Reimplemented PencilRenderCore::drawColorBox, gynt's draft from his fork's reimpl/UI-Rendering-development (63cc49fb3; 96.3% "asm differs" there; his closed #255 had an older form). The box is set up with setupPencil and then filled with drawHorizontalLine row by row from the top. The original decrements the remaining height before it moves drawStartY down; the draft's for loop (height in the increment, drawStartY in the body) did it the other way round, which was the whole gap. Now both go in the for's step, --currentHeight_0x2c, ++drawStartY, in the original's order. Also: an early return when setupPencil reports nothing to draw, in place of the BOOLEnum local and the != FALSE test, and the unused includes and using dropped. quick_diff 1.0000; reccmp 100.0%. Co-authored-by: Gynt Co-Authored-By: Claude Opus 5.5 --- .../PencilRenderCore/drawColorBox.cpp | 22 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/UI/Rendering/PencilRenderCore/drawColorBox.cpp diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawColorBox.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawColorBox.cpp new file mode 100644 index 0000000000..b738c5b1fb --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawColorBox.cpp @@ -0,0 +1,22 @@ +#include "../PencilRenderCore.func.hpp" + +namespace OpenSHC { +namespace UI { + namespace Rendering { + + // FUNCTION: STRONGHOLDCRUSADER 0x00470E90 + void PencilRenderCore::drawColorBox(int left, int top, int right, int bottom, ushort color) + { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::setupPencilSurface, this)(); + if (!MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::setupPencil, this)( + left, top, right, bottom, color)) { + return; + } + for (; this->currentHeight_0x2c >= 0; --this->currentHeight_0x2c, ++this->drawStartY) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHorizontalLine, this)(); + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 6e036f9340..be6a7b3ed2 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -21265,7 +21265,7 @@ SHC_3BB0A8C1_0x00470B30 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00470BC0 | 100.0% | Reimplemented, requires SHC_3BB0A8C1_0x0046CCD0 to be active -SHC_3BB0A8C1_0x00470E90 | 0.0% | Pending +SHC_3BB0A8C1_0x00470E90 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00470EE0 | 0.0% | Pending From 019754a8c8e9535d60192f1d274507780bf49f29 Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:31:59 +0100 Subject: [PATCH 5/9] reimplement: SHC_3BB0A8C1_0x00471050 100.0% Reimplemented PencilRenderCore::dimBox, gynt's draft from his fork's reimpl/UI-Rendering-development (63cc49fb3; 96.3% "asm differs" there; his closed #255 had an older form). The box is set up with setupPencil and then darkened with dimHorizontalLine row by row from the top. The original decrements the remaining height before it moves drawStartY down; the draft's for loop (height in the increment, drawStartY in the body) did it the other way round, which was the whole gap. Now both go in the for's step, --currentHeight_0x2c, ++drawStartY, in the original's order. Also: an early return when setupPencil reports nothing to draw, in place of the BOOLEnum local and the != FALSE test, and the unused includes and using dropped. quick_diff 1.0000; reccmp 100.0%. Co-authored-by: Gynt Co-Authored-By: Claude Opus 5.5 --- .../UI/Rendering/PencilRenderCore/dimBox.cpp | 22 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/UI/Rendering/PencilRenderCore/dimBox.cpp diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/dimBox.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/dimBox.cpp new file mode 100644 index 0000000000..c02d7a8a3e --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/dimBox.cpp @@ -0,0 +1,22 @@ +#include "../PencilRenderCore.func.hpp" + +namespace OpenSHC { +namespace UI { + namespace Rendering { + + // FUNCTION: STRONGHOLDCRUSADER 0x00471050 + void PencilRenderCore::dimBox(int left, int top, int right, int bottom) + { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::setupPencilSurface, this)(); + if (!MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::setupPencil, this)( + left, top, right, bottom, 0)) { + return; + } + for (; this->currentHeight_0x2c >= 0; --this->currentHeight_0x2c, ++this->drawStartY) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::dimHorizontalLine, this)(); + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index be6a7b3ed2..028fc30cef 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -21273,7 +21273,7 @@ SHC_3BB0A8C1_0x00470FC0 | 0.0% | Pending SHC_3BB0A8C1_0x00471000 | 0.0% | Pending -SHC_3BB0A8C1_0x00471050 | 0.0% | Pending +SHC_3BB0A8C1_0x00471050 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004710A0 | 0.0% | Pending From f395669671845be106fadf0d84cac66ad72a7c59 Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:31:59 +0100 Subject: [PATCH 6/9] reimplement: SHC_3BB0A8C1_0x004712E0 100.0% Reimplemented PencilRenderCore::drawPixelPattern4x4OverWholeScreen, gynt's draft from his fork's reimpl/UI-Rendering-development (63cc49fb3; 93.1% "asm differs" there; his closed #255 had an older form). It tiles the 4x4 pixel pattern over the whole screen, keeping the position in currentX / currentY. The draft's do-while loops behind if guards become two for loops over the fields, which put the inner compare's load in the original's register (quick_diff 0.7857 -> 0.9643; the rest is ret / ret 0). With currentX and currentY int (the header commit before this one) the (int) casts go. reccmp 100.0%. Co-authored-by: Gynt Co-Authored-By: Claude Opus 5.5 --- .../drawPixelPattern4x4OverWholeScreen.cpp | 26 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/UI/Rendering/PencilRenderCore/drawPixelPattern4x4OverWholeScreen.cpp diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawPixelPattern4x4OverWholeScreen.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawPixelPattern4x4OverWholeScreen.cpp new file mode 100644 index 0000000000..e35093dceb --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawPixelPattern4x4OverWholeScreen.cpp @@ -0,0 +1,26 @@ +#include "../PencilRenderCore.func.hpp" + +#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp" + +namespace OpenSHC { +namespace UI { + namespace Rendering { + + // FUNCTION: STRONGHOLDCRUSADER 0x004712E0 + void PencilRenderCore::drawPixelPattern4x4OverWholeScreen() + { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::setupPencilSurface, this)(); + // The 4x4 pattern tiled over the whole screen + for (this->currentY = 0; this->currentY < DAT_WindowAndDirectDraw::instance.resolutionY; + this->currentY += 4) { + for (this->currentX = 0; this->currentX < DAT_WindowAndDirectDraw::instance.resolutionX; + this->currentX += 4) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawPixelPattern4x4, this)( + this->currentX, this->currentY); + } + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 028fc30cef..dbfcc47810 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -21283,7 +21283,7 @@ SHC_3BB0A8C1_0x00471220 | 0.0% | Pending SHC_3BB0A8C1_0x00471280 | 0.0% | Pending -SHC_3BB0A8C1_0x004712E0 | 0.0% | Pending +SHC_3BB0A8C1_0x004712E0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00471340 | 0.0% | Pending From 558421d0bd51bc868caf41e2c19c98bad18448aa Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:32:00 +0100 Subject: [PATCH 7/9] reimplement: SHC_3BB0A8C1_0x00471280 100.0% Reimplemented PencilRenderCore::drawDiagonalWiderThanHighUnk, gynt's draft from his fork's reimpl/UI-Rendering-development (63cc49fb3; 44.8% "asm differs" there; his closed #255 had an older form), rewritten from the binary. A Bresenham line for the mostly horizontal case: one pixel per step along x (currentWidth_0x28 counts down), with a step along y as well while the error term is positive. The error term starts at 2 * height - width and grows by 2 * height on a straight step and by 2 * (height - width) on a diagonal one (straightStep and diagonalStep), as the original keeps them (ebx, ebp, edi). The draft did the same, but moved x once after the if, where the original moves it in each arm (once after the if: quick_diff 0.9722 -> 0.8286), and kept its iVar locals. quick_diff leaves only ret / ret 0; reccmp 100.0%. Co-authored-by: Gynt Co-Authored-By: Claude Opus 5.5 --- .../drawDiagonalWiderThanHighUnk.cpp | 29 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp new file mode 100644 index 0000000000..a21b056173 --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp @@ -0,0 +1,29 @@ +#include "../PencilRenderCore.func.hpp" + +namespace OpenSHC { +namespace UI { + namespace Rendering { + + // FUNCTION: STRONGHOLDCRUSADER 0x00471280 + void PencilRenderCore::drawDiagonalWiderThanHighUnk() + { + // Bresenham, the major axis moved in each arm (moved once after the if: quick_diff 0.9722 -> 0.8286) + int const straightStep = this->currentHeight_0x2c * 2; + int const diagonalStep = straightStep - this->currentWidth_0x28 * 2; + int error = straightStep - this->currentWidth_0x28; + for (; this->currentWidth_0x28 >= 0; --this->currentWidth_0x28) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawCurrentPixel, this)(); + if (error > 0) { + this->currentX += this->moveDirectionXUnk_0x20; + this->currentY += this->moveDirectionYUnk_0x24; + error += diagonalStep; + } else { + this->currentX += this->moveDirectionXUnk_0x20; + error += straightStep; + } + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index dbfcc47810..92006d3afe 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -21281,7 +21281,7 @@ SHC_3BB0A8C1_0x004711B0 | 0.0% | Pending SHC_3BB0A8C1_0x00471220 | 0.0% | Pending -SHC_3BB0A8C1_0x00471280 | 0.0% | Pending +SHC_3BB0A8C1_0x00471280 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004712E0 | 100.0% | Reimplemented From f36055edd1138111713e7bfcae091300bf7ffcbb Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 02:32:01 +0100 Subject: [PATCH 8/9] reimplement: SHC_3BB0A8C1_0x00471220 100.0% Reimplemented PencilRenderCore::drawDiagonalHeigherThanWideUnk, gynt's draft from his fork's reimpl/UI-Rendering-development (63cc49fb3; 38.8% "asm differs" there; his closed #255 had an older form), rewritten from the binary. The same Bresenham line as drawDiagonalWiderThanHighUnk for the mostly vertical case: one pixel per step along y (currentHeight_0x2c counts down), with a step along x as well while the error term is positive; the error term starts at 2 * width - height and grows by 2 * width (straightStep) or by 2 * (width - height) (diagonalStep). The draft did the same, but moved y once after the if, where the original moves it in each arm (once after the if: quick_diff 0.9722 -> 0.8857), and kept its iVar locals. quick_diff leaves only ret / ret 0; reccmp 100.0%. Co-authored-by: Gynt Co-Authored-By: Claude Opus 5.5 --- .../drawDiagonalHeigherThanWideUnk.cpp | 29 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp new file mode 100644 index 0000000000..21678cd033 --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp @@ -0,0 +1,29 @@ +#include "../PencilRenderCore.func.hpp" + +namespace OpenSHC { +namespace UI { + namespace Rendering { + + // FUNCTION: STRONGHOLDCRUSADER 0x00471220 + void PencilRenderCore::drawDiagonalHeigherThanWideUnk() + { + // Bresenham, the major axis moved in each arm (moved once after the if: quick_diff 0.9722 -> 0.8857) + int const straightStep = this->currentWidth_0x28 * 2; + int const diagonalStep = straightStep - this->currentHeight_0x2c * 2; + int error = straightStep - this->currentHeight_0x2c; + for (; this->currentHeight_0x2c >= 0; --this->currentHeight_0x2c) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawCurrentPixel, this)(); + if (error > 0) { + this->currentX += this->moveDirectionXUnk_0x20; + this->currentY += this->moveDirectionYUnk_0x24; + error += diagonalStep; + } else { + this->currentY += this->moveDirectionYUnk_0x24; + error += straightStep; + } + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 92006d3afe..f932867514 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -21279,7 +21279,7 @@ SHC_3BB0A8C1_0x004710A0 | 0.0% | Pending SHC_3BB0A8C1_0x004711B0 | 0.0% | Pending -SHC_3BB0A8C1_0x00471220 | 0.0% | Pending +SHC_3BB0A8C1_0x00471220 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00471280 | 100.0% | Reimplemented From c04e193232de5b7f05d9b5d42ce4aa79e8c92183 Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Sat, 7 Nov 2026 20:41:35 +0100 Subject: [PATCH 9/9] PencilRenderCore: the diagonals' comments keep the why, not the measurement drawDiagonalHeigherThanWideUnk (0x00471220) and drawDiagonalWiderThanHighUnk (0x00471280) had the measurement in their comment (moving the major axis once after the if: quick_diff 0.9722 -> 0.8857 and 0.9722 -> 0.8286). The numbers go to the PR text; the comment keeps one line on why the major axis moves in each arm. Comments only, no code change. Co-authored-by: Gynt Co-Authored-By: Claude Opus 5.5 --- .../PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp | 2 +- .../Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp index 21678cd033..f8b69ea995 100644 --- a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalHeigherThanWideUnk.cpp @@ -7,7 +7,7 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00471220 void PencilRenderCore::drawDiagonalHeigherThanWideUnk() { - // Bresenham, the major axis moved in each arm (moved once after the if: quick_diff 0.9722 -> 0.8857) + // Bresenham, the major axis moved in each arm, as the original does (once after the if does not match) int const straightStep = this->currentWidth_0x28 * 2; int const diagonalStep = straightStep - this->currentHeight_0x2c * 2; int error = straightStep - this->currentHeight_0x2c; diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp index a21b056173..880061cf10 100644 --- a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawDiagonalWiderThanHighUnk.cpp @@ -7,7 +7,7 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00471280 void PencilRenderCore::drawDiagonalWiderThanHighUnk() { - // Bresenham, the major axis moved in each arm (moved once after the if: quick_diff 0.9722 -> 0.8286) + // Bresenham, the major axis moved in each arm, as the original does (once after the if does not match) int const straightStep = this->currentHeight_0x2c * 2; int const diagonalStep = straightStep - this->currentWidth_0x28 * 2; int error = straightStep - this->currentWidth_0x28;