summaryrefslogtreecommitdiff
path: root/src/graphics/Renderer.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-15 11:50:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-15 11:50:06 (GMT)
commit2378363055950ec3ba50d42e6b1ff7b5c08a7af3 (patch)
tree6353dfeb819abf698075695d463f38b3feadc81e /src/graphics/Renderer.cpp
parent708379a3f859cb0d09e44c5b2c41469396809940 (diff)
parent42d707f8a432afa001d58611fc960d6ce6021676 (diff)
downloadpowder-2378363055950ec3ba50d42e6b1ff7b5c08a7af3.zip
powder-2378363055950ec3ba50d42e6b1ff7b5c08a7af3.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/graphics/Renderer.cpp')
-rw-r--r--src/graphics/Renderer.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp
index 0d739ed..f39e476 100644
--- a/src/graphics/Renderer.cpp
+++ b/src/graphics/Renderer.cpp
@@ -576,7 +576,6 @@ VideoBuffer * Renderer::WallIcon(int wallID, int width, int height)
void Renderer::DrawWalls()
{
-#ifndef OGLR
int x, y, i, j, cr, cg, cb;
unsigned char wt;
pixel pc;
@@ -593,6 +592,13 @@ void Renderer::DrawWalls()
continue;
pc = wtypes[wt].colour;
gc = wtypes[wt].eglow;
+#ifdef OGLR
+ int r = (pc&0x00FF0000)>>8;
+ int g = (pc&0x0000FF00)>>4;
+ int b = (pc&0x000000FF)>>0;
+ int a = 255;
+#endif
+#ifndef OGLR
// standard wall patterns
if (wtypes[wt].drawstyle==1)
@@ -708,8 +714,10 @@ void Renderer::DrawWalls()
fire_b[y][x] = cb;
}
- }
+#else
+ this->drawrect(x*CELL,y*CELL,CELL,CELL,r,g,b,a,false);
#endif
+ }
}
void Renderer::DrawSigns()