diff options
author | Kari Salminen | 2008-08-11 23:01:32 +0000 |
---|---|---|
committer | Kari Salminen | 2008-08-11 23:01:32 +0000 |
commit | 88ec480cef8d637c2fd69b8197ab3c7de39ede8b (patch) | |
tree | 0fc305e5b2d0b01ee42077bdbd60125be127cf2c /engines/cine | |
parent | c8188bf344fa99dc762d9658a7bdd75da618c5a0 (diff) | |
download | scummvm-rg350-88ec480cef8d637c2fd69b8197ab3c7de39ede8b.tar.gz scummvm-rg350-88ec480cef8d637c2fd69b8197ab3c7de39ede8b.tar.bz2 scummvm-rg350-88ec480cef8d637c2fd69b8197ab3c7de39ede8b.zip |
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).
svn-id: r33790
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/gfx.cpp | 20 | ||||
-rw-r--r-- | engines/cine/gfx.h | 2 |
2 files changed, 15 insertions, 7 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 5d66be5e27..bb11cea5dc 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -225,14 +225,18 @@ void FWRenderer::drawCommand() { * \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 @@ void FWRenderer::drawMessage(const char *str, int x, int y, int width, byte colo } ty += 9; - drawPlainBox(x, ty, width, 9, color); + if (color >= 0) { + drawPlainBox(x, ty, width, 9, color); + } tx = x + 4; } @@ -269,8 +275,10 @@ void FWRenderer::drawMessage(const char *str, int x, int y, int width, byte colo } 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 diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index 078954e3b9..22545abf0b 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -68,7 +68,7 @@ protected: 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); |