[Scummvm-git-logs] scummvm master -> a92dd500177b8e9408d09f2a72400717ed53f557
Die4Ever
noreply at scummvm.org
Wed Feb 16 02:46:58 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a92dd50017 GROOVIE: Clandestiny fix load screen text backgrounds
Commit: a92dd500177b8e9408d09f2a72400717ed53f557
https://github.com/scummvm/scummvm/commit/a92dd500177b8e9408d09f2a72400717ed53f557
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-02-15T20:46:47-06:00
Commit Message:
GROOVIE: Clandestiny fix load screen text backgrounds
Changed paths:
engines/groovie/script.cpp
engines/groovie/video/player.h
engines/groovie/video/roq.cpp
engines/groovie/video/roq.h
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 4df31176672..7190d4498d7 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -702,7 +702,8 @@ void Script::printString(Graphics::Surface *surface, const char *str) {
if (_version == kGroovieT7G) {
_vm->_font->drawString(surface, message, 0, 16, 640, 0xE2, Graphics::kTextAlignCenter);
} else {
- _vm->_videoPlayer->drawString(surface, Common::String(message), 190, 190, _vm->_pixelFormat.RGBToColor(0xff, 0x0A, 0x0A));
+ bool drawBackground = _version == kGroovieCDY;
+ _vm->_videoPlayer->drawString(surface, Common::String(message), 190, 190, _vm->_pixelFormat.RGBToColor(0xff, 0x0A, 0x0A), drawBackground);
}
}
@@ -2108,7 +2109,8 @@ void Script::o2_printstring() {
debugC(1, kDebugScript, "Groovie::Script: PRINTSTRING (%d, %d): %s", posx, posy, text.c_str());
Graphics::Surface *gamescreen = _vm->_system->lockScreen();
- _vm->_videoPlayer->drawString(gamescreen, text, posx, posy, col);
+ bool drawBackground = _version == kGroovieCDY;
+ _vm->_videoPlayer->drawString(gamescreen, text, posx, posy, col, drawBackground);
_vm->_system->unlockScreen();
}
diff --git a/engines/groovie/video/player.h b/engines/groovie/video/player.h
index ff3a86905b5..40b2a8fc294 100644
--- a/engines/groovie/video/player.h
+++ b/engines/groovie/video/player.h
@@ -44,7 +44,7 @@ public:
virtual void stopAudioStream() = 0;
void fastForward();
bool isFastForwarding();
- virtual void drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color) {}
+ virtual void drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color, bool blackBackground) {}
virtual void copyfgtobg(uint8 arg) {}
protected:
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 46b30676efa..ddd7221c119 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -973,20 +973,23 @@ void ROQPlayer::createAudioStream(bool stereo) {
g_system->getMixer()->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, _audioStream);
}
-void ROQPlayer::drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color) {
+void ROQPlayer::drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color, bool blackBackground) {
// TODO: fix redraw
#if 0
int screenOffset = 0;
if (_screen->h != 480) {
screenOffset = 80;
}
-
Graphics::Surface *gamescreen = _vm->_system->lockScreen();
Common::Rect rect(posx, posy - screenOffset, posx + _vm->_font->getMaxCharWidth()*15, posy + _vm->_font->getFontHeight()*2 - screenOffset);
gamescreen->copyRectToSurface(*_bg, posx, posy, rect);
#endif
- _vm->_font->drawString(surface, text.c_str(), posx, posy, _overBuf->w, color, Graphics::kTextAlignLeft);
+ if (blackBackground) {
+ Common::Rect rect(posx - _vm->_font->getMaxCharWidth() * 0.3f, posy, posx + _vm->_font->getMaxCharWidth() * 15.3f, posy + _vm->_font->getFontHeight() * 1.3f);
+ surface->fillRect(rect, surface->format.ARGBToColor(255, 0, 0, 0));
+ }
+ _vm->_font->drawString(surface, text.c_str(), posx, posy, surface->w, color, Graphics::kTextAlignLeft);
_vm->_graphicsMan->change(); // Force Update screen after step
}
diff --git a/engines/groovie/video/roq.h b/engines/groovie/video/roq.h
index 535dd0a19f5..655b46fe73f 100644
--- a/engines/groovie/video/roq.h
+++ b/engines/groovie/video/roq.h
@@ -45,7 +45,7 @@ public:
return _soundHandle;
}
- void drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color) override;
+ void drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color, bool blackBackground) override;
void copyfgtobg(uint8 arg) override;
protected:
More information about the Scummvm-git-logs
mailing list