The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body. src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT, from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra). structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1236 lines
45 KiB
C++
1236 lines
45 KiB
C++
#include "classes.h"
|
|
|
|
// 006841d0
|
|
byte OptionsConfig::read_bool(byte *key, byte isDefault)
|
|
{
|
|
byte ch;
|
|
uint uVar1;
|
|
int ****ppppiVar2;
|
|
int intValue;
|
|
byte ****textCursor;
|
|
byte ****ppppbVar3;
|
|
bool isLess;
|
|
byte ****rawValue [4];
|
|
int rawValueSize;
|
|
uint rawValueCapacity;
|
|
int ****value [4];
|
|
int valueSize;
|
|
uint valueCapacity;
|
|
uint local_14;
|
|
void *local_10;
|
|
undefined1 *puStack_c;
|
|
int ***local_8;
|
|
|
|
local_8 = GHIDRA_CAST<int ***>(0xffffffff);
|
|
puStack_c = &LAB_00af824d;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_UINT((value + 10));
|
|
ExceptionList = &local_10;
|
|
FUN_00684590(rawValue,key,this);
|
|
local_8 = GHIDRA_CAST<int ***>(0x0);
|
|
if (rawValueSize == 0) goto LAB_00684346;
|
|
value[0] = GHIDRA_CAST<int ****>(0x0);
|
|
ppppbVar3 = GHIDRA_CAST<byte ****>(rawValue);
|
|
if (0xf < rawValueCapacity) {
|
|
ppppbVar3 = rawValue[0];
|
|
}
|
|
valueSize = 0;
|
|
valueCapacity = 0xf;
|
|
textCursor = ppppbVar3;
|
|
do {
|
|
ch = *GHIDRA_CAST<byte *>(textCursor);
|
|
textCursor = GHIDRA_CAST<byte ****>((GHIDRA_INT(textCursor) + 1));
|
|
} while (ch != 0);
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(value))))->std::string::assign(GHIDRA_CAST<byte *>(ppppbVar3),GHIDRA_INT(textCursor) - GHIDRA_INT((GHIDRA_INT(ppppbVar3) + 1)));
|
|
if (valueSize == 0) {
|
|
LAB_00684309:
|
|
isDefault = 0;
|
|
}
|
|
else {
|
|
ppppiVar2 = GHIDRA_CAST<int ****>(value);
|
|
if (0xf < valueCapacity) {
|
|
ppppiVar2 = value[0];
|
|
}
|
|
if (valueSize == 4) {
|
|
if ((*ppppiVar2 == GHIDRA_CAST<int ***>(0x65757274)) ||
|
|
((((ch = (byte)*ppppiVar2, isLess = ch < 0x74, ch == 0x74 &&
|
|
(isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 1)) < 0x72, *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 1)) == 0x72))
|
|
&& (isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 2)) < 0x75, *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 2)) == 0x75)
|
|
) && (isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 3)) < 0x65,
|
|
*GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 3)) == 0x65)))) {
|
|
uVar1 = 0;
|
|
}
|
|
else {
|
|
uVar1 = -GHIDRA_UINT(isLess) | 1;
|
|
}
|
|
if (uVar1 != 0) goto LAB_006842a6;
|
|
}
|
|
else {
|
|
LAB_006842a6:
|
|
ppppiVar2 = GHIDRA_CAST<int ****>(value);
|
|
if (0xf < valueCapacity) {
|
|
ppppiVar2 = value[0];
|
|
}
|
|
if (valueSize == 4) {
|
|
if ((*ppppiVar2 == GHIDRA_CAST<int ***>(0x65757254)) ||
|
|
(((ch = (byte)*ppppiVar2, isLess = ch < 0x54, ch == 0x54 &&
|
|
(isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 1)) < 0x72, *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 1)) == 0x72))
|
|
&& ((isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 2)) < 0x75,
|
|
*GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 2)) == 0x75 &&
|
|
(isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 3)) < 0x65,
|
|
*GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(ppppiVar2) + 3)) == 0x65)))))) {
|
|
uVar1 = 0;
|
|
}
|
|
else {
|
|
uVar1 = -GHIDRA_UINT(isLess) | 1;
|
|
}
|
|
if (uVar1 == 0) goto LAB_00684305;
|
|
}
|
|
ppppiVar2 = GHIDRA_CAST<int ****>(value);
|
|
if (0xf < valueCapacity) {
|
|
ppppiVar2 = value[0];
|
|
}
|
|
intValue = atoi(GHIDRA_CAST<char *>(ppppiVar2));
|
|
if (intValue == 0) goto LAB_00684309;
|
|
}
|
|
LAB_00684305:
|
|
isDefault = 1;
|
|
}
|
|
if (0xf < valueCapacity) {
|
|
uVar1 = valueCapacity + 1;
|
|
ppppiVar2 = value[0];
|
|
if (0xfff < uVar1) {
|
|
ppppiVar2 = GHIDRA_CAST<int ****>(value[0][-1]);
|
|
uVar1 = valueCapacity + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(value[0]) + (-4 - GHIDRA_INT(ppppiVar2))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(ppppiVar2,uVar1);
|
|
}
|
|
LAB_00684346:
|
|
if (0xf < rawValueCapacity) {
|
|
uVar1 = rawValueCapacity + 1;
|
|
ppppbVar3 = rawValue[0];
|
|
if (0xfff < uVar1) {
|
|
ppppbVar3 = GHIDRA_CAST<byte ****>(rawValue[0][-1]);
|
|
uVar1 = rawValueCapacity + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>((GHIDRA_INT(rawValue[0]) + (-4 - GHIDRA_INT(ppppbVar3))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(ppppbVar3,uVar1);
|
|
}
|
|
ExceptionList = local_10;
|
|
return isDefault;
|
|
}
|
|
|
|
// 00924000
|
|
void OptionsConfig::reset_defaults()
|
|
{
|
|
int *sizeResult;
|
|
int unused;
|
|
int windowSize [2];
|
|
|
|
this->_musicVolume = 0.3;
|
|
this->_sfxVolume = 0.3;
|
|
this->_mapOpacity = 0.3;
|
|
this->_isFullscreen = 0;
|
|
this->_filterEnabled = 0;
|
|
this->_exposure = 1.0;
|
|
this->_brightness = 0.0;
|
|
this->_gamma = 1.0;
|
|
this->_contrast = 1.0;
|
|
this->_controlHotplugEnabled = 1;
|
|
this->_popupsMode = 1;
|
|
this->_cameraStyle = 1;
|
|
this->_historyHudMode = 0;
|
|
this->_hudOffset = 1.0;
|
|
this->_tryImportSave = 0;
|
|
this->_enableMods = 1;
|
|
this->_enableRumble = 1;
|
|
this->_enableChargeBars = 0;
|
|
this->_bossHpOnBottom = 1;
|
|
this->_enableFoundHUD = 0;
|
|
this->_enableBulletVisibility = 0;
|
|
this->_enableAimLock = 1;
|
|
this->_touchMode = 1;
|
|
this->_ascentVoiceover = 1;
|
|
this->_onlineHud = 0;
|
|
this->_streamerMode = 0;
|
|
this->_onlinePlayerVolume = 6;
|
|
this->_onlinePlayerOpacity = 10;
|
|
this->_onlineChatEnabled = 1;
|
|
this->_onlineFilterEnabled = 1;
|
|
this->_onlineColorSet = 0;
|
|
this->_onlineInputDelay = 3;
|
|
this->_itemInfoDisplayEnabled = 0;
|
|
this->_announcerVoiceMode = 0;
|
|
this->_enableDebugConsole = 0;
|
|
this->_maxScale = 99;
|
|
this->_maxRenderScale = 2;
|
|
this->_enableVSync = 1;
|
|
this->_enableSteamCloud = 1;
|
|
this->_enablePauseOnFocusLost = 1;
|
|
this->_enableMouseControl = 0;
|
|
sizeResult = glfw_get_window_size(windowSize,GHIDRA_INT(this));
|
|
this->_windowWidth = *sizeResult;
|
|
sizeResult = glfw_get_window_size(windowSize,unused);
|
|
this->_windowHeight = sizeResult[1];
|
|
this->_windowPosX = 8;
|
|
this->_windowPosY = 0x20;
|
|
this->_consoleFont = 0;
|
|
this->_enableFadedConsoleDisplay = 0;
|
|
this->_enableSaveCommandHistory = 1;
|
|
this->_enableBorderlessFullscreen = 0;
|
|
this->_enableEpicOverlay = 1;
|
|
this->_eosCrossplay = 0;
|
|
this->_acceptedPublicBeta_VERSION = 0;
|
|
this->_acceptedDataCollectionDisclaimer = 0;
|
|
if ((this->_optionsIniFilePath)._capacity < 0x10) {
|
|
(this->_optionsIniFilePath)._size = 0;
|
|
(this->_optionsIniFilePath)._buf[0] = '\0';
|
|
return;
|
|
}
|
|
(this->_optionsIniFilePath)._size = 0;
|
|
**GHIDRA_CAST<undefined1 **>((this->_optionsIniFilePath)._buf) = 0;
|
|
return;
|
|
}
|
|
|
|
// 00924180
|
|
void OptionsConfig::load_config_ini()
|
|
{
|
|
byte isEnabled;
|
|
uint uVar1;
|
|
byte *extraout_EAX;
|
|
byte *pathText;
|
|
int *file;
|
|
int fileSize;
|
|
void *pvVar2;
|
|
uint uVar3;
|
|
void *keyValues [2];
|
|
void *redirectedPath [4];
|
|
float local_34;
|
|
float local_30;
|
|
std_string configName;
|
|
uint local_14;
|
|
void *local_10;
|
|
undefined1 *puStack_c;
|
|
uint local_8;
|
|
Manager *manager;
|
|
|
|
manager = g_manager;
|
|
puStack_c = &LAB_00b0a77d;
|
|
local_10 = ExceptionList;
|
|
uVar1 = __security_cookie ^ GHIDRA_UINT(&(&configName)[1]._size);
|
|
ExceptionList = &local_10;
|
|
this->_enableColorCorrection = 1;
|
|
this->_enableLighting = 1;
|
|
this->_enableShockwave = 1;
|
|
this->_enableCaustics = 1;
|
|
this->_enableFilter = 1;
|
|
this->_enablePixelation = 1;
|
|
this->_enableBloom = 1;
|
|
this->_enableWaterSurface = 1;
|
|
this->_enableInterpolation = 1;
|
|
this->_getsSetToEnableWaterSurface = 1;
|
|
this->_enableColorModifier = 1;
|
|
configName._capacity = 0xf;
|
|
configName._size = 10;
|
|
builtin_strncpy(configName._buf,"config.ini",0xb);
|
|
local_8 = 0;
|
|
local_14 = uVar1;
|
|
(GHIDRA_CAST<ModManager *>((&manager->_modManager)))->ModManager::TryRedirectPath(GHIDRA_CAST<std_string *>(redirectedPath),&configName);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
|
|
pathText = extraout_EAX;
|
|
if (0xf < *GHIDRA_CAST<uint *>((extraout_EAX + 0x14))) {
|
|
pathText = *GHIDRA_CAST<byte **>(extraout_EAX);
|
|
}
|
|
file = (GHIDRA_CAST<FileSystem *>((&PTR_vftable_00c37a10)))->FileSystem::Open(pathText,GHIDRA_CAST<int *>(0x0));
|
|
local_8 = (*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_8))) + 0x1))) << 8;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
pvVar2 = redirectedPath[0];
|
|
if (0xfff < uVar3) {
|
|
pvVar2 = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4);
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(pvVar2))))) goto LAB_009242ab;
|
|
}
|
|
operator_delete(pvVar2,uVar3);
|
|
}
|
|
local_8 = -1;
|
|
local_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00);
|
|
if (0xf < configName._capacity) {
|
|
uVar3 = configName._capacity + 1;
|
|
pvVar2 = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((void *)configName._buf)) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
pvVar2 = *(void **)((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(configName._buf)) + 0x0))) + -4);
|
|
uVar3 = configName._capacity + 0x24;
|
|
if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(configName._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar2))))) {
|
|
LAB_009242ab:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pvVar2,uVar3);
|
|
}
|
|
if (file != GHIDRA_CAST<int *>(0x0)) {
|
|
fileSize = (**(code **)(*file + 4))(uVar1);
|
|
pvVar2 = operator_new_tracked(fileSize + 1);
|
|
*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(pvVar2) + fileSize)) = 0;
|
|
(**(code **)(*file + 0x14))(pvVar2,1,fileSize);
|
|
(**(code **)*file)(1);
|
|
keyvalue_map_parse(pvVar2);
|
|
local_8 = 3;
|
|
tracked_alloc(1,pvVar2,0);
|
|
local_8 = CONCAT31((*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),2);
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableColorCorrection"),1);
|
|
this->_enableColorCorrection = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableCaustics"),1);
|
|
this->_enableCaustics = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableShockwave"),1);
|
|
this->_enableShockwave = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableLighting"),1);
|
|
this->_enableLighting = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableFilter"),1);
|
|
this->_enableFilter = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnablePixelation"),1);
|
|
this->_enablePixelation = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableBloom"),1);
|
|
this->_enableBloom = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableWaterSurface"),1);
|
|
this->_enableWaterSurface = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableInterpolation"),1);
|
|
this->_enableInterpolation = isEnabled;
|
|
isEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(keyValues),GHIDRA_CAST<byte *>("EnableColorModifier"),1);
|
|
this->_enableColorModifier = isEnabled;
|
|
this->_getsSetToEnableWaterSurface = this->_enableWaterSurface;
|
|
FUN_00431200(keyValues,*GHIDRA_CAST<undefined4 *>((GHIDRA_INT(keyValues[0]) + 4)));
|
|
operator_delete(keyValues[0],0x40);
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 00924440
|
|
void OptionsConfig::Load(byte *path)
|
|
{
|
|
OptionsConfig *this_00;
|
|
byte isMusicEnabled;
|
|
int *piVar1;
|
|
int iVar2;
|
|
void *fileText;
|
|
int iVar3;
|
|
byte *pbVar4;
|
|
byte *******compareCursor;
|
|
int unused;
|
|
int unused_00;
|
|
int unused_01;
|
|
uint uVar5;
|
|
byte *******pppppppbVar6;
|
|
bool isLess;
|
|
float in_XMM0_Da;
|
|
int windowSize;
|
|
byte *******local_7c;
|
|
OptionsConfig *config;
|
|
byte *local_74;
|
|
byte isLegacyPath;
|
|
byte *******local_6c [2];
|
|
byte *searchText;
|
|
float searchTextSize;
|
|
float searchTextCapacity;
|
|
byte *******legacyPath [4];
|
|
int *legacyPathSize;
|
|
float legacyPathCapacity;
|
|
byte betaKey [32];
|
|
uint local_14;
|
|
void *local_10;
|
|
undefined1 *puStack_c;
|
|
undefined4 local_8;
|
|
Manager *manager;
|
|
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0xff;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0xff;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x2))) = 0xff;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x3))) = 0xff;
|
|
puStack_c = &LAB_00b0a7cd;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_UINT((betaKey + 0x30));
|
|
ExceptionList = &local_10;
|
|
local_74 = path;
|
|
config = this;
|
|
reset_defaults(this,local_14);
|
|
pbVar4 = path;
|
|
do {
|
|
isMusicEnabled = *pbVar4;
|
|
pbVar4 = pbVar4 + 1;
|
|
} while (isMusicEnabled != 0);
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(this))))->std::string::assign(path,GHIDRA_INT(pbVar4) - GHIDRA_INT((path + 1)));
|
|
piVar1 = (GHIDRA_CAST<SaveDataManager *>((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_read(path);
|
|
isLegacyPath = 0;
|
|
local_7c = GHIDRA_CAST<byte *******>(piVar1);
|
|
if (piVar1 == GHIDRA_CAST<int *>(0x0)) {
|
|
legacyPathCapacity = 2.10195e-44;
|
|
legacyPath[0] = GHIDRA_CAST<byte *******>(0x0);
|
|
pbVar4 = local_74;
|
|
do {
|
|
isMusicEnabled = *pbVar4;
|
|
pbVar4 = pbVar4 + 1;
|
|
} while (isMusicEnabled != 0);
|
|
legacyPathSize = piVar1;
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(legacyPath))))->std::string::assign(local_74,GHIDRA_INT(pbVar4) - GHIDRA_INT((local_74 + 1)));
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x2))) = 0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x3))) = 0;
|
|
local_74 = std::_Allocate(0x20);
|
|
searchTextSize = 3.92364e-44;
|
|
searchTextCapacity = 4.34403e-44;
|
|
local_74[0] = 'B';
|
|
local_74[1] = 'i';
|
|
local_74[2] = 'n';
|
|
local_74[3] = 'd';
|
|
local_74[4] = 'i';
|
|
local_74[5] = 'n';
|
|
local_74[6] = 'g';
|
|
local_74[7] = ' ';
|
|
local_74[8] = 'o';
|
|
local_74[9] = 'f';
|
|
local_74[10] = ' ';
|
|
local_74[0xb] = 'I';
|
|
local_74[0xc] = 's';
|
|
local_74[0xd] = 'a';
|
|
local_74[0xe] = 'a';
|
|
local_74[0xf] = 'c';
|
|
in_XMM0_Da = 2.838854e+29;
|
|
local_74[0x10] = 0x20;
|
|
local_74[0x11] = 0x52;
|
|
local_74[0x12] = 0x65;
|
|
local_74[0x13] = 0x70;
|
|
local_74[0x14] = 0x65;
|
|
local_74[0x15] = 0x6e;
|
|
local_74[0x16] = 0x74;
|
|
local_74[0x17] = 0x61;
|
|
local_74[0x18] = 'n';
|
|
local_74[0x19] = 'c';
|
|
local_74[0x1a] = 'e';
|
|
local_74[0x1b] = '+';
|
|
local_74[0x1c] = 0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
|
|
local_7c = GHIDRA_CAST<byte *******>(legacyPath);
|
|
if (0xf < GHIDRA_UINT(legacyPathCapacity)) {
|
|
local_7c = legacyPath[0];
|
|
}
|
|
searchText = local_74;
|
|
if (GHIDRA_CAST<int *>(0x1b) < legacyPathSize) {
|
|
piVar1 = GHIDRA_CAST<int *>(0xffffffff);
|
|
if (legacyPathSize + -7 != GHIDRA_CAST<int *>(0xffffffff)) {
|
|
piVar1 = legacyPathSize + -7;
|
|
}
|
|
isLegacyPath = *local_74;
|
|
pppppppbVar6 = GHIDRA_CAST<byte *******>((GHIDRA_INT(piVar1) + GHIDRA_INT(local_7c)));
|
|
LAB_00924554:
|
|
if (*GHIDRA_CAST<byte *>(pppppppbVar6) != isLegacyPath) {
|
|
LAB_009245a7:
|
|
if (pppppppbVar6 == local_7c) goto LAB_009245c8;
|
|
pppppppbVar6 = GHIDRA_CAST<byte *******>((GHIDRA_INT(pppppppbVar6) + -1));
|
|
goto LAB_00924554;
|
|
}
|
|
uVar5 = 0x18;
|
|
compareCursor = pppppppbVar6;
|
|
pbVar4 = local_74;
|
|
do {
|
|
if (*compareCursor != *GHIDRA_CAST<byte *******>(pbVar4)) {
|
|
isMusicEnabled = (byte)*compareCursor;
|
|
isLess = isMusicEnabled < *pbVar4;
|
|
if ((((isMusicEnabled == *pbVar4) &&
|
|
(isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(compareCursor) + 1)) < pbVar4[1],
|
|
*GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(compareCursor) + 1)) == pbVar4[1])) &&
|
|
(isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(compareCursor) + 2)) < pbVar4[2],
|
|
*GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(compareCursor) + 2)) == pbVar4[2])) &&
|
|
(isLess = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(compareCursor) + 3)) < pbVar4[3],
|
|
*GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(compareCursor) + 3)) == pbVar4[3])) {
|
|
uVar5 = 0;
|
|
}
|
|
else {
|
|
uVar5 = -GHIDRA_UINT(isLess) | 1;
|
|
}
|
|
goto LAB_0092459a;
|
|
}
|
|
compareCursor = compareCursor + 1;
|
|
pbVar4 = pbVar4 + 4;
|
|
isLess = 3 < uVar5;
|
|
uVar5 = uVar5 - 4;
|
|
} while (isLess);
|
|
uVar5 = 0;
|
|
LAB_0092459a:
|
|
if (uVar5 != 0) goto LAB_009245a7;
|
|
if (GHIDRA_INT(pppppppbVar6) - GHIDRA_INT(local_7c) != 0xffffffff) {
|
|
std::string::replace
|
|
(GHIDRA_CAST<char *>(legacyPath),GHIDRA_INT(pppppppbVar6) - GHIDRA_INT(local_7c),0x1c,
|
|
GHIDRA_CAST<byte *>("Binding of Isaac Afterbirth+"),0x1c);
|
|
}
|
|
LAB_009245c8:
|
|
this = config;
|
|
}
|
|
pppppppbVar6 = GHIDRA_CAST<byte *******>(legacyPath);
|
|
if (0xf < GHIDRA_UINT(legacyPathCapacity)) {
|
|
pppppppbVar6 = legacyPath[0];
|
|
}
|
|
piVar1 = (GHIDRA_CAST<SaveDataManager *>((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_read(GHIDRA_CAST<byte *>(pppppppbVar6));
|
|
local_7c = GHIDRA_CAST<byte *******>(piVar1);
|
|
if (piVar1 == GHIDRA_CAST<int *>(0x0)) {
|
|
Save(this);
|
|
operator_delete(local_74,0x20);
|
|
if (GHIDRA_UINT(legacyPathCapacity) < 0x10) {
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
uVar5 = GHIDRA_INT(legacyPathCapacity) + 1;
|
|
local_6c[0] = legacyPath[0];
|
|
if (0xfff < uVar5) {
|
|
local_6c[0] = GHIDRA_CAST<byte *******>(legacyPath[0][-1]);
|
|
uVar5 = GHIDRA_INT(legacyPathCapacity) + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>((GHIDRA_INT(legacyPath[0]) + (-4 - GHIDRA_INT(local_6c[0]))))) {
|
|
LAB_0092466d:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
goto LAB_00924ce7;
|
|
}
|
|
isLegacyPath = 1;
|
|
operator_delete(local_74,0x20);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0xff;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0xff;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x2))) = 0xff;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x3))) = 0xff;
|
|
if (0xf < GHIDRA_UINT(legacyPathCapacity)) {
|
|
uVar5 = GHIDRA_INT(legacyPathCapacity) + 1;
|
|
pppppppbVar6 = legacyPath[0];
|
|
if (0xfff < uVar5) {
|
|
pppppppbVar6 = GHIDRA_CAST<byte *******>(legacyPath[0][-1]);
|
|
uVar5 = GHIDRA_INT(legacyPathCapacity) + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>((GHIDRA_INT(legacyPath[0]) + (-4 - GHIDRA_INT(pppppppbVar6)))))
|
|
goto LAB_0092466d;
|
|
}
|
|
operator_delete(pppppppbVar6,uVar5);
|
|
}
|
|
legacyPathSize = GHIDRA_CAST<int *>(0x0);
|
|
legacyPathCapacity = 2.10195e-44;
|
|
legacyPath[0] = GHIDRA_CAST<byte *******>((GHIDRA_UINT(legacyPath[0]) & 0xffffff00));
|
|
}
|
|
iVar2 = (**(code **)(*piVar1 + 4))();
|
|
fileText = operator_new_tracked(iVar2 + 1);
|
|
pppppppbVar6 = local_7c;
|
|
*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(fileText) + iVar2)) = 0;
|
|
(**(code **)(GHIDRA_INT(*local_7c) + 0x14))(fileText,1,iVar2);
|
|
(*(code *)**pppppppbVar6)(1);
|
|
keyvalue_map_parse(fileText);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 3;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x2))) = 0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x3))) = 0;
|
|
tracked_alloc(1,fileText,0);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 2;
|
|
FUN_00684130("Language",0);
|
|
(GHIDRA_CAST<Manager *>((g_manager)))->Manager::validate_language(unused);
|
|
FUN_006843a0("MusicVolume");
|
|
this_00 = config;
|
|
manager = g_manager;
|
|
config->_musicVolume = in_XMM0_Da;
|
|
(manager->_musicManager)._isEnabled = 0.0 < in_XMM0_Da;
|
|
(manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._volume =
|
|
(manager->_optionsConfig)._musicVolume;
|
|
(manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._targetVolume =
|
|
(manager->_optionsConfig)._musicVolume;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("MusicEnabled"),1);
|
|
if (isMusicEnabled == 0) {
|
|
(g_manager->_musicManager)._isEnabled = 0;
|
|
}
|
|
FUN_006843a0("SFXVolume");
|
|
manager = g_manager;
|
|
this_00->_sfxVolume = in_XMM0_Da;
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::ClearVolumeModifier();
|
|
FUN_006843a0("MapOpacity");
|
|
this_00->_mapOpacity = in_XMM0_Da;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("Filter"),0);
|
|
this_00->_filterEnabled = isMusicEnabled;
|
|
FUN_006843a0("Exposure");
|
|
this_00->_exposure = in_XMM0_Da;
|
|
FUN_006843a0("Brightness");
|
|
this_00->_brightness = in_XMM0_Da;
|
|
FUN_006843a0("Gamma");
|
|
this_00->_gamma = in_XMM0_Da;
|
|
FUN_006843a0("Contrast");
|
|
this_00->_contrast = in_XMM0_Da;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("ControllerHotplug"),1);
|
|
this_00->_controlHotplugEnabled = isMusicEnabled;
|
|
if (isMusicEnabled != ((byte)(DAT_00c57b1c >> 1) & 1)) {
|
|
if (isMusicEnabled == 0) {
|
|
DAT_00c57b1c = DAT_00c57b1c & 0xfffffffd;
|
|
}
|
|
else {
|
|
(**(code **)(DAT_00c57b64 + 8))(FUN_00a220c0,2,0x1000,&PTR_vftable_00c57b18);
|
|
DAT_00c57b1c = DAT_00c57b1c | 2;
|
|
}
|
|
}
|
|
iVar2 = FUN_00684130("PopUps",1);
|
|
this_00->_popupsMode = iVar2;
|
|
iVar2 = FUN_00684130("CameraStyle",1);
|
|
this_00->_cameraStyle = iVar2;
|
|
iVar2 = FUN_00684130("ShowRecentItems",0);
|
|
this_00->_historyHudMode = iVar2;
|
|
FUN_006843a0("HudOffset");
|
|
this_00->_hudOffset = in_XMM0_Da;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("TryImportSave"),0);
|
|
this_00->_tryImportSave = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("BossHpOnBottom"),1);
|
|
this_00->_bossHpOnBottom = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("FoundHUD"),0);
|
|
this_00->_enableFoundHUD = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("EnableMods"),1);
|
|
this_00->_enableMods = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("RumbleEnabled"),1);
|
|
this_00->_enableRumble = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("ChargeBars"),0);
|
|
this_00->_enableChargeBars = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("BulletVisibility"),0);
|
|
this_00->_enableBulletVisibility = isMusicEnabled;
|
|
iVar2 = FUN_00684130("TouchMode",1);
|
|
this_00->_touchMode = iVar2;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("AimLock"),1);
|
|
this_00->_enableAimLock = isMusicEnabled;
|
|
iVar2 = FUN_00684130("JacobEsauControls",1);
|
|
this_00->_jacobEsauControls = iVar2;
|
|
iVar2 = FUN_00684130("AscentVoiceOver",1);
|
|
this_00->_ascentVoiceover = iVar2 != 0;
|
|
iVar2 = FUN_00684130("OnlineHud",0);
|
|
this_00->_onlineHud = iVar2;
|
|
iVar3 = FUN_00684130("OnlinePlayerVolume",6);
|
|
iVar2 = 0;
|
|
if (0 < iVar3) {
|
|
iVar2 = iVar3;
|
|
}
|
|
iVar3 = 10;
|
|
if (iVar2 < 10) {
|
|
iVar3 = iVar2;
|
|
}
|
|
this_00->_onlinePlayerVolume = iVar3;
|
|
iVar3 = FUN_00684130("OnlinePlayerOpacity",10);
|
|
iVar2 = 0;
|
|
if (0 < iVar3) {
|
|
iVar2 = iVar3;
|
|
}
|
|
iVar3 = 10;
|
|
if (iVar2 < 10) {
|
|
iVar3 = iVar2;
|
|
}
|
|
this_00->_onlinePlayerOpacity = iVar3;
|
|
iVar2 = FUN_00684130("MultiplayerColorSet",0);
|
|
this_00->_onlineColorSet = iVar2;
|
|
iVar3 = FUN_00684130("OnlineInputDelay",3);
|
|
iVar2 = 5;
|
|
if (iVar3 < 5) {
|
|
iVar2 = iVar3;
|
|
}
|
|
iVar3 = 1;
|
|
if (1 < iVar2) {
|
|
iVar3 = iVar2;
|
|
}
|
|
this_00->_onlineInputDelay = iVar3;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("ItemInfoDisplayEnabled"),0);
|
|
this_00->_itemInfoDisplayEnabled = isMusicEnabled;
|
|
sprintf(betaKey,GHIDRA_CAST<byte *>("AcceptedPublicBeta_%s"));
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),betaKey,0);
|
|
this_00->_acceptedPublicBeta_VERSION = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("AcceptedDataCollectionDisclaimer"),0)
|
|
;
|
|
this_00->_acceptedDataCollectionDisclaimer = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("EnableDebugConsole"),0);
|
|
this_00->_enableDebugConsole = isMusicEnabled;
|
|
iVar2 = FUN_00684130("AnnouncerVoiceMode",0);
|
|
this_00->_announcerVoiceMode = iVar2;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("OnlineChatEnabled"),1);
|
|
this_00->_onlineChatEnabled = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("OnlineChatFilterEnabled"),1);
|
|
this_00->_onlineFilterEnabled = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("StreamerMode"),0);
|
|
this_00->_streamerMode = isMusicEnabled;
|
|
iVar2 = FUN_00684130("MaxScale",99);
|
|
this_00->_maxScale = iVar2;
|
|
iVar2 = FUN_00684130("MaxRenderScale",2);
|
|
this_00->_maxRenderScale = iVar2;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("VSync"),1);
|
|
set_vsync(this_00,isMusicEnabled);
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("PauseOnFocusLost"),1);
|
|
this_00->_enablePauseOnFocusLost = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("SteamCloud"),1);
|
|
this_00->_enableSteamCloud = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("MouseControl"),0);
|
|
this_00->_enableMouseControl = isMusicEnabled;
|
|
glfwSetInputMode(g_glfwWindow,(isMusicEnabled != 0) + 0x34001);
|
|
iVar2 = FUN_00684130("ConsoleFont",0);
|
|
this_00->_consoleFont = iVar2;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("FadedConsoleDisplay"),0);
|
|
this_00->_enableFadedConsoleDisplay = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("SaveCommandHistory"),1);
|
|
this_00->_enableSaveCommandHistory = isMusicEnabled;
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("UseExclusiveFullscreen"),0);
|
|
this_00->_enableBorderlessFullscreen = isMusicEnabled;
|
|
piVar1 = glfw_get_window_size(&windowSize,unused_00);
|
|
iVar2 = FUN_00684130("WindowWidth",*piVar1);
|
|
this_00->_windowWidth = iVar2;
|
|
piVar1 = glfw_get_window_size(&windowSize,unused_01);
|
|
iVar2 = FUN_00684130("WindowHeight",piVar1[1]);
|
|
this_00->_windowHeight = iVar2;
|
|
iVar2 = FUN_00684130("WindowPosX",0);
|
|
if ((iVar2 < 8) || (0xffff < iVar2)) {
|
|
iVar2 = 8;
|
|
}
|
|
iVar3 = FUN_00684130("WindowPosY",0);
|
|
if ((iVar3 < 8) || (0xffff < iVar3)) {
|
|
iVar3 = 0x20;
|
|
}
|
|
this_00->_windowPosX = iVar2;
|
|
this_00->_windowPosY = iVar3;
|
|
glfw_set_window_pos(iVar2,iVar3);
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("Fullscreen"),0);
|
|
set_fullscreen(this_00,isMusicEnabled);
|
|
isMusicEnabled = read_bool(GHIDRA_CAST<OptionsConfig *>(local_6c),GHIDRA_CAST<byte *>("EnableEpicOverlay"),1);
|
|
this_00->_enableEpicOverlay = isMusicEnabled;
|
|
iVar2 = FUN_00684130("EosCrossplay",0);
|
|
this_00->_eosCrossplay = iVar2;
|
|
if (isLegacyPath != 0) {
|
|
this_00->_gamma = 1.0;
|
|
this_00->_hudOffset = 1.0;
|
|
}
|
|
FUN_00431200(local_6c,local_6c[0][1]);
|
|
uVar5 = 0x40;
|
|
LAB_00924ce7:
|
|
operator_delete(local_6c[0],uVar5);
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 00924d10
|
|
void OptionsConfig::Save()
|
|
{
|
|
char cVar1;
|
|
int *file;
|
|
byte *lineEnd;
|
|
char *lineCursor;
|
|
byte abStackY_4a4 [128];
|
|
byte abStack_31e [2];
|
|
byte abStack_22e [2];
|
|
byte abStack_1e6 [2];
|
|
byte abStack_1b6 [2];
|
|
byte abStack_19e [2];
|
|
undefined4 uStack_190;
|
|
undefined1 auStack_174 [2];
|
|
byte abStack_172 [6];
|
|
byte abStack_16c [12];
|
|
byte abStack_160 [12];
|
|
byte abStack_154 [12];
|
|
byte line [260];
|
|
uint local_44;
|
|
byte lineChar;
|
|
|
|
local_44 = __security_cookie ^ GHIDRA_UINT(auStack_174);
|
|
if (0xf < (this->_optionsIniFilePath)._capacity) {
|
|
this = *GHIDRA_CAST<OptionsConfig **>((this->_optionsIniFilePath)._buf);
|
|
}
|
|
file = (GHIDRA_CAST<SaveDataManager *>((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_write(GHIDRA_CAST<byte *>(this),0);
|
|
if (file == GHIDRA_CAST<int *>(0x0)) {
|
|
uStack_190 = 0x924d6c;
|
|
KAGE_LogMessage(1,GHIDRA_CAST<byte *>("[warn] could not opn %s for writing. options will not be saved.\n"));
|
|
return;
|
|
}
|
|
uStack_190 = 0x924d98;
|
|
sprintf_s(line,0x100,GHIDRA_CAST<byte *>("[Options]\r\n"));
|
|
lineEnd = line;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
uStack_190 = 0x924dba;
|
|
(**(code **)(*file + 0x1c))();
|
|
uStack_190 = *GHIDRA_CAST<int *>(&g_manager->_stringTable);
|
|
sprintf_s(abStack_154,0x100,GHIDRA_CAST<byte *>("Language=%d\r\n"));
|
|
lineEnd = abStack_154;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
uStack_190 = GHIDRA_INT(lineEnd) - GHIDRA_INT((abStack_154 + 1));
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_160,0x100,GHIDRA_CAST<byte *>("MusicVolume=%.4f\r\n"));
|
|
lineEnd = abStack_160;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_16c,0x100,GHIDRA_CAST<byte *>("MusicEnabled=%d\r\n"));
|
|
lineEnd = abStack_16c;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(auStack_174 + -4,0x100,GHIDRA_CAST<byte *>("SFXVolume=%.4f\r\n"));
|
|
lineCursor = auStack_174 + -4;
|
|
do {
|
|
cVar1 = *lineCursor;
|
|
lineCursor = lineCursor + 1;
|
|
} while (cVar1 != '\0');
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(auStack_174 + -0x10,0x100,GHIDRA_CAST<byte *>("MapOpacity=%.4f\r\n"));
|
|
lineCursor = auStack_174 + -0x10;
|
|
do {
|
|
cVar1 = *lineCursor;
|
|
lineCursor = lineCursor + 1;
|
|
} while (cVar1 != '\0');
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(GHIDRA_CAST<byte *>(&uStack_190),0x100,GHIDRA_CAST<byte *>("Fullscreen=%d\r\n"));
|
|
lineCursor = GHIDRA_CAST<char *>(&uStack_190);
|
|
do {
|
|
cVar1 = *lineCursor;
|
|
lineCursor = lineCursor + 1;
|
|
} while (cVar1 != '\0');
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_19e + 2,0x100,GHIDRA_CAST<byte *>("Filter=%d\r\n"));
|
|
lineEnd = abStack_19e + 2;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_19e + -10,0x100,GHIDRA_CAST<byte *>("Exposure=%.4f\r\n"));
|
|
lineEnd = abStack_19e + -10;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1b6 + 2,0x100,GHIDRA_CAST<byte *>("Gamma=%.4f\r\n"));
|
|
lineEnd = abStack_1b6 + 2;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1b6 + -10,0x100,GHIDRA_CAST<byte *>("ControllerHotplug=%d\r\n"));
|
|
lineEnd = abStack_1b6 + -10;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1b6 + -0x16,0x100,GHIDRA_CAST<byte *>("PopUps=%d\r\n"));
|
|
lineEnd = abStack_1b6 + -0x16;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1e6 + 0xe,0x100,GHIDRA_CAST<byte *>("CameraStyle=%d\r\n"));
|
|
lineEnd = abStack_1e6 + 0xe;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1e6 + 2,0x100,GHIDRA_CAST<byte *>("ShowRecentItems=%d\r\n"));
|
|
lineEnd = abStack_1e6 + 2;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1e6 + -10,0x100,GHIDRA_CAST<byte *>("HudOffset=%.4f\r\n"));
|
|
lineEnd = abStack_1e6 + -10;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1e6 + -0x16,0x100,GHIDRA_CAST<byte *>("TryImportSave=%d\r\n"));
|
|
lineEnd = abStack_1e6 + -0x16;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_1e6 + -0x22,0x100,GHIDRA_CAST<byte *>("FoundHUD=%d\r\n"));
|
|
lineEnd = abStack_1e6 + -0x22;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + 0x1a,0x100,GHIDRA_CAST<byte *>("EnableMods=%d\r\n"));
|
|
lineEnd = abStack_22e + 0x1a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + 0xe,0x100,GHIDRA_CAST<byte *>("RumbleEnabled=%d\r\n"));
|
|
lineEnd = abStack_22e + 0xe;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + 2,0x100,GHIDRA_CAST<byte *>("ChargeBars=%d\r\n"));
|
|
lineEnd = abStack_22e + 2;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -10,0x100,GHIDRA_CAST<byte *>("BulletVisibility=%d\r\n"));
|
|
lineEnd = abStack_22e + -10;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x16,0x100,GHIDRA_CAST<byte *>("TouchMode=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x16;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x22,0x100,GHIDRA_CAST<byte *>("AimLock=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x22;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x2e,0x100,GHIDRA_CAST<byte *>("JacobEsauControls=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x2e;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x3a,0x100,GHIDRA_CAST<byte *>("AscentVoiceOver=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x3a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x46,0x100,GHIDRA_CAST<byte *>("OnlineHud=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x46;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x52,0x100,GHIDRA_CAST<byte *>("StreamerMode=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x52;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x5e,0x100,GHIDRA_CAST<byte *>("OnlinePlayerVolume=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x5e;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x6a,0x100,GHIDRA_CAST<byte *>("OnlinePlayerOpacity=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x6a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_22e + -0x76,0x100,GHIDRA_CAST<byte *>("OnlineChatEnabled=%d\r\n"));
|
|
lineEnd = abStack_22e + -0x76;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x6e,0x100,GHIDRA_CAST<byte *>("OnlineChatFilterEnabled=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x6e;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x62,0x100,GHIDRA_CAST<byte *>("MultiplayerColorSet=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x62;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x56,0x100,GHIDRA_CAST<byte *>("OnlineInputDelay=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x56;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x4a,0x100,GHIDRA_CAST<byte *>("ItemInfoDisplayEnabled=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x4a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x3e,0x100,GHIDRA_CAST<byte *>("AcceptedPublicBeta_%s=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x3e;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x32,0x100,GHIDRA_CAST<byte *>("AcceptedDataCollectionDisclaimer=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x32;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x26,0x100,GHIDRA_CAST<byte *>("EnableDebugConsole=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x26;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0x1a,0x100,GHIDRA_CAST<byte *>("MaxScale=%d\r\n"));
|
|
lineEnd = abStack_31e + 0x1a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 0xe,0x100,GHIDRA_CAST<byte *>("MaxRenderScale=%d\r\n"));
|
|
lineEnd = abStack_31e + 0xe;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + 2,0x100,GHIDRA_CAST<byte *>("VSync=%d\r\n"));
|
|
lineEnd = abStack_31e + 2;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -10,0x100,GHIDRA_CAST<byte *>("PauseOnFocusLost=%d\r\n"));
|
|
lineEnd = abStack_31e + -10;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x16,0x100,GHIDRA_CAST<byte *>("SteamCloud=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x16;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x22,0x100,GHIDRA_CAST<byte *>("MouseControl=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x22;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x2e,0x100,GHIDRA_CAST<byte *>("BossHpOnBottom=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x2e;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x3a,0x100,GHIDRA_CAST<byte *>("AnnouncerVoiceMode=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x3a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x46,0x100,GHIDRA_CAST<byte *>("ConsoleFont=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x46;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x52,0x100,GHIDRA_CAST<byte *>("FadedConsoleDisplay=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x52;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x5e,0x100,GHIDRA_CAST<byte *>("SaveCommandHistory=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x5e;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x6a,0x100,GHIDRA_CAST<byte *>("WindowWidth=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x6a;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(abStack_31e + -0x76,0x100,GHIDRA_CAST<byte *>("WindowHeight=%d\r\n"));
|
|
lineEnd = abStack_31e + -0x76;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))();
|
|
sprintf_s(GHIDRA_CAST<byte *>((GHIDRA_INT(register0x00000010) + -0x3a0)),0x100,GHIDRA_CAST<byte *>("WindowPosX=%d\r\n"));
|
|
lineCursor = GHIDRA_CAST<char *>((GHIDRA_INT(register0x00000010) + -0x3a0));
|
|
do {
|
|
cVar1 = *lineCursor;
|
|
lineCursor = lineCursor + 1;
|
|
} while (cVar1 != '\0');
|
|
(**(code **)(*file + 0x1c))(GHIDRA_INT(register0x00000010) + -0x3a0,1);
|
|
sprintf_s(abStackY_4a4 + 0xf8,0x100,GHIDRA_CAST<byte *>("WindowPosY=%d\r\n"));
|
|
lineEnd = abStackY_4a4 + 0xf8;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))(abStackY_4a4 + 0xf8,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xf9)));
|
|
sprintf_s(abStackY_4a4 + 0xec,0x100,GHIDRA_CAST<byte *>("UseExclusiveFullscreen=%d\r\n"));
|
|
lineEnd = abStackY_4a4 + 0xec;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))(abStackY_4a4 + 0xec,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xed)));
|
|
sprintf_s(abStackY_4a4 + 0xe0,0x100,GHIDRA_CAST<byte *>("EnableEpicOverlay=%d\r\n"));
|
|
lineEnd = abStackY_4a4 + 0xe0;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))(abStackY_4a4 + 0xe0,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xe1)));
|
|
sprintf_s(abStackY_4a4 + 0xd4,0x100,GHIDRA_CAST<byte *>("EosCrossplay=%d\r\n"));
|
|
lineEnd = abStackY_4a4 + 0xd4;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))(abStackY_4a4 + 0xd4,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xd5)));
|
|
sprintf_s(abStackY_4a4 + 200,0x100,&DAT_00b657f8);
|
|
lineEnd = abStackY_4a4 + 200;
|
|
do {
|
|
lineChar = *lineEnd;
|
|
lineEnd = lineEnd + 1;
|
|
} while (lineChar != 0);
|
|
(**(code **)(*file + 0x1c))(abStackY_4a4 + 200,1,GHIDRA_INT(lineEnd) - GHIDRA_INT((abStackY_4a4 + 0xc9)));
|
|
(**(code **)*file)(1);
|
|
return;
|
|
}
|
|
|
|
// 00925c00
|
|
void OptionsConfig::SetMusicVolume(float volume)
|
|
{
|
|
Manager *manager;
|
|
|
|
manager = g_manager;
|
|
this->_musicVolume = volume;
|
|
(manager->_musicManager)._isEnabled = 0.0 < volume;
|
|
(manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._volume =
|
|
(manager->_optionsConfig)._musicVolume;
|
|
(manager->_musicManager)._channels[(manager->_musicManager)._currentChannel]._targetVolume =
|
|
(manager->_optionsConfig)._musicVolume;
|
|
return;
|
|
}
|
|
|
|
// 00925c60
|
|
void OptionsConfig::set_fullscreen(byte isFullscreen)
|
|
{
|
|
int windowWidth;
|
|
int windowHeight;
|
|
|
|
this->_isFullscreen = isFullscreen;
|
|
KAGE_Graphics::set_fullscreen(isFullscreen,this->_enableBorderlessFullscreen);
|
|
if (this->_isFullscreen == 0) {
|
|
windowWidth = this->_windowWidth;
|
|
windowHeight = this->_windowHeight;
|
|
FUN_00a19450(&windowWidth);
|
|
glfw_set_window_pos(this->_windowPosX,this->_windowPosY);
|
|
glfwSetInputMode(g_glfwWindow,(this->_enableMouseControl != 0) + 0x34001);
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 00925ce0
|
|
void OptionsConfig::set_vsync(uint param_2)
|
|
{
|
|
void *pvVar1;
|
|
uint videoMode;
|
|
int isModeOk;
|
|
byte isVsync;
|
|
float hzRatio;
|
|
float hzDeviation;
|
|
|
|
this->_enableVSync = (byte)param_2;
|
|
isVsync = (byte)param_2;
|
|
if ((byte)param_2 != 0) {
|
|
pvVar1 = window_get_current_monitor(&DAT_00c798e0);
|
|
if (pvVar1 == (void *)0x0) {
|
|
_wassert(L"monitor != NULL",
|
|
L"C:\\nicalis\\builderbob\\projects\\KAGE\\Source\\Platforms\\PC\\Shared\\Source\\External\\gl\\GLFW_3.4\\src\\monitor.c"
|
|
,0x1c1);
|
|
}
|
|
if (_glfw == 0) {
|
|
_glfwInputError(0x10001,0);
|
|
videoMode = 0;
|
|
}
|
|
else {
|
|
isModeOk = (*DAT_00c736fc)(pvVar1,GHIDRA_INT(pvVar1) + 0x98U);
|
|
videoMode = -GHIDRA_UINT((isModeOk != 0)) & GHIDRA_INT(pvVar1) + 0x98U;
|
|
}
|
|
hzRatio = (float)*GHIDRA_CAST<int *>((videoMode + 0x14)) / 60.0;
|
|
FUN_00925f30();
|
|
hzDeviation = 1.0 - hzRatio;
|
|
if (hzRatio <= 1.0 - hzRatio) {
|
|
hzDeviation = hzRatio;
|
|
}
|
|
if (0.04 < hzDeviation) {
|
|
KAGE_LogMessage(1,GHIDRA_CAST<byte *>("Display Hz: %d, Target: 60.. disabling vsync for this session.\n"));
|
|
param_2 = param_2 & 0xffffff00;
|
|
isVsync = 0;
|
|
}
|
|
}
|
|
if (isVsync != ((byte)(g_graphicsManager_flags >> 9) & 1)) {
|
|
if (isVsync == 0) {
|
|
g_graphicsManager_flags = g_graphicsManager_flags & 0xfffffdff;
|
|
}
|
|
else {
|
|
g_graphicsManager_flags = g_graphicsManager_flags | 0x200;
|
|
}
|
|
FUN_00a1a470(param_2);
|
|
}
|
|
return;
|
|
}
|