mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added DisableSpecialAreas option
Added a new "fonts" folder for language specific fonts.
This commit is contained in:
+6
-1
@@ -730,9 +730,14 @@ SkipLoadingGameSettings=0
|
|||||||
SpecialDeathGVAR=491
|
SpecialDeathGVAR=491
|
||||||
|
|
||||||
;Set to 1 to disable the special handling of map IDs 19 and 37 in the engine when entering the maps
|
;Set to 1 to disable the special handling of map IDs 19 and 37 in the engine when entering the maps
|
||||||
;Note that enabling this option can break the map changes in Modoc and Vault 15
|
;Note that enabling this option will break the map changes in Modoc and Vault 15 in Fallout 2
|
||||||
DisableSpecialMapIDs=0
|
DisableSpecialMapIDs=0
|
||||||
|
|
||||||
|
;Set to 1 to disable the special handling of city areas 45 and 46 in the engine when visiting Area 45:
|
||||||
|
;Area 45 automatically disappears from the world map, and Area 46 appears on the world map
|
||||||
|
;Note that enabling this option will break the location change of the 'Fake Vault 13' in Fallout 2
|
||||||
|
DisableSpecialAreas=0
|
||||||
|
|
||||||
;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
|
;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
|
||||||
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
|
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
|
||||||
KnockoutTime=35
|
KnockoutTime=35
|
||||||
|
|||||||
@@ -131,27 +131,54 @@ FUNC(critter_wake_up_, 0x42E424)
|
|||||||
FUNC(datafileConvertData_, 0x42EE84)
|
FUNC(datafileConvertData_, 0x42EE84)
|
||||||
FUNC(db_access_, 0x4390B4)
|
FUNC(db_access_, 0x4390B4)
|
||||||
FUNC(db_dir_entry_, 0x4C5D68)
|
FUNC(db_dir_entry_, 0x4C5D68)
|
||||||
|
FUNC(db_exit_, 0x4C5D60)
|
||||||
FUNC(db_fclose_, 0x4C5EB4)
|
FUNC(db_fclose_, 0x4C5EB4)
|
||||||
|
FUNC(db_feof_, 0x4C60D8)
|
||||||
FUNC(db_fgetc_, 0x4C5F24)
|
FUNC(db_fgetc_, 0x4C5F24)
|
||||||
FUNC(db_fgets_, 0x4C5F70)
|
FUNC(db_fgets_, 0x4C5F70)
|
||||||
|
FUNC(db_filelength_, 0x4C68BC)
|
||||||
FUNC(db_fopen_, 0x4C5EC8)
|
FUNC(db_fopen_, 0x4C5EC8)
|
||||||
|
FUNC(db_fprintf_, 0x4C5ED0)
|
||||||
|
FUNC(db_fputc_, 0x4C5FE4)
|
||||||
|
FUNC(db_fputs_, 0x4C5FEC)
|
||||||
FUNC(db_freadByteCount_, 0x4C62FC)
|
FUNC(db_freadByteCount_, 0x4C62FC)
|
||||||
FUNC(db_freadByte_, 0x4C60E0)
|
FUNC(db_freadByte_, 0x4C60E0)
|
||||||
FUNC(db_freadIntCount_, 0x4C63BC)
|
FUNC(db_freadIntCount_, 0x4C63BC)
|
||||||
FUNC(db_freadInt_, 0x4C614C)
|
FUNC(db_freadInt_, 0x4C614C)
|
||||||
|
FUNC(db_freadLongCount_, 0x4C6438)
|
||||||
FUNC(db_freadShortCount_, 0x4C6330)
|
FUNC(db_freadShortCount_, 0x4C6330)
|
||||||
FUNC(db_freadShort_, 0x4C60F4)
|
FUNC(db_freadShort_, 0x4C60F4)
|
||||||
FUNC(db_fread_, 0x4C5FFC)
|
FUNC(db_fread_, 0x4C5FFC)
|
||||||
FUNC(db_free_file_list_, 0x4C6868)
|
FUNC(db_free_file_list_, 0x4C6868)
|
||||||
FUNC(db_fseek_, 0x4C60C0)
|
FUNC(db_fseek_, 0x4C60C0)
|
||||||
|
FUNC(db_ftell_, 0x4C60C8)
|
||||||
FUNC(db_fwriteByteCount_, 0x4C6464)
|
FUNC(db_fwriteByteCount_, 0x4C6464)
|
||||||
FUNC(db_fwriteByte_, 0x4C61AC)
|
FUNC(db_fwriteByte_, 0x4C61AC)
|
||||||
|
FUNC(db_fwriteFloatCount_, 0x4C65F0)
|
||||||
|
FUNC(db_fwriteFloat_, 0x4C62C4)
|
||||||
|
FUNC(db_fwriteIntCount_, 0x4C64F8)
|
||||||
FUNC(db_fwriteInt_, 0x4C6214)
|
FUNC(db_fwriteInt_, 0x4C6214)
|
||||||
|
FUNC(db_fwriteLongCount_, 0x4C6550)
|
||||||
|
FUNC(db_fwriteLong_, 0x4C6244)
|
||||||
|
FUNC(db_fwriteShortCount_, 0x4C6490)
|
||||||
|
FUNC(db_fwriteShort_, 0x4C61C8)
|
||||||
|
FUNC(db_fwrite_, 0x4C60B8)
|
||||||
FUNC(db_get_file_list_, 0x4C6628)
|
FUNC(db_get_file_list_, 0x4C6628)
|
||||||
FUNC(db_init_, 0x4C5D30)
|
FUNC(db_init_, 0x4C5D30)
|
||||||
|
FUNC(db_list_compare_, 0x4C68E8)
|
||||||
FUNC(db_read_to_buf_, 0x4C5DD4)
|
FUNC(db_read_to_buf_, 0x4C5DD4)
|
||||||
|
FUNC(db_register_callback_, 0x4C68C4)
|
||||||
|
FUNC(db_rewind_, 0x4C60D0)
|
||||||
|
FUNC(db_total_, 0x4C5D58)
|
||||||
|
FUNC(db_ungetc_, 0x4C5FF4)
|
||||||
|
FUNC(db_vfprintf_, 0x4C5F18)
|
||||||
FUNC(dbase_close_, 0x4E5270)
|
FUNC(dbase_close_, 0x4E5270)
|
||||||
|
FUNC(dbase_find_, 0x4E5D78)
|
||||||
|
FUNC(dbase_findclose_, 0x4E541C)
|
||||||
|
FUNC(dbase_findfirst_, 0x4E5308)
|
||||||
|
FUNC(dbase_findnext_, 0x4E53A0)
|
||||||
FUNC(dbase_open_, 0x4E4F58)
|
FUNC(dbase_open_, 0x4E4F58)
|
||||||
|
FUNC(dbg_error_, 0x453FD0)
|
||||||
FUNC(debug_log_, 0x4C7028)
|
FUNC(debug_log_, 0x4C7028)
|
||||||
FUNC(debug_printf_, 0x4C6F48)
|
FUNC(debug_printf_, 0x4C6F48)
|
||||||
FUNC(debug_register_env_, 0x4C6D90)
|
FUNC(debug_register_env_, 0x4C6D90)
|
||||||
@@ -598,17 +625,26 @@ FUNC(wmWorldMapFunc_, 0x4BFE10)
|
|||||||
FUNC(wmWorldMapLoadTempData_, 0x4BD6B4)
|
FUNC(wmWorldMapLoadTempData_, 0x4BD6B4)
|
||||||
FUNC(xfclose_, 0x4DED6C)
|
FUNC(xfclose_, 0x4DED6C)
|
||||||
FUNC(xfeof_, 0x4DF780)
|
FUNC(xfeof_, 0x4DF780)
|
||||||
|
FUNC(xferror_, 0x4DF7D4)
|
||||||
|
FUNC(xfflush_, 0x4DEDD4)
|
||||||
FUNC(xfgetc_, 0x4DF22C)
|
FUNC(xfgetc_, 0x4DF22C)
|
||||||
|
FUNC(xfgetpos_, 0x4DF584)
|
||||||
FUNC(xfgets_, 0x4DF280)
|
FUNC(xfgets_, 0x4DF280)
|
||||||
FUNC(xfilelength_, 0x4DF828)
|
FUNC(xfilelength_, 0x4DF828)
|
||||||
FUNC(xfopen_, 0x4DEE2C)
|
FUNC(xfopen_, 0x4DEE2C)
|
||||||
|
FUNC(xfprintf_, 0x4DF11C)
|
||||||
FUNC(xfputc_, 0x4DF320)
|
FUNC(xfputc_, 0x4DF320)
|
||||||
FUNC(xfputs_, 0x4DF380)
|
FUNC(xfputs_, 0x4DF380)
|
||||||
FUNC(xfread_, 0x4DF44C)
|
FUNC(xfread_, 0x4DF44C)
|
||||||
|
FUNC(xfree_filelist_, 0x4DFF48)
|
||||||
|
FUNC(xfreopen_, 0x4DEFE0)
|
||||||
|
FUNC(xfscanf_, 0x4DF164)
|
||||||
FUNC(xfseek_, 0x4DF5D8)
|
FUNC(xfseek_, 0x4DF5D8)
|
||||||
|
FUNC(xfsetpos_, 0x4DF63C)
|
||||||
FUNC(xftell_, 0x4DF690)
|
FUNC(xftell_, 0x4DF690)
|
||||||
FUNC(xfwrite_, 0x4DF4E8)
|
FUNC(xfwrite_, 0x4DF4E8)
|
||||||
FUNC(xremovepath_, 0x4DFAB4)
|
FUNC(xremovepath_, 0x4DFAB4)
|
||||||
FUNC(xrewind_, 0x4DF6E4)
|
FUNC(xrewind_, 0x4DF6E4)
|
||||||
|
FUNC(xsetpath_, 0x4DF878)
|
||||||
FUNC(xungetc_, 0x4DF3F4)
|
FUNC(xungetc_, 0x4DF3F4)
|
||||||
FUNC(xvfprintf_, 0x4DF1AC)
|
FUNC(xvfprintf_, 0x4DF1AC)
|
||||||
|
|||||||
+1
-1
@@ -287,7 +287,7 @@ static DbFile* __fastcall LoadFont(const char* font, const char* mode) {
|
|||||||
char file[128];
|
char file[128];
|
||||||
const char* lang;
|
const char* lang;
|
||||||
if (fo_get_game_config_string(&lang, "system", "language") && _stricmp(lang, "english") != 0) {
|
if (fo_get_game_config_string(&lang, "system", "language") && _stricmp(lang, "english") != 0) {
|
||||||
std::sprintf(file, "%s\\%s", lang, font);
|
std::sprintf(file, "fonts\\%s\\%s", lang, font);
|
||||||
return fo_db_fopen(file, mode);
|
return fo_db_fopen(file, mode);
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -766,12 +766,19 @@ void MiscPatches_Init() {
|
|||||||
|
|
||||||
// Remove hardcoding for maps with IDs 19 and 37
|
// Remove hardcoding for maps with IDs 19 and 37
|
||||||
if (GetConfigInt("Misc", "DisableSpecialMapIDs", 0)) {
|
if (GetConfigInt("Misc", "DisableSpecialMapIDs", 0)) {
|
||||||
dlog("Applying disable special map IDs patch.", DL_INIT);
|
dlog("Applying disable special maps handling patch.", DL_INIT);
|
||||||
const DWORD specialMapIdsAddr[] = {0x4836D6, 0x4836DB};
|
const DWORD specialMapIdsAddr[] = {0x4836D6, 0x4836DB};
|
||||||
SafeWriteBatch<BYTE>(0, specialMapIdsAddr);
|
SafeWriteBatch<BYTE>(0, specialMapIdsAddr);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove hardcoding for city areas 45 and 46 (AREA_FAKE_VAULT_13)
|
||||||
|
if (GetConfigInt("Misc", "DisableSpecialAreas", 0)) {
|
||||||
|
dlog("Applying disable special areas handling patch.", DL_INIT);
|
||||||
|
SafeWrite8(0x4C0576, CODETYPE_JumpShort);
|
||||||
|
dlogr(" Done", DL_INIT);
|
||||||
|
}
|
||||||
|
|
||||||
// Highlight "Radiated" in red color when the player is under the influence of negative effects of radiation
|
// Highlight "Radiated" in red color when the player is under the influence of negative effects of radiation
|
||||||
const DWORD listDrvdStatsAddr[] = {0x43549C, 0x4354BE};
|
const DWORD listDrvdStatsAddr[] = {0x43549C, 0x4354BE};
|
||||||
HookCalls(ListDrvdStats_hook, listDrvdStatsAddr);
|
HookCalls(ListDrvdStats_hook, listDrvdStatsAddr);
|
||||||
|
|||||||
+3
-3
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
static struct Translation {
|
static struct Translation {
|
||||||
char def[65];
|
char def[65];
|
||||||
char lang[180];
|
char lang[170];
|
||||||
bool state;
|
bool state;
|
||||||
|
|
||||||
const char* File() {
|
const char* File() {
|
||||||
@@ -45,11 +45,11 @@ std::vector<std::string> Translate_GetList(const char* section, const char* sett
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static void MakeLangTranslationPath(const char* config) {
|
static void MakeLangTranslationPath(const char* config) {
|
||||||
char patches[65], language[41];
|
char patches[65], language[32];
|
||||||
char fileConfig[65] = ".\\";
|
char fileConfig[65] = ".\\";
|
||||||
std::strcpy(&fileConfig[2], config);
|
std::strcpy(&fileConfig[2], config);
|
||||||
|
|
||||||
IniGetString("system", "language", "english", language, 41, fileConfig);
|
IniGetString("system", "language", "english", language, 32, fileConfig);
|
||||||
IniGetString("system", "master_patches", "data", patches, 65, fileConfig);
|
IniGetString("system", "master_patches", "data", patches, 65, fileConfig);
|
||||||
|
|
||||||
const char* iniDef = translationIni.def;
|
const char* iniDef = translationIni.def;
|
||||||
|
|||||||
Reference in New Issue
Block a user