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

📄 p.java

📁 j2me武林传之刀剑江湖录[中篇]反编译的源代码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
// 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 

import java.io.*;
import java.util.*;
import javax.microedition.lcdui.*;

public final class p
{

	public static short a[][];
	public static short b[][][][];
	private static Hashtable n;
	private static final int o[] = {
		0, 0, 0, 240, 320
	};
	public static int c = 0;
	public static int d = 0x82418;
	public static int e = 0xf0f0f;
	public static int f = 0xffffff;
	private static Image p[] = new Image[16];
	private static int q;
	private static int r[] = new int[15];
	private static int s = -1;
	private static f t;
	private static final String u[] = {
		"等级 :", "生命 :", "内力 :", "经验 :", "金钱:", "攻击 :", "防御 :", "回血 :", "会心 :"
	};
	private static String v[] = new String[u.length];
	private static final String w[] = {
		"踏入江湖", "再续征程", "挑战模式", "江湖宝典", "关于我们", "归隐山林"
	};
	private static byte x[];
	public static boolean g;
	public static boolean h;
	public static boolean i;
	private static int y;
	private static int z;
	private static final String A[] = {
		"1. 游戏简介", "2. 操作指南", "3. 主角属性", "4. 技能提升", "5. 装备系统", "6. 关于任务", "7. 即时战斗", "8. 附加属性"
	};
	private static byte B[];
	private static byte C[];
	private static byte D[];
	private static boolean E;
	private static final String F[] = {
		"装备", "物品", "技能", "任务", "系统", "退出"
	};
	private static String G = "确定返回主菜单?&尚未保存的游戏进度将丢失!";
	private static short H[] = new short[2];
	private static byte I[];
	private static byte J[][];
	private static int K;
	private static int L;
	private static final String M[] = {
		"武器", "防具", "靴子", "饰品"
	};
	private static boolean N;
	private static final String O[] = {
		"此装备已穿无法丢弃!", "是否扔掉?", "等级不够!"
	};
	private static String P[] = new String[M.length];
	private static String Q[][][] = new String[M.length][][];
	private static boolean R;
	private static boolean S;
	private static byte T[];
	private static byte U[];
	private static byte V[][];
	private static final String W[] = {
		"药品", "其他"
	};
	private static String X[][][] = new String[W.length][][];
	private static boolean Y;
	private static boolean Z;
	private static boolean aa;
	private static byte ab[];
	private static final String ac[];
	public static boolean j;
	private static byte ad[];
	private static boolean ae;
	private static boolean af;
	private static boolean ag;
	private static boolean ah;
	private static int ai;
	private static int aj;
	private static byte ak[];
	private static String al[][];
	private static boolean am;
	private static final String an[] = {
		"开", "关"
	};
	public static String k[][] = new String[2][];
	private static byte ao[] = new byte[3];
	private static byte ap[];
	private static final String aq[] = {
		"购买", "出售"
	};
	private static final String ar[] = {
		"购买", "返回"
	};
	private static final String as[] = {
		"出售", "返回"
	};
	private static byte at[];
	private static byte au[];
	private static byte av[];
	private static byte aw[][];
	private static String ax[][][] = new String[aq.length][][];
	private static byte ay;
	private static boolean az;
	private static o aA[];
	private static int aB;
	private static boolean aC;
	private static boolean aD;
	private static boolean aE;
	private static boolean aF;
	private static boolean aG;
	private static boolean aH;
	public static int l;
	public static int m;

	public p()
	{
	}

	private static void a(byte abyte0[], int i1, int j1, byte byte0, byte byte1)
	{
		byte byte2 = 0;
		byte byte3 = 0;
		abyte0[0] = 0;
		abyte0[1] = 0;
		byte2 = (byte)(i1 / j1);
		if (i1 % j1 != 0)
			byte2++;
		abyte0[2] = byte2;
		abyte0[3] = (byte)j1;
		byte3 = (byte)(i1 % j1);
		if (i1 != 0 && i1 % j1 == 0)
			byte3 = abyte0[3];
		abyte0[4] = byte3;
		abyte0[5] = byte0;
		abyte0[6] = byte1;
	}

