summaryrefslogtreecommitdiff
path: root/maths.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-07-27 11:15:21 +1000
committerquou <quou@disroot.org>2024-07-27 11:17:11 +1000
commit951f6115c16c3ab482c19705344295c90af1625b (patch)
treec7b140f8ba9db86955f2352d23fa9808138fad3e /maths.c
parentd2c76fd62fa735f3d4fc3ceb55a75d6f0b2dc758 (diff)
clipping and viewport improvements.
Diffstat (limited to 'maths.c')
-rw-r--r--maths.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/maths.c b/maths.c
index 706c12b..70b354e 100644
--- a/maths.c
+++ b/maths.c
@@ -290,8 +290,8 @@ int* persp(int* v, int asp) {
}
int* ndc2clip(const int* c, int* p) {
- register int hw = c[2] >> 1;
- register int hh = c[3] >> 1;
+ register int hw = c[0] >> 1;
+ register int hh = c[1] >> 1;
p[0] = ((hw << fbits) * p[0]) >> fbits;
p[1] = ((hh << fbits) * -p[1]) >> fbits;
p[0] >>= fbits;