[Scummvm-git-logs] scummvm master -> e4d897bf7013a2dc37e2d8c7caf7fa66cd95c509
Strangerke
noreply at scummvm.org
Wed Feb 26 06:46:48 UTC 2025
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:
e4d897bf70 M4: BURGER: Fix a bug in dialog of room 105 pointed by CID 1532976, some cleanup
Commit: e4d897bf7013a2dc37e2d8c7caf7fa66cd95c509
https://github.com/scummvm/scummvm/commit/e4d897bf7013a2dc37e2d8c7caf7fa66cd95c509
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-02-26T07:46:36+01:00
Commit Message:
M4: BURGER: Fix a bug in dialog of room 105 pointed by CID 1532976, some cleanup
Changed paths:
engines/m4/burger/rooms/section1/room105.cpp
diff --git a/engines/m4/burger/rooms/section1/room105.cpp b/engines/m4/burger/rooms/section1/room105.cpp
index 35370c6b101..9e5736be3c7 100644
--- a/engines/m4/burger/rooms/section1/room105.cpp
+++ b/engines/m4/burger/rooms/section1/room105.cpp
@@ -45,7 +45,7 @@ static const char *SAID[][4] = {
static const seriesPlayBreak PLAY1[] = {
{ 0, 5, "105_014", 2, 255, -1, 0, 0, nullptr, 0 },
- { 6, -1, 0, 1, 255, 28, 0, 0, nullptr, 0 },
+ { 6, -1, nullptr, 1, 255, 28, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
@@ -254,7 +254,7 @@ static const seriesPlayBreak PLAY31[] = {
{ 7, 7, "105_002", 2, 255, -1, 0, 0, nullptr, 0 },
{ 6, 6, nullptr, 1, 255, -1, 0, 0, nullptr, 0 },
{ 7, 7, "105_002", 2, 255, -1, 0, 0, nullptr, 0 },
- { 3, 0, 0, 1, 255, -1, 0, 0, nullptr, 0 },
+ { 3, 0, nullptr, 1, 255, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
@@ -267,7 +267,7 @@ static const seriesPlayBreak PLAY32[] = {
void Room105::init() {
_val1 = 1;
- _series5 = 0;
+ _series5 = nullptr;
digi_preload("105_001");
Common::fill(&_series1[0], &_series1[12], -1);
@@ -1045,9 +1045,6 @@ void Room105::daemon() {
break;
case 5:
- player_set_commands_allowed(true);
- break;
-
case 6:
player_set_commands_allowed(true);
break;
@@ -1330,7 +1327,7 @@ void Room105::pre_parser() {
}
void Room105::parser() {
- bool lookFlag = player_said("look") || player_said("look at");
+ const bool lookFlag = player_said("look") || player_said("look at");
_G(kernel).trigger_mode = KT_DAEMON;
if (player_said("conv12")) {
@@ -1407,8 +1404,8 @@ void Room105::parser() {
void Room105::conv10() {
_G(kernel).trigger_mode = KT_PARSE;
- int who = conv_whos_talking();
- int node = conv_current_node();
+ const int who = conv_whos_talking();
+ const int node = conv_current_node();
if (_G(kernel).trigger == 10) {
if (who <= 0) {
@@ -1469,9 +1466,9 @@ void Room105::conv10() {
void Room105::conv11() {
_G(kernel).trigger_mode = KT_PARSE;
- int who = conv_whos_talking();
- int node = conv_current_node();
- int entry = conv_current_entry();
+ const int who = conv_whos_talking();
+ const int node = conv_current_node();
+ const int entry = conv_current_entry();
if (_G(kernel).trigger == 10) {
if (who <= 0) {
@@ -1492,7 +1489,7 @@ void Room105::conv11() {
kernel_timing_trigger(30, 1);
} else if ((node == 8 && entry == 1) ||
- (node == 1 && entry == 4 && inv_player_has("deed"))) {
+ (node == 11 && entry == 4 && inv_player_has("deed"))) {
_G(kernel).trigger_mode = KT_DAEMON;
kernel_timing_trigger(1, 29);
_elgusShould = 5;
@@ -1503,7 +1500,7 @@ void Room105::conv11() {
kernel_trigger_dispatch_now(kCHANGE_ELGUS_ANIMATION);
}
} else if (who == 1) {
- sendWSMessage(0x150000, 0, _G(my_walker), 0, 0, 1);
+ sendWSMessage(0x150000, 0, _G(my_walker), 0, nullptr, 1);
conv_resume();
}
} else if (conv_sound_to_play()) {
@@ -1545,7 +1542,7 @@ void Room105::conv11() {
kernel_timing_trigger(1, 32);
_G(kernel).trigger_mode = KT_PARSE;
} else if (node != 13 || entry != 0) {
- sendWSMessage(0x140000, 0, _G(my_walker), 0, 0, 1);
+ sendWSMessage(0x140000, 0, _G(my_walker), 0, nullptr, 1);
}
digi_play(conv_sound_to_play(), 1, 255, 10);
@@ -1557,9 +1554,9 @@ void Room105::conv11() {
void Room105::conv12() {
_G(kernel).trigger_mode = KT_PARSE;
- int who = conv_whos_talking();
- int node = conv_current_node();
- int entry = conv_current_entry();
+ const int who = conv_whos_talking();
+ const int node = conv_current_node();
+ const int entry = conv_current_entry();
if (_G(kernel).trigger == 10) {
if (who <= 0) {
@@ -1601,7 +1598,7 @@ void Room105::conv12() {
if (node == 16 && entry == 1)
digi_unload("12p1702");
- sendWSMessage(0x150000, 0, _G(my_walker), 0, 0, 1);
+ sendWSMessage(0x150000, 0, _G(my_walker), 0, nullptr, 1);
conv_resume();
}
} else if (conv_sound_to_play()) {
@@ -1638,7 +1635,7 @@ void Room105::conv12() {
_val1 = 0;
}
- sendWSMessage(0x140000, 0, _G(my_walker), 0, 0, 1);
+ sendWSMessage(0x140000, 0, _G(my_walker), 0, nullptr, 1);
digi_play(conv_sound_to_play(), 1, 255, 10);
}
} else {
@@ -1648,14 +1645,14 @@ void Room105::conv12() {
void Room105::conv13() {
_G(kernel).trigger_mode = KT_PARSE;
- int who = conv_whos_talking();
- int node = conv_current_node();
+ const int who = conv_whos_talking();
+ const int node = conv_current_node();
if (_G(kernel).trigger == 10) {
if (who <= 0) {
_elgusShould = 59;
} else if (who == 1) {
- sendWSMessage(0x150000, 0, _G(my_walker), 0, 0, 1);
+ sendWSMessage(0x150000, 0, _G(my_walker), 0, nullptr, 1);
}
conv_resume();
@@ -1666,7 +1663,7 @@ void Room105::conv13() {
_savedTrigger = 10;
_digi1 = conv_sound_to_play();
} else if (who == 1) {
- sendWSMessage(0x140000, 0, _G(my_walker), 0, 0, 1);
+ sendWSMessage(0x140000, 0, _G(my_walker), 0, nullptr, 1);
digi_play(conv_sound_to_play(), 1, 255, 10);
}
} else {
More information about the Scummvm-git-logs
mailing list