	private static void a(byte abyte0[], int i1)
	{
		if (i1 == 0)
		{
			abyte0[0] = 0;
			abyte0[1] = 0;
			abyte0[2] = 0;
			abyte0[4] = 0;
			return;
		}
		byte byte0 = 0;
		byte byte1 = 0;
		byte byte2 = abyte0[2];
		if (abyte0[1] == abyte0[2] - 1 && i1 < (abyte0[2] - 1) * abyte0[3] + abyte0[4] && abyte0[0] == abyte0[4] - 1)
			abyte0[0] = --abyte0[0] >= 0 ? abyte0[0] : (byte)(abyte0[3] - 1);
		byte0 = (byte)(i1 / abyte0[3]);
		if (i1 % abyte0[3] != 0)
			byte0++;
		abyte0[2] = byte0;
		if (byte0 < byte2 && i1 < (byte2 - 1) * abyte0[3] + abyte0[4])
			abyte0[1] = --abyte0[1] >= 0 ? abyte0[1] : 0;
		byte1 = (byte)(i1 % abyte0[3]);
		if (i1 % abyte0[3] == 0)
			byte1 = abyte0[3];
		abyte0[4] = byte1;
		if (d(abyte0) > (abyte0[2] - 1) * abyte0[3] + abyte0[4])
			a(abyte0, i1, abyte0[3], abyte0[5], abyte0[6]);
	}

	private static int a(byte abyte0[])
	{
		return (abyte0[2] - 1) * abyte0[3] + abyte0[4];
	}

	private static int b(byte abyte0[])
	{
		if (a.c(2))
		{
			if (abyte0[2] <= 0)
				return 0;
			abyte0[0]++;
			if (abyte0[0] > c(abyte0) - 1)
			{
				abyte0[0] = 0;
				abyte0[1]++;
				if (abyte0[1] > abyte0[2] - 1)
					abyte0[1] = 0;
			}
		} else
		if (a.c(1))
		{
			if (abyte0[2] <= 0)
				return 0;
			abyte0[0]--;
			if (abyte0[0] < 0)
			{
				abyte0[1]--;
				if (abyte0[1] < 0)
				{
					abyte0[1] = (byte)(abyte0[2] - 1);
					abyte0[0] = (byte)(abyte0[4] - 1);
				} else
				{
					abyte0[0] = (byte)(abyte0[3] - 1);
				}
			}
		} else
		{
			if (a.c(20480))
				return -1;
			if (a.c(8192))
				return -2;
		}
		return 0;
	}

	private static byte c(byte abyte0[])
	{
		if (abyte0[1] == abyte0[2] - 1)
			return abyte0[4];
		else
			return abyte0[3];
	}

	private static byte d(byte abyte0[])
	{
		return (byte)(abyte0[1] * abyte0[3] + abyte0[0]);
	}

	private static final void a(Graphics g1, byte abyte0[], String as1[][], int ai1[][], int ai2[], int i1, int j1, int k1)
	{
		if (abyte0[2] <= 0)
			return;
		boolean flag = false;
		boolean flag1 = false;
		byte byte0 = abyte0[1];
		byte byte1 = abyte0[3];
		String s1 = null;
		String s2 = null;
		Object obj = null;
		Object obj1 = null;
		g1.setFont(h.a);
		for (int l1 = 0; l1 < abyte0[3]; l1++)
		{
			int ai3[] = ai1[l1];
			int i2;
			if ((i2 = byte1 * byte0 + l1) >= a(abyte0))
				break;
			if (abyte0[6] == 1)
				s1 = (s1 = as1[i2][0]).substring(s1.indexOf(" ") + 1);
			else
			if (abyte0[6] == 2)
			{
				s1 = (s1 = as1[i2][0]).substring(s1.indexOf(" ") + 1);
				s2 = as1[i2][1];
			} else
			if (abyte0[6] == 3)
			{
				s1 = (s1 = as1[i2][0]).substring(s1.indexOf(" ") + 1);
				s2 = as1[i2][1];
			}
			if (l1 == abyte0[0])
			{
				if (i1 != -1)
					a(g1, i1, ai1[l1]);
				if (s1 != null)
					v.a(g1, s1, ai3[1] + 3, ai3[2] + (ai3[4] - g1.getFont().getHeight()) / 2, 20, 0x5df800, 0);
				if (s2 != null)
					v.a(g1, s2, (ai3[1] + ai3[3]) - 3, ai3[2] + (ai3[4] - g1.getFont().getHeight()) / 2, 24, 0x5df800, 0);
				continue;
			}
			g1.setColor(0xffffff);
			if (j1 != -1)
				a(g1, j1, ai1[l1]);
			if (s1 != null)
				g1.drawString(s1, ai3[1] + 3, ai3[2] + (ai3[4] - g1.getFont().getHeight()) / 2, 20);
			if (s2 != null)
				g1.drawString(s2, (ai3[1] + ai3[3]) - 3, ai3[2] + (ai3[4] - g1.getFont().getHeight()) / 2, 24);
		}

		a(g1, abyte0, ai2, k1);
	}

