[Scummvm-git-logs] scummvm master -> 2aaf87c43629d8164324462a85967efb4ec598b4
dreammaster
noreply at scummvm.org
Sun Jul 26 21:57:48 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b8a7515a26 MADS: Support MADSPACK 1.0 resources
03f1d7f7b6 MADS: NEBULAR: Use the DOS demo startup sequence
2aaf87c436 MADS: NEBULAR: Handle the demo's reduced font set
Commit: b8a7515a264a4547cbb6b570a25a0b2477fb5e5f
https://github.com/scummvm/scummvm/commit/b8a7515a264a4547cbb6b570a25a0b2477fb5e5f
Author: fusefib (fibofuse at gmail.com)
Date: 2026-07-27T07:57:44+10:00
Commit Message:
MADS: Support MADSPACK 1.0 resources
Early MADS data uses MADSPACK 1.0 and assigns compression value 1 to
PKWARE DCL, while MADSPACK 2.0 assigns that value to pFAB. Detect the
container version and route legacy payloads through ScummVM's DCL
decompressor so their resources are decoded correctly.
Assisted-by: Codex:GPT-5.5
Changed paths:
engines/mads/core/loader.cpp
engines/mads/core/pack.cpp
engines/mads/core/pack.h
diff --git a/engines/mads/core/loader.cpp b/engines/mads/core/loader.cpp
index dceb93ad998..17202bea0f7 100644
--- a/engines/mads/core/loader.cpp
+++ b/engines/mads/core/loader.cpp
@@ -20,6 +20,8 @@
*/
#include "common/textconsole.h"
+#include "common/compression/dcl.h"
+#include "common/memstream.h"
#include "mads/core/loader.h"
#include "mads/core/general.h"
#include "mads/core/pack.h"
@@ -232,9 +234,15 @@ long loader_read(void *target, long record_size, long record_count, LoadHandle h
if (decompress_buffer != NULL) {
if (!fileio_fread_f(decompress_buffer, compressed_size, 1, handle->handle)) goto done;
- result = pack_data(packing_flag, total_size,
- FROM_MEMORY, decompress_buffer,
- TO_MEMORY, target);
+ if (pack_strategy == PACK_DCL) {
+ Common::MemoryReadStream stream(decompress_buffer, compressed_size);
+ result = Common::decompressDCL(&stream, (byte *)target,
+ compressed_size, total_size) ? total_size : 0;
+ } else {
+ result = pack_data(packing_flag, total_size,
+ FROM_MEMORY, decompress_buffer,
+ TO_MEMORY, target);
+ }
already_unpacked = true;
}
}
diff --git a/engines/mads/core/pack.cpp b/engines/mads/core/pack.cpp
index 01c5245a33d..8abb041696c 100644
--- a/engines/mads/core/pack.cpp
+++ b/engines/mads/core/pack.cpp
@@ -114,13 +114,19 @@ bool PackList::load(Common::SeekableReadStream *src) {
num_records = src->readUint16LE();
// Confirm that the ID is correct
- if (strncmp(id_string, PACK_ID_STRING, PACK_ID_CHECK) != 0)
+ const bool isVersion1 = strncmp(id_string, PACK_ID_STRING_V1, PACK_ID_CHECK) == 0;
+ if (!isVersion1 && strncmp(id_string, PACK_ID_STRING, PACK_ID_CHECK) != 0)
return false;
// Read in the index. Note that only num_records worth of entries are
// valid, but space is left in the file for the maximum amount of entries
- for (int i = 0; i < PACK_MAX_LIST_LENGTH; ++i)
+ for (int i = 0; i < PACK_MAX_LIST_LENGTH; ++i) {
strategy[i].load(src);
+ // MADSPACK 1.0 used value 1 for PKWARE compression. Version 2.0
+ // assigned that value to the newer pFAB compressor.
+ if (isVersion1 && strategy[i].type == PACK_PFAB)
+ strategy[i].type = PACK_DCL;
+ }
return true;
}
diff --git a/engines/mads/core/pack.h b/engines/mads/core/pack.h
index 1efa85334dc..ab875013d76 100644
--- a/engines/mads/core/pack.h
+++ b/engines/mads/core/pack.h
@@ -28,6 +28,7 @@
namespace MADS {
#define PACK_ID_STRING "MADSPACK 2.0\032"
+#define PACK_ID_STRING_V1 "MADSPACK 1.0\032"
#define PACK_ID_LENGTH 14
#define PACK_ID_CHECK 12
@@ -44,6 +45,7 @@ namespace MADS {
#define PACK_NONE 0 /* No compression */
#define PACK_PFAB 1 /* Dave's Stuff */
#define PACK_ZIP 2 /* Zipped */
+#define PACK_DCL 3 /* PKWARE DCL */
#define PACK_IMPLODE_SIZE 35256 /* pkzip implode buffer */
#define PACK_EXPLODE_SIZE 12574 /* pkzip explode buffer */
Commit: 03f1d7f7b6f65869cf08dbeb1e2307bc141d793e
https://github.com/scummvm/scummvm/commit/03f1d7f7b6f65869cf08dbeb1e2307bc141d793e
Author: fusefib (fibofuse at gmail.com)
Date: 2026-07-27T07:57:44+10:00
Commit Message:
MADS: NEBULAR: Use the DOS demo startup sequence
The demo has no retail room 990 title screen. Its batch file instead
runs the @demodisk ANIMVIEW playlist before launching the playable
section, whose first room is 102. Follow that native sequence while
leaving retail startup unchanged.
Assisted-by: Codex:GPT-5.5
Changed paths:
engines/mads/nebular/main.cpp
diff --git a/engines/mads/nebular/main.cpp b/engines/mads/nebular/main.cpp
index ab82714a03b..25c6a5b9932 100644
--- a/engines/mads/nebular/main.cpp
+++ b/engines/mads/nebular/main.cpp
@@ -241,7 +241,7 @@ static void game_main(int argc, const char **argv) {
mads_mode = env_verify();
new_section = 1;
- new_room = 101;
+ new_room = g_engine->isDemo() ? 102 : 101;
player.x = 160;
player.y = 78;
@@ -313,6 +313,8 @@ void nebular_main() {
if (ConfMan.getBool("start_game") || ConfMan.hasKey("save_slot"))
selected_item = 0;
+ else if (g_engine->isDemo())
+ selected_item = 9;
else if (ConfMan.getBool("start_intro"))
selected_item = 3;
else
@@ -374,6 +376,13 @@ void nebular_main() {
selected_item = -1;
break;
+ case 9:
+ // The DOS demo batch file plays this ANIMVIEW playlist before
+ // starting its three-room playable section.
+ AnimView::animview_main("@demodisk");
+ selected_item = 0;
+ break;
+
case WIN_QUICK_DEATH + 16:
AnimView::animview_main("@rexend1");
TextView::textview_main("ending1");
Commit: 2aaf87c43629d8164324462a85967efb4ec598b4
https://github.com/scummvm/scummvm/commit/2aaf87c43629d8164324462a85967efb4ec598b4
Author: fusefib (fibofuse at gmail.com)
Date: 2026-07-27T07:57:44+10:00
Commit Message:
MADS: NEBULAR: Handle the demo's reduced font set
The demo ships FONTMAIN, FONTINTR, and FONTCONV, but not the retail-only
FONTMISC and FONTTELE resources. Do not require those fonts for the Rex
demo and use its interface font for scrollbar glyphs when the misc font
is absent.
Assisted-by: Codex:GPT-5.5
Changed paths:
engines/mads/core/inter.cpp
engines/mads/core/kernel.cpp
diff --git a/engines/mads/core/inter.cpp b/engines/mads/core/inter.cpp
index d077feaa1af..86a6fbd3b28 100644
--- a/engines/mads/core/inter.cpp
+++ b/engines/mads/core/inter.cpp
@@ -485,7 +485,7 @@ static void inter_show_word(int class_, int id) {
} else {
inter_set_colors(LEFT_SELECT);
}
- font_write(font_misc, &scr_inter, temp_buf, x, y, 0);
+ font_write(font_misc ? font_misc : font_inter, &scr_inter, temp_buf, x, y, 0);
goto done;
break;
diff --git a/engines/mads/core/kernel.cpp b/engines/mads/core/kernel.cpp
index 2cf094f315c..517c7d1b6a7 100644
--- a/engines/mads/core/kernel.cpp
+++ b/engines/mads/core/kernel.cpp
@@ -383,23 +383,27 @@ int kernel_game_startup(int game_video_mode, int load_flag,
// Load the main interface fonts
if (load_flag & KERNEL_STARTUP_FONT) {
+ const bool isRexDemo = g_engine->getGameID() == GType_RexNebular && g_engine->isDemo();
+
font_main = font_load("*FONTMAIN.FF");
font_inter = font_load("*FONTINTR.FF");
font_conv = font_load("*FONTCONV.FF");
- font_misc = font_load("*FONTMISC.FF");
+ font_misc = isRexDemo ? nullptr : font_load("*FONTMISC.FF");
font_menu = font_tele = nullptr;
if (g_engine->getGameID() == GType_RexNebular) {
- font_tele = font_load("*FONTTELE.FF");
+ if (!isRexDemo)
+ font_tele = font_load("*FONTTELE.FF");
box_param.font = font_inter;
} else {
font_menu = font_load("*FONTMENU.FF");
}
- if ((font_main == NULL) || (font_inter == NULL) || (font_conv == NULL) || (font_misc == NULL) ||
+ if ((font_main == NULL) || (font_inter == NULL) || (font_conv == NULL) ||
+ (!isRexDemo && font_misc == NULL) ||
(g_engine->getGameID() != GType_RexNebular && font_menu == NULL) ||
- (g_engine->getGameID() == GType_RexNebular && font_tele == NULL)) {
+ (g_engine->getGameID() == GType_RexNebular && !isRexDemo && font_tele == NULL)) {
#ifndef disable_error_check
error_code = ERROR_KERNEL_NO_FONTS;
#endif
More information about the Scummvm-git-logs
mailing list