/* Class144_Sub2_Sub3_Sub2 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jaggl.OpenGL;

public class Class144_Sub2_Sub3_Sub2 extends Class144_Sub2_Sub3
{
    int anInt11744;
    Class151_Sub2_Sub2 aClass151_Sub2_Sub2_11745;
    int anInt11746;
    int anInt11747;
    static final int anInt11748 = 16;
    int anInt11749;
    Interface52[] anInterface52Array11750 = new Interface52[4];
    int anInt11751;
    Interface52 anInterface52_11752;
    
    public int method1947() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11747;
    }
    
    public int method1943() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11747;
    }
    
    public int method1944() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
    }
    
    public void method8672(int i, Interface18 interface18) {
	int i_0_ = 1 << i;
	Interface52 interface52 = (Interface52) interface18;
	if (interface18 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= i_0_;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i]
		= interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= i_0_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i] = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -17489))
	    method10633(i);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= i_0_;
    }
    
    public void method8671(Interface16 interface16) {
	Interface52 interface52 = (Interface52) interface16;
	if (interface16 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= 0x10;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 = interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= ~0x10;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -28614))
	    method10634();
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= 0x10;
    }
    
    void method10633(int i) {
	Interface52 interface52
	    = ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i];
	if (interface52 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface52.method44(36064 + i);
    }
    
    void method10634() {
	if (((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752
		.method44(36096);
    }
    
    public int method1951() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
    }
    
    boolean method320() {
	OpenGL.glBindFramebufferEXT(36160, (((Class144_Sub2_Sub3_Sub2) this)
					    .anInt11746));
	for (int i = 0; i < 4; i++) {
	    if ((((Class144_Sub2_Sub3_Sub2) this).anInt11744 & 1 << i) != 0)
		method10633(i);
	}
	if ((((Class144_Sub2_Sub3_Sub2) this).anInt11744 & 0x10) != 0)
	    method10634();
	((Class144_Sub2_Sub3_Sub2) this).anInt11744 = 0;
	return super.method320();
    }
    
    boolean method1945() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    void method10635(int i) {
	Interface52 interface52
	    = ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i];
	if (interface52 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface52.method44(36064 + i);
    }
    
    boolean method1952() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    public void finalize() throws Throwable {
	super.finalize();
	method80();
    }
    
    public int method1946() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11747;
    }
    
    public int method1942() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11747;
    }
    
    Class144_Sub2_Sub3_Sub2(Class151_Sub2_Sub2 class151_sub2_sub2) {
	super((Class151_Sub2) class151_sub2_sub2);
	((Class144_Sub2_Sub3_Sub2) this).aClass151_Sub2_Sub2_11745
	    = class151_sub2_sub2;
	int[] is = new int[1];
	if (!((Class144_Sub2_Sub3_Sub2) this).aClass151_Sub2_Sub2_11745
	     .aBool9065)
	    throw new RuntimeException("");
	OpenGL.glGenFramebuffersEXT(1, is, 0);
	((Class144_Sub2_Sub3_Sub2) this).anInt11746 = is[0];
    }
    
    public int method1948() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11747;
    }
    
    public int method1949() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
    }
    
    public void method8676(int i, Interface18 interface18) {
	int i_1_ = 1 << i;
	Interface52 interface52 = (Interface52) interface18;
	if (interface18 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= i_1_;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i]
		= interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= i_1_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i] = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -4366))
	    method10633(i);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= i_1_;
    }
    
    public int method1950() {
	return ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
    }
    
    void method10636() throws Throwable {
	super.finalize();
	method80();
    }
    
    public boolean method8673() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    public void method8677(int i, Interface18 interface18) {
	int i_2_ = 1 << i;
	Interface52 interface52 = (Interface52) interface18;
	if (interface18 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= i_2_;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i]
		= interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= i_2_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i] = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -9772))
	    method10633(i);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= i_2_;
    }
    
    public boolean method8681() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    public void method8679(Interface16 interface16) {
	Interface52 interface52 = (Interface52) interface16;
	if (interface16 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= 0x10;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 = interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= ~0x10;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -12574))
	    method10634();
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= 0x10;
    }
    
    public void method8680(Interface16 interface16) {
	Interface52 interface52 = (Interface52) interface16;
	if (interface16 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= 0x10;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 = interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= ~0x10;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -16724))
	    method10634();
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= 0x10;
    }
    
    public void method8675(int i, Interface18 interface18) {
	int i_3_ = 1 << i;
	Interface52 interface52 = (Interface52) interface18;
	if (interface18 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= i_3_;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i]
		= interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= i_3_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i] = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -3989))
	    method10633(i);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= i_3_;
    }
    
    public void method8678(int i, Interface18 interface18) {
	int i_4_ = 1 << i;
	Interface52 interface52 = (Interface52) interface18;
	if (interface18 != null) {
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 != 0) {
		if ((((Class144_Sub2_Sub3_Sub2) this).anInt11747
		     != interface52.method1())
		    || (((Class144_Sub2_Sub3_Sub2) this).anInt11751
			!= interface52.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751
		    = interface52.method38();
		((Class144_Sub2_Sub3_Sub2) this).anInt11747
		    = interface52.method1();
		method10200();
	    }
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 |= i_4_;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i]
		= interface52;
	} else {
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11749 &= i_4_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i] = null;
	    if (((Class144_Sub2_Sub3_Sub2) this).anInt11749 == 0) {
		((Class144_Sub2_Sub3_Sub2) this).anInt11751 = 0;
		((Class144_Sub2_Sub3_Sub2) this).anInt11747 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub3_Sub2) this)
			.aClass151_Sub2_Sub2_11745.method2302((short) -10795))
	    method10633(i);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11744 |= i_4_;
    }
    
    public boolean method8674() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    public boolean method8685() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    boolean method321() {
	OpenGL.glBindFramebufferEXT(36160, (((Class144_Sub2_Sub3_Sub2) this)
					    .anInt11746));
	for (int i = 0; i < 4; i++) {
	    if ((((Class144_Sub2_Sub3_Sub2) this).anInt11744 & 1 << i) != 0)
		method10633(i);
	}
	if ((((Class144_Sub2_Sub3_Sub2) this).anInt11744 & 0x10) != 0)
	    method10634();
	((Class144_Sub2_Sub3_Sub2) this).anInt11744 = 0;
	return super.method320();
    }
    
    public void method80() {
	if (((Class144_Sub2_Sub3_Sub2) this).anInt11746 != 0) {
	    ((Class144_Sub2_Sub3_Sub2) this).aClass151_Sub2_Sub2_11745
		.method10220(((Class144_Sub2_Sub3_Sub2) this).anInt11746);
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11746 = 0;
	}
    }
    
    public void method8684(int i, int i_5_, int i_6_, int i_7_, int i_8_,
			   int i_9_, boolean bool, boolean bool_10_) {
	if (bool | bool_10_) {
	    int i_11_ = ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
	    int i_12_ = ((Class144_Sub2_Sub3_Sub2) this)
			    .aClass151_Sub2_Sub2_11745.method2302
			    ((short) -26719).method1944();
	    int i_13_ = 0;
	    if (bool_10_)
		i_13_ |= 0x100;
	    if (bool)
		i_13_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008,
					(((Class144_Sub2_Sub3_Sub2) this)
					 .anInt11746));
	    OpenGL.glBlitFramebufferEXT(i, i_11_ - i_5_ - i_7_, i + i_6_,
					i_11_ - i_5_, i_8_,
					i_12_ - i_9_ - i_7_, i_8_ + i_6_,
					i_12_ - i_9_, i_13_, 9728);
	    OpenGL.glBindFramebufferEXT(36008, 0);
	}
    }
    
    public void method8682(int i, int i_14_, int i_15_, int i_16_, int i_17_,
			   int i_18_, boolean bool, boolean bool_19_) {
	if (bool | bool_19_) {
	    int i_20_ = ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
	    int i_21_ = ((Class144_Sub2_Sub3_Sub2) this)
			    .aClass151_Sub2_Sub2_11745.method2302
			    ((short) -23828).method1944();
	    int i_22_ = 0;
	    if (bool_19_)
		i_22_ |= 0x100;
	    if (bool)
		i_22_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008,
					(((Class144_Sub2_Sub3_Sub2) this)
					 .anInt11746));
	    OpenGL.glBlitFramebufferEXT(i, i_20_ - i_14_ - i_16_, i + i_15_,
					i_20_ - i_14_, i_17_,
					i_21_ - i_18_ - i_16_, i_17_ + i_15_,
					i_21_ - i_18_, i_22_, 9728);
	    OpenGL.glBindFramebufferEXT(36008, 0);
	}
    }
    
    public void method314() {
	if (((Class144_Sub2_Sub3_Sub2) this).anInt11746 != 0) {
	    ((Class144_Sub2_Sub3_Sub2) this).aClass151_Sub2_Sub2_11745
		.method10220(((Class144_Sub2_Sub3_Sub2) this).anInt11746);
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11746 = 0;
	}
    }
    
    public void method316() {
	if (((Class144_Sub2_Sub3_Sub2) this).anInt11746 != 0) {
	    ((Class144_Sub2_Sub3_Sub2) this).aClass151_Sub2_Sub2_11745
		.method10220(((Class144_Sub2_Sub3_Sub2) this).anInt11746);
	    ((Class144_Sub2_Sub3_Sub2) this).anInt11746 = 0;
	}
    }
    
    public void method8670(int i, int i_23_, int i_24_, int i_25_, int i_26_,
			   int i_27_, boolean bool, boolean bool_28_) {
	if (bool | bool_28_) {
	    int i_29_ = ((Class144_Sub2_Sub3_Sub2) this).anInt11751;
	    int i_30_ = ((Class144_Sub2_Sub3_Sub2) this)
			    .aClass151_Sub2_Sub2_11745.method2302
			    ((short) -3214).method1944();
	    int i_31_ = 0;
	    if (bool_28_)
		i_31_ |= 0x100;
	    if (bool)
		i_31_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008,
					(((Class144_Sub2_Sub3_Sub2) this)
					 .anInt11746));
	    OpenGL.glBlitFramebufferEXT(i, i_29_ - i_23_ - i_25_, i + i_24_,
					i_29_ - i_23_, i_26_,
					i_30_ - i_27_ - i_25_, i_26_ + i_24_,
					i_30_ - i_27_, i_31_, 9728);
	    OpenGL.glBindFramebufferEXT(36008, 0);
	}
    }
    
    void method10637(int i) {
	Interface52 interface52
	    = ((Class144_Sub2_Sub3_Sub2) this).anInterface52Array11750[i];
	if (interface52 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface52.method44(36064 + i);
    }
    
    void method10638() throws Throwable {
	super.finalize();
	method80();
    }
    
    public boolean method8683() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    void method10639() {
	if (((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class144_Sub2_Sub3_Sub2) this).anInterface52_11752
		.method44(36096);
    }
}
