[Scummvm-git-logs] scummvm master -> 5099bd160cab3a17d9d718372d9335dfc42e0068
dreammaster
noreply at scummvm.org
Sun May 17 07:37:40 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
491f071782 MADS: PHANTOM: Fix fade code between animview anim segments
5099bd160c MADS: PHANTOM: Fix font/cycle crashes in animview
Commit: 491f0717824425b6e14be51dfd76d15f31d890ef
https://github.com/scummvm/scummvm/commit/491f0717824425b6e14be51dfd76d15f31d890ef
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-17T17:17:37+10:00
Commit Message:
MADS: PHANTOM: Fix fade code between animview anim segments
Changed paths:
engines/mads/madsv2/animview/animview.cpp
diff --git a/engines/mads/madsv2/animview/animview.cpp b/engines/mads/madsv2/animview/animview.cpp
index 98c5be871ba..e2fb56bb48f 100644
--- a/engines/mads/madsv2/animview/animview.cpp
+++ b/engines/mads/madsv2/animview/animview.cpp
@@ -277,25 +277,26 @@ static void run_animation(int animIndex) {
bool fadeFlag = true;
while (fadeFlag && !current_error_code) {
- // Check for any keypress
- if (g_engine->hasPendingKey()) {
- g_engine->flushKeys();
- current_error_code = true;
- }
-
- if (g_engine->shouldQuit())
- current_error_code = true;
+ do {
+ // Brief pause
+ g_system->delayMillis(10);
+
+ // Check for any keypress
+ if (g_engine->hasPendingKey()) {
+ g_engine->flushKeys();
+ current_error_code = true;
+ }
- g_system->delayMillis(10);
- if (timer_read() < timer2)
- continue;
+ if (g_engine->shouldQuit())
+ current_error_code = true;
+ } while (timer_read() < timer2);
if (peelFlag) {
anim_peel();
matte_frame(0, 0);
}
- anim_fade(&cycling_palette, current_anim->misc_slow_fade);
+ fadeFlag = anim_fade(&cycling_palette, current_anim->misc_slow_fade);
mcga_setpal(&cycling_palette);
timer2 += current_anim->misc_peel_rate;
}
Commit: 5099bd160cab3a17d9d718372d9335dfc42e0068
https://github.com/scummvm/scummvm/commit/5099bd160cab3a17d9d718372d9335dfc42e0068
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-17T17:37:29+10:00
Commit Message:
MADS: PHANTOM: Fix font/cycle crashes in animview
Changed paths:
engines/mads/madsv2/animview/animview.cpp
engines/mads/madsv2/core/cycle.cpp
engines/mads/madsv2/core/font.cpp
engines/mads/madsv2/core/matte.cpp
diff --git a/engines/mads/madsv2/animview/animview.cpp b/engines/mads/madsv2/animview/animview.cpp
index e2fb56bb48f..5100adfc3a7 100644
--- a/engines/mads/madsv2/animview/animview.cpp
+++ b/engines/mads/madsv2/animview/animview.cpp
@@ -408,7 +408,8 @@ static void animate() {
if (anim_get_sound_info(buf, sound_file_name, &soundLoadFlag))
goto done;
- has_sound_file = Common::isDigit(sound_file_name[strlen(sound_file_name) - 1]);
+ Common::String name(sound_file_name);
+ has_sound_file = !name.empty() && Common::isDigit(name.lastChar());
}
if (has_sound_file) {
diff --git a/engines/mads/madsv2/core/cycle.cpp b/engines/mads/madsv2/core/cycle.cpp
index d45d7cf4731..b6791617077 100644
--- a/engines/mads/madsv2/core/cycle.cpp
+++ b/engines/mads/madsv2/core/cycle.cpp
@@ -101,7 +101,7 @@ void cycle_colors(void) {
tmp = base[num - 1];
// Shift all colors forward by one
- memmove(&base[1], &base[0], (num - 1) * sizeof(Palette));
+ memmove(&base[1], &base[0], (num - 1) * sizeof(RGBcolor));
// Write saved last color into the first slot
base[0] = tmp;
diff --git a/engines/mads/madsv2/core/font.cpp b/engines/mads/madsv2/core/font.cpp
index f3f5d321217..06fb93abbda 100644
--- a/engines/mads/madsv2/core/font.cpp
+++ b/engines/mads/madsv2/core/font.cpp
@@ -126,6 +126,10 @@ int font_write(FontPtr font, Buffer *target, const char *out_string,
char height;
byte *target_ptr;
+ // Nothing needed for empty strings
+ if (strlen(out_string) == 0)
+ return x;
+
*(uint32 *)&colors[0] = *(uint32 *)&font_colors[0];
Common::strcpy_s(temp_buf, out_string);
diff --git a/engines/mads/madsv2/core/matte.cpp b/engines/mads/madsv2/core/matte.cpp
index fd393051150..2bbd16c705b 100644
--- a/engines/mads/madsv2/core/matte.cpp
+++ b/engines/mads/madsv2/core/matte.cpp
@@ -293,7 +293,7 @@ int matte_add_message(FontPtr font, char *text, int x, int y, int message_color,
message_list[message_handle].font = font;
message_list[message_handle].text = text;
message_list[message_handle].xs = font_string_width(font, text, auto_spacing);
- message_list[message_handle].ys = font->max_y_size;
+ message_list[message_handle].ys = font ? font->max_y_size : 0;
message_list[message_handle].main_color = message_color;
message_list[message_handle].spacing = (char)auto_spacing;
message_list[message_handle].status = 1;
More information about the Scummvm-git-logs
mailing list