Add starting days for ddraw.ini
This commit is contained in:
parent
e23b39abaa
commit
459bd3268a
|
@ -36,6 +36,7 @@
|
||||||
#include "window_manager.h"
|
#include "window_manager.h"
|
||||||
#include "window_manager_private.h"
|
#include "window_manager_private.h"
|
||||||
#include "worldmap.h"
|
#include "worldmap.h"
|
||||||
|
#include "sfall_config.h"
|
||||||
|
|
||||||
namespace fallout {
|
namespace fallout {
|
||||||
|
|
||||||
|
@ -265,6 +266,10 @@ static bool _set;
|
||||||
// 0x667750
|
// 0x667750
|
||||||
static char _tempStr1[20];
|
static char _tempStr1[20];
|
||||||
|
|
||||||
|
static int gStartYear;
|
||||||
|
static int gStartMonth;
|
||||||
|
static int gStartDay;
|
||||||
|
|
||||||
// TODO: Make unsigned.
|
// TODO: Make unsigned.
|
||||||
//
|
//
|
||||||
// Returns game time in ticks (1/10 second).
|
// Returns game time in ticks (1/10 second).
|
||||||
|
@ -278,9 +283,9 @@ int gameTimeGetTime()
|
||||||
// 0x4A3338
|
// 0x4A3338
|
||||||
void gameTimeGetDate(int* monthPtr, int* dayPtr, int* yearPtr)
|
void gameTimeGetDate(int* monthPtr, int* dayPtr, int* yearPtr)
|
||||||
{
|
{
|
||||||
int year = (gGameTime / GAME_TIME_TICKS_PER_DAY + 24) / 365 + 2241;
|
int year = (gGameTime / GAME_TIME_TICKS_PER_DAY + gStartDay) / 365 + gStartYear;
|
||||||
int month = 6;
|
int month = gStartMonth;
|
||||||
int day = (gGameTime / GAME_TIME_TICKS_PER_DAY + 24) % 365;
|
int day = (gGameTime / GAME_TIME_TICKS_PER_DAY + gStartDay) % 365;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int daysInMonth = gGameTimeDaysPerMonth[month];
|
int daysInMonth = gGameTimeDaysPerMonth[month];
|
||||||
|
@ -1522,6 +1527,10 @@ int scriptsInit()
|
||||||
|
|
||||||
messageListRepositorySetStandardMessageList(STANDARD_MESSAGE_LIST_SCRIPT, &gScrMessageList);
|
messageListRepositorySetStandardMessageList(STANDARD_MESSAGE_LIST_SCRIPT, &gScrMessageList);
|
||||||
|
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_START_YEAR, &gStartYear);
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_START_MONTH, &gStartMonth);
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_START_DAY, &gStartDay);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,9 @@ bool sfallConfigInit(int argc, char** argv)
|
||||||
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_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_MALE_KEY, "");
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY, "");
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_START_YEAR, 2241);
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_START_MONTH, 6);
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_START_DAY, 24);
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY, 0);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY, 0);
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_X_KEY, 0);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_X_KEY, 0);
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_Y_KEY, 0);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_Y_KEY, 0);
|
||||||
|
|
|
@ -13,6 +13,9 @@ namespace fallout {
|
||||||
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY "FemaleDefaultModel"
|
#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_MALE_KEY "MaleStartModel"
|
||||||
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY "FemaleStartModel"
|
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY "FemaleStartModel"
|
||||||
|
#define SFALL_CONFIG_START_YEAR "StartYear"
|
||||||
|
#define SFALL_CONFIG_START_MONTH "StartMonth"
|
||||||
|
#define SFALL_CONFIG_START_DAY "StartDay"
|
||||||
#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY "MainMenuBigFontColour"
|
#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY "MainMenuBigFontColour"
|
||||||
#define SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_X_KEY "MainMenuCreditsOffsetX"
|
#define SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_X_KEY "MainMenuCreditsOffsetX"
|
||||||
#define SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_Y_KEY "MainMenuCreditsOffsetY"
|
#define SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_Y_KEY "MainMenuCreditsOffsetY"
|
||||||
|
|
Loading…
Reference in New Issue