parent
e27f72f52b
commit
0c7245fa09
45
src/art.cc
45
src/art.cc
|
@ -7,11 +7,24 @@
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
|
#include "sfall_config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
// 0x5002D8
|
||||||
|
char gDefaultJumpsuitMaleFileName[] = "hmjmps";
|
||||||
|
|
||||||
|
// 0x05002E0
|
||||||
|
char gDefaultJumpsuitFemaleFileName[] = "hfjmps";
|
||||||
|
|
||||||
|
// 0x5002E8
|
||||||
|
char gDefaultTribalMaleFileName[] = "hmwarr";
|
||||||
|
|
||||||
|
// 0x5002F0
|
||||||
|
char gDefaultTribalFemaleFileName[] = "hfprim";
|
||||||
|
|
||||||
// 0x510738
|
// 0x510738
|
||||||
ArtListDescription gArtListDescriptions[OBJ_TYPE_COUNT] = {
|
ArtListDescription gArtListDescriptions[OBJ_TYPE_COUNT] = {
|
||||||
{ 0, "items", 0, 0, 0 },
|
{ 0, "items", 0, 0, 0 },
|
||||||
|
@ -153,18 +166,42 @@ int artInit()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* jumpsuitMaleFileName = NULL;
|
||||||
|
configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_MALE_KEY, &jumpsuitMaleFileName);
|
||||||
|
if (jumpsuitMaleFileName == NULL || jumpsuitMaleFileName[0] != '\0') {
|
||||||
|
jumpsuitMaleFileName = gDefaultJumpsuitMaleFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* jumpsuitFemaleFileName = NULL;
|
||||||
|
configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY, &jumpsuitFemaleFileName);
|
||||||
|
if (jumpsuitFemaleFileName == NULL || jumpsuitFemaleFileName[0] == '\0') {
|
||||||
|
jumpsuitFemaleFileName = gDefaultJumpsuitFemaleFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* tribalMaleFileName = NULL;
|
||||||
|
configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY, &tribalMaleFileName);
|
||||||
|
if (tribalMaleFileName == NULL || tribalMaleFileName[0] == '\0') {
|
||||||
|
tribalMaleFileName = gDefaultTribalMaleFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *tribalFemaleFileName = NULL;
|
||||||
|
configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY, &tribalFemaleFileName);
|
||||||
|
if (tribalFemaleFileName == NULL || tribalFemaleFileName[0] == '\0') {
|
||||||
|
tribalFemaleFileName = gDefaultTribalFemaleFileName;
|
||||||
|
}
|
||||||
|
|
||||||
ptr = gArtListDescriptions[1].fileNames;
|
ptr = gArtListDescriptions[1].fileNames;
|
||||||
for (i = 0; i < gArtListDescriptions[1].fileNamesLength; i++) {
|
for (i = 0; i < gArtListDescriptions[1].fileNamesLength; i++) {
|
||||||
if (compat_stricmp(ptr, "hmjmps") == 0) {
|
if (compat_stricmp(ptr, jumpsuitMaleFileName) == 0) {
|
||||||
_art_vault_person_nums[DUDE_NATIVE_LOOK_JUMPSUIT][GENDER_MALE] = i;
|
_art_vault_person_nums[DUDE_NATIVE_LOOK_JUMPSUIT][GENDER_MALE] = i;
|
||||||
} else if (compat_stricmp(ptr, "hfjmps") == 0) {
|
} else if (compat_stricmp(ptr, jumpsuitFemaleFileName) == 0) {
|
||||||
_art_vault_person_nums[DUDE_NATIVE_LOOK_JUMPSUIT][GENDER_FEMALE] = i;
|
_art_vault_person_nums[DUDE_NATIVE_LOOK_JUMPSUIT][GENDER_FEMALE] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compat_stricmp(ptr, "hmwarr") == 0) {
|
if (compat_stricmp(ptr, tribalMaleFileName) == 0) {
|
||||||
_art_vault_person_nums[DUDE_NATIVE_LOOK_TRIBAL][GENDER_MALE] = i;
|
_art_vault_person_nums[DUDE_NATIVE_LOOK_TRIBAL][GENDER_MALE] = i;
|
||||||
_art_vault_guy_num = i;
|
_art_vault_guy_num = i;
|
||||||
} else if (compat_stricmp(ptr, "hfprim") == 0) {
|
} else if (compat_stricmp(ptr, tribalFemaleFileName) == 0) {
|
||||||
_art_vault_person_nums[DUDE_NATIVE_LOOK_TRIBAL][GENDER_FEMALE] = i;
|
_art_vault_person_nums[DUDE_NATIVE_LOOK_TRIBAL][GENDER_FEMALE] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,11 @@ typedef enum DudeNativeLook {
|
||||||
DUDE_NATIVE_LOOK_COUNT,
|
DUDE_NATIVE_LOOK_COUNT,
|
||||||
} DudeNativeLook;
|
} DudeNativeLook;
|
||||||
|
|
||||||
|
extern char gDefaultJumpsuitMaleFileName[];
|
||||||
|
extern char gDefaultJumpsuitFemaleFileName[];
|
||||||
|
extern char gDefaultTribalMaleFileName[];
|
||||||
|
extern char gDefaultTribalFemaleFileName[];
|
||||||
|
|
||||||
extern ArtListDescription gArtListDescriptions[OBJ_TYPE_COUNT];
|
extern ArtListDescription gArtListDescriptions[OBJ_TYPE_COUNT];
|
||||||
extern bool gArtLanguageInitialized;
|
extern bool gArtLanguageInitialized;
|
||||||
extern const char* _head1;
|
extern const char* _head1;
|
||||||
|
|
|
@ -21,6 +21,10 @@ bool sfallConfigInit(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize defaults.
|
// Initialize defaults.
|
||||||
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_MALE_KEY, "");
|
||||||
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY, "");
|
||||||
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY, "");
|
||||||
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY, "");
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR, 0);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR, 0);
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR, 0);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR, 0);
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, 0);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, 0);
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
#define SFALL_CONFIG_MISC_KEY "Misc"
|
#define SFALL_CONFIG_MISC_KEY "Misc"
|
||||||
|
|
||||||
|
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_MALE_KEY "MaleDefaultModel"
|
||||||
|
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY "FemaleDefaultModel"
|
||||||
|
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY "MaleStartModel"
|
||||||
|
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY "FemaleStartModel"
|
||||||
#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR "MainMenuBigFontColour"
|
#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR "MainMenuBigFontColour"
|
||||||
#define SFALL_CONFIG_MAIN_MENU_FONT_COLOR "MainMenuFontColour"
|
#define SFALL_CONFIG_MAIN_MENU_FONT_COLOR "MainMenuFontColour"
|
||||||
#define SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY "SkipOpeningMovies"
|
#define SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY "SkipOpeningMovies"
|
||||||
|
|
Loading…
Reference in New Issue