summaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2024-01-06 12:22:17 +1300
committerBen Bridle <bridle.benjamin@gmail.com>2024-01-06 12:22:17 +1300
commit03023ea0aa987ec7bbcf2ca5019a1db2dedc3493 (patch)
tree7d18bbbc400494b522a1b749bae70635e53bffe4 /Cargo.lock
parent4735200272ac8a8165bd43784a41ca5b3725bc16 (diff)
downloadbedrock-pc-03023ea0aa987ec7bbcf2ca5019a1db2dedc3493.zip
Make orthogonal line drawing operations work with signed coordinates
The vector line drawing operation of the screen device uses optimised methods when drawing horizontal and vertical lines. The emulator now interprets the coordinates of these lines as signed values, to allow for the correct rendering of orthogonal lines where the coordinates of the left or top edges are off-screen. Diagonal lines are yet to be tackled. The bounding-box calculations shared by the rectangle and orthogonal line drawing methods have also been split off into their own method, significantly reducing the code duplication between all four of the methods which require this functionality. This commit also makes aesthetic changes to the code in the draw_diagonal_line method to improve readability and brevity, as a part of the changes made to the draw_line method when the points parameter was removed from each of the three lower line-drawing methods.
Diffstat (limited to 'Cargo.lock')
0 files changed, 0 insertions, 0 deletions