[Scummvm-git-logs] scummvm master -> a3ab31a9a8705994cd247ce9667b750b85a60d02
dreammaster
noreply at scummvm.org
Thu Apr 23 10:30:46 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
a3ab31a9a8 MADS: PHANTOM: Fixes for entering mask puzzle room
Commit: a3ab31a9a8705994cd247ce9667b750b85a60d02
https://github.com/scummvm/scummvm/commit/a3ab31a9a8705994cd247ce9667b750b85a60d02
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-23T20:30:39+10:00
Commit Message:
MADS: PHANTOM: Fixes for entering mask puzzle room
Changed paths:
engines/mads/madsv2/core/color.h
engines/mads/madsv2/phantom/catacombs.cpp
engines/mads/madsv2/phantom/rooms/room502.cpp
diff --git a/engines/mads/madsv2/core/color.h b/engines/mads/madsv2/core/color.h
index 2bc8c028867..49d851ea3d1 100644
--- a/engines/mads/madsv2/core/color.h
+++ b/engines/mads/madsv2/core/color.h
@@ -105,7 +105,7 @@ typedef Cycle *CyclePtr;
/* List of color cycling ranges */
struct CycleList {
- int num_cycles;
+ int16 num_cycles;
Cycle table[COLOR_MAX_CYCLES];
static constexpr int SIZE = 2 + (Cycle::SIZE * COLOR_MAX_CYCLES);
diff --git a/engines/mads/madsv2/phantom/catacombs.cpp b/engines/mads/madsv2/phantom/catacombs.cpp
index 920b850c9e4..ea5a721a219 100644
--- a/engines/mads/madsv2/phantom/catacombs.cpp
+++ b/engines/mads/madsv2/phantom/catacombs.cpp
@@ -241,7 +241,7 @@ static void global_catacombs_new_room(int catacomb_node, int from) {
void global_catacombs_init() {
global_catacombs_setup();
- global[catacombs_next_room] = global[catacombs_room];
+ global[catacombs_room] = global[catacombs_next_room];
}
void global_enter_catacombs(int special) {
diff --git a/engines/mads/madsv2/phantom/rooms/room502.cpp b/engines/mads/madsv2/phantom/rooms/room502.cpp
index 56c513ef716..8ef78498be0 100644
--- a/engines/mads/madsv2/phantom/rooms/room502.cpp
+++ b/engines/mads/madsv2/phantom/rooms/room502.cpp
@@ -98,7 +98,7 @@ static void room_502_initialize_panels() {
static void room_502_load_cycling_info() {
int error_code = 0;
- int count;
+ int count, num;
int cycle;
int num_colors;
int total_colors = 0;
@@ -110,7 +110,7 @@ static void room_502_load_cycling_info() {
local->cycle_pointer = NULL;
- chunk = (byte *)mem_get(mem_get_avail() - 256);
+ chunk = (byte *)mem_get(512 * sizeof(RGBcolor));
if (chunk == NULL) goto done;
color_marker = (RGBcolor *)chunk;
@@ -122,11 +122,7 @@ static void room_502_load_cycling_info() {
}
for (count = 0; count < num_cycle_stages; count++) {
-
- if (!fileio_fread_f(&local->cycle_list[count], sizeof(CycleList), 1, handle)) {
- error_code = 200 + count;
- goto done;
- }
+ local->cycle_list[count].load(handle);
num_colors = 0;
for (cycle = 0; cycle < local->cycle_list[count].num_cycles; cycle++) {
@@ -136,10 +132,8 @@ static void room_502_load_cycling_info() {
local->cycle_color[count] = color_marker;
- if (!fileio_fread_f(color_marker, sizeof(RGBcolor) * num_colors, 1, handle)) {
- error_code = 300 + count;
- goto done;
- }
+ for (num = 0; num < num_colors; ++num)
+ color_marker[num].load(handle);
color_marker += num_colors;
total_colors += num_colors;
More information about the Scummvm-git-logs
mailing list