diff options
author | rodri <rgl@antares-labs.eu> | 2023-11-12 20:34:10 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-11-12 20:34:10 +0000 |
commit | 12bb819509f967381e2e3619734a4a4f953cea6d (patch) | |
tree | a4694cb2acc8ac715dc417ee52da474408230be7 /main.c | |
parent | c6710670bb88c2e72ae0c479477b8c17c05f970d (diff) | |
download | tinyrend-12bb819509f967381e2e3619734a4a4f953cea6d.tar.gz tinyrend-12bb819509f967381e2e3619734a4a4f953cea6d.tar.bz2 tinyrend-12bb819509f967381e2e3619734a4a4f953cea6d.zip |
remove unnecessary cbuf2 variable.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; |