[Scummvm-git-logs] scummvm master -> 6f039142d838940d3d7f89aee999c671b31bd535
dreammaster
noreply at scummvm.org
Mon Jan 15 06:29:42 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:
8479e6a91e M4: RIDDLE: Added menu room 494
6f039142d8 M4: RIDDLE: Implement game tick handler
Commit: 8479e6a91e7159b86e098f83a10b2e65eb21b9a4
https://github.com/scummvm/scummvm/commit/8479e6a91e7159b86e098f83a10b2e65eb21b9a4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-01-14T22:15:24-08:00
Commit Message:
M4: RIDDLE: Added menu room 494
Changed paths:
engines/m4/graphics/gr_series.cpp
engines/m4/graphics/gr_series.h
engines/m4/riddle/inventory.cpp
engines/m4/riddle/inventory.h
engines/m4/riddle/rooms/room.cpp
engines/m4/riddle/rooms/room.h
engines/m4/riddle/rooms/section4/room494.cpp
engines/m4/riddle/rooms/section4/room494.h
engines/m4/riddle/walker.cpp
engines/m4/riddle/walker.h
diff --git a/engines/m4/graphics/gr_series.cpp b/engines/m4/graphics/gr_series.cpp
index b2e0fb238ef..b0dc4d3bf24 100644
--- a/engines/m4/graphics/gr_series.cpp
+++ b/engines/m4/graphics/gr_series.cpp
@@ -241,6 +241,10 @@ machine *series_show(const char *seriesName, frac16 layer, uint32 flags, int16 t
return m;
}
+machine *series_show_sprite(const char *seriesName, int32 index, int32 layer) {
+ return series_show(seriesName, layer, 0x40, -1, -1, index);
+}
+
machine *series_play(const char *seriesName, frac16 layer, uint32 flags, int16 triggerNum,
int32 frameRate, int32 loopCount, int32 s, int32 x, int32 y,
int32 firstFrame, int32 lastFrame) {
diff --git a/engines/m4/graphics/gr_series.h b/engines/m4/graphics/gr_series.h
index 96a7cd93b33..37b24cf8fd8 100644
--- a/engines/m4/graphics/gr_series.h
+++ b/engines/m4/graphics/gr_series.h
@@ -95,7 +95,7 @@ bool series_draw_sprite(int32 spriteHash, int32 index, Buffer *destBuff, int32 x
bool series_show_frame(int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y);
//machine *series_place_sprite(const char *seriesName, int32 index, int32 x, int32 y, int32 s, int32 layer); // was series_show_sprite
-//machine *series_show_sprite(const char *seriesName, int32 index, int32 layer); // was simple_show_sprite
+machine *series_show_sprite(const char *seriesName, int32 index, int32 layer);
machine *series_play(const char *seriesName, frac16 layer, uint32 flags = 0,
int16 triggerNum = -1, int32 frameRate = 6, int32 loopCount = 0, int32 s = 100,
diff --git a/engines/m4/riddle/inventory.cpp b/engines/m4/riddle/inventory.cpp
index ce74f700355..caf4a4854fc 100644
--- a/engines/m4/riddle/inventory.cpp
+++ b/engines/m4/riddle/inventory.cpp
@@ -26,23 +26,161 @@
namespace M4 {
namespace Riddle {
-struct InvObject {
- const char *_name;
- const char *_verbs;
- int32 _scene, _cel, _cursor;
+
+#define INVENTORY_COUNT 123
+
+const char *const INVENTORY_NAMES[123] = {
+ "SOLDIER'S HELMET",
+ "BUCKET",
+ "RIPLEY PHOTO",
+ "LEAD PIPE",
+ "SEVEN SPOKES",
+ "MALLET",
+ "GONG",
+ "WHEELED TOY",
+ "CHARCOAL",
+ "POST MARKED ENVELOPE",
+ "TURTLE",
+ "TURTLE TREATS",
+ "PLANK",
+ "PASS",
+ "KEY",
+ "ACE OF SPADES CARD",
+ "STEP LADDER",
+ "BILLIARD BALL",
+ "CIGAR",
+ "GLASS JAR",
+ "ROMANOV EMERALD",
+ "CORK",
+ "LEVER KEY",
+ "EDGER",
+ "SURGICAL TUBE",
+ "PUMP ROD",
+ "FAUCET PIPE",
+ "FAUCET HANDLE",
+ "RUBBER PLUG",
+ "GARDEN HOSE",
+ "MENENDEZ'S LETTER",
+ "KEYS",
+ "BROKEN WHEEL",
+ "PUMP GRIPS",
+ "CLOCK FACING",
+ "SHOVEL",
+ "WOODEN LADDER",
+ "ROPE",
+ "GREEN VINE",
+ "CRYSTAL SKULL",
+ "BROWN VINE",
+ "PULL CORD",
+ "SPARK PLUG TOOL",
+ "RONGORONGO TABLET",
+ "SLEEVE",
+ "LIGHTER",
+ "STICK AND SHELL MAP",
+ "DRIFTWOOD STUMP",
+ "OBSIDIAN DISK",
+ "SOLDIER'S SHIELD",
+ "TWELVETREES' NOTE",
+ "TWO SOLDIERS' SHIELDS",
+ "WOODEN POST",
+ "CRANK",
+ "WOODEN BEAM",
+ "EMPEROR'S SEAL",
+ "POLE",
+ "REBUS AMULET",
+ "DRIFTWOOD PUFFIN",
+ "SHRUNKEN HEAD",
+ "METAL RIM",
+ "CHINESE YUAN",
+ "JOURNAL",
+ "SILVER BUTTERFLY",
+ "POSTAGE STAMP",
+ "GERMAN BANKNOTE",
+ "WHALE BONE HORN",
+ "CHISEL",
+ "INCENSE BURNER",
+ "POMERANIAN MARKS",
+ "PERUVIAN INTI",
+ "SIKKIMESE RUPEE",
+ "SERENITY WHEEL",
+ "PEACE WHEEL",
+ "INSIGHT WHEEL",
+ "TRUTH WHEEL",
+ "WISDOM WHEEL",
+ "CIGAR WITHOUT BAND",
+ "CIGAR BAND",
+ "FARMER'S SHOVEL",
+ "MATCH",
+ "LIT LIGHTER",
+ "VON SELTSAM'S NOTE",
+ "PRAYER WHEEL BROCHURE",
+ "ENVELOPE",
+ "VON SELTSAM'S LETTER",
+ "HORN/PULL CORD",
+ "FAUCET PIPE/HOSE",
+ "FAUCET PIPE/HOSE/TUBE",
+ "JAR/CORK",
+ "JAR/RUBBER PLUG",
+ "JAR/GRIPS",
+ "JAR/PLUG/GRIPS",
+ "JAR/PLUG/CORK/GRIPS",
+ "JAR/CORK/PLUG",
+ "JAR/CORK/GRIPS",
+ "VINES",
+ "TUBE/HOSE",
+ "US DOLLARS",
+ "JAR/FAUCET PIPE",
+ "EMERALD/CORK",
+ "TWELVETREES' MAP",
+ "PERIODIC TABLE",
+ "LEVER KEY/PUMP ROD",
+ "JAR/LEVER KEY",
+ "PUMP ROD/GRIPS",
+ "JAR/PERIODIC TABLE",
+ "ROPE/GREEN VINE",
+ "ROPE/VINES",
+ "HORN/PULL CORD/WATER",
+ "LADDER/ROPE",
+ "LADDER/GREEN VINE",
+ "LADDER/VINES",
+ "WITHERED GREEN VINE",
+ "WITHERED VINES",
+ "VINE DUST",
+ "JAR/PIPE/HOSE",
+ "LADDER/BROWN VINE",
+ "ROPE/BROWN VINE",
+ "MESSAGE LOG",
+ "WITHERED BROWN VINE",
+ "TOMB MESSAGE",
+ "FAUCET PIPE/TUBE"
};
-static const InvObject INVENTORY_ITEMS[] = {
-// { "mirror", "SPIEGEL", 999, 48, 48 },
- { nullptr, nullptr, 0, 0, 0 }
+static const uint16 INVENTORY_SCENES[123] = {
+ 203, 203, 998, 207, 207, 204, 204, 504,
+ 205, 304, 999, 305, 408, 204, 409, 406,
+ 403, 406, 456, 407, 407, 407, 407, 408,
+ 407, 407, 407, 407, 407, 407, 407, 406,
+ 207, 407, 501, 504, 504, 504, 504, 510,
+ 504, 604, 604, 607, 603, 608, 608, 600,
+ 605, 805, 603, 805, 805, 806, 844, 810,
+ 603, 207, 608, 504, 207, 999, 998, 204,
+ 999, 405, 608, 709, 709, 401, 501, 701,
+ 703, 704, 705, 705, 706, 406, 406, 801,
+ 801, 999, 999, 999, 406, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 407, 998, 407, 407, 603, 407, 407,
+ 407, 407, 407, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 409, 999
};
void Inventory::init() {
- for (const InvObject *item = INVENTORY_ITEMS; item->_name; ++item) {
- inv_register_thing(item->_name, item->_verbs, item->_scene, item->_cel, item->_cursor);
-
- _items.push_back(InventoryItem(item->_name, item->_scene));
+ for (int i = 0; i < INVENTORY_COUNT; ++i) {
+ _G(inv_suppress_click_sound) = true;
+ inv_move_object(INVENTORY_NAMES[i], INVENTORY_SCENES[i]);
}
+
+ _G(inv_suppress_click_sound) = false;
}
void Inventory::add(const Common::String &name, const Common::String &verb, int32 sprite, int32 cursor) {
@@ -65,10 +203,5 @@ void Inventory::remove(const Common::String &name) {
#endif
}
-void Inventory::reset() {
- for (const InvObject *item = INVENTORY_ITEMS; item->_name; ++item)
- inv_move_object(item->_name, item->_scene);
-}
-
} // namespace Riddle
} // namespace M4
diff --git a/engines/m4/riddle/inventory.h b/engines/m4/riddle/inventory.h
index ab7129d55da..be77522256b 100644
--- a/engines/m4/riddle/inventory.h
+++ b/engines/m4/riddle/inventory.h
@@ -48,7 +48,6 @@ public:
void add(const Common::String &name, const Common::String &verbs, int32 sprite, int32 cursor) override;
void set_scroll(int32 scroll) override;
void remove(const Common::String &name) override;
- void reset();
};
} // namespace Riddle
diff --git a/engines/m4/riddle/rooms/room.cpp b/engines/m4/riddle/rooms/room.cpp
index 1ca950ba138..debb96176c2 100644
--- a/engines/m4/riddle/rooms/room.cpp
+++ b/engines/m4/riddle/rooms/room.cpp
@@ -21,11 +21,24 @@
#include "m4/riddle/rooms/room.h"
#include "m4/riddle/vars.h"
+#include "m4/riddle/riddle.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
+void Room::restoreAutosave() {
+ if (g_engine->autosaveExists()) {
+ _G(kernel).restore_slot = 0;
+ auto oldMode = _G(kernel).trigger_mode;
+ _G(kernel).trigger_mode = KT_DAEMON;
+ disable_player_commands_and_fade_init(255);
+
+ _G(kernel).trigger_mode = oldMode;
+ player_set_commands_allowed(false);
+ }
+}
+
} // namespace Rooms
} // namespace Riddle
} // namespace M4
diff --git a/engines/m4/riddle/rooms/room.h b/engines/m4/riddle/rooms/room.h
index 969a2897200..b45e72c9e1f 100644
--- a/engines/m4/riddle/rooms/room.h
+++ b/engines/m4/riddle/rooms/room.h
@@ -33,6 +33,9 @@ namespace Riddle {
namespace Rooms {
class Room : public M4::Room {
+protected:
+ void restoreAutosave();
+
public:
Room() : M4::Room() {}
~Room() override {}
diff --git a/engines/m4/riddle/rooms/section4/room494.cpp b/engines/m4/riddle/rooms/section4/room494.cpp
index 118f446010b..336f2a0e35b 100644
--- a/engines/m4/riddle/rooms/section4/room494.cpp
+++ b/engines/m4/riddle/rooms/section4/room494.cpp
@@ -19,18 +19,230 @@
*
*/
-#include "m4/riddle/rooms/section4/room494.h"
#include "m4/graphics/gr_series.h"
+#include "m4/gui/gui_sys.h"
+#include "m4/riddle/rooms/section4/room494.h"
#include "m4/riddle/vars.h"
+#include "m4/riddle/walker.h"
+#include "m4/riddle/riddle.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
+void Room494::preload() {
+ Room::preload();
+
+ _G(kernel).letter_box_y = 30;
+ _G(player).walker_type = WALKER_ALT;
+ _G(player).shadow_type = SHADOW_ALT;
+ _G(player).walker_in_this_scene = false;
+}
+
void Room494::init() {
+ midi_stop();
+ mouse_show();
+
+ _hotkey27 = GetSystemHotkey(27);
+ _hotkey316 = GetSystemHotkey(316);
+ _hotkey317 = GetSystemHotkey(317);
+
+ RemoveSystemHotkey(316);
+ AddSystemHotkey(27, escapeFn);
+ AddSystemHotkey(317, escapeFn);
+ _machine1 = _machine2 = 0;
+ _selectedBtn1 = _selectedBtn2 = -1;
+ midi_stop();
+
+ digi_preload("gallery", 950);
+ digi_play_loop("gallery", 1, 255, -1, 950);
+ _G(kernel).call_daemon_every_loop = true;
+
+ _menuButtons = series_load("494 MENU BUTTONS");
+ _series1 = series_show_sprite("494 MENU BUTTONS", 0, 0xf00);
+ _series2 = series_show_sprite("494 MENU BUTTONS", 3, 0xf00);
+ _series3 = series_show_sprite("494 MENU BUTTONS", 6, 0xf00);
+ _series4 = series_show_sprite("494 MENU BUTTONS", 9, 0xf00);
+ _series5 = series_show_sprite("494 MENU BUTTONS", 12, 0xf00);
+ _series6 = series_show_sprite("494 MENU BUTTONS", 15, 0xf00);
}
void Room494::daemon() {
+ int selectedBtn = getSelectedButton();
+ bool flag = false;
+
+ switch (_G(kernel).trigger) {
+ case 111:
+ if (g_engine->autosaveExists()) {
+ restoreHotkeys();
+ restoreAutosave();
+
+ } else {
+ _G(flags)[V001] = 1;
+ digi_stop(1);
+ _G(game).setRoom(901);
+ }
+ break;
+
+ case 304:
+ restoreHotkeys();
+ conv_reset_all();
+ player_reset_been();
+
+ _G(flags)[V001] = 1;
+ interface_show();
+ digi_stop(1);
+ _G(game).setRoom(304);
+ break;
+
+ case 493:
+ restoreHotkeys();
+ adv_kill_digi_between_rooms(false);
+ _G(game).setRoom(493);
+ break;
+
+ case 666:
+ _G(kernel).going = false;
+ break;
+
+ case 901:
+ restoreHotkeys();
+
+ _G(flags)[V001] = 1;
+ digi_stop(1);
+ _G(game).setRoom(901);
+ break;
+
+ case 999:
+ interface_hide();
+ break;
+
+ default:
+ break;
+ }
+
+ if (_G(MouseState).ButtonState) {
+ if (_selectState) {
+ if (selectedBtn == _selectedBtn2 && _machine2) {
+ terminateMachineAndNull(_machine2);
+ _selectedBtn2 = -1;
+ digi_play("950_s51", 2);
+ }
+
+ if (!_machine2) {
+ _machine2 = series_show_sprite("494 menu buttons", 0x100,
+ selectedBtn * 3 + 2);
+ _selectedBtn2 = selectedBtn;
+ digi_play("950_s51", 2);
+ }
+ } else {
+ if (_machine1) {
+ terminateMachineAndNull(_machine1);
+ _selectedBtn1 = -1;
+ }
+
+ if (selectedBtn != -1) {
+ _machine2 = series_show_sprite("494 menu buttons", 0x100,
+ selectedBtn * 3 + 2);
+ _selectedBtn2 = selectedBtn;
+ digi_play("950_s51", 2);
+ }
+ }
+
+ _selectState = true;
+
+ } else if (_selectState) {
+ if (_machine2) {
+ terminateMachineAndNull(_machine2);
+ _selectedBtn2 = -1;
+ }
+
+ _selectState = 0;
+ flag = true;
+ }
+
+ if (selectedBtn != -1) {
+ if (_selectedBtn1 != -1 && selectedBtn != _selectedBtn1) {
+ terminateMachineAndNull(_machine1);
+ _selectedBtn1 = -1;
+ }
+
+ if (_selectedBtn1 == -1 && !_machine2)
+ _machine1 = series_show_sprite("494 menu buttons", 0x100,
+ selectedBtn * 3 + 1);
+ } else {
+ if (selectedBtn != _selectedBtn1) {
+ terminateMachineAndNull(_machine1);
+ _selectedBtn1 = selectedBtn;
+ }
+ }
+
+ if (flag) {
+ switch (selectedBtn) {
+ case 0:
+ player_set_commands_allowed(false);
+ disable_player_commands_and_fade_init(901);
+ break;
+ case 1:
+ player_set_commands_allowed(false);
+ disable_player_commands_and_fade_init(304);
+ break;
+ case 2:
+ player_set_commands_allowed(false);
+ disable_player_commands_and_fade_init(111);
+ break;
+ case 3:
+ escapeFn(nullptr, nullptr);
+ break;
+ case 4:
+ player_set_commands_allowed(false);
+ disable_player_commands_and_fade_init(493);
+ break;
+ case 5:
+ player_set_commands_allowed(false);
+ disable_player_commands_and_fade_init(666);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void Room494::pre_parser() {
+ _G(player).need_to_walk = false;
+ _G(player).ready_to_walk = true;
+ _G(player).waiting_for_walk = false;
+}
+
+void Room494::escapeFn(void *, void *) {
+ warning("TODO: room 494 escapeFn");
+}
+
+int Room494::getSelectedButton() const {
+ static const Common::Rect BUTTONS[6] = {
+ { 91, 323, 150, 370 },
+ { 174, 323, 226, 370 },
+ { 247, 323, 312, 370 },
+ { 333, 323, 388, 370 },
+ { 423, 323, 458, 370 },
+ { 494, 323, 547, 370 }
+ };
+
+ int x = _G(MouseState).CursorColumn;
+ int y = _G(MouseState).CursorRow;
+
+ for (int i = 0; i < 6; ++i) {
+ if (BUTTONS[i].contains(x, y))
+ return i;
+ }
+
+ return -1;
+}
+
+void Room494::restoreHotkeys() {
+ AddSystemHotkey(27, _hotkey27);
+ AddSystemHotkey(316, _hotkey316);
+ AddSystemHotkey(317, _hotkey317);
}
} // namespace Rooms
diff --git a/engines/m4/riddle/rooms/section4/room494.h b/engines/m4/riddle/rooms/section4/room494.h
index c4838d0b24b..32d078765a7 100644
--- a/engines/m4/riddle/rooms/section4/room494.h
+++ b/engines/m4/riddle/rooms/section4/room494.h
@@ -29,12 +29,36 @@ namespace Riddle {
namespace Rooms {
class Room494 : public Room {
+private:
+ static void escapeFn(void *, void *);
+ int getSelectedButton() const;
+ void restoreHotkeys();
+
+private:
+ int _menuButtons = 0;
+ int _selectedBtn2 = -1;
+ int _selectedBtn1 = -1;
+ machine *_machine1 = nullptr;
+ machine *_machine2 = nullptr;
+ machine *_series1 = nullptr;
+ machine *_series2 = nullptr;
+ machine *_series3 = nullptr;
+ machine *_series4 = nullptr;
+ machine *_series5 = nullptr;
+ machine *_series6 = nullptr;
+ HotkeyCB _hotkey27 = nullptr;
+ HotkeyCB _hotkey316 = nullptr;
+ HotkeyCB _hotkey317 = nullptr;
+ bool _selectState = false;
+
public:
Room494() : Room() {}
~Room494() override {}
+ void preload() override;
void init() override;
void daemon() override;
+ void pre_parser() override;
};
} // namespace Rooms
diff --git a/engines/m4/riddle/walker.cpp b/engines/m4/riddle/walker.cpp
index ab241999374..bd80215f066 100644
--- a/engines/m4/riddle/walker.cpp
+++ b/engines/m4/riddle/walker.cpp
@@ -35,14 +35,6 @@ namespace Riddle {
#define SHADOW_SERIES_HASH 8
#define NUM_SHADOW_SERIES 5
-// These are the walker types
-#define WALKER_PLAYER 0
-#define WALKER_ALT 1
-
-// These are the shadow types
-#define SHADOW_PLAYER 0
-#define SHADOW_ALT 1
-
static const char *RIPLEY_SERIES[5] = {
"test1", "test2", "test3", "test4", "test5"
};
diff --git a/engines/m4/riddle/walker.h b/engines/m4/riddle/walker.h
index b5d24699cad..3ce50d50622 100644
--- a/engines/m4/riddle/walker.h
+++ b/engines/m4/riddle/walker.h
@@ -29,6 +29,18 @@
namespace M4 {
namespace Riddle {
+// These are the walker types
+enum {
+ WALKER_PLAYER = 0,
+ WALKER_ALT = 1
+};
+
+// These are the shadow types
+enum {
+ SHADOW_PLAYER = 0,
+ SHADOW_ALT = 1
+};
+
class Walker : public M4::Walker {
private:
/**
Commit: 6f039142d838940d3d7f89aee999c671b31bd535
https://github.com/scummvm/scummvm/commit/6f039142d838940d3d7f89aee999c671b31bd535
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-01-14T22:29:23-08:00
Commit Message:
M4: RIDDLE: Implement game tick handler
Changed paths:
engines/m4/riddle/rooms/section.cpp
engines/m4/riddle/rooms/section4/room494.cpp
engines/m4/riddle/rooms/section4/room494.h
engines/m4/riddle/vars.h
diff --git a/engines/m4/riddle/rooms/section.cpp b/engines/m4/riddle/rooms/section.cpp
index efd80c4b18e..2a317381e29 100644
--- a/engines/m4/riddle/rooms/section.cpp
+++ b/engines/m4/riddle/rooms/section.cpp
@@ -135,12 +135,10 @@ void Section::init_series_players() {
}
void Section::tick() {
-#ifdef TODO
int oldTrigger = _G(kernel).trigger;
- _G(kernel).trigger = gCALLED_EACH_LOOP;
+ _G(kernel).trigger = kCALLED_EACH_LOOP;
g_engine->game_daemon_code();
_G(kernel).trigger = oldTrigger;
-#endif
}
void Section::daemon() {
diff --git a/engines/m4/riddle/rooms/section4/room494.cpp b/engines/m4/riddle/rooms/section4/room494.cpp
index 336f2a0e35b..ad78b3fc199 100644
--- a/engines/m4/riddle/rooms/section4/room494.cpp
+++ b/engines/m4/riddle/rooms/section4/room494.cpp
@@ -56,15 +56,16 @@ void Room494::init() {
digi_preload("gallery", 950);
digi_play_loop("gallery", 1, 255, -1, 950);
+ interface_hide();
_G(kernel).call_daemon_every_loop = true;
_menuButtons = series_load("494 MENU BUTTONS");
- _series1 = series_show_sprite("494 MENU BUTTONS", 0, 0xf00);
- _series2 = series_show_sprite("494 MENU BUTTONS", 3, 0xf00);
- _series3 = series_show_sprite("494 MENU BUTTONS", 6, 0xf00);
- _series4 = series_show_sprite("494 MENU BUTTONS", 9, 0xf00);
- _series5 = series_show_sprite("494 MENU BUTTONS", 12, 0xf00);
- _series6 = series_show_sprite("494 MENU BUTTONS", 15, 0xf00);
+ _buttons[0] = series_show_sprite("494 MENU BUTTONS", 0, 0xf00);
+ _buttons[1] = series_show_sprite("494 MENU BUTTONS", 3, 0xf00);
+ _buttons[2] = series_show_sprite("494 MENU BUTTONS", 6, 0xf00);
+ _buttons[3] = series_show_sprite("494 MENU BUTTONS", 9, 0xf00);
+ _buttons[4] = series_show_sprite("494 MENU BUTTONS", 12, 0xf00);
+ _buttons[5] = series_show_sprite("494 MENU BUTTONS", 15, 0xf00);
}
void Room494::daemon() {
diff --git a/engines/m4/riddle/rooms/section4/room494.h b/engines/m4/riddle/rooms/section4/room494.h
index 32d078765a7..98cbb013c2b 100644
--- a/engines/m4/riddle/rooms/section4/room494.h
+++ b/engines/m4/riddle/rooms/section4/room494.h
@@ -40,12 +40,7 @@ private:
int _selectedBtn1 = -1;
machine *_machine1 = nullptr;
machine *_machine2 = nullptr;
- machine *_series1 = nullptr;
- machine *_series2 = nullptr;
- machine *_series3 = nullptr;
- machine *_series4 = nullptr;
- machine *_series5 = nullptr;
- machine *_series6 = nullptr;
+ machine *_buttons[6];
HotkeyCB _hotkey27 = nullptr;
HotkeyCB _hotkey316 = nullptr;
HotkeyCB _hotkey317 = nullptr;
diff --git a/engines/m4/riddle/vars.h b/engines/m4/riddle/vars.h
index 5b4d5385a3f..7b1967f66da 100644
--- a/engines/m4/riddle/vars.h
+++ b/engines/m4/riddle/vars.h
@@ -34,6 +34,8 @@ namespace Riddle {
enum global_triggers {
gFIRST_GLOBAL_TRIGGER = 10000,
+
+ kCALLED_EACH_LOOP = 32764
};
class Vars : public M4::Vars {
More information about the Scummvm-git-logs
mailing list