aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-04-04 18:07:26 +0000
committerMax Horn2004-04-04 18:07:26 +0000
commit5858a919a2b33c7249485f3c4c2d903680fa7ed9 (patch)
treec1e8870f7117b6b8fca0dbb2632b87ea5b4f1d73 /scumm
parentf1ee3c0163b65619a6dcad280ec24ad13c5731b8 (diff)
downloadscummvm-rg350-5858a919a2b33c7249485f3c4c2d903680fa7ed9.tar.gz
scummvm-rg350-5858a919a2b33c7249485f3c4c2d903680fa7ed9.tar.bz2
scummvm-rg350-5858a919a2b33c7249485f3c4c2d903680fa7ed9.zip
allow disabling of text shadow in NUT font renderer
svn-id: r13459
Diffstat (limited to 'scumm')
-rw-r--r--scumm/nut_renderer.cpp10
-rw-r--r--scumm/nut_renderer.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp
index d85222b9e2..215fe830c8 100644
--- a/scumm/nut_renderer.cpp
+++ b/scumm/nut_renderer.cpp
@@ -240,8 +240,8 @@ int NutRenderer::getCharHeight(byte c) {
return _chars[c].height;
}
-void NutRenderer::drawShadowChar(int c, int x, int y, byte color, bool useMask) {
- debug(8, "NutRenderer::drawShadowChar('%c', %d, %d, %d, %d) called", c, x, y, (int)color, useMask);
+void NutRenderer::drawShadowChar(int c, int x, int y, byte color, bool useMask, bool showShadow) {
+ debug(8, "NutRenderer::drawShadowChar('%c', %d, %d, %d, %d, %d) called", c, x, y, (int)color, useMask, showShadow);
if (!_loaded) {
warning("NutRenderer::drawShadowChar() Font is not loaded");
return;
@@ -261,8 +261,12 @@ void NutRenderer::drawShadowChar(int c, int x, int y, byte color, bool useMask)
int offsetX[7] = { -1, 0, 1, 0, 1, 2, 0 };
int offsetY[7] = { 0, -1, 0, 1, 2, 1, 0 };
int cTable[7] = { 0, 0, 0, 0, 0, 0, color };
+ int i = 0;
+
+ if (!showShadow)
+ i = 6;
- for (int i = 0; i < 7; i++) {
+ for (; i < 7; i++) {
x += offsetX[i];
y += offsetY[i];
color = cTable[i];
diff --git a/scumm/nut_renderer.h b/scumm/nut_renderer.h
index 9a261d2105..6e06f6cec0 100644
--- a/scumm/nut_renderer.h
+++ b/scumm/nut_renderer.h
@@ -54,7 +54,7 @@ public:
bool loadFont(const char *filename, const char *dir);
void drawFrame(byte *dst, int c, int x, int y);
- void drawShadowChar(int c, int x, int y, byte color, bool useMask);
+ void drawShadowChar(int c, int x, int y, byte color, bool useMask, bool showShadow);
int getCharWidth(byte c);
int getCharHeight(byte c);