/// <inheritdoc/>> public bool IsGameInLoadingScreen() { int loadingScreenFlagAddress = _addressFinder.GetLoadingScreenFlagAddress(); int isInLoadingScreenFlagValue = _processFunctionsService.ReadMemoryInt(_processHandle, loadingScreenFlagAddress); bool isLoadingScreen = (isInLoadingScreenFlagValue & 1) == 1; return(isLoadingScreen); }
private async Task WaitUntilNotInLoadingScreen(Process gameProcess, IAddressFinder addressFinder) { int loadingScreenFlagAddress = addressFinder.GetLoadingScreenFlagAddress(); while (true) { int loadingScreenFlag = _processFunctionsService.ReadMemoryInt(gameProcess.Handle, loadingScreenFlagAddress); bool isInLoadingScreen = (loadingScreenFlag & 1) == 1; if (!isInLoadingScreen) { break; } await Task.Delay(1000).ConfigureAwait(false); } }
private void RetrieveAddresses(IAddressFinder addressFinder) { _xCameraAddress = addressFinder.GetXCameraAddress(); _yCameraAddress = addressFinder.GetYCameraAddress(); _zCameraAddress = addressFinder.GetZCameraAddress(); _unlimitedZoomCodeAddress = addressFinder.GetUnlimitedZoomCodeAddress(); _horizontalCameraAngleAddress = addressFinder.GetHorizontalCameraAngleAddress(); _verticalCameraAngleAddress = addressFinder.GetVerticalCameraAngleAddress(); _freeCameraCodeAddress = addressFinder.GetFreeCameraCodeAddress(); _collisionZoomAdjustmentCodeAddress = addressFinder.GetCollisionZoomAdjustmentCodeAddress(); _autoCameraAngleAdjustmentCodeAddress = addressFinder.GetAutoCameraAngleAdjustmentCodeAddress(); _cameraZoomDistanceAddress = addressFinder.GetCameraZoomDistanceAddress(); _loadingScreenFlagAddress = addressFinder.GetLoadingScreenFlagAddress(); _menuScreenFlagAddress = addressFinder.GetMenuScreenFlagAddress(); _saveGameLoadedFlagAddress = addressFinder.GetSaveGameLoadedFlagAddress(); _dialogueFlagAddress = addressFinder.GetDialogueFlagAddress(); _menuOrDialogueFlagAddress = addressFinder.GetMenuOrDialogueFlagAddress(); _zoomStateCodeAddress = addressFinder.GetZoomStateCodeAddress(); _centeringCameraBehindCharacterCodeAddress = addressFinder.GetCenteringCameraBehindCharacterCodeAddress(); _menuOrDialogueEnteredCodeAddress = addressFinder.GetMenuOrDialogueEnteredCodeAddress(); _menuOrDialogueExitedCodeAddress = addressFinder.GetMenuOrDialogueExitedCodeAddress(); _loadingScreenEnteredCodeAddress = addressFinder.GetLoadingScreenEnteredCodeAddress(); _loadingScreenExitedCodeAddress = addressFinder.GetLoadingScreenExitedCodeAddress(); }