[Scummvm-git-logs] scummvm master -> c3fac80f48245cfd6e3219079afff108ad886f15

dreammaster noreply at scummvm.org
Fri Apr 24 06:56:34 UTC 2026


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

Summary:
c3fac80f48 MADS: PHANTOM: Compiler warning fixes


Commit: c3fac80f48245cfd6e3219079afff108ad886f15
    https://github.com/scummvm/scummvm/commit/c3fac80f48245cfd6e3219079afff108ad886f15
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-24T16:55:10+10:00

Commit Message:
MADS: PHANTOM: Compiler warning fixes

Changed paths:
    engines/mads/madsv2/core/loader.cpp
    engines/mads/madsv2/core/magic.cpp
    engines/mads/madsv2/core/matte.cpp
    engines/mads/madsv2/core/mcga.cpp
    engines/mads/madsv2/core/mouse.cpp
    engines/mads/madsv2/core/pack.cpp
    engines/mads/madsv2/core/pal.cpp
    engines/mads/madsv2/core/pfab.cpp


diff --git a/engines/mads/madsv2/core/loader.cpp b/engines/mads/madsv2/core/loader.cpp
index 83210a925fe..2ab8e6622e1 100644
--- a/engines/mads/madsv2/core/loader.cpp
+++ b/engines/mads/madsv2/core/loader.cpp
@@ -67,7 +67,6 @@ int loader_open(LoadHandle handle, const char *filename, const char *options, in
 	int reading;
 	int count;
 	int search_himem;
-	long base_position;
 
 	strncpy(loader_last, filename, 13);
 
@@ -116,13 +115,9 @@ int loader_open(LoadHandle handle, const char *filename, const char *options, in
 		handle->pack_list_marker = 0;
 
 		if (reading) {
-			base_position = handle->handle->pos();
-
 			if (!handle->pack.load(handle->handle))
 				goto done;
 
-			base_position = handle->handle->pos();
-
 			handle->decompress_size = 0;
 			for (count = 0; count < (int)handle->pack.num_records; count++) {
 				handle->decompress_size += handle->pack.strategy[count].size;
@@ -191,7 +186,6 @@ int loader_close(LoadHandle handle) {
 
 long loader_read(void *target, long record_size, long record_count, LoadHandle handle) {
 	long total_size;
-	long total_left;
 	long result;
 	long file_position;
 	long compressed_size;
@@ -212,7 +206,6 @@ long loader_read(void *target, long record_size, long record_count, LoadHandle h
 		return 0;
 
 	total_size = record_size * record_count;
-	total_left = total_size;
 
 	marker = handle->pack_list_marker++;
 
diff --git a/engines/mads/madsv2/core/magic.cpp b/engines/mads/madsv2/core/magic.cpp
index 44c191194f3..56ae1c3692d 100644
--- a/engines/mads/madsv2/core/magic.cpp
+++ b/engines/mads/madsv2/core/magic.cpp
@@ -43,12 +43,12 @@ namespace MADSV2 {
 #define MAX_RADIUS      210
 
 /*
-/*      If the "magic_color_flag" for a color gun is set, then the grey
-/*      intensity ramp for its pixels is used during the fade, shifted
-/*      left by its "magic_color_value" (0 means no shift, negative means
-/*      shift right).  If "magic_color_flag" is false, then then that gun
-/*      fades to the precise color value specified by magic_color_value.
-*/
+ * If the "magic_color_flag" for a color gun is set, then the grey
+ * intensity ramp for its pixels is used during the fade, shifted
+ * left by its "magic_color_value" (0 means no shift, negative means
+ * shift right).  If "magic_color_flag" is false, then then that gun
+ * fades to the precise color value specified by magic_color_value.
+ */
 byte magic_color_flags[3] = { true, true, true };
 byte magic_color_values[3] = { 0, 0, 0 };
 
diff --git a/engines/mads/madsv2/core/matte.cpp b/engines/mads/madsv2/core/matte.cpp
index 2c26cd0d36b..d178ffe3d3f 100644
--- a/engines/mads/madsv2/core/matte.cpp
+++ b/engines/mads/madsv2/core/matte.cpp
@@ -613,10 +613,8 @@ static void matte_special_effect(int special_effect, int full_screen) {
 			if (mem_get_avail() < 3600) special_effect = MATTE_FX_FAST_AND_FANCY;
 		}
 
-		if (special_effect == MATTE_FX_FAST_AND_FANCY) {
-			if (viewing_at_y || (mem_get_avail() < sizeof(Palette))) {
-				special_effect = MATTE_FX_FAST_THRU_BLACK;
-			}
+		if (special_effect == MATTE_FX_FAST_AND_FANCY && viewing_at_y) {
+			special_effect = MATTE_FX_FAST_THRU_BLACK;
 		}
 	}
 
diff --git a/engines/mads/madsv2/core/mcga.cpp b/engines/mads/madsv2/core/mcga.cpp
index 96cdca5c0cd..4c7f759af32 100644
--- a/engines/mads/madsv2/core/mcga.cpp
+++ b/engines/mads/madsv2/core/mcga.cpp
@@ -137,11 +137,6 @@ void mcga_retrace() {
 	g_engine->getScreen()->update();
 }
 
-static word mcga_time_palette_swap(Palette *pal, int first_color, int num_colors) {
-	mcga_setpal(pal);
-	return 0;
-}
-
 void mcga_compute_retrace_parameters(void) {
 	mcga_setpal(&master_palette);
 
diff --git a/engines/mads/madsv2/core/mouse.cpp b/engines/mads/madsv2/core/mouse.cpp
index 75e0ec3ffbc..e8d4db27068 100644
--- a/engines/mads/madsv2/core/mouse.cpp
+++ b/engines/mads/madsv2/core/mouse.cpp
@@ -120,13 +120,8 @@ void mouse_end_cycle(int double_flag, int timing_flag) {
 
 void mouse_cursor_sprite(SeriesPtr series, int id) {
 	byte work_area[17][17];
-	Buffer load_buffer = { 17, 17 };
-	int hot_x, hot_y, count;
-
-	load_buffer.data = &work_area[0][0];
-
-	hot_x = 0;
-	hot_y = 0;
+	Buffer load_buffer = { 17, 17, &work_area[0][0] };
+	int hot_x = 0, hot_y = 0, count;
 
 	buffer_fill(load_buffer, 255);
 	sprite_draw(series, id, &load_buffer, 0, 0);
diff --git a/engines/mads/madsv2/core/pack.cpp b/engines/mads/madsv2/core/pack.cpp
index bec7a715b17..c855aaf5860 100644
--- a/engines/mads/madsv2/core/pack.cpp
+++ b/engines/mads/madsv2/core/pack.cpp
@@ -34,7 +34,7 @@ namespace MADS {
 namespace MADSV2 {
 
 byte *pack_special_buffer = NULL;
-void (*(pack_special_function))() = NULL;
+void (*pack_special_function)() = NULL;
 byte *pack_read_memory_ptr;
 byte *pack_write_memory_ptr;
 long pack_read_size;            /* Size left to read   */
diff --git a/engines/mads/madsv2/core/pal.cpp b/engines/mads/madsv2/core/pal.cpp
index 11af9f7eeac..b4f24102500 100644
--- a/engines/mads/madsv2/core/pal.cpp
+++ b/engines/mads/madsv2/core/pal.cpp
@@ -137,7 +137,6 @@ void pal_unlock() {
 }
 
 int pal_deallocate(int use_flag) {
-	int return_code = PAL_ERR_BADFLAG;
 	int count;
 	dword mask;
 
@@ -155,14 +154,10 @@ int pal_deallocate(int use_flag) {
 		}
 	}
 
-	if (!flag_used[use_flag]) {
-		return_code = PAL_ERR_FLAGNOTUSED;
+	if (!flag_used[use_flag])
 		goto done;
-	}
-	flag_used[use_flag] = false;
-
-	return_code = false;
 
+	flag_used[use_flag] = false;
 	pal_exec(pal_manager_update, 4);
 
 done:
@@ -306,7 +301,6 @@ int pal_allocate(ColorListPtr new_list, ShadowListPtr shadow_list, int pal_flags
 	int search_start;
 	int search_stop;
 	dword mask;
-	dword reserved_mask;
 	dword cycle_mask;
 	dword bonus;
 	ShadowList incoming_shadow;
@@ -378,12 +372,6 @@ int pal_allocate(ColorListPtr new_list, ShadowListPtr shadow_list, int pal_flags
 	}
 	sort_insertion_8(new_list->num_colors, reordering_index, reordering_hash);
 
-	if (pal_flags & PAL_MAP_RESERVED) {
-		reserved_mask = 0xffffffff;
-	} else {
-		reserved_mask = 0xfffffffe;
-	}
-
 	// Now, for each color in our color list, find an appropriate mapping or
 	// create a new one from available color space.
 	for (search_color = 0; search_color < new_list->num_colors; search_color++) {
diff --git a/engines/mads/madsv2/core/pfab.cpp b/engines/mads/madsv2/core/pfab.cpp
index 4abec62e8ad..37702320210 100644
--- a/engines/mads/madsv2/core/pfab.cpp
+++ b/engines/mads/madsv2/core/pfab.cpp
@@ -276,7 +276,6 @@ static void match(CompWork *w, unsigned di) {
 
 	int   best_len = 0;
 	unsigned best_pos = 0;
-	int   rem = ZIV - 1;  // chars still to match
 
 	unsigned chain = w->hash[key];
 	while (chain != NIL) {
@@ -300,7 +299,6 @@ static void match(CompWork *w, unsigned di) {
 		if (this_len > best_len) {
 			best_len = this_len;
 			best_pos = chain;
-			rem = ZIV - 1 - matched;
 		}
 		chain = w->hash[chain];
 	}




More information about the Scummvm-git-logs mailing list