APK反编译

源代码:

private int getDpadStates(float x, float y)

{
if (dpad4Way) return DPAD_4WAY[get4WayDirection(x, y)];


final float cx = 0.5f;
final float cy = 0.5f;
int states = 0;


if (x < cx - dpadDeadZone)
states |= Keycodes.GAMEPAD_LEFT;
else if (x > cx + dpadDeadZone) states |= Keycodes.GAMEPAD_RIGHT;
if (y < cy - dpadDeadZone)
states |= Keycodes.GAMEPAD_UP;
else if (y > cy + dpadDeadZone) states |= Keycodes.GAMEPAD_DOWN;


return states;
}

  

反编译后:

  private int getDpadStates(float paramFloat1, float paramFloat2)
  {
    int j;
    if (this.dpad4Way)
    {
      j = DPAD_4WAY[get4WayDirection(paramFloat1, paramFloat2)];
      return j;
    }
    int i = 0;
    if (paramFloat1 < 0.5F - this.dpadDeadZone)
    {
      i = 0x0 | 0x20;
      label41: if (paramFloat2 >= 0.5F - this.dpadDeadZone)
        break label84;
      i |= 64;
    }
    while (true)
    {
      j = i;
      break;
      if (paramFloat1 <= 0.5F + this.dpadDeadZone)
        break label41;
      i = 0x0 | 0x10;
      break label41;
      label84: if (paramFloat2 > 0.5F + this.dpadDeadZone)
        i |= 128;
    }
  }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值