/* Class106_Sub5 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.nio.ByteBuffer;

public class Class106_Sub5 extends Class106 {
	int anInt8704;
	Interface41 anInterface41_8705;
	Class84_Sub1 aClass84_Sub1_8706;
	byte[] aByteArray8707 = new byte[512];
	Interface39 anInterface39_8708;
	int anInt8709;

	void method2547(char c, int i, int i_0_, int i_1_, boolean bool) {
		if (((Class106_Sub5) this).aClass84_Sub1_8706.method15068() != Class370.aClass370_5567) {
			i += ((Class106_Sub5) this).aByteArray8707[c * '\002'];
			i_0_ += ((Class106_Sub5) this).aByteArray8707[c * '\002' + '\001'];
			((Class84_Sub1) ((Class106_Sub5) this).aClass84_Sub1_8706).aClass305_8974.method6078((float) i, (float) i_0_, (float) (i + ((Class106_Sub5) this).anInt8704), (float) (i_0_ + ((Class106_Sub5) this).anInt8704), ((float) (c % '\020') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method258()), ((float) (c / '\020') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method259()), ((float) (c % '\020' + '\001') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method258()), ((float) (c / '\020' + '\001') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method259()), ((Class106_Sub5) this).anInterface39_8708, i_1_);
		} else {
			((Class106_Sub5) this).aClass84_Sub1_8706.method14800();
			((Class106_Sub5) this).aClass84_Sub1_8706.method14851(1);
			Class349 class349 = (((Class84_Sub1) ((Class106_Sub5) this).aClass84_Sub1_8706).aClass349_8978);
			class349.anInterface39_5437 = ((Class106_Sub5) this).anInterface39_8708;
			class349.method6635(0, i_1_);
			float f = (float) ((Class106_Sub5) this).aClass84_Sub1_8706.method2063(-449390193).method3754();
			float f_2_ = (float) ((Class106_Sub5) this).aClass84_Sub1_8706.method2063(211181258).method3755();
			class349.aClass288_5439.method5752(2.0F / f, 2.0F / f_2_, 1.0F, 1.0F);
			class349.aClass288_5439.aFloatArray4285[12] = (((float) i + ((Class106_Sub5) this).aClass84_Sub1_8706.method14773()) * 2.0F / f) - 1.0F;
			class349.aClass288_5439.aFloatArray4285[13] = (((float) i_0_ + ((Class106_Sub5) this).aClass84_Sub1_8706.method14773()) * 2.0F / f_2_) - 1.0F;
			class349.aClass288_5439.aFloatArray4285[14] = -1.0F;
			class349.aClass288_5442.method5744();
			class349.anInterface41_5436 = ((Class106_Sub5) this).anInterface41_8705;
			class349.anInt5443 = c * '\004';
			class349.aClass363_5444 = (((Class84_Sub1) ((Class106_Sub5) this).aClass84_Sub1_8706).aClass363_8969);
			class349.method6636();
		}
	}

	void method2539(char c, int i, int i_3_, int i_4_, boolean bool) {
		if (((Class106_Sub5) this).aClass84_Sub1_8706.method15068() != Class370.aClass370_5567) {
			i += ((Class106_Sub5) this).aByteArray8707[c * '\002'];
			i_3_ += ((Class106_Sub5) this).aByteArray8707[c * '\002' + '\001'];
			((Class84_Sub1) ((Class106_Sub5) this).aClass84_Sub1_8706).aClass305_8974.method6078((float) i, (float) i_3_, (float) (i + ((Class106_Sub5) this).anInt8704), (float) (i_3_ + ((Class106_Sub5) this).anInt8704), ((float) (c % '\020') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method258()), ((float) (c / '\020') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method259()), ((float) (c % '\020' + '\001') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method258()), ((float) (c / '\020' + '\001') / 16.0F * ((Class106_Sub5) this).anInterface39_8708.method259()), ((Class106_Sub5) this).anInterface39_8708, i_4_);
		} else {
			((Class106_Sub5) this).aClass84_Sub1_8706.method14800();
			((Class106_Sub5) this).aClass84_Sub1_8706.method14851(1);
			Class349 class349 = (((Class84_Sub1) ((Class106_Sub5) this).aClass84_Sub1_8706).aClass349_8978);
			class349.anInterface39_5437 = ((Class106_Sub5) this).anInterface39_8708;
			class349.method6635(0, i_4_);
			float f = (float) ((Class106_Sub5) this).aClass84_Sub1_8706.method2063(-1475143283).method3754();
			float f_5_ = (float) ((Class106_Sub5) this).aClass84_Sub1_8706.method2063(-1268317256).method3755();
			class349.aClass288_5439.method5752(2.0F / f, 2.0F / f_5_, 1.0F, 1.0F);
			class349.aClass288_5439.aFloatArray4285[12] = (((float) i + ((Class106_Sub5) this).aClass84_Sub1_8706.method14773()) * 2.0F / f) - 1.0F;
			class349.aClass288_5439.aFloatArray4285[13] = (((float) i_3_ + ((Class106_Sub5) this).aClass84_Sub1_8706.method14773()) * 2.0F / f_5_) - 1.0F;
			class349.aClass288_5439.aFloatArray4285[14] = -1.0F;
			class349.aClass288_5442.method5744();
			class349.anInterface41_5436 = ((Class106_Sub5) this).anInterface41_8705;
			class349.anInt5443 = c * '\004';
			class349.aClass363_5444 = (((Class84_Sub1) ((Class106_Sub5) this).aClass84_Sub1_8706).aClass363_8969);
			class349.method6636();
		}
	}

	Class106_Sub5(Class84_Sub1 class84_sub1, Class611 class611, Class100_Sub1[] class100_sub1s, boolean bool) {
		super(class84_sub1, class611);
		((Class106_Sub5) this).aClass84_Sub1_8706 = class84_sub1;
		((Class106_Sub5) this).anInt8704 = 0;
		for (int i = 0; i < 256; i++) {
			Class100_Sub1 class100_sub1 = class100_sub1s[i];
			if (class100_sub1.anInt8670 > ((Class106_Sub5) this).anInt8704)
				((Class106_Sub5) this).anInt8704 = class100_sub1.anInt8670;
			if (class100_sub1.anInt8666 > ((Class106_Sub5) this).anInt8704)
				((Class106_Sub5) this).anInt8704 = class100_sub1.anInt8666;
		}
		((Class106_Sub5) this).anInt8709 = ((Class106_Sub5) this).anInt8704 * 16;
		if (bool) {
			byte[] is = new byte[(((Class106_Sub5) this).anInt8709 * ((Class106_Sub5) this).anInt8709)];
			for (int i = 0; i < 256; i++) {
				Class100_Sub1 class100_sub1 = class100_sub1s[i];
				int i_6_ = class100_sub1.anInt8670;
				int i_7_ = class100_sub1.anInt8666;
				int i_8_ = i % 16 * ((Class106_Sub5) this).anInt8704;
				int i_9_ = i / 16 * ((Class106_Sub5) this).anInt8704;
				int i_10_ = i_9_ * ((Class106_Sub5) this).anInt8709 + i_8_;
				int i_11_ = 0;
				if (class100_sub1.aByteArray8665 == null) {
					byte[] is_12_ = class100_sub1.aByteArray8672;
					for (int i_13_ = 0; i_13_ < i_6_; i_13_++) {
						for (int i_14_ = 0; i_14_ < i_7_; i_14_++)
							is[i_10_++] = (byte) (is_12_[i_11_++] == 0 ? 0 : -1);
						i_10_ += ((Class106_Sub5) this).anInt8709 - i_7_;
					}
				} else {
					byte[] is_15_ = class100_sub1.aByteArray8665;
					for (int i_16_ = 0; i_16_ < i_6_; i_16_++) {
						for (int i_17_ = 0; i_17_ < i_7_; i_17_++)
							is[i_10_++] = is_15_[i_11_++];
						i_10_ += ((Class106_Sub5) this).anInt8709 - i_7_;
					}
				}
			}
			int[] is_18_ = new int[is.length];
			for (int i = 0; i < is.length; i++)
				is_18_[i] = is[i] << 24 | 0xffffff;
			((Class106_Sub5) this).anInterface39_8708 = class84_sub1.method14823(((Class106_Sub5) this).anInt8709, ((Class106_Sub5) this).anInt8709, false, is_18_);
		} else {
			int[] is = new int[(((Class106_Sub5) this).anInt8709 * ((Class106_Sub5) this).anInt8709)];
			for (int i = 0; i < 256; i++) {
				Class100_Sub1 class100_sub1 = class100_sub1s[i];
				int[] is_19_ = class100_sub1.anIntArray8673;
				byte[] is_20_ = class100_sub1.aByteArray8665;
				byte[] is_21_ = class100_sub1.aByteArray8672;
				int i_22_ = class100_sub1.anInt8670;
				int i_23_ = class100_sub1.anInt8666;
				int i_24_ = i % 16 * ((Class106_Sub5) this).anInt8704;
				int i_25_ = i / 16 * ((Class106_Sub5) this).anInt8704;
				int i_26_ = i_25_ * ((Class106_Sub5) this).anInt8709 + i_24_;
				int i_27_ = 0;
				if (is_20_ != null) {
					for (int i_28_ = 0; i_28_ < i_22_; i_28_++) {
						for (int i_29_ = 0; i_29_ < i_23_; i_29_++) {
							is[i_26_++] = (is_20_[i_27_] << 24 | is_19_[is_21_[i_27_] & 0xff]);
							i_27_++;
						}
						i_26_ += ((Class106_Sub5) this).anInt8709 - i_23_;
					}
				} else {
					for (int i_30_ = 0; i_30_ < i_22_; i_30_++) {
						for (int i_31_ = 0; i_31_ < i_23_; i_31_++) {
							int i_32_;
							if ((i_32_ = is_21_[i_27_++]) != 0)
								is[i_26_++] = ~0xffffff | is_19_[i_32_ & 0xff];
							else
								i_26_++;
						}
						i_26_ += ((Class106_Sub5) this).anInt8709 - i_23_;
					}
				}
			}
			((Class106_Sub5) this).anInterface39_8708 = class84_sub1.method14823(((Class106_Sub5) this).anInt8709, ((Class106_Sub5) this).anInt8709, false, is);
		}
		((Class106_Sub5) this).anInterface39_8708.method189(Class378.aClass378_5630);
		((Class106_Sub5) this).anInterface41_8705 = class84_sub1.method14973(false);
		((Class106_Sub5) this).anInterface41_8705.method289(20480, 20);
		ByteBuffer bytebuffer = ((Class106_Sub5) this).aClass84_Sub1_8706.aByteBuffer8876;
		bytebuffer.clear();
		float f = (((Class106_Sub5) this).anInterface39_8708.method252((float) ((Class106_Sub5) this).anInt8709) / (float) ((Class106_Sub5) this).anInt8709);
		float f_33_ = (((Class106_Sub5) this).anInterface39_8708.method253((float) ((Class106_Sub5) this).anInt8709) / (float) ((Class106_Sub5) this).anInt8709);
		for (int i = 0; i < 256; i++) {
			Class100_Sub1 class100_sub1 = class100_sub1s[i];
			int i_34_ = class100_sub1.anInt8670;
			int i_35_ = class100_sub1.anInt8666;
			int i_36_ = class100_sub1.anInt8669;
			int i_37_ = class100_sub1.anInt8667;
			float f_38_ = (float) (i % 16 * ((Class106_Sub5) this).anInt8704);
			float f_39_ = (float) (i / 16 * ((Class106_Sub5) this).anInt8704);
			float f_40_ = f_38_ * f;
			float f_41_ = f_39_ * f_33_;
			float f_42_ = (f_38_ + (float) i_35_) * f;
			float f_43_ = (f_39_ + (float) i_34_) * f_33_;
			bytebuffer.putFloat((float) i_37_);
			bytebuffer.putFloat((float) i_36_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_40_);
			bytebuffer.putFloat(f_41_);
			bytebuffer.putFloat((float) i_37_);
			bytebuffer.putFloat((float) (i_36_ + i_34_));
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_40_);
			bytebuffer.putFloat(f_43_);
			bytebuffer.putFloat((float) (i_37_ + i_35_));
			bytebuffer.putFloat((float) (i_36_ + i_34_));
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_42_);
			bytebuffer.putFloat(f_43_);
			bytebuffer.putFloat((float) (i_37_ + i_35_));
			bytebuffer.putFloat((float) i_36_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_42_);
			bytebuffer.putFloat(f_41_);
		}
		((Class106_Sub5) this).anInterface41_8705.method302(0, bytebuffer.position(), ((Class106_Sub5) this).aClass84_Sub1_8706.aLong8893);
		for (int i = 0; i < 256; i++) {
			Class100_Sub1 class100_sub1 = class100_sub1s[i];
			((Class106_Sub5) this).aByteArray8707[i * 2] = (byte) class100_sub1.anInt8667;
			((Class106_Sub5) this).aByteArray8707[i * 2 + 1] = (byte) class100_sub1.anInt8669;
		}
	}

	void method2549(char c, int i, int i_44_, int i_45_, boolean bool, Class134 class134, int i_46_, int i_47_) {
		/* empty */
	}

	void method2548(char c, int i, int i_48_, int i_49_, boolean bool, Class134 class134, int i_50_, int i_51_) {
		/* empty */
	}

	void method2546(char c, int i, int i_52_, int i_53_, boolean bool, Class134 class134, int i_54_, int i_55_) {
		/* empty */
	}

	void method2550(char c, int i, int i_56_, int i_57_, boolean bool, Class134 class134, int i_58_, int i_59_) {
		/* empty */
	}
}
