Add sFall movie timer options (#261)
This commit is contained in:
parent
527e152297
commit
99bc14cf3a
|
@ -29,6 +29,7 @@
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
#include "proto_instance.h"
|
#include "proto_instance.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
#include "sfall_config.h"
|
||||||
#include "stat.h"
|
#include "stat.h"
|
||||||
#include "svga.h"
|
#include "svga.h"
|
||||||
#include "tile.h"
|
#include "tile.h"
|
||||||
|
@ -265,6 +266,15 @@ static bool _set;
|
||||||
// 0x667750
|
// 0x667750
|
||||||
static char _tempStr1[20];
|
static char _tempStr1[20];
|
||||||
|
|
||||||
|
static int gStartYear;
|
||||||
|
static int gStartMonth;
|
||||||
|
static int gStartDay;
|
||||||
|
|
||||||
|
static int gMovieTimerArtimer1;
|
||||||
|
static int gMovieTimerArtimer2;
|
||||||
|
static int gMovieTimerArtimer3;
|
||||||
|
static int gMovieTimerArtimer4;
|
||||||
|
|
||||||
// TODO: Make unsigned.
|
// TODO: Make unsigned.
|
||||||
//
|
//
|
||||||
// Returns game time in ticks (1/10 second).
|
// Returns game time in ticks (1/10 second).
|
||||||
|
@ -278,9 +288,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];
|
||||||
|
@ -439,7 +449,7 @@ int _scriptsCheckGameEvents(int* moviePtr, int window)
|
||||||
movieFlags = GAME_MOVIE_FADE_IN | GAME_MOVIE_STOP_MUSIC;
|
movieFlags = GAME_MOVIE_FADE_IN | GAME_MOVIE_STOP_MUSIC;
|
||||||
endgame = true;
|
endgame = true;
|
||||||
} else {
|
} else {
|
||||||
if (day >= 360 || gameGetGlobalVar(GVAR_FALLOUT_2) >= 3) {
|
if (day >= gMovieTimerArtimer4 || gameGetGlobalVar(GVAR_FALLOUT_2) >= 3) {
|
||||||
movie = MOVIE_ARTIMER4;
|
movie = MOVIE_ARTIMER4;
|
||||||
if (!gameMovieIsSeen(MOVIE_ARTIMER4)) {
|
if (!gameMovieIsSeen(MOVIE_ARTIMER4)) {
|
||||||
adjustRep = true;
|
adjustRep = true;
|
||||||
|
@ -447,13 +457,13 @@ int _scriptsCheckGameEvents(int* moviePtr, int window)
|
||||||
wmAreaSetVisibleState(CITY_DESTROYED_ARROYO, 1, 1);
|
wmAreaSetVisibleState(CITY_DESTROYED_ARROYO, 1, 1);
|
||||||
wmAreaMarkVisitedState(CITY_DESTROYED_ARROYO, 2);
|
wmAreaMarkVisitedState(CITY_DESTROYED_ARROYO, 2);
|
||||||
}
|
}
|
||||||
} else if (day >= 270 && gameGetGlobalVar(GVAR_FALLOUT_2) != 3) {
|
} else if (day >= gMovieTimerArtimer3 && gameGetGlobalVar(GVAR_FALLOUT_2) != 3) {
|
||||||
adjustRep = true;
|
adjustRep = true;
|
||||||
movie = MOVIE_ARTIMER3;
|
movie = MOVIE_ARTIMER3;
|
||||||
} else if (day >= 180 && gameGetGlobalVar(GVAR_FALLOUT_2) != 3) {
|
} else if (day >= gMovieTimerArtimer2 && gameGetGlobalVar(GVAR_FALLOUT_2) != 3) {
|
||||||
adjustRep = true;
|
adjustRep = true;
|
||||||
movie = MOVIE_ARTIMER2;
|
movie = MOVIE_ARTIMER2;
|
||||||
} else if (day >= 90 && gameGetGlobalVar(GVAR_FALLOUT_2) != 3) {
|
} else if (day >= gMovieTimerArtimer1 && gameGetGlobalVar(GVAR_FALLOUT_2) != 3) {
|
||||||
adjustRep = true;
|
adjustRep = true;
|
||||||
movie = MOVIE_ARTIMER1;
|
movie = MOVIE_ARTIMER1;
|
||||||
}
|
}
|
||||||
|
@ -1522,6 +1532,15 @@ 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);
|
||||||
|
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER1, &gMovieTimerArtimer1);
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER2, &gMovieTimerArtimer2);
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER3, &gMovieTimerArtimer3);
|
||||||
|
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER4, &gMovieTimerArtimer4);
|
||||||
|
|
||||||
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);
|
||||||
|
@ -50,6 +53,10 @@ bool sfallConfigInit(int argc, char** argv)
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_BURST_MOD_TARGET_MULTIPLIER_KEY, SFALL_CONFIG_BURST_MOD_DEFAULT_TARGET_MULTIPLIER);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_BURST_MOD_TARGET_MULTIPLIER_KEY, SFALL_CONFIG_BURST_MOD_DEFAULT_TARGET_MULTIPLIER);
|
||||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_BURST_MOD_TARGET_DIVISOR_KEY, SFALL_CONFIG_BURST_MOD_DEFAULT_TARGET_DIVISOR);
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_BURST_MOD_TARGET_DIVISOR_KEY, SFALL_CONFIG_BURST_MOD_DEFAULT_TARGET_DIVISOR);
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_EXTRA_MESSAGE_LISTS_KEY, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_EXTRA_MESSAGE_LISTS_KEY, "");
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER1, 90);
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER2, 180);
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER3, 270);
|
||||||
|
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER4, 360);
|
||||||
|
|
||||||
char path[COMPAT_MAX_PATH];
|
char path[COMPAT_MAX_PATH];
|
||||||
char* executable = argv[0];
|
char* executable = argv[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"
|
||||||
|
@ -42,6 +45,10 @@ namespace fallout {
|
||||||
#define SFALL_CONFIG_PLASTIC_EXPLOSIVE_MIN_DAMAGE_KEY "PlasticExplosive_DmgMin"
|
#define SFALL_CONFIG_PLASTIC_EXPLOSIVE_MIN_DAMAGE_KEY "PlasticExplosive_DmgMin"
|
||||||
#define SFALL_CONFIG_PLASTIC_EXPLOSIVE_MAX_DAMAGE_KEY "PlasticExplosive_DmgMax"
|
#define SFALL_CONFIG_PLASTIC_EXPLOSIVE_MAX_DAMAGE_KEY "PlasticExplosive_DmgMax"
|
||||||
#define SFALL_CONFIG_EXPLOSION_EMITS_LIGHT_KEY "ExplosionsEmitLight"
|
#define SFALL_CONFIG_EXPLOSION_EMITS_LIGHT_KEY "ExplosionsEmitLight"
|
||||||
|
#define SFALL_CONFIG_MOVIE_TIMER_ARTIMER1 "MovieTimer_artimer1"
|
||||||
|
#define SFALL_CONFIG_MOVIE_TIMER_ARTIMER2 "MovieTimer_artimer2"
|
||||||
|
#define SFALL_CONFIG_MOVIE_TIMER_ARTIMER3 "MovieTimer_artimer3"
|
||||||
|
#define SFALL_CONFIG_MOVIE_TIMER_ARTIMER4 "MovieTimer_artimer4"
|
||||||
#define SFALL_CONFIG_CITY_REPUTATION_LIST_KEY "CityRepsList"
|
#define SFALL_CONFIG_CITY_REPUTATION_LIST_KEY "CityRepsList"
|
||||||
#define SFALL_CONFIG_UNARMED_FILE_KEY "UnarmedFile"
|
#define SFALL_CONFIG_UNARMED_FILE_KEY "UnarmedFile"
|
||||||
#define SFALL_CONFIG_DAMAGE_MOD_FORMULA_KEY "DamageFormula"
|
#define SFALL_CONFIG_DAMAGE_MOD_FORMULA_KEY "DamageFormula"
|
||||||
|
|
Loading…
Reference in New Issue