/* Class171_Sub1_Sub2_Sub1 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jagdx.IDirect3DDevice;
import jagdx.IUnknown;

public class Class171_Sub1_Sub2_Sub1 extends Class171_Sub1_Sub2 {
	int anInt10937;
	static final int anInt10938 = 16;
	int anInt10939;
	Interface24[] anInterface24Array10940;
	int anInt10941;
	boolean aBool10942;
	Interface26 anInterface26_10943 = null;
	Class84_Sub1_Sub2 aClass84_Sub1_Sub2_10944;

	public void method250() {
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method54();
		for (int i = 0; i < (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940).length; i++) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] != null)
				((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i].method54();
		}
	}

	public int method3754() {
		return ((Class171_Sub1_Sub2_Sub1) this).anInt10937;
	}

	boolean method17263(long l) {
		return Class29.method972(IDirect3DDevice.SetDepthStencilSurface(((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431, l));
	}

	public void method14733(Interface7 interface7) {
		Interface26 interface26 = (Interface26) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface26.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface26.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface26.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface26.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= 0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = interface26;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(interface26.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= ~0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	void method17264() {
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method153();
		for (int i = 0; i < (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940).length; i++) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] != null)
				((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i].method153();
		}
	}

	boolean method17265(int i, long l) {
		return Class29.method972(IDirect3DDevice.SetRenderTarget(((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431, i, l));
	}

	boolean method249() {
		for (int i = 0; i < 4; i++) {
			Interface24 interface24 = ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i];
			if (interface24 != null) {
				long l = interface24.method64();
				method17265(i, l);
			}
		}
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			method17263(((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method64());
		((Class171_Sub1_Sub2_Sub1) this).aBool10942 = true;
		return super.method249();
	}

	public boolean method14731() {
		return (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0] != null);
	}

	public void method14743(int i, Interface11 interface11) {
		int i_0_ = 1 << i;
		Interface24 interface24 = (Interface24) interface11;
		if (interface11 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface24.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface24.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface24.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface24.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= i_0_;
			((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] = interface24;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17265(i, interface24.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= i_0_ ^ 0xffffffff;
			((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17265(i, 0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	public int method3758() {
		return ((Class171_Sub1_Sub2_Sub1) this).anInt10937;
	}

	public void method14738(int i, int i_1_, int i_2_, int i_3_, int i_4_, int i_5_, boolean bool, boolean bool_6_) {
		if (bool) {
			long l = (IDirect3DDevice.GetRenderTarget((((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431), 0));
			IDirect3DDevice.StretchRect((((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431), ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0].method64(), i, i_1_, i_2_, i_3_, l, i_4_, i_5_, i_2_, i_3_, 0);
			IUnknown.Release(l);
		}
	}

	public void method54() {
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method54();
		for (int i = 0; i < (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940).length; i++) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] != null)
				((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i].method54();
		}
	}

	public void method14735(Interface7 interface7) {
		Interface26 interface26 = (Interface26) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface26.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface26.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface26.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface26.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= 0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = interface26;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(interface26.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= ~0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	public void finalize() throws Throwable {
		method17264();
		super.finalize();
	}

	Class171_Sub1_Sub2_Sub1(Class84_Sub1_Sub2 class84_sub1_sub2) {
		super((Class84_Sub1) class84_sub1_sub2);
		((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940 = new Interface24[4];
		((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944 = class84_sub1_sub2;
	}

	public int method3757() {
		return ((Class171_Sub1_Sub2_Sub1) this).anInt10937;
	}

	public int method3759() {
		return ((Class171_Sub1_Sub2_Sub1) this).anInt10941;
	}

	void method17266() throws Throwable {
		method17264();
		super.finalize();
	}

	public void method14734(Interface7 interface7) {
		Interface26 interface26 = (Interface26) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface26.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface26.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface26.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface26.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= 0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = interface26;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(interface26.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= ~0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	public void method14736(Interface7 interface7) {
		Interface26 interface26 = (Interface26) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface26.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface26.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface26.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface26.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= 0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = interface26;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(interface26.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= ~0x10;
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17263(0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	public boolean method14737() {
		return (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0] != null);
	}

	public boolean method14730() {
		return (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0] != null);
	}

	public boolean method14739() {
		return (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0] != null);
	}

	boolean method18() {
		for (int i = 0; i < 4; i++) {
			Interface24 interface24 = ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i];
			if (interface24 != null) {
				long l = interface24.method64();
				method17265(i, l);
			}
		}
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			method17263(((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method64());
		((Class171_Sub1_Sub2_Sub1) this).aBool10942 = true;
		return super.method249();
	}

	boolean method3760() {
		for (int i = 1; i < 4; i++) {
			Interface24 interface24 = ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i];
			if (interface24 != null)
				method17265(i, 0L);
		}
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			method17263(0L);
		((Class171_Sub1_Sub2_Sub1) this).aBool10942 = false;
		return true;
	}

	public void method14740(int i, int i_7_, int i_8_, int i_9_, int i_10_, int i_11_, boolean bool, boolean bool_12_) {
		if (bool) {
			long l = (IDirect3DDevice.GetRenderTarget((((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431), 0));
			IDirect3DDevice.StretchRect((((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431), ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0].method64(), i, i_7_, i_8_, i_9_, l, i_10_, i_11_, i_8_, i_9_, 0);
			IUnknown.Release(l);
		}
	}

	public void method14741(int i, int i_13_, int i_14_, int i_15_, int i_16_, int i_17_, boolean bool, boolean bool_18_) {
		if (bool) {
			long l = (IDirect3DDevice.GetRenderTarget((((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431), 0));
			IDirect3DDevice.StretchRect((((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431), ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[0].method64(), i, i_13_, i_14_, i_15_, l, i_16_, i_17_, i_14_, i_15_, 0);
			IUnknown.Release(l);
		}
	}

	public void method247() {
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method54();
		for (int i = 0; i < (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940).length; i++) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] != null)
				((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i].method54();
		}
	}

	public void method248() {
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method54();
		for (int i = 0; i < (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940).length; i++) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] != null)
				((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i].method54();
		}
	}

	public int method3755() {
		return ((Class171_Sub1_Sub2_Sub1) this).anInt10941;
	}

	boolean method3756() {
		for (int i = 1; i < 4; i++) {
			Interface24 interface24 = ((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i];
			if (interface24 != null)
				method17265(i, 0L);
		}
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			method17263(0L);
		((Class171_Sub1_Sub2_Sub1) this).aBool10942 = false;
		return true;
	}

	void method17267() throws Throwable {
		method17264();
		super.finalize();
	}

	public void method14742(int i, Interface11 interface11) {
		int i_19_ = 1 << i;
		Interface24 interface24 = (Interface24) interface11;
		if (interface11 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface24.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface24.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface24.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface24.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= i_19_;
			((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] = interface24;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17265(i, interface24.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= i_19_ ^ 0xffffffff;
			((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17265(i, 0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	public void method14732(int i, Interface11 interface11) {
		int i_20_ = 1 << i;
		Interface24 interface24 = (Interface24) interface11;
		if (interface11 != null) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 != 0) {
				if ((((Class171_Sub1_Sub2_Sub1) this).anInt10937 != interface24.method51()) || (((Class171_Sub1_Sub2_Sub1) this).anInt10941 != interface24.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = interface24.method49();
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = interface24.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 |= i_20_;
			((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] = interface24;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17265(i, interface24.method64());
		} else {
			((Class171_Sub1_Sub2_Sub1) this).anInt10939 &= i_20_ ^ 0xffffffff;
			((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] = null;
			if (((Class171_Sub1_Sub2_Sub1) this).aBool10942)
				method17265(i, 0L);
			if (((Class171_Sub1_Sub2_Sub1) this).anInt10939 == 0) {
				((Class171_Sub1_Sub2_Sub1) this).anInt10941 = 0;
				((Class171_Sub1_Sub2_Sub1) this).anInt10937 = 0;
			}
		}
	}

	boolean method17268(long l) {
		return Class29.method972(IDirect3DDevice.SetDepthStencilSurface(((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431, l));
	}

	boolean method17269(long l) {
		return Class29.method972(IDirect3DDevice.SetDepthStencilSurface(((Class84_Sub1_Sub2) (((Class171_Sub1_Sub2_Sub1) this).aClass84_Sub1_Sub2_10944)).aLong10431, l));
	}

	void method17270() {
		if (((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943 != null)
			((Class171_Sub1_Sub2_Sub1) this).anInterface26_10943.method153();
		for (int i = 0; i < (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940).length; i++) {
			if (((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i] != null)
				((Class171_Sub1_Sub2_Sub1) this).anInterface24Array10940[i].method153();
		}
	}
}
