Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IconTK: Simplify icon clipping logic more. Saves 15 bytes.
Same as previous commit, but for the window bounds right edge. In the preamble to the complicated icon clipping logic, the right bounds of the overlapping window is decremented by a pixel before diving in to determine how to adjust the clipping rect. After staring at the math for a bit, it turns out that it is because of how "greater than" test is done - the test was implemented as a "greater than or equals" (c/o BMI, skipping if "less than"). If the test is inverted then it can properly be a "greater than" (c/o BPL, skipping if "greater than or equal") and the decrement can be skipped and a copy further simplified. Then there's a follow-on adjustment needed as well, similar but inverted test, and a +2 becomes a +1 which makes more sense. Yay!
- Loading branch information