[Scummvm-git-logs] scummvm master -> 8fbaa3ff56e02269e655e597bca149a8a0833d80
dreammaster
noreply at scummvm.org
Sat Aug 1 01:44:49 UTC 2026
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
7ff440d7f5 MADS: Coverity warning fixes
800690b6d0 MADS: Remove ifndef disable_statistics blocks
fa370e2852 MADS: Remove ifdef sixteen_colors and log_vocab blocks
b9d3b07aed MADS: DRAGONSPHERE: Special handling in inter_show_all_actions
3d8fae4e99 MADS: Remove ifdef disable_error_check blocks
8fbaa3ff56 MADS: Remove word_align_mattes ifdef
Commit: 7ff440d7f5e335a3ecd1303c7d69b0251844ce30
https://github.com/scummvm/scummvm/commit/7ff440d7f5e335a3ecd1303c7d69b0251844ce30
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T11:44:35+10:00
Commit Message:
MADS: Coverity warning fixes
Changed paths:
engines/mads/core/camera.cpp
engines/mads/core/color.cpp
engines/mads/core/conv.cpp
engines/mads/core/dialog.cpp
engines/mads/core/dialog.h
engines/mads/core/implode.cpp
engines/mads/core/inter.cpp
diff --git a/engines/mads/core/camera.cpp b/engines/mads/core/camera.cpp
index 5fd6666d84e..fc67aa9f572 100644
--- a/engines/mads/core/camera.cpp
+++ b/engines/mads/core/camera.cpp
@@ -128,10 +128,8 @@ static int camera_pan(Camera *camera, int *picture_view, int *player_loc,
high_edge = *picture_view - camera->pan_on_tolerance + display_size - 1;
if (*player_loc < low_edge) {
- if (picture_view) {
- camera->panning = true;
- camera->pan_direction = -1;
- }
+ camera->panning = true;
+ camera->pan_direction = -1;
}
if (*player_loc > high_edge) {
diff --git a/engines/mads/core/color.cpp b/engines/mads/core/color.cpp
index 507865a3ac7..8ab0e13431b 100644
--- a/engines/mads/core/color.cpp
+++ b/engines/mads/core/color.cpp
@@ -106,7 +106,7 @@ int color_list_update(ColorListPtr list, Buffer *scan_buf, Palette *scan_pal, by
byte r, g, b;
word cycle_value;
word value[256];
- byte reverse_map[256];
+ byte reverse_map[256] = { 0 };
ColorList temp_list;
result = 0;
diff --git a/engines/mads/core/conv.cpp b/engines/mads/core/conv.cpp
index 91364edb700..543b6af931f 100644
--- a/engines/mads/core/conv.cpp
+++ b/engines/mads/core/conv.cpp
@@ -1787,6 +1787,7 @@ int conv_expand(Common::SeekableReadStream *handle) {
int count;
int16 list[CONV_MAX_SLOTS];
ConvData *convData;
+ bool success = true;
Common::fill(conv_indexes, conv_indexes + CONV_MAX_SLOTS, 0);
@@ -1795,7 +1796,7 @@ int conv_expand(Common::SeekableReadStream *handle) {
for (int i = 0; i < count; ++i)
list[i] = handle->readSint16LE();
- for (int i = 0; i < count; ++i) {
+ for (int i = 0; i < count && success; ++i) {
int index = list[i];
conv_indexes[index] = 1;
@@ -1808,14 +1809,11 @@ int conv_expand(Common::SeekableReadStream *handle) {
convData = conv_read(handle);
// Write it out to the temporary file
- bool success = false;
+ success = false;
if (convData)
success = !conv_write(dest, convData);
- if (!success) {
- delete convData;
- break;
- }
+ delete convData;
}
return 0;
diff --git a/engines/mads/core/dialog.cpp b/engines/mads/core/dialog.cpp
index 069ae4033dd..4ab892eb1a3 100644
--- a/engines/mads/core/dialog.cpp
+++ b/engines/mads/core/dialog.cpp
@@ -3159,7 +3159,7 @@ int dialog_alert(int x, int y, int buttons, const char *string1,
}
dialog_add_blank(dialog);
- if (string1 != NULL) dialog_add_message(dialog, DD_IX_CENTER, DD_IY_AUTOFILL, string1);
+ dialog_add_message(dialog, DD_IX_CENTER, DD_IY_AUTOFILL, string1);
if (string2 != NULL) dialog_add_message(dialog, DD_IX_CENTER, DD_IY_AUTOFILL, string2);
if (string3 != NULL) dialog_add_message(dialog, DD_IX_CENTER, DD_IY_AUTOFILL, string3);
if (string4 != NULL) dialog_add_message(dialog, DD_IX_CENTER, DD_IY_AUTOFILL, string4);
@@ -3199,11 +3199,6 @@ int dialog_alert_ok(const char *string1, const char *string2,
return dialog_alert(DD_CENTER, DD_CENTER, DD_OK_BUTTON, string1, string2, string3, string4);
}
-void dialog_newsay(int x, int y) {
- dialog_set_string_space(say_dialog, &say_dialog_work[0], SAY_DIALOG_SIZE);
- dialog_create(say_dialog, x, y, DD_AUTO, DD_DEFAULT, DD_DEFAULT, DD_DEFAULT);
-}
-
void dialog_say(const char *message, int x) {
dialog_add_message(say_dialog, x, DD_IY_AUTOFILL, message);
}
diff --git a/engines/mads/core/dialog.h b/engines/mads/core/dialog.h
index a2373b2f250..ee8a181343d 100644
--- a/engines/mads/core/dialog.h
+++ b/engines/mads/core/dialog.h
@@ -390,7 +390,6 @@ extern int dialog_alert_center(int buttons, const char *string1,
const char *string2, const char *string3, const char *string4);
extern int dialog_alert_ok(const char *string1, const char *string2,
const char *string3, const char *string4);
-extern void dialog_newsay(int x, int y);
extern void dialog_say(const char *message, int x);
extern Window dialog_sayit(int saymode);
diff --git a/engines/mads/core/implode.cpp b/engines/mads/core/implode.cpp
index fbbb99a5fe4..da529ebd3d5 100644
--- a/engines/mads/core/implode.cpp
+++ b/engines/mads/core/implode.cpp
@@ -354,7 +354,7 @@ word explode(
// buffers. In the flat C model this is a no-op.
continue;
} else {
- cx = (int)aux + 1;
+ cx = (uint)aux + 1;
while (cx-- > 0) {
byte b = s.flat[s.di + bx];
exp_put_byte(&s, b);
diff --git a/engines/mads/core/inter.cpp b/engines/mads/core/inter.cpp
index 4a2c2ec9151..1f9f2406e29 100644
--- a/engines/mads/core/inter.cpp
+++ b/engines/mads/core/inter.cpp
@@ -1072,7 +1072,7 @@ static void inter_select_word() {
int mode;
int limit = 0;
int strict, delta;
- int tight_boxes;
+ int tight_boxes = false;
int difference = 0;
int *selection;
int base_spot, this_spot;
Commit: 800690b6d07366d755f538ca984c35bbf8e10f12
https://github.com/scummvm/scummvm/commit/800690b6d07366d755f538ca984c35bbf8e10f12
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T11:44:35+10:00
Commit Message:
MADS: Remove ifndef disable_statistics blocks
Changed paths:
engines/mads/core/himem.cpp
engines/mads/core/loader.cpp
engines/mads/core/loader.h
diff --git a/engines/mads/core/himem.cpp b/engines/mads/core/himem.cpp
index 72c5e73cfea..66a37771978 100644
--- a/engines/mads/core/himem.cpp
+++ b/engines/mads/core/himem.cpp
@@ -330,14 +330,6 @@ int himem_preload(char *filename, int level) {
preload_handle = new_handle;
-#ifndef disable_statistics
- if (memory_type == MEM_EMS) {
- himem_ems_preloaded++;
- } else {
- himem_xms_preloaded++;
- }
-#endif
-
done:
if (load_buf != NULL) mem_free(load_buf);
if (handle.open) loader_close(&handle);
@@ -616,14 +608,6 @@ int himem_preload_series(const char *fname, int level) {
preload_handle = new_handle;
-#ifndef disable_statistics
- if (memory_type == MEM_EMS) {
- himem_ems_preloaded++;
- } else {
- himem_xms_preloaded++;
- }
-#endif
-
done:
if (decompress_buffer != NULL) mem_free(decompress_buffer);
if (load_buf != NULL) mem_free(load_buf);
diff --git a/engines/mads/core/loader.cpp b/engines/mads/core/loader.cpp
index 56a5eff353f..5aa86114435 100644
--- a/engines/mads/core/loader.cpp
+++ b/engines/mads/core/loader.cpp
@@ -37,20 +37,6 @@
namespace MADS {
-
-/* debug stuff */
-#ifndef disable_statistics
-long loader_found_in_ems = 0;
-long loader_found_in_xms = 0;
-long loader_found_on_disk = 0;
-long loader_timing_ems = 0;
-long loader_timing_xms = 0;
-long loader_timing_disk = 0;
-long loader_size_ems = 0;
-long loader_size_xms = 0;
-long loader_size_disk = 0;
-#endif
-
int loader_ems_search_disabled = false;
char loader_last[14] = "";
@@ -119,20 +105,11 @@ int loader_open(LoadHandle handle, const char *filename, const char *options, in
handle->pack_list_marker = 0;
handle->reading = true;
- // printf ("Opened %d with xms handle %d\n", found_himem, himem_directory_entry->xms_handle);
for (count = 0; count < (int)handle->pack.num_records; count++) {
handle->pack.strategy[count].type = PACK_NONE;
handle->pack.strategy[count].size = himem_directory_entry->packet_size[count];
handle->pack.strategy[count].compressed_size = himem_directory_entry->packet_size[count];
}
-
-#ifndef disable_statistics
- if (himem_directory_entry->memory_type == MEM_EMS) {
- loader_found_in_ems++;
- } else {
- loader_found_in_xms++;
- }
-#endif
} else {
handle->mode = LOADER_DISK;
handle->ems_handle = -1;
@@ -153,10 +130,6 @@ int loader_open(LoadHandle handle, const char *filename, const char *options, in
} else {
error("Open for writing not supported in ScummVM");
}
-
-#ifndef disable_statistics
- loader_found_on_disk++;
-#endif
}
handle->open = true;
@@ -208,14 +181,6 @@ long loader_read(void *target, long record_size, long record_count, LoadHandle h
int marker;
int already_unpacked = false;
-#ifndef disable_statistics
- long start_timing;
- long finish_timing;
- long total_timing;
-
- start_timing = timer_read_600();
-#endif
-
if (!record_size)
return 0;
@@ -276,22 +241,6 @@ long loader_read(void *target, long record_size, long record_count, LoadHandle h
}
}
-#ifndef disable_statistics
- finish_timing = timer_read_600();
- total_timing = finish_timing - start_timing;
-
- if (handle->mode == LOADER_EMS) {
- loader_timing_ems += total_timing;
- loader_size_ems += total_size;
- } else if (handle->mode == LOADER_XMS) {
- loader_timing_xms += total_timing;
- loader_size_xms += total_size;
- } else {
- loader_timing_disk += total_timing;
- loader_size_disk += total_size;
- }
-#endif
-
done:
if (decompress_buffer != NULL)
mem_free(decompress_buffer);
diff --git a/engines/mads/core/loader.h b/engines/mads/core/loader.h
index b766723ae21..957dd1cb04d 100644
--- a/engines/mads/core/loader.h
+++ b/engines/mads/core/loader.h
@@ -79,20 +79,6 @@ public:
}
};
-
-/* Debug tracking variables */
-#ifndef disable_statistics
-extern long loader_found_in_ems;
-extern long loader_found_in_xms;
-extern long loader_found_on_disk;
-extern long loader_timing_ems;
-extern long loader_timing_xms;
-extern long loader_timing_disk;
-extern long loader_size_ems;
-extern long loader_size_xms;
-extern long loader_size_disk;
-#endif
-
extern int loader_ems_search_disabled;
extern char loader_last[14];
Commit: fa370e285224e3106f0161a62c65f77cb8411b41
https://github.com/scummvm/scummvm/commit/fa370e285224e3106f0161a62c65f77cb8411b41
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T11:44:36+10:00
Commit Message:
MADS: Remove ifdef sixteen_colors and log_vocab blocks
Changed paths:
engines/mads/core/inter.cpp
engines/mads/core/kernel.cpp
diff --git a/engines/mads/core/inter.cpp b/engines/mads/core/inter.cpp
index 1f9f2406e29..ffe1cd8eace 100644
--- a/engines/mads/core/inter.cpp
+++ b/engines/mads/core/inter.cpp
@@ -673,12 +673,6 @@ static void inter_update(int x1, int y1, int xs, int ys) {
x1 + inter_base_x, y1a,
xs, ys);
-#ifdef sixteen_colors
- if (video_mode == ega_mode) {
- video_flush_ega(y1a, (y1a + ys - 1));
- }
-#endif
-
if (refresh_flag) mouse_refresh_done();
mouse_thaw();
}
diff --git a/engines/mads/core/kernel.cpp b/engines/mads/core/kernel.cpp
index 2c46bc7cbc6..996fc7af410 100644
--- a/engines/mads/core/kernel.cpp
+++ b/engines/mads/core/kernel.cpp
@@ -170,10 +170,6 @@ int kernel_load_vocab() {
int error_flag;
int count;
int count2;
-#ifdef log_vocab
- FILE *handle;
- long before, after;
-#endif
// Load all main command verbs
for (count = 0; count < INTER_COMMANDS; count++) {
@@ -197,22 +193,8 @@ int kernel_load_vocab() {
}
}
-#ifdef log_vocab
- before = mem_get_avail();
-#endif
-
error_flag = vocab_load_active();
-#ifdef log_vocab
- after = mem_get_avail();
- if (fileio_exist("vocab.log")) {
- handle = fopen("vocab.log", "wt");
- fprintf(handle, "Room %d Vocab words: %d Memory: %ld\n",
- room_id, vocab_active, before - after);
- fclose(handle);
- }
-#endif
-
return error_flag;
}
Commit: b9d3b07aedfc3a939634db34c52c685e88304d12
https://github.com/scummvm/scummvm/commit/b9d3b07aedfc3a939634db34c52c685e88304d12
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T11:44:36+10:00
Commit Message:
MADS: DRAGONSPHERE: Special handling in inter_show_all_actions
Changed paths:
engines/mads/core/inter.cpp
diff --git a/engines/mads/core/inter.cpp b/engines/mads/core/inter.cpp
index ffe1cd8eace..da0710ab22c 100644
--- a/engines/mads/core/inter.cpp
+++ b/engines/mads/core/inter.cpp
@@ -538,26 +538,30 @@ static void inter_show_all_inven() {
* work buffer.
*/
static void inter_show_all_actions() {
- int count;
+ int count, id;
if (active_inven >= 0) {
for (count = 0; count < (int)object[inven[active_inven]].num_verbs; count++) {
- inter_show_word(STROKE_ACTION, count);
-#if 0
- int id = object[inven[active_inven]].vocab_id;
- id = object_named(id);
- // id = object[inven[active_inven]].verb[count].count;
- if (id == 8) { // pid doll
- if (global[86]) { // heal_verbs_visible
- inter_show_word(STROKE_ACTION, count);
- } else if (count == 0) {
+ if (g_engine->getGameID() == GType_Dragonsphere) {
+ // Special handling for Pid Doll
+ id = object[inven[active_inven]].vocab_id;
+ id = object_named(id);
+
+ if (id == Dragonsphere::pid_doll) {
+ if (global[Dragonsphere::heal_verbs_visible]) {
+ // heal_verbs_visible
+ inter_show_word(STROKE_ACTION, count);
+ } else if (count == 0) {
+ inter_show_word(STROKE_ACTION, count);
+ }
+
+ } else {
inter_show_word(STROKE_ACTION, count);
}
-
} else {
+ // All other games
inter_show_word(STROKE_ACTION, count);
}
-#endif
}
}
}
Commit: 3d8fae4e99778a282016cff98462cdcac81a7a08
https://github.com/scummvm/scummvm/commit/3d8fae4e99778a282016cff98462cdcac81a7a08
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T11:44:36+10:00
Commit Message:
MADS: Remove ifdef disable_error_check blocks
Changed paths:
engines/mads/core/inter.cpp
engines/mads/core/kernel.cpp
engines/mads/core/matte.cpp
engines/mads/core/pal.cpp
diff --git a/engines/mads/core/inter.cpp b/engines/mads/core/inter.cpp
index da0710ab22c..e2ed29029d0 100644
--- a/engines/mads/core/inter.cpp
+++ b/engines/mads/core/inter.cpp
@@ -52,8 +52,6 @@
namespace MADS {
-#define disable_error_check
-
int stroke_type = STROKE_NONE; /* Current stroke type */
int inter_auxiliary_click; /* Clicks during downtime */
@@ -692,11 +690,6 @@ static void inter_image(int x1, int y1, int xs, int ys) {
image_inter_list[image_inter_marker].series_id = (byte)ys;
image_inter_marker++;
}
-#ifndef disable_error_check
- else {
- error_report(ERROR_IMAGE_INTER_LIST_FULL, WARNING, MODULE_INTER, IMAGE_INTER_LIST_SIZE, 1);
- }
-#endif
}
static void inter_scrollbar_refresh() {
@@ -809,11 +802,6 @@ void inter_set_active_inven(int new_active) {
image_inter_list[image_inter_marker].series_id = (byte)ys;
image_inter_marker++;
}
-#ifndef disable_error_check
- else {
- error_report(ERROR_IMAGE_INTER_LIST_FULL, WARNING, MODULE_INTER, IMAGE_INTER_LIST_SIZE, 2);
- }
-#endif
matte_inter_frame(false, false);
@@ -1868,11 +1856,6 @@ static void inter_background_animation() {
image_inter_list[image_inter_marker].flags = IMAGE_UPDATE;
image_inter_marker++;
}
-#ifndef disable_error_check
- else {
- error_report(ERROR_IMAGE_INTER_LIST_FULL, WARNING, MODULE_INTER, IMAGE_INTER_LIST_SIZE, 3);
- }
-#endif
}
}
@@ -1905,11 +1888,6 @@ void inter_spinning_object() {
image_inter_list[image_inter_marker].y = inter_object_base_y;
image_inter_marker++;
}
-#ifndef disable_error_check
- else {
- error_report(ERROR_IMAGE_INTER_LIST_FULL, WARNING, MODULE_INTER, IMAGE_INTER_LIST_SIZE, 3);
- }
-#endif
}
done:
diff --git a/engines/mads/core/kernel.cpp b/engines/mads/core/kernel.cpp
index 996fc7af410..39d67d72360 100644
--- a/engines/mads/core/kernel.cpp
+++ b/engines/mads/core/kernel.cpp
@@ -277,10 +277,6 @@ int kernel_game_startup(int game_video_mode, int load_flag,
int reserve[EMS_PAGING_CLASSES];
byte *interrupt_stack;
-#ifndef disable_error_check
- int error_code = 0;
-#endif
-
// Set up EMS/XMS paging system, if any
himem_startup();
@@ -348,9 +344,6 @@ int kernel_game_startup(int game_video_mode, int load_flag,
buffer_init_name(&scr_main, video_x, video_y, "$scrmain");
}
if (scr_main.data == NULL) {
-#ifndef disable_error_check
- error_code = ERROR_NO_MORE_MEMORY;
-#endif
goto done;
}
@@ -383,12 +376,9 @@ int kernel_game_startup(int game_video_mode, int load_flag,
}
if ((font_main == NULL) || (font_inter == NULL) || (font_conv == NULL) ||
- (!isRexDemo && font_misc == NULL) ||
- (g_engine->getGameID() != GType_RexNebular && font_menu == NULL) ||
- (g_engine->getGameID() == GType_RexNebular && !isRexDemo && font_tele == NULL)) {
-#ifndef disable_error_check
- error_code = ERROR_KERNEL_NO_FONTS;
-#endif
+ (!isRexDemo && font_misc == NULL) ||
+ (g_engine->getGameID() != GType_RexNebular && font_menu == NULL) ||
+ (g_engine->getGameID() == GType_RexNebular && !isRexDemo && font_tele == NULL)) {
goto done;
}
}
@@ -406,9 +396,6 @@ int kernel_game_startup(int game_video_mode, int load_flag,
// Load the objects list
if (load_flag & KERNEL_STARTUP_OBJECTS) {
if (object_load()) {
-#ifndef disable_error_check
- error_code = ERROR_KERNEL_NO_OBJECTS;
-#endif
goto done;
}
if (inven_num_objects > 0) {
@@ -439,9 +426,6 @@ int kernel_game_startup(int game_video_mode, int load_flag,
// Load cursor sprite series
cursor = sprite_series_load("*CURSOR.SS", PAL_MAP_RESERVED);
if (cursor == NULL) {
-#ifndef disable_error_check
- error_code = ERROR_KERNEL_NO_CURSOR;
-#endif
goto done;
}
@@ -456,7 +440,6 @@ int kernel_game_startup(int game_video_mode, int load_flag,
if (load_flag & KERNEL_STARTUP_POPUP && g_engine->getGameID() != GType_RexNebular) {
if (popup_box_load()) {
- error_code = ERROR_KERNEL_NO_POPUP;
goto done;
}
}
@@ -471,10 +454,6 @@ done:
mouse_show();
if (error_flag) {
-#ifndef disable_error_check
- error_check_memory();
- error_report(error_code, ERROR, MODULE_KERNEL, 0, 0);
-#endif
kernel_game_shutdown();
}
@@ -534,10 +513,6 @@ int kernel_room_startup(int newRoom, int initial_variant, const char *interface,
bool new_palette, bool barebones) {
int error_flag = true;
int load_flags;
-#ifndef disable_error_check
- int error_code = 0;
- int error_data = 0;
-#endif
// Make a note of the new room number & variant
previous_room = room_id;
@@ -554,7 +529,6 @@ int kernel_room_startup(int newRoom, int initial_variant, const char *interface,
// Load up popup box frame
if (g_engine->getGameID() == GType_Phantom && popup_box_load()) {
- error_code = ERROR_KERNEL_NO_POPUP;
goto done;
}
@@ -585,10 +559,6 @@ int kernel_room_startup(int newRoom, int initial_variant, const char *interface,
-1,
load_flags);
if (room == NULL) {
-#ifndef disable_error_check
- error_data = room_load_error;
- error_code = ERROR_KERNEL_NO_ROOM;
-#endif
goto done;
}
@@ -628,9 +598,6 @@ int kernel_room_startup(int newRoom, int initial_variant, const char *interface,
// Load up the room's hotspot table
room_spots = room_load_hotspots(room_id, &room_num_spots);
if (room_spots == NULL) {
-#ifndef disable_error_check
- error_code = ERROR_KERNEL_NO_HOTSPOTS;
-#endif
goto done;
}
@@ -670,10 +637,6 @@ finish:
done:
if (error_flag) {
-#ifndef disable_error_check
- error_check_memory();
- error_report(error_code, ERROR, MODULE_KERNEL, room_id, error_data);
-#endif
kernel_room_shutdown();
}
return error_flag;
@@ -696,13 +659,6 @@ int kernel_load_series(const char *name, int load_flags) {
handle = matte_load_series(name, load_flags, 0);
- if ((handle < 0) && !kernel_ok_to_fail_load) {
-#ifndef disable_error_check
- Common::strcpy_s(error_string, name);
- error_report(ERROR_SERIES_LOAD_FAILED, WARNING, MODULE_KERNEL, handle, sprite_error);
-#endif
- }
-
return handle;
}
@@ -757,9 +713,6 @@ int kernel_seq_add(int series_id, int mirror, int initial_sprite,
}
if (!found) {
-#if !defined(disable_error_check)
- error_report(ERROR_SEQUENCE_LIST_FULL, WARNING, MODULE_KERNEL, KERNEL_MAX_SEQUENCES, 0);
-#endif
goto done;
}
@@ -1060,9 +1013,6 @@ int kernel_timing_trigger(int ticks, int trigger_code) {
}
if (!found) {
-#if !defined(disable_error_check)
- error_report(ERROR_SEQUENCE_LIST_FULL, WARNING, MODULE_KERNEL, KERNEL_MAX_SEQUENCES, 0);
-#endif
goto done;
}
@@ -1500,11 +1450,8 @@ int kernel_run_animation(const char *name, int trigger_code) {
done:
if (error_flag) {
- if (found >= 0) kernel_abort_animation(found);
-#ifndef disable_error_check
- Common::strcpy_s(error_string, name);
- error_report(ERROR_KERNEL_NO_ANIMATION, WARNING, MODULE_KERNEL, trigger_code, anim_error);
-#endif
+ if (found >= 0)
+ kernel_abort_animation(found);
}
anim_error = 0;
diff --git a/engines/mads/core/matte.cpp b/engines/mads/core/matte.cpp
index 9860e742b1f..4d2cecee585 100644
--- a/engines/mads/core/matte.cpp
+++ b/engines/mads/core/matte.cpp
@@ -39,9 +39,6 @@
#include "mads/core/video.h"
#include "mads/core/anim.h"
#include "mads/core/matte.h"
-#ifndef disable_error_check
-#include "mads/core/error.h"
-#endif
namespace MADS {
@@ -139,11 +136,6 @@ int matte_allocate_series(SeriesPtr series, int bonus_series_number) {
series_list[handle] = series;
}
}
-#ifndef disable_error_check
- if (handle < 0) {
- error_report(ERROR_SERIES_LIST_FULL, ERROR, MODULE_MATTE, SERIES_LIST_SIZE, 0);
- }
-#endif
return handle;
}
@@ -221,13 +213,8 @@ void matte_deallocate_series(int id, int free_memory) {
// Protect against memory fragmentation
if (id < SERIES_LIST_SIZE) {
- if (id == series_list_marker - 1) {
+ if (id == series_list_marker - 1)
series_list_marker--;
- } else {
-#ifndef disable_error_check
- error_report(ERROR_WRONG_SERIES_UNLOAD_ORDER, WARNING, MODULE_MATTE, id, series_list_marker);
-#endif
- }
}
done:
@@ -254,9 +241,6 @@ int matte_allocate_image() {
int result;
if (image_marker >= IMAGE_LIST_SIZE) {
-#if !defined(disable_error_check)
- error_report(ERROR_IMAGE_LIST_FULL, ERROR, MODULE_MATTE, IMAGE_LIST_SIZE, image_marker);
-#endif
result = -1;
} else {
result = image_marker++;
@@ -293,13 +277,7 @@ int matte_add_message(FontPtr font, char *text, int x, int y, int message_color,
message_list[message_handle].active = true;
}
}
-#ifndef disable_error_check
-#ifndef disable_minor_error
- if (message_handle < 0) {
- error_report(ERROR_MESSAGE_LIST_FULL, ERROR, MODULE_MATTE, MESSAGE_LIST_SIZE, 0);
- }
-#endif
-#endif
+
return message_handle;
}
@@ -983,9 +961,6 @@ int matte_allocate_inter_image() {
int result;
if (image_inter_marker >= IMAGE_INTER_LIST_SIZE) {
-#if !defined(disable_error_check)
- error_report(ERROR_IMAGE_INTER_LIST_FULL, ERROR, MODULE_MATTE, IMAGE_INTER_LIST_SIZE, image_inter_marker);
-#endif
result = -1;
} else {
result = image_inter_marker++;
diff --git a/engines/mads/core/pal.cpp b/engines/mads/core/pal.cpp
index d578fb7772b..f952c23d735 100644
--- a/engines/mads/core/pal.cpp
+++ b/engines/mads/core/pal.cpp
@@ -249,13 +249,6 @@ static int pal_get_new_flag() {
}
}
- // If no handles left to allocate:
- if (return_code < 0) {
-#ifndef disable_error_check
- error_report(ERROR_NO_MORE_PALETTE_FLAGS, ERROR, MODULE_PAL, PAL_MAXFLAGS, 100);
-#endif
- }
-
done:
return return_code;
}
@@ -495,9 +488,7 @@ int pal_allocate(ColorListPtr new_list, ShadowListPtr shadow_list, int pal_flags
} else {
pal_manager_colors = new_list->num_colors;
pal_exec(pal_manager_update, 3);
-#ifndef disable_error_check
- error_report(ERROR_NO_MORE_COLORS, ERROR, MODULE_PAL, new_list->num_colors, search_color);
-#endif
+
return_code = PAL_ERR_OUTOFCOLORS;
goto done;
}
@@ -607,9 +598,6 @@ int pal_get_color(RGBcolor color, int color_handle, int override_reserved, int *
}
if (result < 0) {
-#ifndef disable_error_check
- error_report(ERROR_NO_MORE_PALETTE_FLAGS, ERROR, MODULE_PAL, PAL_MAXFLAGS, 1);
-#endif
return result; // No flags left to allocate
}
} else {
@@ -643,9 +631,6 @@ int pal_get_color(RGBcolor color, int color_handle, int override_reserved, int *
}
if (!found) {
-#ifndef disable_error_check
- error_report(ERROR_NO_MORE_COLORS, ERROR, MODULE_PAL, 1, 1);
-#endif
result = PAL_ERR_OUTOFCOLORS;
}
Commit: 8fbaa3ff56e02269e655e597bca149a8a0833d80
https://github.com/scummvm/scummvm/commit/8fbaa3ff56e02269e655e597bca149a8a0833d80
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-01T11:44:36+10:00
Commit Message:
MADS: Remove word_align_mattes ifdef
Changed paths:
engines/mads/core/matte.cpp
diff --git a/engines/mads/core/matte.cpp b/engines/mads/core/matte.cpp
index 4d2cecee585..6fb16e1d84b 100644
--- a/engines/mads/core/matte.cpp
+++ b/engines/mads/core/matte.cpp
@@ -42,8 +42,6 @@
namespace MADS {
-#define word_align_mattes
-
/* Global data structures */
SeriesPtr series_list[SERIES_LIST_SIZE + SERIES_BONUS_SIZE];
@@ -288,7 +286,6 @@ void matte_clear_message(int handle) {
void bound_matte(MattePtr matte, int xs, int ys, int maxx, int maxy) {
int x2, y2;
-#if defined(word_align_mattes)
if (matte->x & 1) {
matte->x -= 1;
xs++;
@@ -296,7 +293,6 @@ void bound_matte(MattePtr matte, int xs, int ys, int maxx, int maxy) {
if (xs & 1) {
xs++;
}
-#endif
x2 = matte->x + xs - 1; // Determine right most point
matte->x = MAX(0, matte->x); // Scale coordinates to work
More information about the Scummvm-git-logs
mailing list