From 19c4ff034c0ad8dd5df822d397f297e5c77d159c Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Tue, 11 Jan 2022 02:09:41 +0900 Subject: [PATCH] more mod stuff fixes --- XivAlexander/App_ConfigRepository.h | 1 + XivAlexander/App_Misc_VirtualSqPacks.cpp | 14 +- XivAlexander/App_Window_MainWindow.cpp | 7 +- XivAlexander/XivAlexander.rc | 382 +++++++++--------- XivAlexander/resource.h | 4 +- XivAlexanderCommon/Sqex_Sqpack.cpp | 12 +- .../Sqex_Sqpack_BinaryEntryProvider.cpp | 18 +- .../Sqex_Sqpack_ModelEntryProvider.cpp | 2 +- .../Sqex_Sqpack_TextureEntryProvider.cpp | 6 +- .../includes/XivAlexanderCommon/Sqex_Sqpack.h | 7 +- 10 files changed, 237 insertions(+), 216 deletions(-) diff --git a/XivAlexander/App_ConfigRepository.h b/XivAlexander/App_ConfigRepository.h index 25b166fd..d2d8a6fd 100644 --- a/XivAlexander/App_ConfigRepository.h +++ b/XivAlexander/App_ConfigRepository.h @@ -249,6 +249,7 @@ namespace App { Item> ChainLoadPath_dinput8 = CreateConfigItem>(this, "ChainLoadPath_dinput8"); Item UseModding = CreateConfigItem(this, "UseModding", false); + Item CompressModsWheneverPossible = CreateConfigItem(this, "CompressModsWheneverPossible", true); Item TtmpFlattenSubdirectoryDisplay = CreateConfigItem(this, "TtmpFlattenSubdirectoryDisplay", false); Item TtmpUseSubdirectoryTogglingOnFlattenedView = CreateConfigItem(this, "", false); Item TtmpShowDedicatedMenu = CreateConfigItem(this, "TtmpShowDedicatedMenu", false); diff --git a/XivAlexander/App_Misc_VirtualSqPacks.cpp b/XivAlexander/App_Misc_VirtualSqPacks.cpp index 09e2c2f1..eb973b1a 100644 --- a/XivAlexander/App_Misc_VirtualSqPacks.cpp +++ b/XivAlexander/App_Misc_VirtualSqPacks.cpp @@ -490,7 +490,7 @@ struct App::Misc::VirtualSqPacks::Implementation { writer.SetSoundEntry(i, Sqex::Sound::ScdWriter::SoundEntry::EmptyEntry()); } EmptyScd = std::make_shared( - Sqex::Sqpack::MemoryBinaryEntryProvider("dummy/dummy", std::make_shared(writer.Export())) + Sqex::Sqpack::MemoryBinaryEntryProvider("dummy/dummy", std::make_shared(writer.Export()), Config->Runtime.CompressModsWheneverPossible ? Z_BEST_COMPRESSION : Z_NO_COMPRESSION) .ReadStreamIntoVector(0)); } @@ -782,6 +782,7 @@ struct App::Misc::VirtualSqPacks::Implementation { exhTable.emplace(pair); std::string currentCacheKeys("VERSION:3\n"); + currentCacheKeys += Config->Runtime.CompressModsWheneverPossible ? "compress:true\n" : "compress:false\n"; { const auto gameRoot = indexFile.parent_path().parent_path().parent_path(); const auto versionFile = Utils::Win32::Handle::FromCreateFile(gameRoot / "ffxivgame.ver", GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0); @@ -1375,7 +1376,7 @@ struct App::Misc::VirtualSqPacks::Implementation { const auto targetPath = cachedDir / entryPathSpec.FullPath; - const auto provider = Sqex::Sqpack::MemoryBinaryEntryProvider(entryPathSpec, std::make_shared(std::move(*reinterpret_cast*>(&data)))); + const auto provider = Sqex::Sqpack::MemoryBinaryEntryProvider(entryPathSpec, std::make_shared(std::move(*reinterpret_cast*>(&data))), Config->Runtime.CompressModsWheneverPossible ? Z_BEST_COMPRESSION : Z_NO_COMPRESSION); const auto len = provider.StreamSize(); const auto dv = provider.ReadStreamIntoVector(0, static_cast(len)); @@ -1584,7 +1585,10 @@ struct App::Misc::VirtualSqPacks::Implementation { const auto gameRoot = indexPath.parent_path().parent_path().parent_path(); const auto versionFile = Utils::Win32::Handle::FromCreateFile(gameRoot / "ffxivgame.ver", GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0); const auto versionContent = versionFile.Read(0, static_cast(versionFile.GetFileSize())); - currentCacheKeys += std::format("SQPACK:{}:{}\n", canonical(gameRoot).wstring(), std::string(versionContent.begin(), versionContent.end())); + currentCacheKeys += std::format("SQPACK:{}:{}:{}\n", + canonical(gameRoot).wstring(), + Config->Runtime.CompressModsWheneverPossible ? "compress" : "nocompress", + std::string(versionContent.begin(), versionContent.end())); } if (const auto& configFile = Config->Runtime.OverrideFontConfig.Value(); !configFile.empty()) { @@ -1684,9 +1688,9 @@ struct App::Misc::VirtualSqPacks::Implementation { CharLowerW(&extension[0]); if (extension == L".tex") - provider = std::make_shared(entryPathSpec, stream); + provider = std::make_shared(entryPathSpec, stream, Config->Runtime.CompressModsWheneverPossible ? Z_BEST_COMPRESSION : Z_NO_COMPRESSION); else - provider = std::make_shared(entryPathSpec, stream); + provider = std::make_shared(entryPathSpec, stream, Config->Runtime.CompressModsWheneverPossible ? Z_BEST_COMPRESSION : Z_NO_COMPRESSION); const auto len = provider->StreamSize(); const auto dv = provider->ReadStreamIntoVector(0, static_cast(len)); progress += stream->StreamSize(); diff --git a/XivAlexander/App_Window_MainWindow.cpp b/XivAlexander/App_Window_MainWindow.cpp index e2afd6ae..4cbf6b40 100644 --- a/XivAlexander/App_Window_MainWindow.cpp +++ b/XivAlexander/App_Window_MainWindow.cpp @@ -994,7 +994,7 @@ void App::Window::MainWindow::SetMenuStates() const { { SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_ENABLE, config.UseNetworkTimingHandler, true); SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_MODE_1, config.HighLatencyMitigationMode == HighLatencyMitigationMode::SubtractLatency, true); - SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2, config.HighLatencyMitigationMode == HighLatencyMitigationMode::SimulateRtt, true); + SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2, config.HighLatencyMitigationMode == HighLatencyMitigationMode::SimulateRtt, true, config.FormatStringRes(IDS_MENU_NETWORKLATENCYHANDLEMODE_2, config.ExpectedAnimationLockDurationUs.Value())); SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_MODE_3, config.HighLatencyMitigationMode == HighLatencyMitigationMode::SimulateNormalizedRttAndLatency, true); SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY, config.UseEarlyPenalty, true); SetMenuState(hMenu, ID_NETWORK_HIGHLATENCYMITIGATION_USELOGGING, config.UseHighLatencyMitigationLogging, true); @@ -1014,6 +1014,7 @@ void App::Window::MainWindow::SetMenuStates() const { SetMenuState(hMenu, ID_MODDING_ENABLE, config.UseModding, true); SetMenuState(hMenu, ID_MODDING_LOGALLHASHKEYS, config.UseHashTrackerKeyLogging, true); SetMenuState(hMenu, ID_MODDING_LOGALLFILEACCESS, config.LogAllDataFileRead, true); + SetMenuState(hMenu, ID_MODDING_COMPRESSWHENEVERPOSSIBLE, config.CompressModsWheneverPossible, true); const auto languageList = config.GetFallbackLanguageList(); SetMenuState(hMenu, ID_MODDING_FALLBACKLANGUAGEPRIORITY_ENTRY1, false, true, config.GetLanguageNameLocalized(languageList[0])); @@ -1383,6 +1384,10 @@ void App::Window::MainWindow::OnCommand_Menu_Modding(int menuId) { config.LogAllDataFileRead = !config.LogAllDataFileRead; return; + case ID_MODDING_COMPRESSWHENEVERPOSSIBLE: + config.CompressModsWheneverPossible = !config.CompressModsWheneverPossible; + return; + case ID_MODDING_FALLBACKLANGUAGEPRIORITY_ENTRY1: { auto languageList = config.GetFallbackLanguageList(); languageList.insert(languageList.begin(), languageList[0]); diff --git a/XivAlexander/XivAlexander.rc b/XivAlexander/XivAlexander.rc index 7cea8323..9fa81700 100644 --- a/XivAlexander/XivAlexander.rc +++ b/XivAlexander/XivAlexander.rc @@ -198,10 +198,10 @@ BEGIN MENUITEM "有効化(&E)\t(Ctrl+Shift+)H", ID_NETWORK_HIGHLATENCYMITIGATION_ENABLE MENUITEM SEPARATOR MENUITEM "モード&1:次のアクションの使用可能時刻からレイテンシを繰り上げる", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_1 - MENUITEM "モード&2:サーバからの応答にかかる時間を75msに固定", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2 + MENUITEM "モード&2:サーバからの応答にかかる時間を{}usに固定", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2 MENUITEM "モード&3:サーバーからの応答にかかる時間とレイテンシを補正", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_3 MENUITEM SEPARATOR - MENUITEM "アクションの拙速な使用の防止(&E)\tCtrl+(Alt+)E", ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY + MENUITEM "アクションの拙速な使用の防止(&F)\tCtrl+(Alt+)E", ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY MENUITEM SEPARATOR MENUITEM "ログを有効にする(&L)\tCtrl+(Alt+)L", ID_NETWORK_HIGHLATENCYMITIGATION_USELOGGING MENUITEM "作動のシミュレーション(ログに記録)(&P)\tCtrl+(Alt+)P", ID_NETWORK_HIGHLATENCYMITIGATION_PREVIEWMODE @@ -227,6 +227,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "ゲームが読み込むすべてのファイルのパスをログに記録(&P)\t(Ctrl+Alt+)K", ID_MODDING_LOGALLHASHKEYS MENUITEM "すべてのファイルのアクセスをログに記録(I)", ID_MODDING_LOGALLFILEACCESS + MENUITEM "ファイルを圧縮して管理(&C)", ID_MODDING_COMPRESSWHENEVERPOSSIBLE MENUITEM SEPARATOR POPUP "言語の優先順位(&L)" BEGIN @@ -335,7 +336,7 @@ BEGIN MENUITEM "削除(&D)", ID_MODDING_TTMP_ENTRY_DELETE MENUITEM SEPARATOR MENUITEM "再起動必要", ID_MODDING_TTMP_ENTRY_REQUIRESRESTART, INACTIVE - MENUITEM "説明を表示(&D)", ID_MODDING_TTMP_ENTRY_SHOWDESCRIPTION + MENUITEM "説明を表示(&S)", ID_MODDING_TTMP_ENTRY_SHOWDESCRIPTION MENUITEM SEPARATOR END MENUITEM "(インストール済みのMODパックなし)", ID_MODDING_TTMP_NOENTRY, INACTIVE @@ -370,7 +371,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "ゲームがCPUをできるだけ利用させる(&C)", ID_CONFIGURE_USEMORECPUTIME MENUITEM "FPSの固定", ID_CONFIGURE_LOCKFRAMERATE - MENUITEM "リキャストとアニメーション待機時間とゲーム処理の同期化(&S)", ID_CONFIGURE_SYNCHRONIZEPROCESSING + MENUITEM "リキャストとアニメーション待機時間とゲーム処理の同期化(&P)", ID_CONFIGURE_SYNCHRONIZEPROCESSING MENUITEM "ゲーム終了の時に強制終了(&T) (ゲームの設定が壊れる可能背あり)", ID_CONFIGURE_QUICKGAMETERMINATION MENUITEM SEPARATOR MENUITEM "システム言語を使用(&S)\t", ID_CONFIGURE_LANGUAGE_SYSTEMDEFAULT @@ -692,6 +693,7 @@ BEGIN IDS_MENU_LOCKFRAMERATE "FPSの固定:{:g} fps" IDS_MENU_LOCKFRAMERATE_DISABLED "FPSの固定:未使用" IDS_MENU_LOCKFRAMERATE_AUTOMATIC "FPSの固定:自動" + IDS_MENU_NETWORKLATENCYHANDLEMODE_2 "モード&2:サーバからの応答にかかる時間を{}usに固定" END #endif // Japanese (Japan) resources @@ -705,6 +707,94 @@ END LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT #pragma code_page(949) +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_FRAMERATELOCKING DIALOGEX 0, 0, 294, 294 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_TOPMOST +CAPTION "FPS ーチ、" +FONT 9, "Segoe UI", 400, 0, 0x0 +BEGIN + DEFPUSHBUTTON "ネョタホ",IDOK,132,276,50,14 + PUSHBUTTON "テシメ",IDCANCEL,186,276,50,14 + PUSHBUTTON "タソ(&A)",IDC_APPLY,240,276,50,14 + GROUPBOX "テヨタタヌ シウチ、 テ」ア",IDC_STATIC,6,6,282,102 + LTEXT "1. クヌ・ FPS(&R)",IDC_TARGETFPS_FROM_STATIC,12,18,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_TARGETFPS_FROM_EDIT,156,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CTEXT "~",IDC_TARGETFPS_TO_STATIC,210,18,18,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_TARGETFPS_TO_EDIT,234,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "2. キサエ チヨア コッオソ(&D) (us)",IDC_FPSDEV_STATIC,12,36,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_FPSDEV_EDIT,156,36,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "3. アロキホケ トエルソ(&C) (s)",IDC_GCD_STATIC,12,54,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_GCD_EDIT,156,54,126,12,ES_RIGHT | ES_AUTOHSCROLL + LTEXT "4. ソケサオヌエツ スヌチヲ アロキホケ トエルソ (s)",IDC_ESTIMATEDGCD_STATIC,12,72,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATEDGCD_EDIT,156,72,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY + CONTROL "タレオソ シウチ、(&U)",IDC_AUTOMATICFPSLOCKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,78,12 + PUSHBUTTON "アロトタフ ケミクョチ セハオオキマ FPS シウチ、(&M)",IDC_CALCFPS,96,90,186,14 + GROUPBOX "チチ「 シウチ、",IDC_STATIC,6,114,138,48 + LTEXT "キサエ チヨア(&I) (us)",IDC_INTERVAL_STATIC,12,126,66,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_INTERVAL_EDIT,84,126,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "FPS(&F)",IDC_TARGETFRAMERATE_STATIC,12,144,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_TARGETFRAMERATE_EDIT,84,144,54,12,ES_RIGHT | ES_AUTOHSCROLL + GROUPBOX "アロト シ ー霆",IDC_STATIC,6,168,138,48 + LTEXT "タナ ステー」 (&U)",IDC_ESTIMATENUMGCD_DURATION_STATIC,12,180,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATENUMGCD_DURATION_EDIT,84,180,54,12,ES_RIGHT | ES_AUTOHSCROLL + LTEXT "アロト サ鄙 ネスシ",IDC_ESTIMATENUMGCD_RESULT_STATIC,12,198,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATENUMGCD_RESULT_EDIT,84,198,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + GROUPBOX "シメソ ステー」 ー霆",IDC_STATIC,6,222,138,48 + LTEXT "アロト サ鄙 ネスシ(&N)",IDC_ESTIMATEDURATION_NUMGCD_STATIC,12,234,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATEDURATION_NUMGCD_EDIT,84,234,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "シメソ ステー」",IDC_ESTIMATEDURATION_RESULT_STATIC,12,252,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATEDURATION_RESULT_EDIT,84,252,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + GROUPBOX "テヨアル サ鄙ヌム アロト テチ、",IDC_STATIC,150,114,138,156 + LISTBOX IDC_LASTGCD_LIST,156,126,84,120,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "コソア(&R)",IDC_LASTGCD_RESET,156,252,84,12 + LTEXT "ニアユ",IDC_LASTGCD_MEAN_STATIC,246,126,36,8 + EDITTEXT IDC_LASTGCD_MEAN_EDIT,246,138,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "ヌ・チリニツ",IDC_LASTGCD_STDDEV_STATIC,246,156,36,8 + EDITTEXT IDC_LASTGCD_STDDEV_EDIT,246,168,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "チ゚セモーェ",IDC_LASTGCD_MEDIAN_STATIC,246,186,36,8 + EDITTEXT IDC_LASTGCD_MEDIAN_EDIT,246,198,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "ケタァ",IDC_LASTGCD_RANGE_STATIC,246,222,36,8 + EDITTEXT IDC_LASTGCD_RANGE_EDIT_MIN,246,234,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + EDITTEXT IDC_LASTGCD_RANGE_EDIT_MAX,246,252,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "コネーシコネュヌマー エンア",IDC_DISABLE,6,276,78,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_FRAMERATELOCKING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 287 + TOPMARGIN, 7 + BOTTOMMARGIN, 287 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_DIALOG_FRAMERATELOCKING AFX_DIALOG_LAYOUT +BEGIN + 0 +END + + ///////////////////////////////////////////////////////////////////////////// // // Menu @@ -753,10 +843,10 @@ BEGIN MENUITEM "サ鄙(&E)\t(Ctrl+Shift+)H", ID_NETWORK_HIGHLATENCYMITIGATION_ENABLE MENUITEM SEPARATOR MENUITEM "クオ &1: チソャ ステー」ククナュ エルタス ア箴 ステタ ー。エノ ステー「 セユエ邀箜", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_1 - MENUITEM "クオ &2: シュケ タタエ ステー」タサ 75msキホ ーチ、", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2 + MENUITEM "クオ &2: シュケ タタエ ステー」タサ {}usキホ ーチ、", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2 MENUITEM "クオ &3: シュケ タタエ ケラ チソャ ステー」 コクチ、", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_3 MENUITEM SEPARATOR - MENUITEM "タフク・ ア箴 ステタ ケ戝(&E)\tCtrl+(Alt+)E", ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY + MENUITEM "タフク・ ア箴 ステタ ケ戝(&F)\tCtrl+(Alt+)E", ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY MENUITEM SEPARATOR MENUITEM "キホアラ サ鄙(&L)\tCtrl+(Alt+)L", ID_NETWORK_HIGHLATENCYMITIGATION_USELOGGING MENUITEM "クタヌ タロオソ (キホアラソ。シュ ケフクョ コクア)(&P)\tCtrl+(Alt+)P", ID_NETWORK_HIGHLATENCYMITIGATION_PREVIEWMODE @@ -782,6 +872,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "ーヤタモタフ チ「アルヌマエツ ウサコホ ニトタマ ー豺ホ クオホ ア箙マヌマア(&P)\t(Ctrl+Alt+)K", ID_MODDING_LOGALLHASHKEYS MENUITEM "クオ ニトタマ チ「アル ア箙マヌマア(&I)", ID_MODDING_LOGALLFILEACCESS + MENUITEM "ニトタマ セミテ猊リシュ ークョ(&C)", ID_MODDING_COMPRESSWHENEVERPOSSIBLE MENUITEM SEPARATOR POPUP "セセ ソシアシタァ(&L)" BEGIN @@ -890,7 +981,7 @@ BEGIN MENUITEM "チヲーナ(&D)", ID_MODDING_TTMP_ENTRY_DELETE MENUITEM SEPARATOR MENUITEM "タ鄂テタロ ヌハソ", ID_MODDING_TTMP_ENTRY_REQUIRESRESTART, INACTIVE - MENUITEM "シウク コクア(&D)", ID_MODDING_TTMP_ENTRY_SHOWDESCRIPTION + MENUITEM "シウク コクア(&S)", ID_MODDING_TTMP_ENTRY_SHOWDESCRIPTION MENUITEM SEPARATOR END MENUITEM "(シウト。オネ クオ衄ム セタス )", ID_MODDING_TTMP_NOENTRY, INACTIVE @@ -925,7 +1016,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "ーヤタモタフ ー。エノヌム ククナュ CPUクヲ セイオオキマ ククオ魍(&C)", ID_CONFIGURE_USEMORECPUTIME MENUITEM "FPS ーチ、(&F)", ID_CONFIGURE_LOCKFRAMERATE - MENUITEM "タ扈鄙 エア ステー」 ケラ セヨエマグタフシヌ ステー」ソ。 ーヤタモ テウクョクヲ オソア篳ュヌマア(&S)", ID_CONFIGURE_SYNCHRONIZEPROCESSING + MENUITEM "タ扈鄙 エア ステー」 ケラ セヨエマグタフシヌ ステー」ソ。 ーヤタモ テウクョクヲ オソア篳ュヌマア(&P)", ID_CONFIGURE_SYNCHRONIZEPROCESSING MENUITEM "コク・ ーヤタモ チセキ(&T) (ーヤタモ シウチ、 ニトタマ シユサ ー。エノシコ タヨタス)", ID_CONFIGURE_QUICKGAMETERMINATION MENUITEM SEPARATOR MENUITEM "ステスコナロ ア篌サ セセ サ鄙(&S)", ID_CONFIGURE_LANGUAGE_SYSTEMDEFAULT @@ -1011,94 +1102,6 @@ END #endif // APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG_FRAMERATELOCKING DIALOGEX 0, 0, 294, 294 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_TOPMOST -CAPTION "FPS ーチ、" -FONT 9, "Segoe UI", 400, 0, 0x0 -BEGIN - DEFPUSHBUTTON "ネョタホ",IDOK,132,276,50,14 - PUSHBUTTON "テシメ",IDCANCEL,186,276,50,14 - PUSHBUTTON "タソ(&A)",IDC_APPLY,240,276,50,14 - GROUPBOX "テヨタタヌ シウチ、 テ」ア",IDC_STATIC,6,6,282,102 - LTEXT "1. クヌ・ FPS(&R)",IDC_TARGETFPS_FROM_STATIC,12,18,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_TARGETFPS_FROM_EDIT,156,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CTEXT "~",IDC_TARGETFPS_TO_STATIC,210,18,18,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_TARGETFPS_TO_EDIT,234,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "2. キサエ チヨア コッオソ(&D) (us)",IDC_FPSDEV_STATIC,12,36,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_FPSDEV_EDIT,156,36,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "3. アロキホケ トエルソ(&C) (s)",IDC_GCD_STATIC,12,54,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_GCD_EDIT,156,54,126,12,ES_RIGHT | ES_AUTOHSCROLL - LTEXT "4. ソケサオヌエツ スヌチヲ アロキホケ トエルソ (s)",IDC_ESTIMATEDGCD_STATIC,12,72,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATEDGCD_EDIT,156,72,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY - CONTROL "タレオソ シウチ、(&U)",IDC_AUTOMATICFPSLOCKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,78,12 - PUSHBUTTON "アロトタフ ケミクョチ セハオオキマ FPS シウチ、(&M)",IDC_CALCFPS,96,90,186,14 - GROUPBOX "チチ「 シウチ、",IDC_STATIC,6,114,138,48 - LTEXT "キサエ チヨア(&I) (us)",IDC_INTERVAL_STATIC,12,126,66,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_INTERVAL_EDIT,84,126,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "FPS(&F)",IDC_TARGETFRAMERATE_STATIC,12,144,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_TARGETFRAMERATE_EDIT,84,144,54,12,ES_RIGHT | ES_AUTOHSCROLL - GROUPBOX "アロト シ ー霆",IDC_STATIC,6,168,138,48 - LTEXT "タナ ステー」 (&U)",IDC_ESTIMATENUMGCD_DURATION_STATIC,12,180,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATENUMGCD_DURATION_EDIT,84,180,54,12,ES_RIGHT | ES_AUTOHSCROLL - LTEXT "アロト サ鄙 ネスシ",IDC_ESTIMATENUMGCD_RESULT_STATIC,12,198,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATENUMGCD_RESULT_EDIT,84,198,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - GROUPBOX "シメソ ステー」 ー霆",IDC_STATIC,6,222,138,48 - LTEXT "アロト サ鄙 ネスシ(&N)",IDC_ESTIMATEDURATION_NUMGCD_STATIC,12,234,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATEDURATION_NUMGCD_EDIT,84,234,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "シメソ ステー」",IDC_ESTIMATEDURATION_RESULT_STATIC,12,252,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATEDURATION_RESULT_EDIT,84,252,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - GROUPBOX "テヨアル サ鄙ヌム アロト テチ、",IDC_STATIC,150,114,138,156 - LISTBOX IDC_LASTGCD_LIST,156,126,84,120,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "コソア(&R)",IDC_LASTGCD_RESET,156,252,84,12 - LTEXT "ニアユ",IDC_LASTGCD_MEAN_STATIC,246,126,36,8 - EDITTEXT IDC_LASTGCD_MEAN_EDIT,246,138,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - LTEXT "ヌ・チリニツ",IDC_LASTGCD_STDDEV_STATIC,246,156,36,8 - EDITTEXT IDC_LASTGCD_STDDEV_EDIT,246,168,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - LTEXT "チ゚セモーェ",IDC_LASTGCD_MEDIAN_STATIC,246,186,36,8 - EDITTEXT IDC_LASTGCD_MEDIAN_EDIT,246,198,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - LTEXT "ケタァ",IDC_LASTGCD_RANGE_STATIC,246,222,36,8 - EDITTEXT IDC_LASTGCD_RANGE_EDIT_MIN,246,234,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - EDITTEXT IDC_LASTGCD_RANGE_EDIT_MAX,246,252,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "コネーシコネュヌマー エンア",IDC_DISABLE,6,276,78,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DIALOG_FRAMERATELOCKING, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 287 - TOPMARGIN, 7 - BOTTOMMARGIN, 287 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// AFX_DIALOG_LAYOUT -// - -IDD_DIALOG_FRAMERATELOCKING AFX_DIALOG_LAYOUT -BEGIN - 0 -END - - ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -1395,6 +1398,7 @@ BEGIN IDS_MENU_LOCKFRAMERATE "FPS ーチ、: {:g} fps" IDS_MENU_LOCKFRAMERATE_DISABLED "FPS ーチ、 サ鄙 セネヌヤ" IDS_MENU_LOCKFRAMERATE_AUTOMATIC "FPS ーチ、: タレオソ" + IDS_MENU_NETWORKLATENCYHANDLEMODE_2 "クオ &2: シュケ タタエ ステー」タサ {}usキホ ーチ、" END #endif // Korean (Korea) resources @@ -1408,6 +1412,94 @@ END LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_FRAMERATELOCKING DIALOGEX 0, 0, 295, 294 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_TOPMOST +CAPTION "Framerate Locking" +FONT 9, "Segoe UI", 400, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,132,276,50,14 + PUSHBUTTON "Cancel",IDCANCEL,186,276,50,14 + PUSHBUTTON "&Apply",IDC_APPLY,238,276,50,14 + GROUPBOX "Find Best Settings",IDC_STATIC,7,6,282,102 + LTEXT "1. Target Framerate &Range (fps)",IDC_TARGETFPS_FROM_STATIC,12,18,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_TARGETFPS_FROM_EDIT,156,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CTEXT "&to",IDC_TARGETFPS_TO_STATIC,210,18,18,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_TARGETFPS_TO_EDIT,234,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "2. Render Interval &Deviation (us)",IDC_FPSDEV_STATIC,12,36,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_FPSDEV_EDIT,156,36,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "3. Global &Cooldown (s)",IDC_GCD_STATIC,12,54,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_GCD_EDIT,156,54,126,12,ES_RIGHT | ES_AUTOHSCROLL + LTEXT "4. Estimated Actual Global Cooldown (s)",IDC_ESTIMATEDGCD_STATIC,12,72,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATEDGCD_EDIT,156,72,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY + CONTROL "A&utomatic",IDC_AUTOMATICFPSLOCKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,78,12 + PUSHBUTTON "Adjust Framerate to &Minimize Cooldown Clipping",IDC_CALCFPS,96,90,186,14 + GROUPBOX "Raw Values",IDC_STATIC,6,114,138,48 + LTEXT "Render &Interval (us)",IDC_INTERVAL_STATIC,12,126,66,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_INTERVAL_EDIT,84,126,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "&Framerate (fps)",IDC_TARGETFRAMERATE_STATIC,12,144,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_TARGETFRAMERATE_EDIT,84,144,54,12,ES_RIGHT | ES_AUTOHSCROLL + GROUPBOX "Estimate Number of Global Cooldowns",IDC_STATIC,6,168,138,48 + LTEXT "D&uration (s or mm:ss)",IDC_ESTIMATENUMGCD_DURATION_STATIC,12,180,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATENUMGCD_DURATION_EDIT,84,180,54,12,ES_RIGHT | ES_AUTOHSCROLL + LTEXT "Number of GCDs",IDC_ESTIMATENUMGCD_RESULT_STATIC,12,198,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATENUMGCD_RESULT_EDIT,84,198,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + GROUPBOX "Estimate Duration",IDC_STATIC,6,222,138,48 + LTEXT "&Number of GCDs",IDC_ESTIMATEDURATION_NUMGCD_STATIC,12,234,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATEDURATION_NUMGCD_EDIT,84,234,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Duration",IDC_ESTIMATEDURATION_RESULT_STATIC,12,252,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT + EDITTEXT IDC_ESTIMATEDURATION_RESULT_EDIT,84,252,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + GROUPBOX "Latest Global Cooldowns",IDC_STATIC,150,114,138,156 + LISTBOX IDC_LASTGCD_LIST,156,126,84,120,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Reset",IDC_LASTGCD_RESET,156,252,84,12 + LTEXT "Mean",IDC_LASTGCD_MEAN_STATIC,246,126,36,8 + EDITTEXT IDC_LASTGCD_MEAN_EDIT,246,138,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "Std. Dev.",IDC_LASTGCD_STDDEV_STATIC,246,156,36,8 + EDITTEXT IDC_LASTGCD_STDDEV_EDIT,246,168,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "Median",IDC_LASTGCD_MEDIAN_STATIC,246,186,36,8 + EDITTEXT IDC_LASTGCD_MEDIAN_EDIT,246,198,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "Range",IDC_LASTGCD_RANGE_STATIC,246,222,36,8 + EDITTEXT IDC_LASTGCD_RANGE_EDIT_MIN,246,234,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + EDITTEXT IDC_LASTGCD_RANGE_EDIT_MAX,246,252,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + PUSHBUTTON "Disable and Close",IDC_DISABLE,6,276,78,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_FRAMERATELOCKING, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 288 + TOPMARGIN, 7 + BOTTOMMARGIN, 287 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_DIALOG_FRAMERATELOCKING AFX_DIALOG_LAYOUT +BEGIN + 0 +END + + ///////////////////////////////////////////////////////////////////////////// // // Menu @@ -1456,10 +1548,10 @@ BEGIN MENUITEM "&Enable\t(Ctrl+Shift+)H", ID_NETWORK_HIGHLATENCYMITIGATION_ENABLE MENUITEM SEPARATOR MENUITEM "Mode &1: Subtract Latency", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_1 - MENUITEM "Mode &2: Simulate RTT (75ms)", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2 + MENUITEM "Mode &2: Simulate RTT ({}us)", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_2 MENUITEM "Mode &3: Simulate Normalized RTT and Latency", ID_NETWORK_HIGHLATENCYMITIGATION_MODE_3 MENUITEM SEPARATOR - MENUITEM "Prevent &Early Firing\tCtrl+(Alt+)E", ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY + MENUITEM "Prevent Early &Firing\tCtrl+(Alt+)E", ID_NETWORK_HIGHLATENCYMITIGATION_USEEARLYPENALTY MENUITEM SEPARATOR MENUITEM "Use &Logging\tCtrl+(Alt+)L", ID_NETWORK_HIGHLATENCYMITIGATION_USELOGGING MENUITEM "&Preview Mode (Dry Run)\tCtrl+(Alt+)P", ID_NETWORK_HIGHLATENCYMITIGATION_PREVIEWMODE @@ -1485,6 +1577,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Log All &Path Plaintext Before Hash\t(Ctrl+Alt+)K", ID_MODDING_LOGALLHASHKEYS MENUITEM "Log All F&ile Access", ID_MODDING_LOGALLFILEACCESS + MENUITEM "&Compress Whenever Possible", ID_MODDING_COMPRESSWHENEVERPOSSIBLE MENUITEM SEPARATOR POPUP "Fallback &Language Priority" BEGIN @@ -1593,7 +1686,7 @@ BEGIN MENUITEM "&Delete", ID_MODDING_TTMP_ENTRY_DELETE MENUITEM SEPARATOR MENUITEM "Requires restart", ID_MODDING_TTMP_ENTRY_REQUIRESRESTART, INACTIVE - MENUITEM "Show &Description", ID_MODDING_TTMP_ENTRY_SHOWDESCRIPTION + MENUITEM "&Show Description", ID_MODDING_TTMP_ENTRY_SHOWDESCRIPTION MENUITEM SEPARATOR END MENUITEM "(No installed ModPacks found)", ID_MODDING_TTMP_NOENTRY, INACTIVE @@ -1628,7 +1721,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Force the Game to Use More &CPU Time", ID_CONFIGURE_USEMORECPUTIME MENUITEM "Lock &Framerate ", ID_CONFIGURE_LOCKFRAMERATE - MENUITEM "&Synchronize Processing to Cooldowns and Animation Locks", ID_CONFIGURE_SYNCHRONIZEPROCESSING + MENUITEM "Synchronize &Processing to Cooldowns and Animation Locks", ID_CONFIGURE_SYNCHRONIZEPROCESSING MENUITEM "Quick Game &Termination (MAY CORRUPT YOUR GAME SETTINGS)", ID_CONFIGURE_QUICKGAMETERMINATION MENUITEM SEPARATOR MENUITEM "Use &System Default Language", ID_CONFIGURE_LANGUAGE_SYSTEMDEFAULT @@ -1832,94 +1925,6 @@ BEGIN END -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG_FRAMERATELOCKING DIALOGEX 0, 0, 295, 294 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_TOPMOST -CAPTION "Framerate Locking" -FONT 9, "Segoe UI", 400, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,132,276,50,14 - PUSHBUTTON "Cancel",IDCANCEL,186,276,50,14 - PUSHBUTTON "&Apply",IDC_APPLY,238,276,50,14 - GROUPBOX "Find Best Settings",IDC_STATIC,7,6,282,102 - LTEXT "1. Target Framerate &Range (fps)",IDC_TARGETFPS_FROM_STATIC,12,18,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_TARGETFPS_FROM_EDIT,156,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CTEXT "&to",IDC_TARGETFPS_TO_STATIC,210,18,18,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_TARGETFPS_TO_EDIT,234,18,48,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "2. Render Interval &Deviation (us)",IDC_FPSDEV_STATIC,12,36,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_FPSDEV_EDIT,156,36,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "3. Global &Cooldown (s)",IDC_GCD_STATIC,12,54,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_GCD_EDIT,156,54,126,12,ES_RIGHT | ES_AUTOHSCROLL - LTEXT "4. Estimated Actual Global Cooldown (s)",IDC_ESTIMATEDGCD_STATIC,12,72,138,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATEDGCD_EDIT,156,72,126,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY - CONTROL "A&utomatic",IDC_AUTOMATICFPSLOCKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,78,12 - PUSHBUTTON "Adjust Framerate to &Minimize Cooldown Clipping",IDC_CALCFPS,96,90,186,14 - GROUPBOX "Raw Values",IDC_STATIC,6,114,138,48 - LTEXT "Render &Interval (us)",IDC_INTERVAL_STATIC,12,126,66,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_INTERVAL_EDIT,84,126,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "&Framerate (fps)",IDC_TARGETFRAMERATE_STATIC,12,144,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_TARGETFRAMERATE_EDIT,84,144,54,12,ES_RIGHT | ES_AUTOHSCROLL - GROUPBOX "Estimate Number of Global Cooldowns",IDC_STATIC,6,168,138,48 - LTEXT "D&uration (s or mm:ss)",IDC_ESTIMATENUMGCD_DURATION_STATIC,12,180,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATENUMGCD_DURATION_EDIT,84,180,54,12,ES_RIGHT | ES_AUTOHSCROLL - LTEXT "Number of GCDs",IDC_ESTIMATENUMGCD_RESULT_STATIC,12,198,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATENUMGCD_RESULT_EDIT,84,198,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - GROUPBOX "Estimate Duration",IDC_STATIC,6,222,138,48 - LTEXT "&Number of GCDs",IDC_ESTIMATEDURATION_NUMGCD_STATIC,12,234,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATEDURATION_NUMGCD_EDIT,84,234,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Duration",IDC_ESTIMATEDURATION_RESULT_STATIC,12,252,66,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_ESTIMATEDURATION_RESULT_EDIT,84,252,54,12,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - GROUPBOX "Latest Global Cooldowns",IDC_STATIC,150,114,138,156 - LISTBOX IDC_LASTGCD_LIST,156,126,84,120,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Reset",IDC_LASTGCD_RESET,156,252,84,12 - LTEXT "Mean",IDC_LASTGCD_MEAN_STATIC,246,126,36,8 - EDITTEXT IDC_LASTGCD_MEAN_EDIT,246,138,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - LTEXT "Std. Dev.",IDC_LASTGCD_STDDEV_STATIC,246,156,36,8 - EDITTEXT IDC_LASTGCD_STDDEV_EDIT,246,168,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - LTEXT "Median",IDC_LASTGCD_MEDIAN_STATIC,246,186,36,8 - EDITTEXT IDC_LASTGCD_MEDIAN_EDIT,246,198,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - LTEXT "Range",IDC_LASTGCD_RANGE_STATIC,246,222,36,8 - EDITTEXT IDC_LASTGCD_RANGE_EDIT_MIN,246,234,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - EDITTEXT IDC_LASTGCD_RANGE_EDIT_MAX,246,252,36,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "Disable and Close",IDC_DISABLE,6,276,78,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DIALOG_FRAMERATELOCKING, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 288 - TOPMARGIN, 7 - BOTTOMMARGIN, 287 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// AFX_DIALOG_LAYOUT -// - -IDD_DIALOG_FRAMERATELOCKING AFX_DIALOG_LAYOUT -BEGIN - 0 -END - - ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -2246,6 +2251,7 @@ BEGIN IDS_MENU_LOCKFRAMERATE "Lock Framerate: {:g} fps" IDS_MENU_LOCKFRAMERATE_DISABLED "Lock Framerate: Disabled" IDS_MENU_LOCKFRAMERATE_AUTOMATIC "Lock Framerate: Automatic" + IDS_MENU_NETWORKLATENCYHANDLEMODE_2 "Mode &2: Simulate RTT ({}us)" END #endif // English (United States) resources diff --git a/XivAlexander/resource.h b/XivAlexander/resource.h index 5261e5f5..d89c6a86 100644 --- a/XivAlexander/resource.h +++ b/XivAlexander/resource.h @@ -212,6 +212,7 @@ #define IDS_MENU_LOCKFRAMERATE 294 #define IDS_MENU_LOCKFRAMERATE_DISABLED 295 #define IDS_MENU_LOCKFRAMERATE_AUTOMATIC 296 +#define IDS_MENU_NETWORKLATENCYHANDLEMODE_2 297 #define IDC_INTERVAL_EDIT 1001 #define IDC_TARGETFRAMERATE_EDIT 1002 #define IDC_FPSDEV_EDIT 1003 @@ -384,13 +385,14 @@ #define ID_MODDING_TTMP_SHOWDEDICATEDMENU 40525 #define ID_MODDING_TTMP_USESUBDIRECTORYTOGGLINGONFLATTENEDVIEW 40527 #define ID_CONFIGURE_LOCKFRAMERATE 40528 +#define ID_MODDING_COMPRESSWHENEVERPOSSIBLE 40529 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 208 -#define _APS_NEXT_COMMAND_VALUE 40529 +#define _APS_NEXT_COMMAND_VALUE 40530 #define _APS_NEXT_CONTROL_VALUE 1034 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/XivAlexanderCommon/Sqex_Sqpack.cpp b/XivAlexanderCommon/Sqex_Sqpack.cpp index 70fe3b51..69acad01 100644 --- a/XivAlexanderCommon/Sqex_Sqpack.cpp +++ b/XivAlexanderCommon/Sqex_Sqpack.cpp @@ -262,12 +262,16 @@ Sqex::Sqpack::SqData::FileEntryHeader Sqex::Sqpack::SqData::FileEntryHeader::New return res; } -void Sqex::Sqpack::SqData::FileEntryHeader::SetSpaceUnits(size_t totalEntrySize) { - AllocatedSpaceUnitCount = OccupiedSpaceUnitCount = static_cast((totalEntrySize - HeaderSize) / EntryAlignment); +void Sqex::Sqpack::SqData::FileEntryHeader::SetSpaceUnits(uint64_t dataSize) { + AllocatedSpaceUnitCount = OccupiedSpaceUnitCount = Align(dataSize, EntryAlignment).Count; } -uint32_t Sqex::Sqpack::SqData::FileEntryHeader::GetTotalEntrySize() const { - return HeaderSize + OccupiedSpaceUnitCount * EntryAlignment; +uint64_t Sqex::Sqpack::SqData::FileEntryHeader::GetDataSize() const { + return 1ULL * OccupiedSpaceUnitCount * EntryAlignment; +} + +uint64_t Sqex::Sqpack::SqData::FileEntryHeader::GetTotalEntrySize() const { + return HeaderSize + GetDataSize(); } uint32_t Sqex::Sqpack::SqexHash(const char* data, size_t len) { diff --git a/XivAlexanderCommon/Sqex_Sqpack_BinaryEntryProvider.cpp b/XivAlexanderCommon/Sqex_Sqpack_BinaryEntryProvider.cpp index fb3bf275..7af32e41 100644 --- a/XivAlexanderCommon/Sqex_Sqpack_BinaryEntryProvider.cpp +++ b/XivAlexanderCommon/Sqex_Sqpack_BinaryEntryProvider.cpp @@ -21,9 +21,9 @@ static std::vector CreateHeaderForNonCompressedBinaryEntryProvider(size .DecompressedSize = static_cast(size), .BlockCountOrVersion = blockAlignment.Count, }; - header.SetSpaceUnits((blockAlignment.Count - 1) * EntryBlockSize + sizeof SqData::BlockHeader + blockAlignment.Last); + header.SetSpaceUnits((static_cast(blockAlignment.Count) - 1) * EntryBlockSize + sizeof SqData::BlockHeader + blockAlignment.Last); - blockAlignment.IterateChunked([&](uint32_t index, uint64_t offset, uint64_t size) { + blockAlignment.IterateChunked([&](uint32_t index, uint32_t offset, uint32_t size) { locators[index] = { static_cast(offset), static_cast(EntryBlockSize), @@ -67,12 +67,12 @@ uint64_t Sqex::Sqpack::OnTheFlyBinaryEntryProvider::ReadStreamPartial(const Rand } else relativeOffset -= m_header.size(); - const auto blockAlignment = Align(m_stream->StreamSize(), EntryBlockDataSize); - if (static_cast(relativeOffset) < header.BlockCountOrVersion * EntryBlockSize) { - auto i = relativeOffset / EntryBlockSize; + const auto blockAlignment = Align(static_cast(m_stream->StreamSize()), EntryBlockDataSize); + if (static_cast(relativeOffset) < header.OccupiedSpaceUnitCount * EntryAlignment) { + const auto i = relativeOffset / EntryBlockSize; relativeOffset -= i * EntryBlockSize; - blockAlignment.IterateChunkedBreakable([&](uint64_t, uint64_t offset, uint64_t size) { + blockAlignment.IterateChunkedBreakable([&](uint32_t, uint32_t offset, uint32_t size) { if (relativeOffset < sizeof SqData::BlockHeader) { const auto header = SqData::BlockHeader{ .HeaderSize = sizeof SqData::BlockHeader, @@ -93,7 +93,7 @@ uint64_t Sqex::Sqpack::OnTheFlyBinaryEntryProvider::ReadStreamPartial(const Rand if (relativeOffset < size) { const auto available = std::min(out.size_bytes(), static_cast(size - relativeOffset)); - stream.ReadStream(i * EntryBlockDataSize + relativeOffset, &out[0], available); + stream.ReadStream(offset + relativeOffset, &out[0], available); out = out.subspan(available); relativeOffset = 0; @@ -112,7 +112,7 @@ uint64_t Sqex::Sqpack::OnTheFlyBinaryEntryProvider::ReadStreamPartial(const Rand relativeOffset -= pad; return true; - }, 0, i); + }, 0, static_cast(i)); } return length - out.size_bytes(); @@ -167,6 +167,7 @@ void Sqex::Sqpack::MemoryBinaryEntryProvider::Initialize(const RandomAccessStrea entryHeader.BlockCountOrVersion = static_cast(locators.size()); entryHeader.HeaderSize = static_cast(Align(entryHeader.HeaderSize + std::span(locators).size_bytes())); + entryHeader.SetSpaceUnits(entryBody.size()); m_data.reserve(Align(entryHeader.HeaderSize + entryBody.size())); m_data.insert(m_data.end(), reinterpret_cast(&entryHeader), reinterpret_cast(&entryHeader + 1)); if (!locators.empty()) { @@ -177,7 +178,6 @@ void Sqex::Sqpack::MemoryBinaryEntryProvider::Initialize(const RandomAccessStrea m_data.resize(entryHeader.HeaderSize, 0); m_data.resize(Align(m_data.size())); - reinterpret_cast(&m_data[0])->SetSpaceUnits(m_data.size()); } uint64_t Sqex::Sqpack::MemoryBinaryEntryProvider::ReadStreamPartial(const RandomAccessStream& stream, uint64_t offset, void* buf, uint64_t length) const { diff --git a/XivAlexanderCommon/Sqex_Sqpack_ModelEntryProvider.cpp b/XivAlexanderCommon/Sqex_Sqpack_ModelEntryProvider.cpp index ce60efa7..8db1e7fe 100644 --- a/XivAlexanderCommon/Sqex_Sqpack_ModelEntryProvider.cpp +++ b/XivAlexanderCommon/Sqex_Sqpack_ModelEntryProvider.cpp @@ -318,6 +318,7 @@ void Sqex::Sqpack::MemoryModelEntryProvider::Initialize(const RandomAccessStream } entryHeader.HeaderSize = Align(static_cast(sizeof entryHeader + sizeof modelHeader + std::span(paddedBlockSizes).size_bytes())); + entryHeader.SetSpaceUnits(entryBody.size()); m_data.reserve(Align(entryHeader.HeaderSize + getNextBlockOffset())); m_data.insert(m_data.end(), reinterpret_cast(&entryHeader), reinterpret_cast(&entryHeader + 1)); @@ -330,7 +331,6 @@ void Sqex::Sqpack::MemoryModelEntryProvider::Initialize(const RandomAccessStream m_data.resize(entryHeader.HeaderSize, 0); m_data.resize(Align(m_data.size())); - reinterpret_cast(&m_data[0])->SetSpaceUnits(m_data.size()); } uint64_t Sqex::Sqpack::MemoryModelEntryProvider::ReadStreamPartial(const RandomAccessStream& stream, uint64_t offset, void* buf, uint64_t length) const { diff --git a/XivAlexanderCommon/Sqex_Sqpack_TextureEntryProvider.cpp b/XivAlexanderCommon/Sqex_Sqpack_TextureEntryProvider.cpp index 368248d9..fc25c36b 100644 --- a/XivAlexanderCommon/Sqex_Sqpack_TextureEntryProvider.cpp +++ b/XivAlexanderCommon/Sqex_Sqpack_TextureEntryProvider.cpp @@ -76,6 +76,7 @@ void Sqex::Sqpack::OnTheFlyTextureEntryProvider::Initialize(const RandomAccessSt sizeof entryHeader + std::span(m_blockLocators).size_bytes() + std::span(m_subBlockSizes).size_bytes())); + entryHeader.SetSpaceUnits(m_size); m_mergedHeader.insert(m_mergedHeader.end(), reinterpret_cast(&entryHeader), @@ -92,7 +93,6 @@ void Sqex::Sqpack::OnTheFlyTextureEntryProvider::Initialize(const RandomAccessSt m_texHeaderBytes.end()); m_size += m_mergedHeader.size(); - reinterpret_cast(&m_mergedHeader[0])->SetSpaceUnits(m_size); } uint64_t Sqex::Sqpack::OnTheFlyTextureEntryProvider::MaxPossibleStreamSize() const { @@ -332,6 +332,7 @@ void Sqex::Sqpack::MemoryTextureEntryProvider::Initialize(const RandomAccessStre sizeof entryHeader + std::span(blockLocators).size_bytes() + std::span(subBlockSizes).size_bytes())); + entryHeader.SetSpaceUnits(texHeaderBytes.size() + entryBody.size()); m_data.insert(m_data.end(), reinterpret_cast(&entryHeader), @@ -349,9 +350,6 @@ void Sqex::Sqpack::MemoryTextureEntryProvider::Initialize(const RandomAccessStre m_data.insert(m_data.end(), entryBody.begin(), entryBody.end()); m_data.resize(Align(m_data.size())); - - auto& fileEntryHeader = *reinterpret_cast(&m_data[0]); - reinterpret_cast(&m_data[0])->SetSpaceUnits(m_data.size()); } uint64_t Sqex::Sqpack::MemoryTextureEntryProvider::ReadStreamPartial(const RandomAccessStream& stream, uint64_t offset, void* buf, uint64_t length) const { diff --git a/XivAlexanderCommon/includes/XivAlexanderCommon/Sqex_Sqpack.h b/XivAlexanderCommon/includes/XivAlexanderCommon/Sqex_Sqpack.h index 2cf49b12..e4aaacc2 100644 --- a/XivAlexanderCommon/includes/XivAlexanderCommon/Sqex_Sqpack.h +++ b/XivAlexanderCommon/includes/XivAlexanderCommon/Sqex_Sqpack.h @@ -303,11 +303,12 @@ namespace Sqex::Sqpack { LE BlockCountOrVersion; - static FileEntryHeader NewEmpty(size_t decompressedSize = 0, size_t compressedSize = 0); + static FileEntryHeader NewEmpty(uint64_t decompressedSize = 0, uint64_t compressedSize = 0); - void SetSpaceUnits(size_t totalEntrySize); + void SetSpaceUnits(uint64_t dataSize); + [[nodiscard]] uint64_t GetDataSize() const; - uint32_t GetTotalEntrySize() const; + [[nodiscard]] uint64_t GetTotalEntrySize() const; }; struct TextureBlockHeaderLocator {