diff options
| author | Bryan Hoyle <starfoxprime@gmail.com> | 2012-08-15 03:18:39 (GMT) |
|---|---|---|
| committer | Bryan Hoyle <starfoxprime@gmail.com> | 2012-08-15 03:18:39 (GMT) |
| commit | 42d707f8a432afa001d58611fc960d6ce6021676 (patch) | |
| tree | 63654e26cb9dfddc6b82250cb3703e1f86f98ec9 /src/graphics/Renderer.cpp | |
| parent | c8080cb0251890b3a9513756e2438ca0f03ffbd6 (diff) | |
| download | powder-42d707f8a432afa001d58611fc960d6ce6021676.zip powder-42d707f8a432afa001d58611fc960d6ce6021676.tar.gz | |
Very very basic wall rendering for opengl
Diffstat (limited to 'src/graphics/Renderer.cpp')
| -rw-r--r-- | src/graphics/Renderer.cpp | 12 |
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() |
