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

public class Class144_Sub2_Sub1 extends Class144_Sub2
{
    int anInt11058;
    int anInt11059;
    int anInt11060;
    Interface11 anInterface11_11061;
    int anInt11062;
    static final int anInt11063 = 16;
    int anInt11064;
    Class151_Sub3 aClass151_Sub3_11065;
    Interface11[] anInterface11Array11066 = new Interface11[4];
    
    void method10150() {
	if (((Class144_Sub2_Sub1) this).anInterface11_11061 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class144_Sub2_Sub1) this).anInterface11_11061.method44(36096);
    }
    
    public int method1943() {
	return ((Class144_Sub2_Sub1) this).anInt11058;
    }
    
    public int method1944() {
	return ((Class144_Sub2_Sub1) this).anInt11062;
    }
    
    boolean method1945() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    public void method8671(Interface16 interface16) {
	Interface11 interface11 = (Interface11) interface16;
	if (interface16 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | 0x10) != 16) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -6879))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= 0x10;
	    ((Class144_Sub2_Sub1) this).anInterface11_11061 = interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= ~0x10;
	    ((Class144_Sub2_Sub1) this).anInterface11_11061 = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -16320))
	    method10150();
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= 0x10;
    }
    
    void method10151(int i) {
	Interface11 interface11
	    = ((Class144_Sub2_Sub1) this).anInterface11Array11066[i];
	if (interface11 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface11.method44(36064 + i);
    }
    
    public boolean method8683() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    public boolean method8673() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    boolean method320() {
	OpenGL.glBindFramebufferEXT(36160,
				    ((Class144_Sub2_Sub1) this).anInt11059);
	for (int i = 0; i < 4; i++) {
	    if ((((Class144_Sub2_Sub1) this).anInt11064 & 1 << i) != 0)
		method10151(i);
	}
	if ((((Class144_Sub2_Sub1) this).anInt11064 & 0x10) != 0)
	    method10150();
	((Class144_Sub2_Sub1) this).anInt11064 = 0;
	((Class144_Sub2_Sub1) this).aClass151_Sub3_11065.method8616();
	return true;
    }
    
    public void method316() {
	if (((Class144_Sub2_Sub1) this).anInt11059 != 0) {
	    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
		.method8612(((Class144_Sub2_Sub1) this).anInt11059);
	    ((Class144_Sub2_Sub1) this).anInt11059 = 0;
	}
    }
    
    void method10152(int i) {
	OpenGL.glDrawBuffer(36064 + i);
    }
    
    void method10153(int i) {
	OpenGL.glDrawBuffer(36064 + i);
    }
    
    public void method80() {
	if (((Class144_Sub2_Sub1) this).anInt11059 != 0) {
	    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
		.method8612(((Class144_Sub2_Sub1) this).anInt11059);
	    ((Class144_Sub2_Sub1) this).anInt11059 = 0;
	}
    }
    
    public void finalize() throws Throwable {
	super.finalize();
	method80();
    }
    
    void method10154(int i) {
	Interface11 interface11
	    = ((Class144_Sub2_Sub1) this).anInterface11Array11066[i];
	if (interface11 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface11.method44(36064 + i);
    }
    
    public int method1942() {
	return ((Class144_Sub2_Sub1) this).anInt11058;
    }
    
    public int method1946() {
	return ((Class144_Sub2_Sub1) this).anInt11058;
    }
    
    public void method8678(int i, Interface18 interface18) {
	int i_0_ = 1 << i;
	Interface11 interface11 = (Interface11) interface18;
	if (interface18 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | i_0_) != i_0_) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -3809))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= i_0_;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i]
		= interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= i_0_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i] = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -7494))
	    method10151(i);
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= i_0_;
    }
    
    public int method1949() {
	return ((Class144_Sub2_Sub1) this).anInt11062;
    }
    
    public int method1948() {
	return ((Class144_Sub2_Sub1) this).anInt11058;
    }
    
    public int method1951() {
	return ((Class144_Sub2_Sub1) this).anInt11062;
    }
    
    public void method8675(int i, Interface18 interface18) {
	int i_1_ = 1 << i;
	Interface11 interface11 = (Interface11) interface18;
	if (interface18 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | i_1_) != i_1_) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -18598))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= i_1_;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i]
		= interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= i_1_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i] = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -12403))
	    method10151(i);
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= i_1_;
    }
    
    public void method8676(int i, Interface18 interface18) {
	int i_2_ = 1 << i;
	Interface11 interface11 = (Interface11) interface18;
	if (interface18 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | i_2_) != i_2_) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -30184))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= i_2_;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i]
		= interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= i_2_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i] = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -26297))
	    method10151(i);
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= i_2_;
    }
    
    public void method8677(int i, Interface18 interface18) {
	int i_3_ = 1 << i;
	Interface11 interface11 = (Interface11) interface18;
	if (interface18 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | i_3_) != i_3_) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -9191))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= i_3_;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i]
		= interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= i_3_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i] = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -26648))
	    method10151(i);
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= i_3_;
    }
    
    void method10155(int i) {
	OpenGL.glDrawBuffer(36064 + i);
    }
    
    public void method8679(Interface16 interface16) {
	Interface11 interface11 = (Interface11) interface16;
	if (interface16 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | 0x10) != 16) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -5838))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= 0x10;
	    ((Class144_Sub2_Sub1) this).anInterface11_11061 = interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= ~0x10;
	    ((Class144_Sub2_Sub1) this).anInterface11_11061 = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -18227))
	    method10150();
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= 0x10;
    }
    
    public void method8680(Interface16 interface16) {
	Interface11 interface11 = (Interface11) interface16;
	if (interface16 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | 0x10) != 16) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -1127))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= 0x10;
	    ((Class144_Sub2_Sub1) this).anInterface11_11061 = interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= ~0x10;
	    ((Class144_Sub2_Sub1) this).anInterface11_11061 = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -23524))
	    method10150();
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= 0x10;
    }
    
    boolean method321() {
	OpenGL.glBindFramebufferEXT(36160,
				    ((Class144_Sub2_Sub1) this).anInt11059);
	for (int i = 0; i < 4; i++) {
	    if ((((Class144_Sub2_Sub1) this).anInt11064 & 1 << i) != 0)
		method10151(i);
	}
	if ((((Class144_Sub2_Sub1) this).anInt11064 & 0x10) != 0)
	    method10150();
	((Class144_Sub2_Sub1) this).anInt11064 = 0;
	((Class144_Sub2_Sub1) this).aClass151_Sub3_11065.method8616();
	return true;
    }
    
    public void method8672(int i, Interface18 interface18) {
	int i_4_ = 1 << i;
	Interface11 interface11 = (Interface11) interface18;
	if (interface18 != null) {
	    if ((((Class144_Sub2_Sub1) this).anInt11060 | i_4_) != i_4_) {
		if ((((Class144_Sub2_Sub1) this).anInt11058
		     != interface11.method1())
		    || (((Class144_Sub2_Sub1) this).anInt11062
			!= interface11.method38()))
		    throw new RuntimeException();
	    } else {
		((Class144_Sub2_Sub1) this).anInt11062
		    = interface11.method38();
		((Class144_Sub2_Sub1) this).anInt11058 = interface11.method1();
		if (this == ((Class144_Sub2_Sub1) this)
				.aClass151_Sub3_11065
				.method2302((short) -31916))
		    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method8622();
	    }
	    ((Class144_Sub2_Sub1) this).anInt11060 |= i_4_;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i]
		= interface11;
	} else {
	    ((Class144_Sub2_Sub1) this).anInt11060 &= i_4_ ^ 0xffffffff;
	    ((Class144_Sub2_Sub1) this).anInterface11Array11066[i] = null;
	    if (((Class144_Sub2_Sub1) this).anInt11060 == 0) {
		((Class144_Sub2_Sub1) this).anInt11062 = 0;
		((Class144_Sub2_Sub1) this).anInt11058 = 0;
	    }
	}
	if (this == ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
			.method2302((short) -19448))
	    method10151(i);
	else
	    ((Class144_Sub2_Sub1) this).anInt11064 |= 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;
    }
    
    public int method1947() {
	return ((Class144_Sub2_Sub1) this).anInt11058;
    }
    
    boolean method1952() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    public int method1950() {
	return ((Class144_Sub2_Sub1) this).anInt11062;
    }
    
    public void method8682(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_Sub1) this).anInt11062;
	    int i_12_
		= ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065.method2302
		      ((short) -29885).method1944();
	    int i_13_ = 0;
	    if (bool_10_)
		i_13_ |= 0x100;
	    if (bool)
		i_13_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008, (((Class144_Sub2_Sub1) this)
						.anInt11059));
	    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 method314() {
	if (((Class144_Sub2_Sub1) this).anInt11059 != 0) {
	    ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065
		.method8612(((Class144_Sub2_Sub1) this).anInt11059);
	    ((Class144_Sub2_Sub1) this).anInt11059 = 0;
	}
    }
    
    Class144_Sub2_Sub1(Class151_Sub3 class151_sub3) {
	if (!((Class151_Sub3) class151_sub3).aBool9364)
	    throw new IllegalStateException("");
	((Class144_Sub2_Sub1) this).aClass151_Sub3_11065 = class151_sub3;
	int[] is = new int[1];
	OpenGL.glGenFramebuffersEXT(1, is, 0);
	((Class144_Sub2_Sub1) this).anInt11059 = is[0];
    }
    
    void method10156() throws Throwable {
	super.finalize();
	method80();
    }
    
    void method10157() {
	if (((Class144_Sub2_Sub1) this).anInterface11_11061 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class144_Sub2_Sub1) this).anInterface11_11061.method44(36096);
    }
    
    public void method8684(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_Sub1) this).anInt11062;
	    int i_21_
		= ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065.method2302
		      ((short) -24764).method1944();
	    int i_22_ = 0;
	    if (bool_19_)
		i_22_ |= 0x100;
	    if (bool)
		i_22_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008, (((Class144_Sub2_Sub1) this)
						.anInt11059));
	    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);
	}
    }
    
    void method10158(int i) {
	Interface11 interface11
	    = ((Class144_Sub2_Sub1) this).anInterface11Array11066[i];
	if (interface11 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface11.method44(36064 + i);
    }
    
    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_Sub1) this).anInt11062;
	    int i_30_
		= ((Class144_Sub2_Sub1) this).aClass151_Sub3_11065.method2302
		      ((short) -28134).method1944();
	    int i_31_ = 0;
	    if (bool_28_)
		i_31_ |= 0x100;
	    if (bool)
		i_31_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008, (((Class144_Sub2_Sub1) this)
						.anInt11059));
	    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 method10159() throws Throwable {
	super.finalize();
	method80();
    }
    
    void method10160(int i) {
	OpenGL.glDrawBuffer(36064 + i);
    }
    
    void method10161(int i) {
	OpenGL.glDrawBuffer(36064 + i);
    }
    
    void method10162(int i) {
	OpenGL.glDrawBuffer(36064 + i);
    }
    
    public boolean method8681() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
}
