[Scummvm-git-logs] scummvm master -> 31acce0c9fe0b5097a03ecad2194775121b7d1d0
dreammaster
noreply at scummvm.org
Fri Jan 26 06:55:03 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
aac32e988b M4: Cleanup of wilbur in chair code in room 102
31acce0c9f M4: Cleanups and fixes for room 102
Commit: aac32e988b9bc774b0e7bf9f07d4d615dd56894b
https://github.com/scummvm/scummvm/commit/aac32e988b9bc774b0e7bf9f07d4d615dd56894b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-01-25T22:54:42-08:00
Commit Message:
M4: Cleanup of wilbur in chair code in room 102
Changed paths:
engines/m4/burger/rooms/section1/room102.cpp
engines/m4/burger/rooms/section1/room102.h
diff --git a/engines/m4/burger/rooms/section1/room102.cpp b/engines/m4/burger/rooms/section1/room102.cpp
index ae1bb4c6f00..8b8680462be 100644
--- a/engines/m4/burger/rooms/section1/room102.cpp
+++ b/engines/m4/burger/rooms/section1/room102.cpp
@@ -30,7 +30,8 @@ namespace Burger {
namespace Rooms {
enum {
- kCHANGE_HARRY_ANIMATION = 3
+ kCHANGE_HARRY_ANIMATION = 3,
+ kCHANGE_WILBUR_CHAIR_ANIMATION = 4
};
static const seriesStreamBreak STREAMS1[] = {
@@ -102,10 +103,10 @@ void Room102::init() {
_val4 = 0;
_val5 = 0;
_val6 = 0;
- _series4 = 0;
_val8 = 0;
_val9 = 0;
_val10 = 99999;
+ _G(flags)[V298] = 1;
digi_preload("102_001");
digi_preload("102_002");
@@ -118,8 +119,8 @@ void Room102::init() {
_harryShould = 35;
kernel_trigger_dispatch_now(kCHANGE_HARRY_ANIMATION);
- _val13 = 58;
- _val14 = 62;
+ _wilburChairShould = 58;
+ _wilburChairMode = 62;
kernel_trigger_dispatch_now(4);
hotspot_set_active("harry", false);
@@ -232,7 +233,7 @@ void Room102::daemon() {
series_play("102ha01", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 8, 0, 100, 0, 0, 46, 48);
break;
default:
- series_play("102ha01", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 4, 0, 100, 0, 0, 0, 0);
+ series_play("102ha01", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 40, 0, 100, 0, 0, 0, 0);
break;
}
break;
@@ -285,8 +286,8 @@ void Room102::daemon() {
case 33:
digi_unload_stream_breaks(STREAMS1);
- _val14 = 62;
- _val13 = 58;
+ _wilburChairMode = 62;
+ _wilburChairShould = 58;
kernel_trigger_dispatch_now(4);
digi_stop(2);
_index2 = series_load("102ha03", -1);
@@ -501,10 +502,10 @@ void Room102::daemon() {
break;
case 41:
- _val13 = 65;
+ _wilburChairShould = 65;
series_unload(_index2);
_harryMode = 42;
- sub1();
+ freeWilburChair();
digi_preload_stream_breaks(STREAMS4);
series_play("102ha04s", 1024, 0, -1, 6, 0, 100, 0, 0, 0, -1);
@@ -514,8 +515,8 @@ void Room102::daemon() {
case 42:
digi_unload_stream_breaks(STREAMS4);
digi_stop(2);
- _val14 = 59;
- _val13 = 58;
+ _wilburChairMode = 59;
+ _wilburChairShould = 58;
kernel_trigger_dispatch_now(4);
_index3 = series_load("102wi05", -1);
@@ -613,10 +614,10 @@ void Room102::daemon() {
break;
case 50:
- sub1();
+ freeWilburChair();
series_unload(_index4);
series_unload(_index3);
- _val13 = 65;
+ _wilburChairShould = 65;
_harryMode = 51;
series_play_with_breaks(PLAY1, "102ha11", 0xa00, 3, 3, 6, 100, 0, 0);
break;
@@ -748,65 +749,60 @@ void Room102::daemon() {
}
break;
- case 4:
- switch (_val14) {
+ case kCHANGE_WILBUR_CHAIR_ANIMATION:
+ switch (_wilburChairMode) {
case 59:
- switch (_val13) {
+ switch (_wilburChairShould) {
case 58:
- _series4 = series_play("102wi05", 0xb00, 0, 4, 10, -1, 100, 0, 0, 0, 0);
- _series5 = series_play("102wi05s", 0xb01, 0, -1, 10, -1, 100, 0, 0, 0, 0);
+ _wilburChair.play("102wi05", 0xb00, 0, kCHANGE_WILBUR_CHAIR_ANIMATION, 10, -1, 100, 0, 0, 0, 0);
break;
case 60:
- sub1();
+ freeWilburChair();
frame = imath_ranged_rand(1, 5);
- series_play("102wi05", 0xb00, 0, 4, 4, 0, 100, 0, 0, frame, frame);
- series_play("102wi05s", 0xb01, 0, -1, 4, 0, 100, 0, 0, frame, frame);
+ Series::series_play("102wi05", 0xb00, 0, kCHANGE_WILBUR_CHAIR_ANIMATION, 4, 0, 100, 0, 0, frame, frame);
break;
case 63:
- sub1();
- _val14 = 64;
- _val13 = 58;
- series_play_with_breaks(PLAY3, "102wi05", 0xb00, 4, 3, 6, 100, 0, 0);
+ freeWilburChair();
+ _wilburChairMode = 64;
+ _wilburChairShould = 58;
+ series_play_with_breaks(PLAY3, "102wi05", 0xb00, kCHANGE_WILBUR_CHAIR_ANIMATION, 3, 6, 100, 0, 0);
break;
default:
- sub1();
+ freeWilburChair();
break;
}
break;
case 62:
- switch (_val13) {
+ switch (_wilburChairShould) {
case 58:
- _series4 = series_play("102wi03", 0xb00, 0, -1, 600, -1, 100, 0, 0, 2, 2);
- _series5 = series_play("102wi03s", 0xb00, 0, -1, 600, -1, 100, 0, 0, 2, 2);
+ _wilburChair.play("102wi03", 0xb00, 0, -1, 600, -1, 100, 0, 0, 2, 2);
break;
case 60:
- sub1();
+ freeWilburChair();
frame = imath_ranged_rand(0, 5);
- series_play("102wi03", 0xb00, 0, 4, 4, 0, 100, 0, 0, frame, frame);
- series_play("102wi03s", 0xb00, 0, -1, 4, 0, 100, 0, 0, frame, frame);
+ Series::series_play("102wi03", 0xb00, 0, kCHANGE_WILBUR_CHAIR_ANIMATION, 4, 0, 100, 0, 0, frame, frame);
break;
case 61:
- sub1();
- _val13 = 60;
- series_play("102wi03", 0xb00, 1, 4, 6, 0, 100, 0, 0, 6, 9);
- series_play("102wi03s", 0xb00, 1, -1, 6, 0, 100, 0, 0, 6, 9);
+ freeWilburChair();
+ _wilburChairShould = 60;
+ Series::series_play("102wi03", 0xb00, 1, kCHANGE_WILBUR_CHAIR_ANIMATION, 6, 0, 100, 0, 0, 6, 9);
break;
default:
- sub1();
+ freeWilburChair();
break;
}
break;
case 64:
- _val14 = 59;
- kernel_trigger_dispatch_now(4);
+ _wilburChairMode = 59;
+ kernel_trigger_dispatch_now(kCHANGE_WILBUR_CHAIR_ANIMATION);
break;
default:
@@ -1457,11 +1453,8 @@ const char *Room102::getDigi2(int num) const {
return (num >= 1 && num <= 35) ? NAMES[num - 1] : "102_024";
}
-void Room102::sub1() {
- if (_series4) {
- terminateMachineAndNull(_series4);
- terminateMachineAndNull(_series5);
- }
+void Room102::freeWilburChair() {
+ _wilburChair.terminate();
}
void Room102::queuePlay(const char *filename, int trigger, KernelTriggerType triggerMode) {
@@ -1534,7 +1527,7 @@ void Room102::conv04() {
if (node == 4 && entry == 1) {
// Nothing
} else if (node == 4 && entry == 2) {
- _val13 = 58;
+ _wilburChairShould = 58;
conv_resume_curr();
} else {
_G(wilbur_should) = 10002;
@@ -1561,7 +1554,7 @@ void Room102::conv04() {
digi_preload("04p0502", 102);
digi_play(sound, 1, 255, 22);
} else if (node == 4 && entry == 2) {
- _val13 = 60;
+ _wilburChairShould = 60;
_G(kernel).trigger_mode = KT_DAEMON;
kernel_trigger_dispatch_now(4);
_G(kernel).trigger_mode = KT_PARSE;
@@ -1594,7 +1587,7 @@ void Room102::conv05() {
_harryMode = 35;
}
} else if (who == 1) {
- _val13 = 58;
+ _wilburChairShould = 58;
}
conv_resume_curr();
@@ -1605,9 +1598,9 @@ void Room102::conv05() {
} else if (who == 1) {
if ((node == 1 && entry == 1) || (node == 3 && entry == 0) ||
(node == 3 && entry == 3) || (node == 5 && entry == 3)) {
- _val13 = 61;
+ _wilburChairShould = 61;
} else {
- _val13 = 60;
+ _wilburChairShould = 60;
}
_G(kernel).trigger_mode = KT_DAEMON;
@@ -1645,12 +1638,12 @@ void Room102::conv06() {
} else if (who == 1) {
if (node == 1 && entry == 1) {
- _val13 = 63;
+ _wilburChairShould = 63;
} else if (node == 2) {
_harryMode = _G(flags)[GLB_TEMP_4] == 1 ? 49 : 48;
- _val13 = 58;
+ _wilburChairShould = 58;
} else {
- _val13 = 58;
+ _wilburChairShould = 58;
conv_resume_curr();
}
}
@@ -1687,10 +1680,10 @@ void Room102::conv06() {
}
} else if (who == 1) {
- if (_val14 == 64) {
+ if (_wilburChairMode == 64) {
kernel_timing_trigger(30, 7);
} else {
- _val13 = 60;
+ _wilburChairShould = 60;
_G(kernel).trigger_mode = KT_DAEMON;
kernel_trigger_dispatch_now(4);
}
diff --git a/engines/m4/burger/rooms/section1/room102.h b/engines/m4/burger/rooms/section1/room102.h
index d91ea50be32..f15b9bfe594 100644
--- a/engines/m4/burger/rooms/section1/room102.h
+++ b/engines/m4/burger/rooms/section1/room102.h
@@ -40,16 +40,15 @@ private:
uint32 _val10 = 99999;
int _harryMode = 0;
int _harryShould = 0;
- int _val13 = 0;
- int _val14 = 0;
+ int _wilburChairShould = 0;
+ int _wilburChairMode = 0;
int _val16 = 0;
int _trigger = -1;
KernelTriggerType _triggerMode = KT_DAEMON;
machine *_series1 = nullptr;
machine *_series1s = nullptr;
machine *_series3 = nullptr;
- machine *_series4 = nullptr;
- machine *_series5 = nullptr;
+ Series _wilburChair;
machine *_series6 = nullptr;
machine *_series7 = nullptr;
machine *_laz1 = nullptr;
@@ -66,7 +65,7 @@ private:
void setupLaz();
const char *getDigi1(int num) const;
const char *getDigi2(int num) const;
- void sub1();
+ void freeWilburChair();
void queuePlay(const char *filename, int trigger = 29, KernelTriggerType triggerMode = KT_DAEMON);
void freshen();
void conv04();
Commit: 31acce0c9fe0b5097a03ecad2194775121b7d1d0
https://github.com/scummvm/scummvm/commit/31acce0c9fe0b5097a03ecad2194775121b7d1d0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-01-25T22:54:42-08:00
Commit Message:
M4: Cleanups and fixes for room 102
Changed paths:
engines/m4/burger/rooms/section1/room102.cpp
diff --git a/engines/m4/burger/rooms/section1/room102.cpp b/engines/m4/burger/rooms/section1/room102.cpp
index 8b8680462be..b21e46f5b29 100644
--- a/engines/m4/burger/rooms/section1/room102.cpp
+++ b/engines/m4/burger/rooms/section1/room102.cpp
@@ -469,8 +469,7 @@ void Room102::daemon() {
case 36:
_harryShould = 36;
- series_play("102ha03", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 6, 0, 100, 0, 0, 16, 16);
- series_play("102ha03s", 0xa01, 0, -1, 6, 0, 100, 0, 0, 16, 16);
+ Series::series_play("102ha03", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 6, 0, 100, 0, 0, 16, 16);
break;
case 37:
@@ -478,7 +477,7 @@ void Room102::daemon() {
_G(flags)[GLB_TEMP_5] = 2;
digi_preload_stream_breaks(STREAMS2);
series_play("102ha09s", 0x101, 0, -1, 6, 0, 100, 0, 0, 0, -1);
- series_stream_with_breaks(STREAMS2, "102ha09", 6, 256, 3);
+ series_stream_with_breaks(STREAMS2, "102ha09", 6, 0x100, 3);
break;
case 38:
@@ -508,7 +507,7 @@ void Room102::daemon() {
freeWilburChair();
digi_preload_stream_breaks(STREAMS4);
- series_play("102ha04s", 1024, 0, -1, 6, 0, 100, 0, 0, 0, -1);
+ series_play("102ha04s", 0x400, 0, -1, 6, 0, 100, 0, 0, 0, -1);
series_stream_with_breaks(STREAMS4, "102ha04", 6, 0x300, 3);
break;
@@ -517,7 +516,7 @@ void Room102::daemon() {
digi_stop(2);
_wilburChairMode = 59;
_wilburChairShould = 58;
- kernel_trigger_dispatch_now(4);
+ kernel_trigger_dispatch_now(kCHANGE_WILBUR_CHAIR_ANIMATION);
_index3 = series_load("102wi05", -1);
_index4 = series_load("102ha05", -1);
@@ -526,7 +525,7 @@ void Room102::daemon() {
Series::series_play("102ha05", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 6, 0, 100, 0, 0, 0, 4);
- conv_load_and_prepare("conv06", 21, false);
+ conv_load_and_prepare("conv06", 21);
conv_export_pointer_curr(&_val4, 0);
conv_export_value_curr(_G(flags)[V001], 1);
conv_play_curr();
@@ -597,6 +596,7 @@ void Room102::daemon() {
case 44:
_harryMode = 45;
Series::series_play("102ha05", 0xa00, 0, kCHANGE_HARRY_ANIMATION, 6, 0, 100, 0, 0, 16, 24);
+ conv_resume_curr();
break;
case 45:
@@ -605,12 +605,12 @@ void Room102::daemon() {
case 48:
_harryMode = 49;
- Series::series_play("102ha05", 0xa00, 2, 3, 6, 0, 100, 0, 0, 0, 3);
+ Series::series_play("102ha05", 0xa00, 2, kCHANGE_HARRY_ANIMATION, 6, 0, 100, 0, 0, 0, 3);
break;
case 49:
_harryMode = 50;
- Series::series_play("102ha05", 0xb02, 2, 3, 30, 0, 100, 0, 0, 8, 8);
+ Series::series_play("102ha05", 0xb02, 2, kCHANGE_HARRY_ANIMATION, 30, 0, 100, 0, 0, 8, 8);
break;
case 50:
@@ -619,7 +619,7 @@ void Room102::daemon() {
series_unload(_index3);
_wilburChairShould = 65;
_harryMode = 51;
- series_play_with_breaks(PLAY1, "102ha11", 0xa00, 3, 3, 6, 100, 0, 0);
+ series_play_with_breaks(PLAY1, "102ha11", 0xa00, kCHANGE_HARRY_ANIMATION, 3, 6, 100, 0, 0);
break;
case 51:
@@ -641,7 +641,7 @@ void Room102::daemon() {
terminateMachineAndNull(_series1);
terminateMachineAndNull(_series1s);
_harryMode = 47;
- series_play_with_breaks(PLAY2, "102ha06", 0xa00, 3, 3, 6, 100, 0, 0);
+ series_play_with_breaks(PLAY2, "102ha06", 0xa00, kCHANGE_HARRY_ANIMATION, 3, 6, 100, 0, 0);
hotspot_set_active("harry", true);
break;
More information about the Scummvm-git-logs
mailing list