MCPcopy Create free account
hub / github.com/Wemino/EchoPatch / LoadGameString_Hook

Function LoadGameString_Hook

src/Client/Client.cpp:1924–1969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1922}
1923
1924static const wchar_t* __stdcall LoadGameString_Hook(int ptr, char* String)
1925{
1926 const uint32_t strHash = HashHelper::FNV1aRuntime(String);
1927
1928 switch (strHash)
1929 {
1930 case HashHelper::StringHashes::IDS_CONTROLLER_SENSITIVITY: return L"Controller Sensitivity";
1931 case HashHelper::StringHashes::IDS_EDGE_ACCELERATION: return L"Edge Acceleration";
1932 case HashHelper::StringHashes::IDS_GYRO_SENSITIVITY: return L"Gyro Sensitivity";
1933 case HashHelper::StringHashes::IDS_GYRO_SMOOTHING: return L"Gyro Smoothing";
1934 case HashHelper::StringHashes::IDS_HELP_CONTROLLER_SENSITIVITY: return L"Adjust the sensitivity of the analog sticks.";
1935 case HashHelper::StringHashes::IDS_HELP_EDGE_ACCELERATION: return L"Adjust the turn rate multiplier when the stick is pushed to the edge.";
1936 case HashHelper::StringHashes::IDS_HELP_RUMBLE: return L"Enable or disable controller vibration feedback.";
1937 case HashHelper::StringHashes::IDS_HELP_GYRO_ENABLED: return L"Enable or disable gyroscope aiming.";
1938 case HashHelper::StringHashes::IDS_HELP_GYRO_TYPE: return L"Choose when gyro aiming is active.";
1939 case HashHelper::StringHashes::IDS_HELP_GYRO_PERSISTENCE_ENABLED: return L"Automatically save and load gyro calibration data upon reconnection.";
1940 case HashHelper::StringHashes::IDS_HELP_GYRO_SENSITIVITY: return L"Adjust the sensitivity of the gyroscope.";
1941 case HashHelper::StringHashes::IDS_HELP_GYRO_SMOOTHING: return L"Adjust smoothing applied to gyroscope input.";
1942 case HashHelper::StringHashes::IDS_HELP_TOUCHPAD: return L"Enable or disable touchpad functionality.";
1943
1944 case HashHelper::StringHashes::IDS_QUICKSAVE:
1945 if (ShouldShowControllerPrompts())
1946 {
1947 return L"Quick save";
1948 }
1949 break;
1950
1951 case HashHelper::StringHashes::ScreenFailure_PressAnyKey:
1952 if (ShouldShowControllerPrompts())
1953 {
1954 switch (GetGamepadStyle())
1955 {
1956 case GamepadStyle::PlayStation:
1957 return L"Press Circle to return to the main menu.\nPress any other button to continue.";
1958 case GamepadStyle::Nintendo:
1959 return L"Press B to return to the main menu.\nPress any other button to continue.";
1960 case GamepadStyle::Xbox:
1961 default:
1962 return L"Press B to return to the main menu.\nPress any other button to continue.";
1963 }
1964 }
1965 break;
1966 }
1967
1968 return LoadGameString(ptr, String);
1969}
1970
1971static bool __stdcall DEditLoadModule_Hook(const char* pszProjectPath)
1972{

Callers

nothing calls this directly

Calls 3

FNV1aRuntimeFunction · 0.85
GetGamepadStyleFunction · 0.85

Tested by

no test coverage detected