	private static final void a(Graphics g1, byte abyte0[], int ai1[], int i1)
	{
		if (abyte0[2] <= 0)
			return;
		boolean flag = false;
		byte byte0 = abyte0[0];
		byte byte1 = abyte0[1];
		byte byte2 = abyte0[3];
		byte byte3 = (byte)a(abyte0);
		int j1 = byte2 * byte1 + byte0;
		int k1 = ai1[1] + ai1[3] / 2;
		int l1 = ai1[2];
		if (byte3 == 1)
			l1 += 0;
		else
			l1 += (j1 * ai1[4]) / (byte3 - 1);
		int ai2[] = {
			0, k1, l1, 0, 0
		};
		a(g1, i1, ai2);
	}

	private static void a(byte abyte0[], int i1, int j1)
	{
		abyte0[0] = 0;
		abyte0[1] = (byte)i1;
		abyte0[2] = (byte)j1;
	}

	private static int e(byte abyte0[])
	{
		byte byte0 = 0;
		if (abyte0[2] == 0 && a.c(4) || abyte0[2] == 1 && a.c(1))
			abyte0[0] = --abyte0[0] >= 0 ? abyte0[0] : (byte)(abyte0[1] - 1);
		if (abyte0[2] == 0 && a.c(8) || abyte0[2] == 1 && a.c(2))
			abyte0[0] = ++abyte0[0] <= abyte0[1] - 1 ? abyte0[0] : 0;
		if (a.c(20480))
			byte0 = -1;
		else
		if (a.c(8192))
			byte0 = -2;
		return byte0;
	}

	public static final void a()
	{
		b("uidata_7370.bin");
		q = -1;
		for (int i1 = r.length - 1; i1 >= 0; i1--)
			r[i1] = -1;

		e();
	}

	public static final void b()
	{
		byte abyte0[][] = c("uires.bin");
		for (int i1 = 0; i1 < abyte0.length; i1++)
			if (abyte0[i1] != null)
				p[i1] = Image.createImage(abyte0[i1], 0, abyte0[i1].length);

	}

	private static int[][] c(int i1)
	{
		return (int[][])n.get(String.valueOf(i1));
	}

	private static void e()
	{
		n = new Hashtable();
		Hashtable hashtable = new Hashtable();
		for (int i1 = 0; i1 < a.length; i1++)
			if (a[i1][0] < 0)
				hashtable.put(String.valueOf(i1), a[i1]);

		if (hashtable.size() == 0)
			return;
		for (int l1 = 0; l1 < b.length; l1++)
		{
			for (int i2 = 0; i2 < b[l1].length; i2++)
			{
				for (int j2 = 0; j2 < b[l1][i2].length; j2++)
				{
					Vector vector = new Vector();
					int k2;
					k2 = (k2 = b[l1][i2][j2].length / 3) != 0 ? k2 : 1;
					for (int l2 = 0; l2 < k2; l2++)
					{
						String s1 = String.valueOf(b[l1][i2][j2][l2 * 3]);
						if (hashtable.containsKey(s1))
						{
							short aword0[];
							short word0 = (aword0 = (short[])hashtable.get(s1))[0];
							short word1 = aword0[4];
							short word2 = aword0[5];
							short word3 = b[l1][i2][j2][l2 * 3 + 1];
							short word4 = b[l1][i2][j2][l2 * 3 + 2];
							int j1 = (word3 - (word1 >> 1)) + 120;
							int k1 = (word4 - (word2 >> 1)) + 160;
							vector.addElement(new int[] {
								word0, j1, k1, word1, word2
							});
						}
					}

					if (vector.size() == 0)
						continue;
					int ai1[][] = new int[vector.size()][5];
					int i3 = 0;
					for (int j3 = 0; j3 < ai1.length;)
					{
						ai1[j3] = (int[])vector.elementAt(i3);
						j3++;
						i3++;
					}

					n.put(String.valueOf(l1 << 16 | i2 << 8 | j2), ai1);
				}

			}

		}

	}

