[Scummvm-git-logs] scummvm master -> cea5b29fb5ddb5de53fd4e4fcd89e85714f8de7a
mduggan
noreply at scummvm.org
Sun Nov 3 03:11:41 UTC 2024
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:
608f507cad DGDS: Add detection for RotD Amiga German (#15453)
cea5b29fb5 DGDS: Fix crash on German dgds intro
Commit: 608f507cadb642f3d7144b4c92babd672ad253bb
https://github.com/scummvm/scummvm/commit/608f507cadb642f3d7144b4c92babd672ad253bb
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-11-03T14:10:58+11:00
Commit Message:
DGDS: Add detection for RotD Amiga German (#15453)
Changed paths:
engines/dgds/detection_tables.h
diff --git a/engines/dgds/detection_tables.h b/engines/dgds/detection_tables.h
index 246e6c674e8..3b3cf584d3c 100644
--- a/engines/dgds/detection_tables.h
+++ b/engines/dgds/detection_tables.h
@@ -112,6 +112,20 @@ static const ADGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
+ // Rise of the Dragon (Amiga) German (reported by gabberhead, #15453)
+ {
+ "rise",
+ 0,
+ {
+ {"volume.rmf", 0, "7737489a8c452f0c497956eead46e4f0", 8964},
+ {"volume.001", 0, "4e693c2748ccd71a633b76abe2ed6f12", 525920},
+ },
+ Common::DE_DEU,
+ Common::kPlatformAmiga,
+ ADGF_UNSTABLE,
+ GUIO1(GUIO_NONE)
+ },
+
// Rise of the Dragon (Macintosh)
{
"rise",
Commit: cea5b29fb5ddb5de53fd4e4fcd89e85714f8de7a
https://github.com/scummvm/scummvm/commit/cea5b29fb5ddb5de53fd4e4fcd89e85714f8de7a
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-11-03T14:11:13+11:00
Commit Message:
DGDS: Fix crash on German dgds intro
The font functions take u32 but that was sign-extending when coming out of a
non-u32 string. This never comes up in the English version, but the German
font has codepoints over 128.
Also fixed a couple of places where it was incorrectly measuring a string
position instead of a char value.
This fixes #15450.
Changed paths:
engines/dgds/dialog.cpp
engines/dgds/font.cpp
engines/dgds/font.h
diff --git a/engines/dgds/dialog.cpp b/engines/dgds/dialog.cpp
index 4520fbef297..e8610611e42 100644
--- a/engines/dgds/dialog.cpp
+++ b/engines/dgds/dialog.cpp
@@ -435,7 +435,7 @@ void Dialog::drawFindSelectionXY() {
x += _stringWidthIgnoringTrainingSpace(font, _str.substr(totalchars, _state->_strMouseLoc - totalchars));
// TODO: does this make sense?
- if (_state->_loc.x + _state->_loc.width < (x + font->getCharWidth(_state->_strMouseLoc))) {
+ if (_state->_loc.x + _state->_loc.width < (x + font->getCharWidth(_str[_state->_strMouseLoc]))) {
if (_str[_state->_strMouseLoc] < '!') {
_state->_charHeight = 0;
_state->_charWidth = 0;
@@ -449,7 +449,7 @@ void Dialog::drawFindSelectionXY() {
_state->_lastMouseX = x;
_state->_lastMouseY = y;
- _state->_charWidth = font->getCharWidth(_state->_strMouseLoc);
+ _state->_charWidth = font->getCharWidth(_str[_state->_strMouseLoc]);
}
}
diff --git a/engines/dgds/font.cpp b/engines/dgds/font.cpp
index b35ae91a1e2..88eb4f493f9 100644
--- a/engines/dgds/font.cpp
+++ b/engines/dgds/font.cpp
@@ -166,7 +166,7 @@ void PFont::drawChar(Graphics::Surface* dst, uint32 chr, int x, int y, uint32 co
int PFont::getCharWidth(uint32 chr) const {
if (!hasChar(chr))
return 0;
- return _widths[chr - _start];
+ return _widths[(byte)chr - _start];
}
PFont *PFont::load(Common::SeekableReadStream &input, Decompressor *decompressor) {
diff --git a/engines/dgds/font.h b/engines/dgds/font.h
index bfc654312ea..1bf935c8543 100644
--- a/engines/dgds/font.h
+++ b/engines/dgds/font.h
@@ -86,8 +86,8 @@ class FFont : public DgdsFont {
public:
FFont(byte w, byte h, byte start, byte count, byte *data);
~FFont();
- int getCharWidth(uint32 chr) const override { return _w; }
- void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override;
+ int getCharWidth(uint32 chr) const override { return _w; }
+ void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override;
static FFont *load(Common::SeekableReadStream &input);
protected:
More information about the Scummvm-git-logs
mailing list