From 6d842c02c2cbd0b4071ad9fb252f3b929ec3e2ef Mon Sep 17 00:00:00 2001 From: RobotMan2412 Date: Sun, 31 Dec 2023 11:29:23 +0100 Subject: [PATCH] Fix an orientation bug --- checklist.md | 3 ++- src/pax_orientation.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/checklist.md b/checklist.md index 0f70d7d..8d3c349 100644 --- a/checklist.md +++ b/checklist.md @@ -1,12 +1,13 @@ # Pre-release checklist - [ ] All working features documented -- [x] Functions tested: +- [X] Functions tested: - [x] MCR enabled/disabled consistency. - [x] Unshaded rect, tri, line, circle, arc. - [x] Shaded rect, tri, line, circle, arc. - [x] Images - [x] Text + - [X] Orientation functions - [x] Buffer types tested: - [x] PAX_BUF_1_PAL - [x] PAX_BUF_2_PAL diff --git a/src/pax_orientation.c b/src/pax_orientation.c index 010b233..e0d305f 100644 --- a/src/pax_orientation.c +++ b/src/pax_orientation.c @@ -59,7 +59,7 @@ static inline pax_vec2f pax_orient_ccw2_flip_vec2f(pax_buf_t const *buf, pax_vec }; } -// Transforms the co-ordinates as 2x counter-clockwise rotation and flip horizontally. +// Transforms the co-ordinates as 3x counter-clockwise rotation and flip horizontally. static inline pax_vec2f pax_orient_ccw3_flip_vec2f(pax_buf_t const *buf, pax_vec2f vec) __attribute__((pure)); static inline pax_vec2f pax_orient_ccw3_flip_vec2f(pax_buf_t const *buf, pax_vec2f vec) { return (pax_vec2f){ @@ -145,7 +145,7 @@ static inline pax_rectf pax_orient_flip_rectf(pax_buf_t const *buf, pax_rectf ve static inline pax_rectf pax_orient_flip_rectf(pax_buf_t const *buf, pax_rectf vec) { return (pax_rectf){ buf->width - vec.x, - buf->height - vec.y, + vec.y, -vec.w, vec.h, };