[Scummvm-cvs-logs] SF.net SVN: scummvm:[33790] scummvm/trunk/engines/cine

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Tue Aug 12 01:01:33 CEST 2008


Revision: 33790
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33790&view=rev
Author:   buddha_
Date:     2008-08-11 23:01:32 +0000 (Mon, 11 Aug 2008)

Log Message:
-----------
Implemented drawMessage changes for Operation Stealth's timed cutscenes (Negative colors are used for timed text boxes that are totally transparent, only the text is drawn).

Modified Paths:
--------------
    scummvm/trunk/engines/cine/gfx.cpp
    scummvm/trunk/engines/cine/gfx.h

Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2008-08-11 22:46:31 UTC (rev 33789)
+++ scummvm/trunk/engines/cine/gfx.cpp	2008-08-11 23:01:32 UTC (rev 33790)
@@ -225,14 +225,18 @@
  * \param x Top left message box corner coordinate
  * \param y Top left message box corner coordinate
  * \param width Message box width
- * \param color Message box background color
+ * \param color Message box background color (Or if negative draws only the text)
+ * \note Negative colors are used in Operation Stealth's timed cutscenes
+ * (e.g. when first meeting The Movement for the Liberation of Santa Paragua).
  */
-void FWRenderer::drawMessage(const char *str, int x, int y, int width, byte color) {
+void FWRenderer::drawMessage(const char *str, int x, int y, int width, int color) {
 	int i, tx, ty, tw;
 	int line = 0, words = 0, cw = 0;
 	int space = 0, extraSpace = 0;
 
-	drawPlainBox(x, y, width, 4, color);
+	if (color >= 0) {
+		drawPlainBox(x, y, width, 4, color);
+	}
 	tx = x + 4;
 	ty = str[0] ? y - 5 : y + 4;
 	tw = width - 8;
@@ -252,7 +256,9 @@
 			}
 
 			ty += 9;
-			drawPlainBox(x, ty, width, 9, color);
+			if (color >= 0) {
+				drawPlainBox(x, ty, width, 9, color);
+			}
 			tx = x + 4;
 		}
 
@@ -269,8 +275,10 @@
 	}
 
 	ty += 9;
-	drawPlainBox(x, ty, width, 4, color);
-	drawDoubleBorder(x, y, width, ty - y + 4, 2);
+	if (color >= 0) {
+		drawPlainBox(x, ty, width, 4, color);
+		drawDoubleBorder(x, y, width, ty - y + 4, 2);
+	}
 }
 
 /*! \brief Draw rectangle on screen

Modified: scummvm/trunk/engines/cine/gfx.h
===================================================================
--- scummvm/trunk/engines/cine/gfx.h	2008-08-11 22:46:31 UTC (rev 33789)
+++ scummvm/trunk/engines/cine/gfx.h	2008-08-11 23:01:32 UTC (rev 33790)
@@ -68,7 +68,7 @@
 	virtual void drawSprite(const objectStruct &obj);
 
 	void drawCommand();
-	void drawMessage(const char *str, int x, int y, int width, byte color);
+	void drawMessage(const char *str, int x, int y, int width, int color);
 	void drawPlainBox(int x, int y, int width, int height, byte color);
 	void drawBorder(int x, int y, int width, int height, byte color);
 	void drawDoubleBorder(int x, int y, int width, int height, byte color);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list