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

public class Class169_Sub2_Sub3_Sub1 extends Class169_Sub2_Sub3
{
    int anInt11070;
    Class87_Sub2_Sub2 aClass87_Sub2_Sub2_11071;
    int anInt11072;
    Interface21 anInterface21_11073;
    int anInt11074;
    int anInt11075;
    static final int anInt11076 = 16;
    int anInt11077;
    Interface21[] anInterface21Array11078 = new Interface21[4];
    
    public int method3829() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11072;
    }
    
    public int method3826() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11072;
    }
    
    public int method3836() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
    }
    
    public void method23() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInt11077 != 0) {
	    ((Class169_Sub2_Sub3_Sub1) this).aClass87_Sub2_Sub2_11071
		.method17483(((Class169_Sub2_Sub3_Sub1) this).anInt11077);
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11077 = 0;
	}
    }
    
    public int method3835() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
    }
    
    void method17585(int i) {
	Interface21 interface21
	    = ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i];
	if (interface21 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface21.method50(36064 + i);
    }
    
    void method17586() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073
		.method50(36096);
    }
    
    public boolean method15851() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    boolean method171() {
	OpenGL.glBindFramebufferEXT(36160, (((Class169_Sub2_Sub3_Sub1) this)
					    .anInt11077));
	for (int i = 0; i < 4; i++) {
	    if ((((Class169_Sub2_Sub3_Sub1) this).anInt11070 & 1 << i) != 0)
		method17585(i);
	}
	if ((((Class169_Sub2_Sub3_Sub1) this).anInt11070 & 0x10) != 0)
	    method17586();
	((Class169_Sub2_Sub3_Sub1) this).anInt11070 = 0;
	return super.method171();
    }
    
    boolean method3828() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    void method17587() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073
		.method50(36096);
    }
    
    public void method15850(int i, Interface5 interface5) {
	int i_0_ = 1 << i;
	Interface21 interface21 = (Interface21) interface5;
	if (interface5 != null) {
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 != 0) {
		if ((((Class169_Sub2_Sub3_Sub1) this).anInt11072
		     != interface21.method28())
		    || (((Class169_Sub2_Sub3_Sub1) this).anInt11074
			!= interface21.method26()))
		    throw new RuntimeException();
	    } else {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074
		    = interface21.method26();
		((Class169_Sub2_Sub3_Sub1) this).anInt11072
		    = interface21.method28();
		method16889();
	    }
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 |= i_0_;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i]
		= interface21;
	} else {
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 &= i_0_ ^ 0xffffffff;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i] = null;
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 == 0) {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074 = 0;
		((Class169_Sub2_Sub3_Sub1) this).anInt11072 = 0;
	    }
	}
	if (this == ((Class169_Sub2_Sub3_Sub1) this)
			.aClass87_Sub2_Sub2_11071.method2164(-888988672))
	    method17585(i);
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11070 |= i_0_;
    }
    
    boolean method3832() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    void method17588(int i) {
	Interface21 interface21
	    = ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i];
	if (interface21 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface21.method50(36064 + i);
    }
    
    public int method3830() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11072;
    }
    
    public int method3827() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
    }
    
    public int method3831() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
    }
    
    public void method15849(int i, int i_1_, int i_2_, int i_3_, int i_4_,
			    int i_5_, boolean bool, boolean bool_6_) {
	if (bool | bool_6_) {
	    int i_7_ = ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
	    int i_8_ = ((Class169_Sub2_Sub3_Sub1) this)
			   .aClass87_Sub2_Sub2_11071.method2164
			   (-564534691).method3836();
	    int i_9_ = 0;
	    if (bool_6_)
		i_9_ |= 0x100;
	    if (bool)
		i_9_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008,
					(((Class169_Sub2_Sub3_Sub1) this)
					 .anInt11077));
	    OpenGL.glBlitFramebufferEXT(i, i_7_ - i_1_ - i_3_, i + i_2_,
					i_7_ - i_1_, i_4_, i_8_ - i_5_ - i_3_,
					i_4_ + i_2_, i_8_ - i_5_, i_9_, 9728);
	    OpenGL.glBindFramebufferEXT(36008, 0);
	}
    }
    
    public int method3825() {
	return ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
    }
    
    public void method15854(Interface4 interface4) {
	Interface21 interface21 = (Interface21) interface4;
	if (interface4 != null) {
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 != 0) {
		if ((((Class169_Sub2_Sub3_Sub1) this).anInt11072
		     != interface21.method28())
		    || (((Class169_Sub2_Sub3_Sub1) this).anInt11074
			!= interface21.method26()))
		    throw new RuntimeException();
	    } else {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074
		    = interface21.method26();
		((Class169_Sub2_Sub3_Sub1) this).anInt11072
		    = interface21.method28();
		method16889();
	    }
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 |= 0x10;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 = interface21;
	} else {
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 &= ~0x10;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 = null;
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 == 0) {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074 = 0;
		((Class169_Sub2_Sub3_Sub1) this).anInt11072 = 0;
	    }
	}
	if (this == ((Class169_Sub2_Sub3_Sub1) this)
			.aClass87_Sub2_Sub2_11071.method2164(226981898))
	    method17586();
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11070 |= 0x10;
    }
    
    public boolean method15858() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    public void method15857(Interface4 interface4) {
	Interface21 interface21 = (Interface21) interface4;
	if (interface4 != null) {
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 != 0) {
		if ((((Class169_Sub2_Sub3_Sub1) this).anInt11072
		     != interface21.method28())
		    || (((Class169_Sub2_Sub3_Sub1) this).anInt11074
			!= interface21.method26()))
		    throw new RuntimeException();
	    } else {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074
		    = interface21.method26();
		((Class169_Sub2_Sub3_Sub1) this).anInt11072
		    = interface21.method28();
		method16889();
	    }
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 |= 0x10;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 = interface21;
	} else {
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 &= ~0x10;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 = null;
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 == 0) {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074 = 0;
		((Class169_Sub2_Sub3_Sub1) this).anInt11072 = 0;
	    }
	}
	if (this == ((Class169_Sub2_Sub3_Sub1) this)
			.aClass87_Sub2_Sub2_11071.method2164(-551706767))
	    method17586();
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11070 |= 0x10;
    }
    
    public void method15853(int i, Interface5 interface5) {
	int i_10_ = 1 << i;
	Interface21 interface21 = (Interface21) interface5;
	if (interface5 != null) {
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 != 0) {
		if ((((Class169_Sub2_Sub3_Sub1) this).anInt11072
		     != interface21.method28())
		    || (((Class169_Sub2_Sub3_Sub1) this).anInt11074
			!= interface21.method26()))
		    throw new RuntimeException();
	    } else {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074
		    = interface21.method26();
		((Class169_Sub2_Sub3_Sub1) this).anInt11072
		    = interface21.method28();
		method16889();
	    }
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 |= i_10_;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i]
		= interface21;
	} else {
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 &= i_10_ ^ 0xffffffff;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i] = null;
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 == 0) {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074 = 0;
		((Class169_Sub2_Sub3_Sub1) this).anInt11072 = 0;
	    }
	}
	if (this == ((Class169_Sub2_Sub3_Sub1) this)
			.aClass87_Sub2_Sub2_11071.method2164(299682769))
	    method17585(i);
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11070 |= i_10_;
    }
    
    boolean method3833() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    boolean method3834() {
	OpenGL.glBindFramebufferEXT(36160, 0);
	return true;
    }
    
    public void finalize() throws Throwable {
	super.finalize();
	method23();
    }
    
    public void method15856(int i, int i_11_, int i_12_, int i_13_, int i_14_,
			    int i_15_, boolean bool, boolean bool_16_) {
	if (bool | bool_16_) {
	    int i_17_ = ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
	    int i_18_ = ((Class169_Sub2_Sub3_Sub1) this)
			    .aClass87_Sub2_Sub2_11071.method2164
			    (-914386948).method3836();
	    int i_19_ = 0;
	    if (bool_16_)
		i_19_ |= 0x100;
	    if (bool)
		i_19_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008,
					(((Class169_Sub2_Sub3_Sub1) this)
					 .anInt11077));
	    OpenGL.glBlitFramebufferEXT(i, i_17_ - i_11_ - i_13_, i + i_12_,
					i_17_ - i_11_, i_14_,
					i_18_ - i_15_ - i_13_, i_14_ + i_12_,
					i_18_ - i_15_, i_19_, 9728);
	    OpenGL.glBindFramebufferEXT(36008, 0);
	}
    }
    
    public void method37() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInt11077 != 0) {
	    ((Class169_Sub2_Sub3_Sub1) this).aClass87_Sub2_Sub2_11071
		.method17483(((Class169_Sub2_Sub3_Sub1) this).anInt11077);
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11077 = 0;
	}
    }
    
    public void method15852(int i, int i_20_, int i_21_, int i_22_, int i_23_,
			    int i_24_, boolean bool, boolean bool_25_) {
	if (bool | bool_25_) {
	    int i_26_ = ((Class169_Sub2_Sub3_Sub1) this).anInt11074;
	    int i_27_ = ((Class169_Sub2_Sub3_Sub1) this)
			    .aClass87_Sub2_Sub2_11071.method2164
			    (-1181298208).method3836();
	    int i_28_ = 0;
	    if (bool_25_)
		i_28_ |= 0x100;
	    if (bool)
		i_28_ |= 0x4000;
	    OpenGL.glBindFramebufferEXT(36008,
					(((Class169_Sub2_Sub3_Sub1) this)
					 .anInt11077));
	    OpenGL.glBlitFramebufferEXT(i, i_26_ - i_20_ - i_22_, i + i_21_,
					i_26_ - i_20_, i_23_,
					i_27_ - i_24_ - i_22_, i_23_ + i_21_,
					i_27_ - i_24_, i_28_, 9728);
	    OpenGL.glBindFramebufferEXT(36008, 0);
	}
    }
    
    public void method173() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInt11077 != 0) {
	    ((Class169_Sub2_Sub3_Sub1) this).aClass87_Sub2_Sub2_11071
		.method17483(((Class169_Sub2_Sub3_Sub1) this).anInt11077);
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11077 = 0;
	}
    }
    
    boolean method172() {
	OpenGL.glBindFramebufferEXT(36160, (((Class169_Sub2_Sub3_Sub1) this)
					    .anInt11077));
	for (int i = 0; i < 4; i++) {
	    if ((((Class169_Sub2_Sub3_Sub1) this).anInt11070 & 1 << i) != 0)
		method17585(i);
	}
	if ((((Class169_Sub2_Sub3_Sub1) this).anInt11070 & 0x10) != 0)
	    method17586();
	((Class169_Sub2_Sub3_Sub1) this).anInt11070 = 0;
	return super.method171();
    }
    
    void method17589() throws Throwable {
	super.finalize();
	method23();
    }
    
    public boolean method15855() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    void method17590() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073
		.method50(36096);
    }
    
    public boolean method15859() {
	int i = OpenGL.glCheckFramebufferStatusEXT(36160);
	if (i != 36053)
	    return false;
	return true;
    }
    
    public void method170() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInt11077 != 0) {
	    ((Class169_Sub2_Sub3_Sub1) this).aClass87_Sub2_Sub2_11071
		.method17483(((Class169_Sub2_Sub3_Sub1) this).anInt11077);
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11077 = 0;
	}
    }
    
    void method17591(int i) {
	Interface21 interface21
	    = ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i];
	if (interface21 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface21.method50(36064 + i);
    }
    
    void method17592(int i) {
	Interface21 interface21
	    = ((Class169_Sub2_Sub3_Sub1) this).anInterface21Array11078[i];
	if (interface21 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
	else
	    interface21.method50(36064 + i);
    }
    
    void method17593() {
	if (((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 == null)
	    OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073
		.method50(36096);
    }
    
    public void method15848(Interface4 interface4) {
	Interface21 interface21 = (Interface21) interface4;
	if (interface4 != null) {
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 != 0) {
		if ((((Class169_Sub2_Sub3_Sub1) this).anInt11072
		     != interface21.method28())
		    || (((Class169_Sub2_Sub3_Sub1) this).anInt11074
			!= interface21.method26()))
		    throw new RuntimeException();
	    } else {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074
		    = interface21.method26();
		((Class169_Sub2_Sub3_Sub1) this).anInt11072
		    = interface21.method28();
		method16889();
	    }
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 |= 0x10;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 = interface21;
	} else {
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11075 &= ~0x10;
	    ((Class169_Sub2_Sub3_Sub1) this).anInterface21_11073 = null;
	    if (((Class169_Sub2_Sub3_Sub1) this).anInt11075 == 0) {
		((Class169_Sub2_Sub3_Sub1) this).anInt11074 = 0;
		((Class169_Sub2_Sub3_Sub1) this).anInt11072 = 0;
	    }
	}
	if (this == ((Class169_Sub2_Sub3_Sub1) this)
			.aClass87_Sub2_Sub2_11071.method2164(-670078622))
	    method17586();
	else
	    ((Class169_Sub2_Sub3_Sub1) this).anInt11070 |= 0x10;
    }
    
    Class169_Sub2_Sub3_Sub1(Class87_Sub2_Sub2 class87_sub2_sub2) {
	super((Class87_Sub2) class87_sub2_sub2);
	((Class169_Sub2_Sub3_Sub1) this).aClass87_Sub2_Sub2_11071
	    = class87_sub2_sub2;
	int[] is = new int[1];
	OpenGL.glGenFramebuffersEXT(1, is, 0);
	((Class169_Sub2_Sub3_Sub1) this).anInt11077 = is[0];
    }
}
