[Scummvm-git-logs] scummvm master -> 73b7ed5eb66b20f20b43a5497834c2db532deff4
criezy
criezy at scummvm.org
Thu Apr 8 21:32:01 UTC 2021
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:
53432f1153 AGS: Cleanup TTF font rendering a bit
73b7ed5eb6 AGS: Add more detection entries
Commit: 53432f1153e173cf73e2b8d623f75baf41ae337d
https://github.com/scummvm/scummvm/commit/53432f1153e173cf73e2b8d623f75baf41ae337d
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-08T22:15:37+01:00
Commit Message:
AGS: Cleanup TTF font rendering a bit
There is no need to test if antialiasing should be used
in two different places.
Changed paths:
engines/ags/lib/alfont/alfont.cpp
engines/ags/lib/alfont/alfont.h
engines/ags/shared/font/ttffontrenderer.cpp
diff --git a/engines/ags/lib/alfont/alfont.cpp b/engines/ags/lib/alfont/alfont.cpp
index c0aba2dac6..a5ebb920b7 100644
--- a/engines/ags/lib/alfont/alfont.cpp
+++ b/engines/ags/lib/alfont/alfont.cpp
@@ -24,6 +24,7 @@
#include "ags/ags.h"
#include "ags/globals.h"
#include "ags/shared/ac/gamesetupstruct.h"
+#include "ags/engine/ac/display.h"
#include "common/file.h"
#include "graphics/fonts/ttf.h"
@@ -34,7 +35,7 @@ Graphics::Font *ALFONT_FONT::getFont() {
if (!_fonts.contains(_size)) {
// Instantiate the raw TTF data into a font of the given size
Graphics::TTFRenderMode renderMode = Graphics::kTTFRenderModeMonochrome;
- if (_GP(game).options[OPT_ANTIALIASFONTS] != 0 || ::AGS::g_vm->_forceTextAA)
+ if (ShouldAntiAliasText())
renderMode = Graphics::kTTFRenderModeLight;
_fonts[_size] = Graphics::loadTTFFont(_ttfData, _size, Graphics::kTTFSizeModeCharacter, 0, renderMode);
assert(_fonts[_size]);
@@ -65,16 +66,14 @@ size_t alfont_text_height(ALFONT_FONT *font) {
}
void alfont_textout(BITMAP *bmp, ALFONT_FONT *font, const char *text, int x, int y, uint32 color) {
+ // Note: the original does not use antialiasing when drawing on 8 bit bmp
+ // if (bitmap_color_depth(bmp) > 8) do not use AA in getFont()...
// The original alfont changes the y based on the font height and ascent.
y += (font->_size - font->getFont()->getFontAscent());
Graphics::ManagedSurface &surf = **bmp;
font->getFont()->drawString(&surf, text, x, y, bmp->w - x, color);
}
-void alfont_textout_aa(BITMAP *bmp, ALFONT_FONT *font, const char *text, int x, int y, uint32 color) {
- alfont_textout(bmp, font, text, x, y, color);
-}
-
void alfont_set_font_size(ALFONT_FONT *font, int size) {
font->_size = size;
}
diff --git a/engines/ags/lib/alfont/alfont.h b/engines/ags/lib/alfont/alfont.h
index 2e7b053c61..d10ea6c918 100644
--- a/engines/ags/lib/alfont/alfont.h
+++ b/engines/ags/lib/alfont/alfont.h
@@ -56,7 +56,6 @@ extern void alfont_destroy_font(ALFONT_FONT *font);
extern size_t alfont_text_length(ALFONT_FONT *font, const char *text);
extern size_t alfont_text_height(ALFONT_FONT *font);
extern void alfont_textout(BITMAP *bmp, ALFONT_FONT *font, const char *text, int x, int y, uint32 color);
-extern void alfont_textout_aa(BITMAP *bmp, ALFONT_FONT *font, const char *text, int x, int y, uint32 color);
extern const char *alfont_get_name(ALFONT_FONT *font);
extern void alfont_set_font_size(ALFONT_FONT *font, int size);
diff --git a/engines/ags/shared/font/ttffontrenderer.cpp b/engines/ags/shared/font/ttffontrenderer.cpp
index 0cb6cb4169..d0460b8d00 100644
--- a/engines/ags/shared/font/ttffontrenderer.cpp
+++ b/engines/ags/shared/font/ttffontrenderer.cpp
@@ -76,10 +76,7 @@ void TTFFontRenderer::RenderText(const char *text, int fontNumber, BITMAP *desti
return;
// Y - 1 because it seems to get drawn down a bit
- if ((ShouldAntiAliasText()) && (bitmap_color_depth(destination) > 8))
- alfont_textout_aa(destination, _fontData[fontNumber].AlFont, text, x, y - 1, colour);
- else
- alfont_textout(destination, _fontData[fontNumber].AlFont, text, x, y - 1, colour);
+ alfont_textout(destination, _fontData[fontNumber].AlFont, text, x, y - 1, colour);
}
bool TTFFontRenderer::LoadFromDisk(int fontNumber, int fontSize) {
Commit: 73b7ed5eb66b20f20b43a5497834c2db532deff4
https://github.com/scummvm/scummvm/commit/73b7ed5eb66b20f20b43a5497834c2db532deff4
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-08T22:31:29+01:00
Commit Message:
AGS: Add more detection entries
Changed paths:
engines/ags/detection_tables.h
diff --git a/engines/ags/detection_tables.h b/engines/ags/detection_tables.h
index bd594213bf..15adedf548 100644
--- a/engines/ags/detection_tables.h
+++ b/engines/ags/detection_tables.h
@@ -1637,12 +1637,15 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("alemmo", "al_emmo.exe", "d14295053c672c253460c8a7179b2bba", 19054865),
GAME_ENTRY("alemmoanozira", "postcards from anozira.exe", "f5f73b35e809d9e01a2cff32abeffadf", 5567476), // 3.0, Desura
GAME_ENTRY("alemmoanozira", "Postcards_from_Anozira.exe", "a33691e4a84e2645b4cbe1f681511798", 5567690), // Steam
+ GAME_ENTRY("alemmoanozira", "postcards from anozira.exe", "893f31faa33f1219b316894a0cbe7b27", 174781776),
GAME_ENTRY("alum", "alum.exe", "6d2f8e80c5f2372b705fdd4cc32f3579", 429203260), // Steam
+ GAME_ENTRY("alum", "alum.exe", "6d2f8e80c5f2372b705fdd4cc32f3579", 428902430),
GAME_ENTRY("atotkdeluxe", "atotk.exe", "68d4f3488a9dcec74584651c0e29e439", 5078719), // Steam
GAME_ENTRY("apotheosis", "the apotheosis project.exe", "0cab252e992e5da65bdbf3648c2b70df", 1144087889), // 1.0
GAME_ENTRY("apotheosis", "the apotheosis project.exe", "0115a64ddec9396108f32da31d761ecb", 1144677502), //Steam
GAME_ENTRY("apotheosis", "The Apotheosis Project.ags", "0d9ae5a4ffd3e3e968c6addb5d524954", 1142362222), // Steam Linux
GAME_ENTRY("astroloco", "astroloco1.exe", "c71919e3b0cc415ef725cf1a9818a515", 42894919), // Steam
+ GAME_ENTRY("astroloco", "astroloco1.exe", "06e70a826fde73b3f86f974885d31abe", 42492070),
GAME_ENTRY("beer", "beer!.exe", "6f201fd7a19869c85f49c7c471d0479a", 5055091), // Steam
GAME_ENTRY("blackwell1", "blackwell1.exe", "605e124cb7e0b56841c471e2d641c224", 18822697), // GOG
GAME_ENTRY_PLUGIN("blackwell1", "blackwell1.exe", "605e124cb7e0b56841c471e2d641c224", 18824597, AGSTEAM_WADJETEYE), // Steam
@@ -1704,6 +1707,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("footballgame", "football game.exe", "76703ac67835bdbfde5b378a147c8ba2", 164951859),
GAME_ENTRY("geminirue", "GeminiRue.exe", "0bdfb2139abaae5ae2dc85f1aacfd3f6", 61906750), // v1.1 CD Release
GAME_ENTRY("geminirue", "gemini rue.exe", "f3c0c7d3892bdd8963e8ce017f73de08", 61986506), // GOG
+ GAME_ENTRY("geminirue", "gemini rue.exe", "0bdfb2139abaae5ae2dc85f1aacfd3f6", 61926695),
GAME_ENTRY("geminirue", "gemini_rue_pc.exe", "83362d0d2c1d4909bfbd85c04c95bde2", 72960932), // Steam
GAME_ENTRY("geminirue", "gemini_rue_pc.exe", "f49a61ea46feb86f89de3c136ad809ff", 73412249), // Steam
GAME_ENTRY_PLUGIN("geminirue", "agsgame.dat", "f3c0c7d3892bdd8963e8ce017f73de08", 62059297, AGSTEAM_WADJETEYE), // Steam Linux
@@ -1736,6 +1740,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("mage", "mages_initiation.exe", "2e822f554994f36e0c62da2acda874da", 30492087), // Steam
GAME_ENTRY("metaldead", "metaldead.exe", "91996c5379e82787b68e84ab67d9672f", 1504754877), // Steam
GAME_ENTRY("neofeud", "neofeud.exe", "6e861b1f476ff7cdf036082abb271329", 2078740517), // Steam
+ GAME_ENTRY("neofeud", "neofeud.exe", "6e861b1f476ff7cdf036082abb271329", 2078743375),
GAME_ENTRY("oott", "oott-tkc.exe", "11c2421258465cba4bd773c49d918ee3", 467834855), // GOG
GAME_ENTRY("oott", "oott-tkc.exe", "11c2421258465cba4bd773c49d918ee3", 467845009), // GOG
GAME_ENTRY("oott", "oott-tkc.exe", "11c2421258465cba4bd773c49d918ee3", 467844896), // Steam
@@ -1748,6 +1753,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("qfi", "qfi.exe", "0702df6e67ef87fd3c51d09303803126", 534847265), // GOG
GAME_ENTRY("qfi", "qfi.exe", "32b36aebe0729c9360bc10dcddc0653c", 538562096), // GOG
GAME_ENTRY("qfi", "qfi.exe", "32b36aebe0729c9360bc10dcddc0653c", 538681872), // Steam
+ GAME_ENTRY("qfi", "qfi.exe", "32b36aebe0729c9360bc10dcddc0653c", 538547262),
GAME_ENTRY("qfi", "agsgame.dat", "9efb669ada4b685f9a5a91ce161424a7", 532694795), // Linux Groupees
GAME_ENTRY("qfi", "agsgame.dat", "2a0ba29e479ca5aa8c6b4233f030e78f", 536391599),
GAME_ENTRY("qfi", "agsgame.dat", "2a0ba29e479ca5aa8c6b4233f030e78f", 536513114), // Steam Linux
@@ -1786,6 +1792,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("theterribleoldman", "the terrible old man.exe", "e07a475bcf14bc75c016724186f222ac", 369769127), // Steam
GAME_ENTRY("theterribleoldman", "the terrible old man.exe", "b3a10d7d3b5a728330b028ec28ff2d05", 103852030), // Steam
GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 1089857773), // Steam
+ GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 1072879555),
GAME_ENTRY("untilihaveyou", "until i have you.exe", "cda1d7e36993dd55ba5513c1c43e5b2b", 457842687),
GAME_ENTRY("waitingfortheloop", "waitingfortheloop.exe", "0241777c2537fc5d077c05cde10bfa9f", 51472537), // Steam
GAME_ENTRY("waitingfortheloop", "waitingfortheloop.exe", "0241777c2537fc5d077c05cde10bfa9f", 51273604),
@@ -2377,6 +2384,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("isnkill", "ISN.exe", "4d17844029d8910fbaae1bdc99e250f2", 7932669),
GAME_ENTRY("ioawn4t", "ioawn4t.ags", "34455803b41269a1a2dd44cc8b2d549f", 884275141), // Linux
GAME_ENTRY("ioawn4t", "ioawn4t.exe", "b93a59eb67e202f5e807d7a7e678ad85", 887314393), // Windows
+ GAME_ENTRY("ioawn4t", "ioawn4t.exe", "b93a59eb67e202f5e807d7a7e678ad85", 887315687),
GAME_ENTRY("isos", "ISOS.exe", "06a03fe35791b0578068ab1873455463", 7362937),
GAME_ENTRY("itsabugslife", "It's a Bugs Life.exe", "c48d0beedcdc1b05e9e25dcd60de46a9", 201172081),
GAME_ENTRY("iwalkedapath", "I walked a path.exe", "fd3ecd8289bebadbf775fe8a13b9c5d7", 89018261),
More information about the Scummvm-git-logs
mailing list