diff --git a/src/automap.cc b/src/automap.cc index b622b34..0a2313c 100644 --- a/src/automap.cc +++ b/src/automap.cc @@ -66,7 +66,7 @@ static const int _defam[AUTOMAP_MAP_COUNT][ELEVATION_COUNT] = { }; // 0x41B560 -static const int _displayMapList[AUTOMAP_MAP_COUNT] = { +static int _displayMapList[AUTOMAP_MAP_COUNT] = { -1, -1, -1, @@ -1153,3 +1153,10 @@ int automapGetHeader(AutomapHeader** automapHeaderPtr) return 0; } + +void automapSetDisplayMap(int map, bool available) +{ + if (map >= 0 && map < AUTOMAP_MAP_COUNT) { + _displayMapList[map] = available ? 0 : -1; + } +} diff --git a/src/automap.h b/src/automap.h index 8fe6052..05a2353 100644 --- a/src/automap.h +++ b/src/automap.h @@ -54,4 +54,6 @@ int automapRenderInPipboyWindow(int win, int map, int elevation); int automapSaveCurrent(); int automapGetHeader(AutomapHeader** automapHeaderPtr); +void automapSetDisplayMap(int map, bool available); + #endif /* AUTOMAP_H */ diff --git a/src/world_map.cc b/src/world_map.cc index d0c9751..ef7386c 100644 --- a/src/world_map.cc +++ b/src/world_map.cc @@ -2,6 +2,7 @@ #include "animation.h" #include "art.h" +#include "automap.h" #include "color.h" #include "combat.h" #include "combat_ai.h" @@ -2963,6 +2964,15 @@ int _wmMapInit() } } + // SFALL: Pip-boy automaps patch. + if (configGetString(&config, section, "automap", &str)) { + if (strParseStrFromList(&str, &num, _wmYesNoStrs, 2) == -1) { + return -1; + } + + automapSetDisplayMap(mapIndex, num); + } + if (configGetString(&config, section, "random_start_point_0", &str)) { j = 0; while (str != NULL) {