[Scummvm-git-logs] scummvm master -> 248ecea562726a4bb81872d81c43c04f0cca868f

dreammaster noreply at scummvm.org
Wed Oct 9 02:52:24 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:
051ad9f0a6 M4: RIDDLE: Fix loading inventory list
248ecea562 M4: RIDDLE: Fix palette range indexes for Riddle


Commit: 051ad9f0a6cee2e47bd30bf6cd9d6b4cf5f82917
    https://github.com/scummvm/scummvm/commit/051ad9f0a6cee2e47bd30bf6cd9d6b4cf5f82917
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-10-08T19:33:44-07:00

Commit Message:
M4: RIDDLE: Fix loading inventory list

Changed paths:
    engines/m4/riddle/inventory.cpp


diff --git a/engines/m4/riddle/inventory.cpp b/engines/m4/riddle/inventory.cpp
index bc138a0288f..fde54b1465e 100644
--- a/engines/m4/riddle/inventory.cpp
+++ b/engines/m4/riddle/inventory.cpp
@@ -33,7 +33,7 @@ struct InvObject {
 	int16 _scene, _cel, _cursor;
 };
 
-static const InvObject INVENTORY_ITEMS[123] = {
+static const InvObject INVENTORY_ITEMS[] = {
 	{ "SOLDIER'S HELMET",       203,  14,  10 },
 	{ "BUCKET",					203,  15,  11 },
 	{ "RIPLEY PHOTO",			998,  16,  12 },
@@ -156,7 +156,8 @@ static const InvObject INVENTORY_ITEMS[123] = {
 	{ "MESSAGE LOG",			999,  94,  90 },
 	{ "WITHERED BROWN VINE",	999,  68,  64 },
 	{ "TOMB MESSAGE",			409, 128, 124 },
-	{ "FAUCET PIPE/TUBE",		999, 137, 125 }
+	{ "FAUCET PIPE/TUBE",		999, 137, 125 },
+	{ nullptr,                    0,   0,   0 }
 };
 
 void Inventory::init() {


Commit: 248ecea562726a4bb81872d81c43c04f0cca868f
    https://github.com/scummvm/scummvm/commit/248ecea562726a4bb81872d81c43c04f0cca868f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-10-08T19:52:07-07:00

Commit Message:
M4: RIDDLE: Fix palette range indexes for Riddle

Changed paths:
    engines/m4/graphics/krn_pal.cpp


diff --git a/engines/m4/graphics/krn_pal.cpp b/engines/m4/graphics/krn_pal.cpp
index 85196187d81..1b7a0af4365 100644
--- a/engines/m4/graphics/krn_pal.cpp
+++ b/engines/m4/graphics/krn_pal.cpp
@@ -38,13 +38,14 @@ namespace M4 {
 
 #define BACKGROUND_HEIGHT  (int32)639
 
-#define GREY_START   32
-#define NUM_GREYS    32					// gotta have 32 greys to fade to (hardcoded algorithm) 
-#define GREY_END     GREY_START+NUM_GREYS      		
+#define IS_RIDDLE   g_engine->getGameType() == GType_Riddle
+#define GREY_START	(IS_RIDDLE ? 21 : 32)
+#define NUM_GREYS	(IS_RIDDLE ? 64 : 32)
+#define GREY_END	(IS_RIDDLE ? 58 : 63)
 
-#define FREE_START   GREY_END+1
-#define FREE_END     255
-#define NUM_FREE     FREE_END-(FREE_START)+1
+#define FREE_START	(IS_RIDDLE ? 59 : 64)
+#define FREE_END	255
+#define NUM_FREE	(IS_RIDDLE ? 255 - 59 + 1 : 255 - 64 + 1)
 
 static HotkeyCB remember_esc_key;
 static HotSpotRec *exam_saved_hotspots;
@@ -302,8 +303,8 @@ void kernel_examine_inventory_object(const char *picName, RGB8 *pal, int steps,
 
 	krn_fade_to_grey(pal, steps, delay);
 
-	_GP(seriesHash) = series_load(picName, -1, pal);                    // preload sprite so we can unload it
-	gr_pal_set_range(pal, FREE_START, 197);                                  // set that series colors into VGA
+	_GP(seriesHash) = series_load(picName, -1, pal);	// Preload sprite so we can unload it
+	gr_pal_set_range(pal, FREE_START, NUM_FREE);		// Set that series colors into VGA
 	RestoreScreens(MIN_VIDEO_X, MIN_VIDEO_Y, MAX_VIDEO_X, MAX_VIDEO_Y);
 
 	Buffer *grey_screen = _G(gameDrawBuff)->get_buffer();




More information about the Scummvm-git-logs mailing list