⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wrirevent.java

📁 支持任天堂wii2手柄的java中间件
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   WRIREvent.java

package wiiremotej.event;

import wiiremotej.IRLight;
import wiiremotej.WiiRemote;

// Referenced classes of package wiiremotej.event:
//			WREvent

public class WRIREvent extends WREvent
{

	public static int BASIC = 1;
	public static int EXTENDED = 3;
	public static int FULL = 5;
	private int mode;
	private IRLight IRLights[];

	public WRIREvent(WiiRemote wiiremote, int i, byte abyte0[], int j)
	{
		super(wiiremote);
		mode = i;
		IRLights = new IRLight[4];
		if (i == BASIC)
		{
			for (int k = 0; k < 2; k++)
			{
				if (k != 0)
					j += 5;
				int i1 = ((abyte0[j + 2] & 0x30) << 4) + (abyte0[j + 0] & 0xff);
				int k1 = ((abyte0[j + 2] & 0xc0) << 2) + (abyte0[j + 1] & 0xff);
				if ((i1 & 0x3ff) == 1023)
					IRLights[0 + 2 * k] = null;
				else
					IRLights[0 + 2 * k] = new IRLight(i1, k1);
				int i2 = ((abyte0[j + 2] & 3) << 8) + (abyte0[j + 3] & 0xff);
				int k2 = ((abyte0[j + 2] & 0xc) << 6) + (abyte0[j + 4] & 0xff);
				if ((i2 & 0x3ff) == 1023)
					IRLights[1 + 2 * k] = null;
				else
					IRLights[1 + 2 * k] = new IRLight(i2, k2);
			}

		} else
		if (i == EXTENDED)
		{
			for (int l = 0; l < 4; l++)
			{
				if (l != 0)
					j += 3;
				int j1 = ((abyte0[j + 2] & 0x30) << 4) + (abyte0[j + 0] & 0xff);
				int l1 = ((abyte0[j + 2] & 0xc0) << 2) + (abyte0[j + 1] & 0xff);
				int j2 = abyte0[j + 2] & 0xf;
				if ((j1 & 0x3ff) == 1023)
					IRLights[l] = null;
				else
					IRLights[l] = new IRLight(j1, l1, j2);
			}

		}
	}

	public WRIREvent(WiiRemote wiiremote, int i, byte abyte0[], byte abyte1[])
	{
		IRLights = new IRLight[4];
		int j = 5;
		for (int k = 0; k < 2; k++)
		{
			if (k != 0)
				j += 9;
			int i1 = ((abyte0[j + 2] & 0x30) << 4) + (abyte0[j + 0] & 0xff);
			int k1 = ((abyte0[j + 2] & 0xc0) << 2) + (abyte0[j + 1] & 0xff);
			int i2 = abyte0[j + 2] & 0xf;
			int k2 = abyte0[j + 3] & 0xff;
			int i3 = abyte0[j + 4] & 0xff;
			int k3 = abyte0[j + 5] & 0xff;
			int i4 = abyte0[j + 6] & 0xff;
			int k4 = abyte0[j + 8] & 0xff;
			if ((i1 & 0x3ff) == 1023)
				IRLights[k] = null;
			else
				IRLights[k] = new IRLight(i1, k1, i2, k2, i3, k3, i4, k4);
		}

		j = 5;
		for (int l = 0; l < 2; l++)
		{
			if (l != 0)
				j += 9;
			int j1 = ((abyte1[j + 2] & 0x30) << 4) + (abyte0[j + 0] & 0xff);
			int l1 = ((abyte1[j + 2] & 0xc0) << 2) + (abyte0[j + 1] & 0xff);
			int j2 = abyte1[j + 2] & 0xf;
			int l2 = abyte1[j + 3] & 0xff;
			int j3 = abyte1[j + 4] & 0xff;
			int l3 = abyte1[j + 5] & 0xff;
			int j4 = abyte1[j + 6] & 0xff;
			int l4 = abyte1[j + 8] & 0xff;
			if ((j1 & 0x3ff) == 1023)
				IRLights[l + 2] = null;
			else
				IRLights[l + 2] = new IRLight(j1, l1, j2, l2, j3, l3, j4, l4);
		}

	}

	public WRIREvent(WiiRemote wiiremote, int i, IRLight airlight[])
	{
		super(wiiremote);
		mode = i;
		IRLights = airlight;
	}

	public IRLight[] getIRLights()
	{
		return IRLights;
	}

	public int getMode()
	{
		return mode;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -