Exemple #1
0
 private void _amTpUpdateTouch_req()
 {
     AppMain.AMS_IPHONE_TP_DATA touchReqDispData = AppMain._amTpUpdateTouch_req_DispData;
     for (int TouchIndex = 0; TouchIndex < 4; ++TouchIndex)
     {
         AppMain.AMS_TP_TOUCH_CORE core = AppMain._am_tp_touch[TouchIndex].core;
         AppMain.amIPhoneRequestTouch(touchReqDispData, TouchIndex);
         if (touchReqDispData.touch == (ushort)1)
         {
             if (touchReqDispData.validity == (ushort)1)
             {
                 core.sampling_buf[0] = touchReqDispData.x;
                 core.sampling_buf[1] = touchReqDispData.y;
                 core.sampling_flag  |= (byte)1;
                 core.sampling_flag  &= (byte)127;
             }
             else
             {
                 core.sampling_flag |= (byte)128;
             }
         }
         else
         {
             core.sampling_flag &= (byte)126;
         }
     }
 }
Exemple #2
0
    // Token: 0x06000A33 RID: 2611 RVA: 0x0005BD90 File Offset: 0x00059F90
    private void amTpUpdateStatus(AppMain.AMS_TP_TOUCH_STATUS status, AppMain.AMS_TP_TOUCH_CORE core)
    {
        bool flag  = (core.sampling_flag & 1) != 0;
        bool flag2 = (status.flag & 1) != 0;
        bool flag3 = flag ^ flag2;

        AppMain.AMM_TP_BIT_SET16(ref status.flag, 7, (core.sampling_flag & 128) != 0);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 1, flag2);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 0, flag);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 2, flag3 && flag);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 3, flag3 && flag2);
        status.prev[0] = status.on[0];
        status.prev[1] = status.on[1];
        ushort[] sampling_buf = core.sampling_buf;
        status.on[0] = sampling_buf[0];
        status.on[1] = sampling_buf[1];
        if ((status.flag & 4) != 0)
        {
            status.push[0] = status.on[0];
            status.push[1] = status.on[1];
        }
        else if ((status.flag & 8) != 0)
        {
            status.pull[0] = status.prev[0];
            status.pull[1] = status.prev[1];
        }
        if (status.core != core)
        {
            status.core = core;
        }
    }
Exemple #3
0
    private void amTpUpdateStatus(AppMain.AMS_TP_TOUCH_STATUS status, AppMain.AMS_TP_TOUCH_CORE core)
    {
        bool b1   = ((int)core.sampling_flag & 1) != 0;
        bool b2   = ((int)status.flag & 1) != 0;
        bool flag = b1 ^ b2;

        AppMain.AMM_TP_BIT_SET16(ref status.flag, 7, ((int)core.sampling_flag & 128) != 0);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 1, b2);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 0, b1);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 2, flag & b1);
        AppMain.AMM_TP_BIT_SET16(ref status.flag, 3, flag & b2);
        status.prev[0] = status.on[0];
        status.prev[1] = status.on[1];
        ushort[] samplingBuf = core.sampling_buf;
        status.on[0] = samplingBuf[0];
        status.on[1] = samplingBuf[1];
        if (((int)status.flag & 4) != 0)
        {
            status.push[0] = status.on[0];
            status.push[1] = status.on[1];
        }
        else if (((int)status.flag & 8) != 0)
        {
            status.pull[0] = status.prev[0];
            status.pull[1] = status.prev[1];
        }
        if (status.core == core)
        {
            return;
        }
        status.core = core;
    }
Exemple #4
0
 // Token: 0x06000A34 RID: 2612 RVA: 0x0005BEB8 File Offset: 0x0005A0B8
 private void _amTpUpdateTouch_req()
 {
     AppMain.AMS_IPHONE_TP_DATA amTpUpdateTouch_req_DispData = AppMain._amTpUpdateTouch_req_DispData;
     for (int i = 0; i < 4; i++)
     {
         AppMain.AMS_TP_TOUCH_CORE core = AppMain._am_tp_touch[i].core;
         AppMain.amIPhoneRequestTouch(amTpUpdateTouch_req_DispData, i);
         if (amTpUpdateTouch_req_DispData.touch == 1)
         {
             if (amTpUpdateTouch_req_DispData.validity == 1)
             {
                 core.sampling_buf[0] = amTpUpdateTouch_req_DispData.x;
                 core.sampling_buf[1] = amTpUpdateTouch_req_DispData.y;
                 AppMain.AMS_TP_TOUCH_CORE ams_TP_TOUCH_CORE = core;
                 ams_TP_TOUCH_CORE.sampling_flag |= 1;
                 AppMain.AMS_TP_TOUCH_CORE ams_TP_TOUCH_CORE2 = core;
                 ams_TP_TOUCH_CORE2.sampling_flag &= 127;
             }
             else
             {
                 AppMain.AMS_TP_TOUCH_CORE ams_TP_TOUCH_CORE3 = core;
                 ams_TP_TOUCH_CORE3.sampling_flag |= 128;
             }
         }
         else
         {
             AppMain.AMS_TP_TOUCH_CORE ams_TP_TOUCH_CORE4 = core;
             ams_TP_TOUCH_CORE4.sampling_flag &= 126;
         }
     }
 }