[Scummvm-git-logs] scummvm master -> e52de4f25aa63eaeb35d24e2c9ac8663f7b58c01
bluegr
noreply at scummvm.org
Fri May 20 18:59:27 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b616c5117b CHEWY: Fix font kerning
e52de4f25a CHEWY: Remove redundant qualifiers
Commit: b616c5117bdb78f3136dc8c2e31d22a01deda800
https://github.com/scummvm/scummvm/commit/b616c5117bdb78f3136dc8c2e31d22a01deda800
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-05-20T21:58:34+03:00
Commit Message:
CHEWY: Fix font kerning
Changed paths:
engines/chewy/main.cpp
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index f24c11cab84..8aa7f599983 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1957,12 +1957,17 @@ void ChewyFont::setDeltaX(uint16 deltaX) {
}
::Graphics::Surface *ChewyFont::getLine(const Common::String &texts) {
- ::Graphics::Surface *line = new ::Graphics::Surface();
- line->create(texts.size() * _dataWidth, _dataHeight, ::Graphics::PixelFormat::createFormatCLUT8());
+ Graphics::Surface *line = new Graphics::Surface();
+ if (texts.size() == 0)
+ return line;
+
+ Common::Rect subrect(0, 0, _dataWidth, _dataHeight);
+ line->create(texts.size() * _deltaX, _dataHeight, ::Graphics::PixelFormat::createFormatCLUT8());
+ line->fillRect(Common::Rect(line->w, line->h), 0xFF);
for (uint i = 0; i < texts.size(); i++) {
- uint x = (texts[i] - _first) * _dataWidth;
- line->copyRectToSurface(_fontSurface, i * _dataWidth, 0, Common::Rect(x, 0, x + _dataWidth, _dataHeight));
+ subrect.moveTo((texts[i] - _first) * _dataWidth, 0);
+ line->copyRectToSurface(_fontSurface, i * (_deltaX - 2), 0, subrect);
}
return line;
Commit: e52de4f25aa63eaeb35d24e2c9ac8663f7b58c01
https://github.com/scummvm/scummvm/commit/e52de4f25aa63eaeb35d24e2c9ac8663f7b58c01
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-05-20T21:58:35+03:00
Commit Message:
CHEWY: Remove redundant qualifiers
Changed paths:
engines/chewy/main.cpp
engines/chewy/video/cfo_decoder.cpp
engines/chewy/video/cfo_decoder.h
engines/chewy/video/video_player.cpp
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 8aa7f599983..dabd5f548df 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1920,7 +1920,7 @@ ChewyFont::ChewyFont(Common::String filename) {
_displayWidth = _dataWidth;
_displayHeight = _dataHeight;
- _fontSurface.create(_dataWidth * _count, _dataHeight, ::Graphics::PixelFormat::createFormatCLUT8());
+ _fontSurface.create(_dataWidth * _count, _dataHeight, Graphics::PixelFormat::createFormatCLUT8());
int bitIndex = 7;
@@ -1956,13 +1956,13 @@ void ChewyFont::setDeltaX(uint16 deltaX) {
_deltaX = deltaX;
}
-::Graphics::Surface *ChewyFont::getLine(const Common::String &texts) {
+Graphics::Surface *ChewyFont::getLine(const Common::String &texts) {
Graphics::Surface *line = new Graphics::Surface();
if (texts.size() == 0)
return line;
Common::Rect subrect(0, 0, _dataWidth, _dataHeight);
- line->create(texts.size() * _deltaX, _dataHeight, ::Graphics::PixelFormat::createFormatCLUT8());
+ line->create(texts.size() * _deltaX, _dataHeight, Graphics::PixelFormat::createFormatCLUT8());
line->fillRect(Common::Rect(line->w, line->h), 0xFF);
for (uint i = 0; i < texts.size(); i++) {
@@ -1973,7 +1973,7 @@ void ChewyFont::setDeltaX(uint16 deltaX) {
return line;
}
-::Graphics::Surface *FontMgr::getLine(const Common::String &texts) {
+Graphics::Surface *FontMgr::getLine(const Common::String &texts) {
return _font->getLine(texts);
}
diff --git a/engines/chewy/video/cfo_decoder.cpp b/engines/chewy/video/cfo_decoder.cpp
index 70905dedbb1..e4c733692e0 100644
--- a/engines/chewy/video/cfo_decoder.cpp
+++ b/engines/chewy/video/cfo_decoder.cpp
@@ -107,7 +107,7 @@ void CfoDecoder::CfoVideoTrack::readHeader() {
#define FRAME_TYPE 0xF1FA
#define CUSTOM_FRAME_TYPE 0xFAF1
-const ::Graphics::Surface *CfoDecoder::CfoVideoTrack::decodeNextFrame() {
+const Graphics::Surface *CfoDecoder::CfoVideoTrack::decodeNextFrame() {
uint16 frameType;
// Read chunk
diff --git a/engines/chewy/video/cfo_decoder.h b/engines/chewy/video/cfo_decoder.h
index 77bcc78ac7c..c087cd125e9 100644
--- a/engines/chewy/video/cfo_decoder.h
+++ b/engines/chewy/video/cfo_decoder.h
@@ -49,7 +49,7 @@ private:
void readHeader() override;
- const ::Graphics::Surface *decodeNextFrame() override;
+ const Graphics::Surface *decodeNextFrame() override;
private:
void handleFrame() override;
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index 584ee0d805e..ff688571f6f 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -68,7 +68,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && keepPlaying) {
if (cfoDecoder->needsUpdate()) {
- const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
+ const Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
if (frame) {
const byte *srcP = (const byte *)frame->getPixels();
byte *destP = (byte *)g_screen->getPixels();
More information about the Scummvm-git-logs
mailing list