summaryrefslogtreecommitdiff
path: root/src/graphics/Renderer.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-09-19 01:11:34 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-25 18:50:14 (GMT)
commit4be80a3c7c84ba8dea5984609b33c0acd08bdc55 (patch)
tree594d7b0345a05f3c49ef37c860133da7a02f1492 /src/graphics/Renderer.cpp
parent640a61b3b44a4b4232790a6a3d1acff0edb2c3f4 (diff)
downloadpowder-4be80a3c7c84ba8dea5984609b33c0acd08bdc55.zip
powder-4be80a3c7c84ba8dea5984609b33c0acd08bdc55.tar.gz
Fix crash - uninitialized (and not needed) variable
Diffstat (limited to 'src/graphics/Renderer.cpp')
-rw-r--r--src/graphics/Renderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp
index 7d5f28b..de51562 100644
--- a/src/graphics/Renderer.cpp
+++ b/src/graphics/Renderer.cpp
@@ -518,7 +518,7 @@ wall_type * Renderer_wtypes = LoadWalls(Renderer_wtypesCount);
VideoBuffer * Renderer::WallIcon(int wallID, int width, int height)
{
- int x, y, i, j, cr, cg, cb;
+ int i, j, cr, cg, cb;
int wt = wallID;
if (wt<0 || wt>=Renderer_wtypesCount)
return 0;
@@ -578,7 +578,7 @@ VideoBuffer * Renderer::WallIcon(int wallID, int width, int height)
for (j=0; j<height; j++)
for (i=0; i<width; i++)
{
- if (!((y*CELL+j)%2) && !((x*CELL+i)%2))
+ if (!(j%2) && !(i%2))
newTexture->SetPixel(i, j, PIXR(pc), PIXG(pc), PIXB(pc), 255);
else
newTexture->SetPixel(i, j, 0x80, 0x80, 0x80, 255);