summaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'render.c')
-rw-r--r--render.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/render.c b/render.c
index e225bb6..14aa6a1 100644
--- a/render.c
+++ b/render.c
@@ -161,7 +161,7 @@ void ren_begin(Renderer* r, Colour* t, int* d, int w, int h) {
r->vp[2] = w;
r->vp[3] = h;
r->asp = (w << fbits) / h;
- r->n = 8;
+ r->n = 256;
}
void ren_end(Renderer* r) {
@@ -512,12 +512,19 @@ void ren_tri3(
const Bitmap* tex
) {
#define ec 8
-#define ec2 (ec * 2)
+#define ec2 (ec)
int tri[ec2 * 3];
int tc = 1, i;
vec_cpy(&tri[0], iv0, ec);
vec_cpy(&tri[8], iv1, ec);
vec_cpy(&tri[16], iv2, ec);
+ if (tri[2] < r->n) tri[2] = r->n;
+ if (tri[10] < r->n) tri[10] = r->n;
+ if (tri[18] < r->n) tri[18] = r->n;
+ if (
+ tri[2] == tri[10] &&
+ tri[2] == tri[18]
+ ) return;
for (i = 0; i < tc; i++) {
int ti = i * ec, j;
for (j = 0; j < 3; j++) {