[Scummvm-git-logs] scummvm master -> 92c81483646aeda6af9a123bb73f3e97c4e48786
dreammaster
noreply at scummvm.org
Wed Jul 29 12:24:10 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:
92c8148364 MADS: NEBULAR: Fix restore game dialog savegame list
Commit: 92c81483646aeda6af9a123bb73f3e97c4e48786
https://github.com/scummvm/scummvm/commit/92c81483646aeda6af9a123bb73f3e97c4e48786
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-07-29T22:23:54+10:00
Commit Message:
MADS: NEBULAR: Fix restore game dialog savegame list
Changed paths:
engines/mads/core/game.cpp
engines/mads/core/game.h
engines/mads/nebular/menus.cpp
diff --git a/engines/mads/core/game.cpp b/engines/mads/core/game.cpp
index 8691d60569b..6841bac0fbd 100644
--- a/engines/mads/core/game.cpp
+++ b/engines/mads/core/game.cpp
@@ -1967,6 +1967,11 @@ void chain_execute() {
error("TODO: chain_execute");
}
+
+char *game_menu_save_string(int id) {
+ return game_save_directory + (id * (GAME_MAX_SAVE_LENGTH + 1));
+}
+
/**
* Reads the list of save files.
*/
@@ -1976,7 +1981,7 @@ static void game_read_save_directory() {
for (auto it = list.begin(); it != list.end(); ++it) {
if (it->getSaveSlot() > 0) {
- char *slot = game_save_directory + (it->getSaveSlot() - 1) * (GAME_MAX_SAVE_LENGTH + 1);
+ char *slot = game_menu_save_string(it->getSaveSlot() - 1);
Common::strcpy_s(slot, GAME_MAX_SAVE_LENGTH + 1, it->getDescription().c_str());
}
}
diff --git a/engines/mads/core/game.h b/engines/mads/core/game.h
index 514b00b0286..beeb070989a 100644
--- a/engines/mads/core/game.h
+++ b/engines/mads/core/game.h
@@ -281,6 +281,11 @@ extern void show_version();
extern void init_game();
+/**
+ * Returns a pointer to a savegame slot in the savegame directory list
+ */
+extern char *game_menu_save_string(int id);
+
} // namespace MADS
#endif
diff --git a/engines/mads/nebular/menus.cpp b/engines/mads/nebular/menus.cpp
index 7978719120a..c10e2b5acdd 100644
--- a/engines/mads/nebular/menus.cpp
+++ b/engines/mads/nebular/menus.cpp
@@ -74,7 +74,6 @@ struct MenuMessage {
#define MAX_MENU_MESSAGE 20
static MenuMessage *menu = NULL;
-static byte *save_menu = NULL;
static byte *trash_bag = NULL;
static int game_menu_num_items;
static int game_menu_scan_items;
@@ -261,6 +260,7 @@ static int global_save(int id, const char *save_game_name) {
else
status = SAVE_FAILED;
+ game_save_status = status;
return status;
}
@@ -272,19 +272,12 @@ static int global_restore(int id) {
else
status = RESTORE_FAILED;
+ game_save_status = status;
WRITE_LE_UINT32(&global[walker_timing], 0);
return status;
}
-static char *game_menu_save_string(int id) {
- char *string;
-
- string = (char *)save_menu + (id * (GAME_MAX_SAVE_LENGTH + 1));
-
- return string;
-}
-
static void game_menu_write_message(FontPtr font, char *string,
int special, int x, int y) {
int this_x;
More information about the Scummvm-git-logs
mailing list