[Scummvm-git-logs] scummvm master -> 2cbb79aa83c9dd173694ef67d4e943a1c2dd1875
dreammaster
noreply at scummvm.org
Sun May 31 04:21:11 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
a849242688 MADS: DRAGONSPHERE: Fix conv script for playing games with Caliph
2cbb79aa83 MADS: FOREST: Skeleton files for digi, midi, and journal
Commit: a849242688f67ce295087fd4bea9da847ae9e1e8
https://github.com/scummvm/scummvm/commit/a849242688f67ce295087fd4bea9da847ae9e1e8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-31T14:17:07+10:00
Commit Message:
MADS: DRAGONSPHERE: Fix conv script for playing games with Caliph
Changed paths:
engines/mads/madsv2/core/conv.cpp
engines/mads/madsv2/dragonsphere/rooms/room407.cpp
diff --git a/engines/mads/madsv2/core/conv.cpp b/engines/mads/madsv2/core/conv.cpp
index f0fb7ec96c0..b15f60d864d 100644
--- a/engines/mads/madsv2/core/conv.cpp
+++ b/engines/mads/madsv2/core/conv.cpp
@@ -739,11 +739,27 @@ static void conv_param_load(ConvScriptParams *params) {
// paramNum: 0 = param1, 1 = param2
// ---------------------------------------------------------------------------
static int16 conv_scr_get_param(ConvScriptParams *params, int paramNum) {
+ int16 result;
+
if (paramNum) {
- return params->param2IsVar == 1 ? *conv_get_variable(params->param2) : params->param2;
+ if (params->param2IsVar < 1) {
+ result = params->param2;
+ } else {
+ result = *conv_get_variable(params->param2);
+ if (params->param2IsVar == 2)
+ result = !result ? 1 : 0;
+ }
} else {
- return params->param1IsVar == 1 ? *conv_get_variable(params->param1) : params->param1;
+ if (params->param1IsVar < 1) {
+ result = params->param1;
+ } else {
+ result = *conv_get_variable(params->param1);
+ if (params->param1IsVar == 2)
+ result = !result ? 1 : 0;
+ }
}
+
+ return result;
}
// ---------------------------------------------------------------------------
diff --git a/engines/mads/madsv2/dragonsphere/rooms/room407.cpp b/engines/mads/madsv2/dragonsphere/rooms/room407.cpp
index 1f00b5e3af6..f265bdcca00 100644
--- a/engines/mads/madsv2/dragonsphere/rooms/room407.cpp
+++ b/engines/mads/madsv2/dragonsphere/rooms/room407.cpp
@@ -218,7 +218,7 @@ static void room_407_init() {
local->last_spin = -1;
local->his_score_int = 0;
local->my_score_int = 0;
- local->will_give = true;
+ local->will_give = -1;
}
if (global[player_persona] == PLAYER_IS_PID) {
Commit: 2cbb79aa83c9dd173694ef67d4e943a1c2dd1875
https://github.com/scummvm/scummvm/commit/2cbb79aa83c9dd173694ef67d4e943a1c2dd1875
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-31T14:17:07+10:00
Commit Message:
MADS: FOREST: Skeleton files for digi, midi, and journal
Changed paths:
A engines/mads/madsv2/core/digi.cpp
A engines/mads/madsv2/core/digi.h
A engines/mads/madsv2/core/midi.cpp
A engines/mads/madsv2/core/midi.h
A engines/mads/madsv2/forest/journal.cpp
A engines/mads/madsv2/forest/journal.h
engines/mads/madsv2/core/kernel.cpp
engines/mads/madsv2/core/kernel.h
engines/mads/madsv2/forest/rooms/room101.cpp
engines/mads/module.mk
diff --git a/engines/mads/madsv2/core/digi.cpp b/engines/mads/madsv2/core/digi.cpp
new file mode 100644
index 00000000000..49cbb8c55c4
--- /dev/null
+++ b/engines/mads/madsv2/core/digi.cpp
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "mads/madsv2/core/digi.h"
+#include "mads/madsv2/engine.h"
+
+namespace MADS {
+namespace MADSV2 {
+
+void digi_install() {
+}
+
+void digi_uninstall() {
+}
+
+void digi_play_build_ii(char thing, int num, int slot) {
+ Common::String name;
+ name += (thing == '_') ? 's' : 'd';
+ name += "0ii";
+ name += Common::String::format("%.3d", num);
+ digi_play(name.c_str(), slot);
+}
+
+void digi_play_build(int room, char thing, int num, int slot) {
+ Common::String name;
+ name += (thing == '_') ? 's' : 'd';
+ name += Common::String::format("%d", room);
+ name += Common::String::format("%.3d", num);
+ digi_play(name.c_str(), slot);
+}
+
+void digi_play(const char *name, int slot) {}
+void digi_stop(int which_one) {}
+void digi_read_another_chunk() {}
+void digi_initial_volume(int vol) {}
+void digi_set_volume(int vol, int slot) {}
+
+} // namespace MADSV2
+} // namespace MADS
diff --git a/engines/mads/madsv2/core/digi.h b/engines/mads/madsv2/core/digi.h
new file mode 100644
index 00000000000..69cb647d13e
--- /dev/null
+++ b/engines/mads/madsv2/core/digi.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MADS_DIGI_SOUND_H
+#define MADS_DIGI_SOUND_H
+
+#include "common/scummsys.h"
+
+namespace MADS {
+namespace MADSV2 {
+
+extern void digi_install();
+extern void digi_play(const char *name, int slot);
+extern void digi_play_build(int room, char thing, int num, int slot);
+extern void digi_play_build_ii(char thing, int num, int slot);
+extern void digi_stop(int which_one);
+extern void digi_uninstall();
+extern void digi_read_another_chunk();
+extern void digi_initial_volume(int vol);
+extern void digi_set_volume(int vol, int slot);
+
+} // namespace MADSV2
+} // namespace MADS
+
+#endif
diff --git a/engines/mads/madsv2/core/kernel.cpp b/engines/mads/madsv2/core/kernel.cpp
index 717e3390f4b..cbd9fd89726 100644
--- a/engines/mads/madsv2/core/kernel.cpp
+++ b/engines/mads/madsv2/core/kernel.cpp
@@ -2979,5 +2979,54 @@ void init_kernel() {
memset(kernel_interface_loaded, 0, sizeof(kernel_interface_loaded));
}
+void kernel_random_frame(int handle, int16 *frame, int mode) {
+ int16 newFrame = -1;
+
+ if (kernel_anim[handle].frame == *frame)
+ return;
+
+ int16 currentFrame = (int16)kernel_anim[handle].frame;
+ *frame = currentFrame;
+
+ if (currentFrame >= 1 && currentFrame <= 8) {
+ if (mode == 0)
+ newFrame = 0;
+ else if (mode == 1)
+ newFrame = 7;
+ else
+ newFrame = (int16)imath_random(1, 6);
+ }
+
+ if (newFrame >= 0) {
+ kernel_reset_animation(handle, newFrame);
+ *frame = newFrame;
+ }
+}
+
+void kernel_translate_anim(int handle, int delta_x, int delta_y, int delta_scale) {
+ Animation &k_anim = kernel_anim[handle];
+ Anim *anim = k_anim.anim;
+
+ for (int count = 0; count < anim->num_frames; ++count) {
+ Image &image = anim->image[count];
+ image.x += delta_x;
+ image.y += delta_y;
+ image.scale += delta_scale;
+ }
+}
+
+void kernel_position_anim(int handle, int x, int y, int scale, int depth) {
+ Animation &k_anim = kernel_anim[handle];
+ Anim *anim = k_anim.anim;
+
+ for (int count = 0; count < anim->num_frames; ++count) {
+ Image &image = anim->image[count];
+ image.x = x;
+ image.y = y;
+ image.scale = scale;
+ image.depth = depth;
+ }
+}
+
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/kernel.h b/engines/mads/madsv2/core/kernel.h
index e5a873d166f..65bfb67aff7 100644
--- a/engines/mads/madsv2/core/kernel.h
+++ b/engines/mads/madsv2/core/kernel.h
@@ -625,6 +625,10 @@ extern int kernel_background_startup(int new_room, int initial_variant);
extern void init_kernel();
+extern void kernel_random_frame(int handle, int16 *frame, int mode);
+extern void kernel_translate_anim(int handle, int delta_x, int delta_y, int delta_scale);
+extern void kernel_position_anim(int handle, int x, int y, int scale, int depth);
+
} // namespace MADSV2
} // namespace MADS
diff --git a/engines/mads/madsv2/core/midi.cpp b/engines/mads/madsv2/core/midi.cpp
new file mode 100644
index 00000000000..60f4db14e41
--- /dev/null
+++ b/engines/mads/madsv2/core/midi.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/textconsole.h"
+#include "mads/madsv2/core/midi.h"
+#include "mads/madsv2/engine.h"
+
+namespace MADS {
+namespace MADSV2 {
+
+void midi_play(const char *name) {
+ // TODO
+}
+
+} // namespace MADSV2
+} // namespace MADS
diff --git a/engines/mads/madsv2/core/midi.h b/engines/mads/madsv2/core/midi.h
new file mode 100644
index 00000000000..f3a1c00e378
--- /dev/null
+++ b/engines/mads/madsv2/core/midi.h
@@ -0,0 +1,35 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MADS_CORE_MIDI_H
+#define MADS_CORE_MIDI_H
+
+#include "common/scummsys.h"
+
+namespace MADS {
+namespace MADSV2 {
+
+extern void midi_play(const char *name);
+
+} // namespace MADSV2
+} // namespace MADS
+
+#endif
diff --git a/engines/mads/madsv2/forest/journal.cpp b/engines/mads/madsv2/forest/journal.cpp
new file mode 100644
index 00000000000..3526a5933fc
--- /dev/null
+++ b/engines/mads/madsv2/forest/journal.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "mads/madsv2/forest/journal.h"
+
+namespace MADS {
+namespace MADSV2 {
+namespace Forest {
+
+void close_journal() {
+ // TODO
+}
+
+} // namespace Forest
+} // namespace MADSV2
+} // namespace MADS
diff --git a/engines/mads/madsv2/forest/journal.h b/engines/mads/madsv2/forest/journal.h
new file mode 100644
index 00000000000..e4b4fd6647f
--- /dev/null
+++ b/engines/mads/madsv2/forest/journal.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MADS_FOREST_JOURNAL_H
+#define MADS_FOREST_JOURNAL_H
+
+#include "mads/madsv2/engine.h"
+
+namespace MADS {
+namespace MADSV2 {
+namespace Forest {
+
+extern void close_journal();
+
+} // namespace Forest
+} // namespace MADSV2
+} // namespace MADS
+
+#endif
diff --git a/engines/mads/madsv2/forest/rooms/room101.cpp b/engines/mads/madsv2/forest/rooms/room101.cpp
index 204d289745d..deb7f902b21 100644
--- a/engines/mads/madsv2/forest/rooms/room101.cpp
+++ b/engines/mads/madsv2/forest/rooms/room101.cpp
@@ -64,6 +64,11 @@ static void room_101_daemon() {
}
static void room_101_pre_parser() {
+ if (player_parse(13, 16, 0))
+ player.walk_off_edge_to_room = 104;
+
+ if (player_parse(13, 17, 0))
+ player.walk_off_edge_to_room = 106;
}
static void room_101_parser() {
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index ff038901416..774f3abfdd3 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -72,6 +72,7 @@ MODULE_OBJS += \
madsv2/core/cursor.o \
madsv2/core/cycle.o \
madsv2/core/dialog.o \
+ madsv2/core/digi.o \
madsv2/core/ems.o \
madsv2/core/env.o \
madsv2/core/error.o \
@@ -96,6 +97,7 @@ MODULE_OBJS += \
madsv2/core/matte.o \
madsv2/core/mcga.o \
madsv2/core/mem.o \
+ madsv2/core/midi.o \
madsv2/core/mouse.o \
madsv2/core/object.o \
madsv2/core/pack.o \
@@ -264,6 +266,7 @@ MODULE_OBJS += \
madsv2/forest/forest.o \
madsv2/forest/asound.o \
madsv2/forest/global.o \
+ madsv2/forest/journal.o \
madsv2/forest/main.o \
madsv2/forest/main_menu.o \
madsv2/forest/menus.o \
More information about the Scummvm-git-logs
mailing list