From 685bde5c21b4c1cfb29fd0694a72bd48e3af52fe Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 8 Feb 2013 22:50:37 -0500 Subject: [PATCH] blobby walls in blob view --- src/graphics/Renderer.cpp | 94 +++++++++++++++++++++++++++++++++++++++ src/graphics/Renderer.h | 1 + 2 files changed, 95 insertions(+) diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index e60f0f3a3..23ebcf0eb 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -645,6 +645,19 @@ VideoBuffer * Renderer::WallIcon(int wallID, int width, int height) return newTexture; } +void Renderer::DrawBlob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb) +{ + blendpixel(x+1, y, cr, cg, cb, 112); + blendpixel(x-1, y, cr, cg, cb, 112); + blendpixel(x, y+1, cr, cg, cb, 112); + blendpixel(x, y-1, cr, cg, cb, 112); + + blendpixel(x+1, y-1, cr, cg, cb, 64); + blendpixel(x-1, y-1, cr, cg, cb, 64); + blendpixel(x+1, y+1, cr, cg, cb, 64); + blendpixel(x-1, y+1, cr, cg, cb, 64); +} + void Renderer::DrawWalls() { #ifdef OGLR @@ -796,6 +809,87 @@ void Renderer::DrawWalls() } drawtext(x*CELL, y*CELL-2, "\x8D", 255, 255, 255, 128); } + + // when in blob view, draw some blobs + if (render_mode & PMODE_BLOB) + { + if (wtypes[wt].drawstyle==1) + { + for (j=0; j>1)&1; i