[Scummvm-cvs-logs] CVS: scummvm/scumm nut_renderer.cpp,1.43,1.44 nut_renderer.h,1.17,1.18

Max Horn fingolfin at users.sourceforge.net
Sun Apr 4 11:20:08 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16636

Modified Files:
	nut_renderer.cpp nut_renderer.h 
Log Message:
allow disabling of text shadow in NUT font renderer

Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- nut_renderer.cpp	2 Feb 2004 22:40:19 -0000	1.43
+++ nut_renderer.cpp	4 Apr 2004 18:07:26 -0000	1.44
@@ -240,8 +240,8 @@
 	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 @@
 	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];

Index: nut_renderer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- nut_renderer.h	6 Jan 2004 12:45:30 -0000	1.17
+++ nut_renderer.h	4 Apr 2004 18:07:26 -0000	1.18
@@ -54,7 +54,7 @@
 	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);





More information about the Scummvm-git-logs mailing list