summaryrefslogtreecommitdiff
path: root/src/graphics/Renderer.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-15 12:02:15 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-15 12:02:15 (GMT)
commit1e406eeaf4d9e88f3638d3d145a48e58efc07f93 (patch)
tree1e62e168b838350fa2167d3c0a043494f281bbe3 /src/graphics/Renderer.cpp
parent54a81031bcb8e67ef661fb4f96cb2f65501f4c85 (diff)
downloadpowder-1e406eeaf4d9e88f3638d3d145a48e58efc07f93.zip
powder-1e406eeaf4d9e88f3638d3d145a48e58efc07f93.tar.gz
Revert some changes by Triclops200 in 42d707f8a432afa001d58611fc960d6ce6021676, Broke prototypes for drawrect with pixel functions, seems to have modified drawrect to make filled rects (forgot about fillrect?). Also use correct macros for getting colour components out of pixel data
Diffstat (limited to 'src/graphics/Renderer.cpp')
-rw-r--r--src/graphics/Renderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp
index f39e476..380aabd 100644
--- a/src/graphics/Renderer.cpp
+++ b/src/graphics/Renderer.cpp
@@ -593,9 +593,9 @@ void Renderer::DrawWalls()
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 r = PIXR(pc);
+ int g = PIXG(pc);
+ int b = PIXB(pc);
int a = 255;
#endif
#ifndef OGLR
@@ -715,7 +715,7 @@ void Renderer::DrawWalls()
}
#else
- this->drawrect(x*CELL,y*CELL,CELL,CELL,r,g,b,a,false);
+ this->fillrect(x*CELL, y*CELL, CELL, CELL, r, g, b, a);
#endif
}
}