Ejemplo n.º 1
0
 public static Boolean CheckChocoboVirtual()
 {
     if (FF9StateSystem.MobilePlatform)
     {
         if (PersistenSingleton <EventEngine> .Instance.gMode == 1)
         {
             if (EventHUD.CurrentHUD == MinigameHUD.ChocoHot)
             {
                 return(true);
             }
         }
         else if (PersistenSingleton <EventEngine> .Instance.gMode == 3)
         {
             if (EventCollision.IsRidingChocobo() && EventInput.IsPressedDig)
             {
                 return(true);
             }
             EventInput.IsPressedDig = false;
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
    public static UInt32 ReadInput()
    {
        UInt32 num = 0u;

        if (!EventInput.isProcessingInput)
        {
            EventInput.ResetWorldTriggerButton();
            return(num);
        }
        Int32   fldMapNo = (Int32)FF9StateSystem.Common.FF9.fldMapNo;
        Int32   gMode    = PersistenSingleton <EventEngine> .Instance.gMode;
        Boolean isKeyboardOrJoystickInput = EventInput.IsKeyboardOrJoystickInput;

        if (Singleton <BubbleUI> .Instance.IsActive)
        {
            if (gMode == 1)
            {
                if (fldMapNo == 1420 && EventInput.CheckLadderFlag())
                {
                    num = EventInput.ProcessInput(false, false);
                }
                else
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
            else if (gMode == 3)
            {
                if (FF9StateSystem.MobilePlatform)
                {
                    num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput);
                    EventInput.GetWorldTriggerButton(ref num);
                }
                else
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
        }
        else if (EventHUD.CurrentHUD != MinigameHUD.None)
        {
            MinigameHUD currentHUD = EventHUD.CurrentHUD;
            if (currentHUD != MinigameHUD.Chanbara)
            {
                if (currentHUD != MinigameHUD.RacingHippaul)
                {
                    num = EventInput.ProcessInput(false, true);
                }
                else
                {
                    num = EventInput.ProcessInput(false, false);
                }
            }
            else
            {
                num  = EventInput.ProcessInput(true, true);
                num &= EventInput.ChanbaraMask;
                if (FF9StateSystem.MobilePlatform)
                {
                    if ((num & 8u) > 0u)
                    {
                        EventInput.IsNeedAddStartSignal = true;
                    }
                    else if (EventInput.addStartSignal > 0)
                    {
                        num |= 8u;
                        EventInput.addStartSignal--;
                        EventInput.InputLog("Extra Start");
                    }
                }
            }
        }
        else if (fldMapNo == 606)
        {
            if (EventHUD.CurrentHUD == MinigameHUD.Telescope)
            {
                num = EventInput.ProcessInput(false, true);
            }
        }
        else if (fldMapNo == 2204 && TimerUI.Enable)
        {
            num = EventInput.ProcessInput(false, false);
        }
        else if (fldMapNo == 1607)
        {
            num = EventInput.ProcessInput(false, false);
        }
        else if (fldMapNo == 1420)
        {
            num = EventInput.ProcessInput(false, true);
        }
        else if (fldMapNo == 1422)
        {
            num = EventInput.ProcessInput(false, true);
        }
        else
        {
            Dialog mognetDialog = Singleton <DialogManager> .Instance.GetMognetDialog();

            if (mognetDialog != (UnityEngine.Object)null)
            {
                if (mognetDialog.IsChoiceReady)
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
            else if (FF9StateSystem.MobilePlatform)
            {
                num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput);
                if (isKeyboardOrJoystickInput)
                {
                    UIManager.Input.ResetTriggerEvent();
                }
                EventInput.GetWorldTriggerButton(ref num);
            }
            else
            {
                num = EventInput.ProcessInput(false, true);
            }
        }
        num |= EventInput.eventButtonInput;
        if (EventInput.isDialogConfirm)
        {
            num |= EventInput.ConfirmMask;
            EventInput.isDialogConfirm = false;
        }
        if (HonoBehaviorSystem.Instance.IsFastForwardModeActive())
        {
            if (FF9StateSystem.MobilePlatform)
            {
                if (fldMapNo == 909 || fldMapNo == 1909)
                {
                    num = EventInput.FastForwardProcess(gMode, fldMapNo, num);
                }
            }
            else
            {
                num = EventInput.FastForwardProcess(gMode, fldMapNo, num);
            }
        }
        num &= ~EventInput.PSXCntlPadMask[0];
        if (FF9StateSystem.MobilePlatform && gMode == 3 && EventCollision.IsRidingChocobo())
        {
            if ((num & 524288u) > 0u || (num & 32768u) > 0u)
            {
                EventInput.isPressedDig = true;
            }
            else if ((num & 16777216u) > 0u || (num & 4096u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
            else if ((num & EventInput.Lx) > 0u || (num & 16384u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
            else if ((num & 1u) > 0u || (num & 1u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
        }
        if (gMode == 3 && EventEngineUtils.IsMogCalled(PersistenSingleton <EventEngine> .Instance))
        {
            ff9.w_isMogActive = true;
        }
        if (gMode == 3 && EMinigame.CheckBeachMinigame() && EventCollision.IsWorldTrigger() && (num & CancelMask) > 0u)
        {
            num &= ~CancelMask;
            EventInput.InputLog("Remove cancel mask for <SQEX> #2893");
        }
        EventInput.eventButtonInput = 0u;
        EventInput.ResetWorldTriggerButton();
        return(num);
    }