Exemple #1
0
        private static void MixInput(Button button)
        {
            bool keyDown = button.KeyIds.Any(keyId => keyId != -1 && 1 <= DDKey.GetInput(keyId));
            bool btnDown = button.BtnIds.Any(btnId => btnId != -1 && 1 <= DDPad.GetInput(DDGround.PrimaryPadId, btnId));

            DDUtils.UpdateInput(ref button.Status, keyDown || btnDown);
        }
Exemple #2
0
        public static void EachFrame()
        {
            uint status;

            if (DDEngine.WindowIsActive)
            {
                _rot   = DX.GetMouseWheelRotVol();
                status = (uint)DX.GetMouseInput();
            }
            else
            {
                _rot   = 0;
                status = 0u;
            }
            _rot = SCommon.ToRange(_rot, -SCommon.IMAX, SCommon.IMAX);

            DDUtils.UpdateInput(ref L.Status, (status & (uint)DX.MOUSE_INPUT_LEFT) != 0u);
            DDUtils.UpdateInput(ref R.Status, (status & (uint)DX.MOUSE_INPUT_RIGHT) != 0u);
            DDUtils.UpdateInput(ref M.Status, (status & (uint)DX.MOUSE_INPUT_MIDDLE) != 0u);

            UpdatePos_EF();
        }
Exemple #3
0
        public static void EachFrame()
        {
            if (DDEngine.WindowIsActive)
            {
                if (DX.GetHitKeyStateAll(StatusMap) != 0)                 // ? 失敗
                {
                    throw new DDError();
                }

                for (int keyId = 0; keyId < 256; keyId++)
                {
                    DDUtils.UpdateInput(ref KeyStatus[keyId], StatusMap[keyId] != 0);
                }
            }
            else
            {
                for (int keyId = 0; keyId < 256; keyId++)
                {
                    DDUtils.UpdateInput(ref KeyStatus[keyId], false);
                }
            }
        }
Exemple #4
0
        public static void EachFrame()
        {
            for (int padId = 0; padId < GetPadCount(); padId++)
            {
                uint status;

                if (DDEngine.WindowIsActive)
                {
                    status = (uint)DX.GetJoypadInputState(PadId2InputType(padId));
                }
                else
                {
                    status = 0u;
                }

                if (status != 0u)
                {
                    for (int btnId = 0; btnId < PAD_BUTTON_MAX; btnId++)
                    {
                        DDUtils.UpdateInput(ref ButtonStatus[padId * PAD_BUTTON_MAX + btnId], (status & (1u << btnId)) != 0u);
                    }
                }
                else
                {
                    for (int btnId = 0; btnId < PAD_BUTTON_MAX; btnId++)
                    {
                        DDUtils.UpdateInput(ref ButtonStatus[padId * PAD_BUTTON_MAX + btnId], false);
                    }
                }

                if (DDGround.PrimaryPadId == -1 && 10 < DDEngine.ProcFrame && PadStatus[padId] == 0u && status != 0u)                 // 最初にボタンを押下したパッドを PrimaryPadId にセット
                {
                    DDGround.PrimaryPadId = padId;
                }

                PadStatus[padId] = status;
            }
        }