[Scummvm-git-logs] scummvm master -> 62b2b85a139abf68e1de5a3f7e7bc70f9e04018b
Die4Ever
noreply at scummvm.org
Sun Feb 13 04:15:12 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:
62b2b85a13 GROOVIE: fix Clan and T11H saving
Commit: 62b2b85a139abf68e1de5a3f7e7bc70f9e04018b
https://github.com/scummvm/scummvm/commit/62b2b85a139abf68e1de5a3f7e7bc70f9e04018b
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-02-12T22:14:52-06:00
Commit Message:
GROOVIE: fix Clan and T11H saving
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 8c2cc7b73b8..a0937d4d5cf 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -622,7 +622,7 @@ void Script::directGameSave(int slot, const Common::String &desc) {
return;
}
const char *saveName = desc.c_str();
- uint name_len = _version == 15;
+ uint name_len = 15;
if (_version == kGroovieTLC) {
name_len = 19;
} else if (_version == kGroovieUHP) {
@@ -657,7 +657,7 @@ void Script::savegame(uint slot, const char name[27]) {
}
// Saving the variables. It is endian safe because they're byte variables
- uint name_len = _version == 15;
+ uint name_len = 15;
if (_version == kGroovieTLC) {
name_len = 19;
} else if (_version == kGroovieUHP) {
@@ -700,7 +700,7 @@ 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(Common::String(message), 190, 190, _vm->_pixelFormat.RGBToColor(0xff, 0x0A, 0x0A));
+ _vm->_videoPlayer->drawString(surface, Common::String(message), 190, 190, _vm->_pixelFormat.RGBToColor(0xff, 0x0A, 0x0A));
}
}
@@ -2103,7 +2103,9 @@ void Script::o2_printstring() {
readScriptString(text);
debugC(1, kDebugScript, "Groovie::Script: PRINTSTRING (%d, %d): %s", posx, posy, text.c_str());
- _vm->_videoPlayer->drawString(text, posx, posy, col);
+ Graphics::Surface *gamescreen = _vm->_system->lockScreen();
+ _vm->_videoPlayer->drawString(gamescreen, text, posx, posy, col);
+ _vm->_system->unlockScreen();
}
void Script::o2_playsong() {
diff --git a/engines/groovie/video/player.h b/engines/groovie/video/player.h
index b22e1571318..ff3a86905b5 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(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) {}
virtual void copyfgtobg(uint8 arg) {}
protected:
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 0f2e04b5494..3740b13f0b9 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -964,7 +964,7 @@ void ROQPlayer::createAudioStream(bool stereo) {
g_system->getMixer()->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, _audioStream);
}
-void ROQPlayer::drawString(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) {
// TODO: fix redraw
#if 0
int screenOffset = 0;
@@ -975,12 +975,9 @@ void ROQPlayer::drawString(const Common::String text, int posx, int posy, uint32
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);
-#else
- Graphics::Surface *gamescreen = _vm->_system->lockScreen();
#endif
- _vm->_font->drawString(gamescreen, text.c_str(), posx, posy, _overBuf->w, color, Graphics::kTextAlignLeft);
- _vm->_system->unlockScreen();
+ _vm->_font->drawString(surface, text.c_str(), posx, posy, _overBuf->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 8ef6eae0bd4..3a23bd41672 100644
--- a/engines/groovie/video/roq.h
+++ b/engines/groovie/video/roq.h
@@ -45,7 +45,7 @@ public:
return _soundHandle;
}
- void drawString(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) override;
void copyfgtobg(uint8 arg) override;
protected:
More information about the Scummvm-git-logs
mailing list