[Scummvm-git-logs] scummvm branch-2-6 -> a5d7942d575e61a7f607f5a57f80999f1f8bb80f
criezy
noreply at scummvm.org
Tue Jun 21 22:29:36 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3d185fc704 AGS: Fixed parsing of legacy "game_scale_win" from 3.5.* config
b3c84286f1 AGS: Fixed GUI textual controls not redrawn when translation changes
a5d7942d57 AGS: Fixed character's loop fixup in UpdateMoveAndAnim()
Commit: 3d185fc704dff823cd92ff04708b857e78a0b0c3
https://github.com/scummvm/scummvm/commit/3d185fc704dff823cd92ff04708b857e78a0b0c3
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-06-21T23:29:19+01:00
Commit Message:
AGS: Fixed parsing of legacy "game_scale_win" from 3.5.* config
>From upstream 0e592f18546d3d65e2cf7822a4f7063278beef06
Changed paths:
engines/ags/engine/main/config.cpp
diff --git a/engines/ags/engine/main/config.cpp b/engines/ags/engine/main/config.cpp
index 37ce15c2c7d..5474bebad9b 100644
--- a/engines/ags/engine/main/config.cpp
+++ b/engines/ags/engine/main/config.cpp
@@ -244,7 +244,7 @@ static void read_legacy_graphics_config(const ConfigTree &cfg) {
break;
case kScreenDef_ByGameScaling:
{
- int src_scale;
+ int src_scale = 0;
is_windowed ?
parse_legacy_scaling_option(CfgReadString(cfg, "graphics", "game_scale_win"), src_scale) :
parse_legacy_scaling_option(CfgReadString(cfg, "graphics", "game_scale_fs"), src_scale);
Commit: b3c84286f14661b2d9b7afc91c9d9515ff437c01
https://github.com/scummvm/scummvm/commit/b3c84286f14661b2d9b7afc91c9d9515ff437c01
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-06-21T23:29:19+01:00
Commit Message:
AGS: Fixed GUI textual controls not redrawn when translation changes
>From upstream 618d2e38a118f47389aaf7e57972b2520b81fc1b
Changed paths:
engines/ags/engine/ac/game.cpp
engines/ags/shared/gui/gui_main.cpp
engines/ags/shared/gui/gui_main.h
diff --git a/engines/ags/engine/ac/game.cpp b/engines/ags/engine/ac/game.cpp
index 8f7e1589b43..1fdb3f8c88f 100644
--- a/engines/ags/engine/ac/game.cpp
+++ b/engines/ags/engine/ac/game.cpp
@@ -659,6 +659,7 @@ int Game_ChangeTranslation(const char *newFilename) {
if ((newFilename == nullptr) || (newFilename[0] == 0)) { // switch back to default translation
close_translation();
_GP(usetup).translation = "";
+ GUI::MarkForTranslationUpdate();
return 1;
}
@@ -667,6 +668,7 @@ int Game_ChangeTranslation(const char *newFilename) {
return 0; // failed, kept previous translation
_GP(usetup).translation = newFilename;
+ GUI::MarkForTranslationUpdate();
return 1;
}
diff --git a/engines/ags/shared/gui/gui_main.cpp b/engines/ags/shared/gui/gui_main.cpp
index 96cae7694ce..77c9a17f024 100644
--- a/engines/ags/shared/gui/gui_main.cpp
+++ b/engines/ags/shared/gui/gui_main.cpp
@@ -689,6 +689,21 @@ void MarkAllGUIForUpdate() {
}
}
+void MarkForTranslationUpdate() {
+ for (auto &btn : _GP(guibuts)) {
+ if (btn.IsTranslated())
+ btn.MarkChanged();
+ }
+ for (auto &lbl : _GP(guilabels)) {
+ if (lbl.IsTranslated())
+ lbl.MarkChanged();
+ }
+ for (auto &list : _GP(guilist)) {
+ if (list.IsTranslated())
+ list.MarkChanged();
+ }
+}
+
void MarkForFontUpdate(int font) {
for (auto &btn : _GP(guibuts)) {
if (btn.Font == font)
diff --git a/engines/ags/shared/gui/gui_main.h b/engines/ags/shared/gui/gui_main.h
index b5be1f763ff..625f23681c1 100644
--- a/engines/ags/shared/gui/gui_main.h
+++ b/engines/ags/shared/gui/gui_main.h
@@ -229,6 +229,8 @@ void DrawTextAlignedHor(Bitmap *ds, const char *text, int font, color_t text_col
// Mark all existing GUI for redraw
void MarkAllGUIForUpdate();
+// Mark all translatable GUI controls for redraw
+void MarkForTranslationUpdate();
// Mark all GUI which use the given font for redraw
void MarkForFontUpdate(int font);
// Mark labels that acts as special text placeholders for redraw
Commit: a5d7942d575e61a7f607f5a57f80999f1f8bb80f
https://github.com/scummvm/scummvm/commit/a5d7942d575e61a7f607f5a57f80999f1f8bb80f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-06-21T23:29:19+01:00
Commit Message:
AGS: Fixed character's loop fixup in UpdateMoveAndAnim()
Was broken by 7a1ee192e2
Fixes bug #13477 AGS: Heroine's Quest intro shows portrait bug
This old commit was trying to fix a problem in old game(s), when
character was set to a loop with no frames. In such case the old
engine would seek for the first loop with frames, starting with 0.
The condition for doing so was made incorrect though: instead of
testing simply for a empty loop, it tested for frame number being
outside of the current loop's frame range.
This broke games where e.g. some walking view's loops were shorter
than the others.
A replacement is a condition that tests exactly for an empty loop
instead. The frame exceeding a loop's frame count is fixed later
along the way, so it's not a problem here.
>From upstream ac73a555d737fb3f759cc7da9eeaf488a3bdcb2f
Changed paths:
engines/ags/engine/ac/character_info_engine.cpp
diff --git a/engines/ags/engine/ac/character_info_engine.cpp b/engines/ags/engine/ac/character_info_engine.cpp
index d661f358059..e201c74422b 100644
--- a/engines/ags/engine/ac/character_info_engine.cpp
+++ b/engines/ags/engine/ac/character_info_engine.cpp
@@ -78,7 +78,7 @@ void CharacterInfo::UpdateMoveAndAnim(int &char_index, CharacterExtras *chex, st
// Fixup character's view when possible
if (view >= 0 &&
- (loop >= _GP(views)[view].numLoops || frame >= _GP(views)[view].loops[loop].numFrames)) {
+ (loop >= _GP(views)[view].numLoops || _GP(views)[view].loops[loop].numFrames == 0)) {
for (loop = 0;
(loop < _GP(views)[view].numLoops) && (_GP(views)[view].loops[loop].numFrames == 0); ++loop) {
}
More information about the Scummvm-git-logs
mailing list