diff options
Diffstat (limited to 'src/graphics')
| -rw-r--r-- | src/graphics/Renderer.cpp | 11 | ||||
| -rw-r--r-- | src/graphics/Renderer.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index f07d548..d5eb43a 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -2272,6 +2272,17 @@ void Renderer::drawblob(int x, int y, unsigned char cr, unsigned char cg, unsign blendpixel(x-1, y+1, cr, cg, cb, 64); } +pixel Renderer::GetPixel(int x, int y) +{ + if (x<0 || y<0 || x>=VIDXRES || y>=VIDYRES) + return 0; +#ifdef OGLR + return 0; +#else + return vid[(y*VIDXRES)+x]; +#endif +} + Renderer::Renderer(Graphics * g, Simulation * sim): sim(NULL), g(NULL), diff --git a/src/graphics/Renderer.h b/src/graphics/Renderer.h index 7c84280..9c216ed 100644 --- a/src/graphics/Renderer.h +++ b/src/graphics/Renderer.h @@ -115,6 +115,8 @@ public: VideoBuffer DumpFrame(); void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); + + pixel GetPixel(int x, int y); //... //Display mode modifiers void CompileDisplayMode(); |
