[Scummvm-git-logs] scummvm master -> 5270fd844b0cf45a61822d85e75faa94d78f98ac
dreammaster
noreply at scummvm.org
Wed Aug 19 05:36:21 UTC 2026
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
3dd3229964 MADS: FOREST: Fix warnings. PVS-Studio V560, V581, V590, V646, V1037, V1048
c7457238b7 MADS: PHANTOM: Fix warnings. PVS-Studio V1048, V590
962328021b MADS: NEBULAR: Fix warnings. PVS-Studio V1071, V779, V560, V512
5270fd844b MADS: NEBULAR: Fix warnings. PVS-Studio V519, V560, V728
Commit: 3dd3229964a660103d861d2322c6c1b2d6ffc3f8
https://github.com/scummvm/scummvm/commit/3dd3229964a660103d861d2322c6c1b2d6ffc3f8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-19T15:17:52+10:00
Commit Message:
MADS: FOREST: Fix warnings. PVS-Studio V560, V581, V590, V646, V1037, V1048
Changed paths:
engines/mads/forest/global.cpp
engines/mads/forest/inventory.cpp
engines/mads/forest/rooms/room104.cpp
engines/mads/forest/rooms/room220.cpp
engines/mads/forest/rooms/room303.cpp
engines/mads/forest/rooms/room308.cpp
engines/mads/forest/rooms/room401.cpp
engines/mads/forest/rooms/room510.cpp
diff --git a/engines/mads/forest/global.cpp b/engines/mads/forest/global.cpp
index befde430810..a87d6f5e4e0 100644
--- a/engines/mads/forest/global.cpp
+++ b/engines/mads/forest/global.cpp
@@ -1144,10 +1144,10 @@ static void do_looping_sounds() {
kernel_timing_trigger(1, 107); // PLAY_MORE_TRICKLE
break;
- case 305:
- // do bird crowd
+ case 210: // rush MORE_RUSH_RUSH
+ case 305: // do bird crowd
kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
- kernel_timing_trigger(1, 109); // DO_CROWD
+ kernel_timing_trigger(1, 109);
break;
case 306:
@@ -1163,6 +1163,7 @@ static void do_looping_sounds() {
break;
case 401:
+ case 405:
// do dragon noise
kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
kernel_timing_trigger(1, 106); // DRAGON_NOISE
@@ -1179,19 +1180,6 @@ static void do_looping_sounds() {
kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
kernel_timing_trigger(1, 110); // DRAGON_NOISE
break;
-
- case 405:
- // do dragon noise
- kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
- kernel_timing_trigger(1, 106); // DRAGON_NOISE
- break;
-
- case 210:
- // rush MORE_RUSH_RUSH
- kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
- kernel_timing_trigger(1, 109); // MORE_RUSH_RUSH
- break;
-
}
}
diff --git a/engines/mads/forest/inventory.cpp b/engines/mads/forest/inventory.cpp
index 4e0719ca142..8692a16e4d4 100644
--- a/engines/mads/forest/inventory.cpp
+++ b/engines/mads/forest/inventory.cpp
@@ -257,14 +257,12 @@ void display_inventory() {
if (object_id <= 15) {
switch (object_id) {
case 0:
+ case 2: case 3: case 6: case 7: case 9: case 11: case 12:
var_22 = (room_id == 521) ? 0 : -1;
break;
case 1: case 10: case 15:
var_22 = (room_id == 308) ? 0 : -1;
break;
- case 2: case 3: case 6: case 7: case 9: case 11: case 12:
- var_22 = (room_id == 521) ? 0 : -1;
- break;
case 4: case 14:
var_22 = (room_id == 307 || room_id == 322 || room_id == 308 ||
room_id == 401 || room_id == 512) ? 0 : -1;
@@ -318,7 +316,7 @@ void display_inventory() {
}
}
- if (object_id == -1 || itemNum == -1 || var_22 != 0) {
+ if (object_id == -1 || var_22 != 0) {
var_E = 0;
continue;
}
diff --git a/engines/mads/forest/rooms/room104.cpp b/engines/mads/forest/rooms/room104.cpp
index 5efb2ea1378..22f7fbd7450 100644
--- a/engines/mads/forest/rooms/room104.cpp
+++ b/engines/mads/forest/rooms/room104.cpp
@@ -107,10 +107,6 @@ static void room_104_init() {
room_104_init1();
return;
case -2:
- if (previous_room == 107) { flags[2] = 5; room_104_init2(); return; }
- flags[2] = -3;
- room_104_init1();
- return;
case -1:
if (previous_room == 107) { flags[2] = 5; room_104_init2(); return; }
flags[2] = -3;
@@ -130,7 +126,6 @@ static void room_104_init() {
room_104_init2();
return;
case 5:
- if (previous_room == 107) flags[2] = 5;
room_104_init2();
return;
case 6:
diff --git a/engines/mads/forest/rooms/room220.cpp b/engines/mads/forest/rooms/room220.cpp
index 54961b20a8b..dd225c76195 100644
--- a/engines/mads/forest/rooms/room220.cpp
+++ b/engines/mads/forest/rooms/room220.cpp
@@ -154,16 +154,14 @@ static void room_220_anim2() {
digi_play_build(220, '_', 3, 2);
break;
case 28:
+ case 46:
+ case 54:
digi_play_build(220, '_', 1, 2);
break;
case 30:
digi_play_build(220, 'R', 2, 1);
scratch._9e = 2;
break;
- case 46:
- case 54:
- digi_play_build(220, '_', 1, 2);
- break;
case 55:
new_room = 221;
break;
diff --git a/engines/mads/forest/rooms/room303.cpp b/engines/mads/forest/rooms/room303.cpp
index 755272f37e7..79e7f60d313 100644
--- a/engines/mads/forest/rooms/room303.cpp
+++ b/engines/mads/forest/rooms/room303.cpp
@@ -325,6 +325,8 @@ static void room_303_anim7() {
switch (idx) {
case 0:
+ case 4:
+ case 8:
aainfo[7]._val3 = 0;
kernel_timing_trigger(30, 28);
scratch._a8++;
@@ -335,6 +337,7 @@ static void room_303_anim7() {
scratch._a8++;
break;
case 2:
+ case 6:
aainfo[6]._val3 = 0;
kernel_timing_trigger(30, 28);
scratch._a8++;
@@ -344,31 +347,16 @@ static void room_303_anim7() {
digi_play_build(303, 'f', 2, 1);
scratch._a8++;
break;
- case 4:
- aainfo[7]._val3 = 0;
- kernel_timing_trigger(30, 28);
- scratch._a8++;
- break;
case 5:
aainfo[6]._val3 = 2;
digi_play_build(303, 'e', 1, 1);
scratch._a8++;
break;
- case 6:
- aainfo[6]._val3 = 0;
- kernel_timing_trigger(30, 28);
- scratch._a8++;
- break;
case 7:
aainfo[7]._val3 = 3;
digi_play_build(303, 'f', 3, 1);
scratch._a8++;
break;
- case 8:
- aainfo[7]._val3 = 0;
- kernel_timing_trigger(30, 28);
- scratch._a8++;
- break;
case 9:
dont_frag_the_palette();
kernel_abort_animation(aa[7]);
diff --git a/engines/mads/forest/rooms/room308.cpp b/engines/mads/forest/rooms/room308.cpp
index 89922b167c3..81686cdf51f 100644
--- a/engines/mads/forest/rooms/room308.cpp
+++ b/engines/mads/forest/rooms/room308.cpp
@@ -412,7 +412,6 @@ static void room_308_anim12() {
aainfo[9]._val3 = (scratch._c0 != 0) ? 11 : 10;
do_e0 = true;
} else if (scratch._b8 == 0) {
- aainfo[8]._val3 = 0;
scratch._b6 = 1;
aainfo[8]._val3 = 7;
kernel_reset_animation(aa[6], 10);
@@ -622,7 +621,7 @@ static void room_308_anim15() {
if (scratch._c0 <= 3) {
scratch._c2 = 6;
} else {
- if (aainfo[13]._val3 != 0 || scratch._c0 == 0 || scratch._c2 != 0 || imath_random(1, 15) != 1) {
+ if (aainfo[13]._val3 != 0 || scratch._c2 != 0 || imath_random(1, 15) != 1) {
result = 6;
} else {
result = 7;
diff --git a/engines/mads/forest/rooms/room401.cpp b/engines/mads/forest/rooms/room401.cpp
index be1fdea23d5..5ae982e2100 100644
--- a/engines/mads/forest/rooms/room401.cpp
+++ b/engines/mads/forest/rooms/room401.cpp
@@ -340,7 +340,6 @@ static void room_401_anim4() {
if (kernel.trigger != 7 && kernel.trigger != 28)
return;
- result = -1;
int16 a0 = scratch._a0 - 53;
if (a0 == 0) {
kernel_timing_trigger(30, 28);
diff --git a/engines/mads/forest/rooms/room510.cpp b/engines/mads/forest/rooms/room510.cpp
index 2e4fc47d1b3..73bde33c5b9 100644
--- a/engines/mads/forest/rooms/room510.cpp
+++ b/engines/mads/forest/rooms/room510.cpp
@@ -208,7 +208,6 @@ static void room_510_anim2() {
if (kernel.trigger == 8) {
if (scratch._90 == 1) {
- scratch._90 = 1;
digi_play_build(503, '_', 2, 3);
digi_val2 = -1;
} else if (scratch._90 == 133) {
Commit: c7457238b73438a89e359f1a24b02c834a8fb988
https://github.com/scummvm/scummvm/commit/c7457238b73438a89e359f1a24b02c834a8fb988
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-19T15:19:59+10:00
Commit Message:
MADS: PHANTOM: Fix warnings. PVS-Studio V1048, V590
Changed paths:
engines/mads/phantom/menus.cpp
engines/mads/phantom/rooms/room501.cpp
diff --git a/engines/mads/phantom/menus.cpp b/engines/mads/phantom/menus.cpp
index 75c4ea5e71a..353f921a04c 100644
--- a/engines/mads/phantom/menus.cpp
+++ b/engines/mads/phantom/menus.cpp
@@ -437,8 +437,6 @@ static void global_menu_options() {
result = popup_execute();
- kernel.activate_menu = GAME_MAIN_MENU;
-
if (result == cancel_button) {
switch (game_menu_popup->key) {
case alt_x_key:
diff --git a/engines/mads/phantom/rooms/room501.cpp b/engines/mads/phantom/rooms/room501.cpp
index a3eafd1bf16..fe2c69415f4 100644
--- a/engines/mads/phantom/rooms/room501.cpp
+++ b/engines/mads/phantom/rooms/room501.cpp
@@ -129,7 +129,7 @@ void room_501_init() {
(ss[fx_left_door], false, KERNEL_LAST);
kernel_seq_depth(seq[fx_left_door], 1);
- } else if ((previous_room == 401) || (previous_room == 408) || (previous_room != KERNEL_RESTORING_GAME)) {
+ } else if (previous_room != KERNEL_RESTORING_GAME) {
player_first_walk(WEST_X, WEST_Y, FACING_EAST, WALK_TO_WEST_X, WALK_TO_WEST_Y, FACING_EAST, true);
seq[fx_door] = kernel_seq_stamp
(ss[fx_door], false, 1);
Commit: 962328021b95209aa74e2926a89659d1d71b8c22
https://github.com/scummvm/scummvm/commit/962328021b95209aa74e2926a89659d1d71b8c22
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-19T15:30:05+10:00
Commit Message:
MADS: NEBULAR: Fix warnings. PVS-Studio V1071, V779, V560, V512
Changed paths:
engines/mads/nebular/mac_menus.cpp
engines/mads/nebular/mac_resources.cpp
engines/mads/nebular/mps_installer.cpp
engines/mads/nebular/popup.cpp
diff --git a/engines/mads/nebular/mac_menus.cpp b/engines/mads/nebular/mac_menus.cpp
index eb28dd0aa62..d345c065720 100644
--- a/engines/mads/nebular/mac_menus.cpp
+++ b/engines/mads/nebular/mac_menus.cpp
@@ -157,7 +157,7 @@ bool readMenuResource(Common::SeekableReadStream &stream, MenuResource &resource
if (stream.pos() + 4 > stream.size())
return false;
- /* byte icon = */ stream.readByte();
+ /* byte icon = */ (void)stream.readByte();
item.key = stream.readByte();
item.mark = stream.readByte();
item.style = stream.readByte();
@@ -874,8 +874,7 @@ void selectMacintoshDifficulty(MacNebularMenu *menus) {
const int nativeDifficulty = menus ? menus->runDifficultyDialog() :
DIFFICULTY_MEDIUM;
- if (nativeDifficulty >= DIFFICULTY_HARD &&
- nativeDifficulty <= DIFFICULTY_EASY) {
+ if (nativeDifficulty != -1) {
game.difficulty = nativeDifficulty;
return;
}
diff --git a/engines/mads/nebular/mac_resources.cpp b/engines/mads/nebular/mac_resources.cpp
index a1a001e8452..ad69081802b 100644
--- a/engines/mads/nebular/mac_resources.cpp
+++ b/engines/mads/nebular/mac_resources.cpp
@@ -365,8 +365,6 @@ MacResourceProvider::ResourceID MacResourceProvider::mapResource(const Common::S
return result;
const int section = room / 100;
- if (section < 1 || section > 9)
- return result;
result.container = (Container)(kSection1Container + section - 1);
const int extensionAt = name.findLastOf('.');
@@ -641,7 +639,8 @@ bool MacResourceProvider::setCursor(int id) {
_nextCursorTime = g_system->getMillis() + 15;
return installCursorResource(1000);
}
- if (id >= 3 && id <= 6)
+
+ if (id <= 6)
return installCursorResource(3000 + id);
return false;
}
diff --git a/engines/mads/nebular/mps_installer.cpp b/engines/mads/nebular/mps_installer.cpp
index 33dd6671551..3a330e39352 100644
--- a/engines/mads/nebular/mps_installer.cpp
+++ b/engines/mads/nebular/mps_installer.cpp
@@ -145,7 +145,6 @@ Common::SharedArchiveContents MpsInstaller::readContentsForPath(const Common::Pa
} break;
default:
error("Unsupported compression algorithm");
- uncompressedBuf = nullptr;
break;
}
diff --git a/engines/mads/nebular/popup.cpp b/engines/mads/nebular/popup.cpp
index 8edb80bde0d..8e8e18c8c84 100644
--- a/engines/mads/nebular/popup.cpp
+++ b/engines/mads/nebular/popup.cpp
@@ -193,9 +193,7 @@ void popup_draw() {
void popup_setup_cycle() {
font_set_colors(-1, DIALOG_BLACK_COLOR, DIALOG_BLACK_COLOR, DIALOG_BLACK_COLOR);
- memcpy(&cycling_palette[Graphics::PALETTE_COUNT - PALETTE_CYCLING_AREA].r,
- &master_palette[Graphics::PALETTE_COUNT - PALETTE_CYCLING_AREA].r,
- PALETTE_CYCLING_AREA * sizeof(RGBcolor));
+ memcpy(&cycling_palette[248].r, &master_palette[248].r, 8 * sizeof(RGBcolor));
pal_grey(master_palette, DIALOG_CONTENT1_COLOR, 2, 36, 32);
pal_grey(master_palette, DIALOG_EDGE_COLOR, 2, 39, 28);
pal_grey(master_palette, DIALOG_FC_COLOR, 2, 36, 32);
Commit: 5270fd844b0cf45a61822d85e75faa94d78f98ac
https://github.com/scummvm/scummvm/commit/5270fd844b0cf45a61822d85e75faa94d78f98ac
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-19T15:33:59+10:00
Commit Message:
MADS: NEBULAR: Fix warnings. PVS-Studio V519, V560, V728
Changed paths:
engines/mads/nebular/rooms/room307.cpp
engines/mads/nebular/rooms/room608.cpp
engines/mads/nebular/rooms/room611.cpp
engines/mads/nebular/rooms/room620.cpp
engines/mads/nebular/rooms/teleporter.cpp
diff --git a/engines/mads/nebular/rooms/room307.cpp b/engines/mads/nebular/rooms/room307.cpp
index 4acf4a95174..aa4e813f821 100644
--- a/engines/mads/nebular/rooms/room307.cpp
+++ b/engines/mads/nebular/rooms/room307.cpp
@@ -415,7 +415,7 @@ static void room_307_daemon() {
}
local._lastFrameTime = kernel.clock;
- if ((local._guardTime > 3000) && !local._duringPeeingFl && (kernel_anim[0].anim == nullptr)
+ if ((local._guardTime > 3000) && (kernel_anim[0].anim == nullptr)
&& (inter_input_mode != INTER_CONVERSATION) && global[kMetBuddyBeast] && !local._activePrisonerFl) {
if (!player_has(OBJ_SCALPEL) && !local._grateOpenedFl) {
player.commands_allowed = false;
diff --git a/engines/mads/nebular/rooms/room608.cpp b/engines/mads/nebular/rooms/room608.cpp
index a156b721c8b..724e0c00196 100644
--- a/engines/mads/nebular/rooms/room608.cpp
+++ b/engines/mads/nebular/rooms/room608.cpp
@@ -675,7 +675,7 @@ static void room_608_daemon() {
break;
case 85:
- if (local._rexBeingEaten && (local._animationMode == 1)) {
+ if (local._animationMode == 1) {
g_engine->_soundManager->command(12, 0);
kernel_timing_trigger(10, 85);
}
diff --git a/engines/mads/nebular/rooms/room611.cpp b/engines/mads/nebular/rooms/room611.cpp
index ced680b8506..0927f6bd5be 100644
--- a/engines/mads/nebular/rooms/room611.cpp
+++ b/engines/mads/nebular/rooms/room611.cpp
@@ -113,11 +113,7 @@ static void setDialogNode(int node) {
}
static bool check2ChargedBatteries() {
- if ((player_has(OBJ_DURAFAIL_CELLS) && !player_has(OBJ_PHONE_CELLS))
- || (!player_has(OBJ_DURAFAIL_CELLS) && player_has(OBJ_PHONE_CELLS)))
- return true;
-
- return false;
+ return bool(player_has(OBJ_DURAFAIL_CELLS)) != bool(player_has(OBJ_PHONE_CELLS));
}
static bool check4ChargedBatteries() {
diff --git a/engines/mads/nebular/rooms/room620.cpp b/engines/mads/nebular/rooms/room620.cpp
index 77a3482bf83..dc1d3f8a2a4 100644
--- a/engines/mads/nebular/rooms/room620.cpp
+++ b/engines/mads/nebular/rooms/room620.cpp
@@ -60,7 +60,7 @@ static void room_620_daemon() {
global[kCityFlooded] = true;
global[kTeleporterRoom + 5] = 0;
new_room = previous_room;
- } else if (previous_room >= 501 && previous_room <= 612) {
+ } else if (previous_room <= 612) {
global[kResurrectRoom] = global[kHoverCarLocation];
inter_give_to_player(OBJ_TIMEBOMB);
global[kTimebombStatus] = 0;
diff --git a/engines/mads/nebular/rooms/teleporter.cpp b/engines/mads/nebular/rooms/teleporter.cpp
index 64c48b09d3e..98b5f82820c 100644
--- a/engines/mads/nebular/rooms/teleporter.cpp
+++ b/engines/mads/nebular/rooms/teleporter.cpp
@@ -44,7 +44,6 @@ static char _msgText2[256];
void teleporter_init() {
_buttonTyped = -1;
- _digitCount = -1;
_curMessageId = -1;
_handSequenceId = -1;
_meteorologistNextPlace = -1;
More information about the Scummvm-git-logs
mailing list