	public static final void a(Graphics g1, int i1, int j1, int k1)
	{
		int l1 = i1 >> 16 & 0xff;
		int i2 = i1 >> 8 & 0xff;
		int j2 = i1 >> 0 & 0xff;
		int k2 = j1;
		int l2 = k1;
		short aword0[] = b[l1][i2][j2];
		Object obj = null;
		int i3 = aword0.length;
		for (int j3 = 0; j3 < i3;)
		{
			short word0 = aword0[j3++];
			short aword1[];
			if ((aword1 = a[word0])[0] < 0)
			{
				j3++;
				j3++;
			} else
			{
				short word1;
				if (aword1.length > 5)
					word1 = aword1[5];
				else
					word1 = 0;
				short word2 = aword0[j3++];
				short word3 = aword0[j3++];
				if (p[aword1[0]] == null)
				{
					System.out.println("UI image=null! subImgID=" + word0);
					System.out.println("\tid=" + l1 + "  state=" + i2 + "  frameID=" + j2);
				}
				k.a(g1, p[aword1[0]], aword1[1], aword1[2], aword1[3], aword1[4], (k2 + word2) - (aword1[3] >> 1), (l2 + word3) - (aword1[4] >> 1), 20, word1);
			}
		}

	}

	public static final void a(Graphics g1, int i1, int ai1[])
	{
		a(g1, i1, ai1[1] + (ai1[3] >> 1), ai1[2] + (ai1[4] >> 1));
	}

	public static final void a(Graphics g1, int i1)
	{
		a(g1, i1, o);
	}

	public static final void a(Graphics g1, String s1, String s2, String s3)
	{
		v.a(g1, 10, 106, 220, 106, 0xa0050505);
		g1.setColor(0xffffff);
		v.a(g1, s1, 15, 10, 106, 220, 106, 17);
		if (s2 != null)
			g1.drawString(s2, 15, 212, 36);
		if (s3 != null)
			g1.drawString(s3, 225, 212, 40);
	}

	private static int a(String s1)
	{
		return Integer.parseInt(s1.substring(0, s1.indexOf(" ")), 10);
		JVM INSTR dup ;
		NumberFormatException numberformatexception;
		numberformatexception;
		printStackTrace();
		return 0;
	}

	public static final String[] a(Vector vector)
	{
		String as1[] = new String[vector.size()];
		for (int i1 = 0; i1 < as1.length; i1++)
			as1[i1] = (String)vector.elementAt(i1);

		return as1;
	}

	public static final String[][] b(Vector vector)
	{
		String as1[][] = new String[vector.size()][];
		for (int i1 = 0; i1 < as1.length; i1++)
			as1[i1] = a((Vector)vector.elementAt(i1));

		vector.removeAllElements();
		return as1;
	}

	public static final void a(f f1)
	{
		t = f1;
	}

	public static final void c()
	{
		e(q);
	}

	public static final void a(Graphics g1)
	{
		for (int i1 = 0; i1 <= s; i1++)
			d(g1, r[i1]);

	}

	public static final void a(int i1)
	{
		boolean flag = false;
		int j1 = 0;
		do
		{
			if (j1 > s)
				break;
			if (r[j1] == i1)
			{
				flag = true;
				s = j1;
				q = r[s];
				if (s <= 0);
				break;
			}
			j1++;
		} while (true);
		if (!flag)
		{
			q = i1;
			s++;
			r[s] = q;
		}
		l = 0;
		d(q);
	}

	private static void f()
	{
		s--;
		if (s >= 0)
		{
			q = r[s];
			if (s > 0)
				return;
			else
				return;
		}
		q = -1;
		if (s < -1)
			s = -1;
	}

	private static void g()
	{
		v[0] = ((z) (t)).f[0] + "级";
		v[1] = ((z) (t)).f[4] + "/" + ((z) (t)).f[5];
		v[2] = ((z) (t)).f[6] + "/" + ((z) (t)).f[7];
		v[3] = ((z) (t)).f[10] + "/" + ((z) (t)).f[24];
		v[4] = t.J() + "两";
		v[5] = ((z) (t)).f[8] + " ";
		v[6] = ((z) (t)).f[9] + " ";
		v[7] = ((z) (t)).f[30] + "";
		v[8] = ((z) (t)).f[32] + "%";
	}

	private static final void h()
	{
		z = 0;
		y = 0;

⌨️ 快捷键说明

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