summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-11-12 20:34:10 +0000
committerrodri <rgl@antares-labs.eu>2023-11-12 20:34:10 +0000
commit12bb819509f967381e2e3619734a4a4f953cea6d (patch)
treea4694cb2acc8ac715dc417ee52da474408230be7
parentc6710670bb88c2e72ae0c479477b8c17c05f970d (diff)
downloadtinyrend-12bb819509f967381e2e3619734a4a4f953cea6d.tar.gz
tinyrend-12bb819509f967381e2e3619734a4a4f953cea6d.tar.bz2
tinyrend-12bb819509f967381e2e3619734a4a4f953cea6d.zip
remove unnecessary cbuf2 variable.
-rw-r--r--main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/main.c b/main.c
index aa98c68..dfae9d4 100644
--- a/main.c
+++ b/main.c
@@ -391,7 +391,7 @@ modelshader(Sparams *sp)
static Point3 light = {0,0,-1,0}; /* global light field */
Point tp; /* texture point */
int i;
- uchar cbuf[4], cbuf2[4];
+ uchar cbuf[4];
double z, intensity;
verts = model->vertdata[OBJVGeometric].verts;
@@ -452,11 +452,8 @@ modelshader(Sparams *sp)
tp.x = (tt.p0.x + tt.p1.x + tt.p2.x)*Dx(modeltex->r);
tp.y = Dy(modeltex->r)-(tt.p0.y + tt.p1.y + tt.p2.y)*Dy(modeltex->r);
- unloadmemimage(modeltex, rectaddpt(Rect(0,0,1,1), tp), cbuf2, sizeof cbuf2);
cbuf[0] = 0xFF;
- cbuf[1] = cbuf2[0];
- cbuf[2] = cbuf2[1];
- cbuf[3] = cbuf2[2];
+ unloadmemimage(modeltex, rectaddpt(Rect(0,0,1,1), tp), cbuf+1, sizeof cbuf - 1);
}else{
cbuf[0] = 0xFF;
cbuf[1] = 0xFF;