Add pip-boy automaps patch
This commit is contained in:
parent
e3a811c83d
commit
c593eceaaf
|
@ -66,7 +66,7 @@ static const int _defam[AUTOMAP_MAP_COUNT][ELEVATION_COUNT] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 0x41B560
|
// 0x41B560
|
||||||
static const int _displayMapList[AUTOMAP_MAP_COUNT] = {
|
static int _displayMapList[AUTOMAP_MAP_COUNT] = {
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
|
@ -1153,3 +1153,10 @@ int automapGetHeader(AutomapHeader** automapHeaderPtr)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void automapSetDisplayMap(int map, bool available)
|
||||||
|
{
|
||||||
|
if (map >= 0 && map < AUTOMAP_MAP_COUNT) {
|
||||||
|
_displayMapList[map] = available ? 0 : -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -54,4 +54,6 @@ int automapRenderInPipboyWindow(int win, int map, int elevation);
|
||||||
int automapSaveCurrent();
|
int automapSaveCurrent();
|
||||||
int automapGetHeader(AutomapHeader** automapHeaderPtr);
|
int automapGetHeader(AutomapHeader** automapHeaderPtr);
|
||||||
|
|
||||||
|
void automapSetDisplayMap(int map, bool available);
|
||||||
|
|
||||||
#endif /* AUTOMAP_H */
|
#endif /* AUTOMAP_H */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
#include "art.h"
|
#include "art.h"
|
||||||
|
#include "automap.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "combat.h"
|
#include "combat.h"
|
||||||
#include "combat_ai.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)) {
|
if (configGetString(&config, section, "random_start_point_0", &str)) {
|
||||||
j = 0;
|
j = 0;
|
||||||
while (str != NULL) {
|
while (str != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue