[Scummvm-git-logs] scummvm master -> 0d643e32348c89cde10ee10304c10dcae79672c9

dreammaster noreply at scummvm.org
Sat Feb 10 19:00:23 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0d643e3234 M4: Fixes for gizmo display


Commit: 0d643e32348c89cde10ee10304c10dcae79672c9
    https://github.com/scummvm/scummvm/commit/0d643e32348c89cde10ee10304c10dcae79672c9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-02-10T11:00:14-08:00

Commit Message:
M4: Fixes for gizmo display

Changed paths:
    engines/m4/burger/gui/gui_gizmo.cpp


diff --git a/engines/m4/burger/gui/gui_gizmo.cpp b/engines/m4/burger/gui/gui_gizmo.cpp
index 41e4ea6e7bd..c1a0585b595 100644
--- a/engines/m4/burger/gui/gui_gizmo.cpp
+++ b/engines/m4/burger/gui/gui_gizmo.cpp
@@ -55,6 +55,17 @@ Gizmo_Globals::~Gizmo_Globals() {
 	mem_free(_gui);
 }
 
+static void gizmo_sound() {
+	digi_read_another_chunk();
+	midi_loop();
+
+	g_system->updateScreen();
+	g_system->delayMillis(10);
+
+	g_events->process();
+	gui_system_event_handler();
+}
+
 void gizmo_digi_play(const char *name, int vol, bool &done) {
 	if (!done) {
 		done = true;
@@ -62,11 +73,8 @@ void gizmo_digi_play(const char *name, int vol, bool &done) {
 		digi_read_another_chunk();
 		player_set_commands_allowed(false);
 
-		while (!g_engine->shouldQuit() && digi_play_state(2)) {
-			digi_read_another_chunk();
-			midi_loop();
-			gui_system_event_handler();
-		}
+		while (!g_engine->shouldQuit() && digi_play_state(2))
+			gizmo_sound();
 
 		player_set_commands_allowed(true);
 	}
@@ -182,15 +190,13 @@ static void gizmo_digi_wait(int spriteIndex1, int spriteIndex2) {
 	int spriteNum = spriteIndex1;
 	while (digi_play_state(2)) {
 		// Cycle displayed sprite
-		gizmo_restore_sprite(spriteIndex1);
+		gizmo_restore_sprite(spriteNum);
 		spriteNum = (spriteNum == spriteIndex2) ? spriteIndex1 : spriteNum + 1;
 
 		uint32 timer = timer_read_60();
-		while (!g_engine->shouldQuit() && (timer_read_60() - timer) < 6) {
-			digi_read_another_chunk();
-			midi_loop();
-			gui_system_event_handler();
-		}
+
+		while (!g_engine->shouldQuit() && (timer_read_60() - timer) < 6)
+			gizmo_sound();
 	}
 
 	gizmo_restore_sprite(57);




More information about the Scummvm-git-logs mailing list