-
-
Save Hadyn/b9c914e1f4c0f7a422607ba6732af5f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ha_Sub2 - Decompiled by JODE | |
* Visit http://jode.sourceforge.net/ | |
*/ | |
import jaclib.memory.Buffer; | |
import jaclib.memory.Stream; | |
import jaclib.memory.heap.NativeHeap; | |
import jaggl.OpenGL; | |
import java.awt.Canvas; | |
import java.awt.Dimension; | |
import java.awt.Rectangle; | |
import java.lang.reflect.Method; | |
import java.util.Enumeration; | |
import java.util.Hashtable; | |
final class OpenGlRenderer extends RendererToolkit { | |
static int anInt7514; | |
static int anInt7515; | |
static int anInt7516; | |
static int anInt7517; | |
static int anInt7518; | |
static int anInt7519; | |
static int anInt7520; | |
static int anInt7521; | |
static int anInt7522; | |
static int anInt7524; | |
static int anInt7525; | |
static int anInt7526; | |
static int anInt7527; | |
static int anInt7528; | |
static int anInt7529; | |
static int anInt7530; | |
static int anInt7531; | |
static int anInt7532; | |
static int anInt7533; | |
static int anInt7534; | |
static int anInt7535; | |
static int anInt7536; | |
static int anInt7537; | |
static int anInt7538; | |
static int anInt7539; | |
static int anInt7540; | |
static int anInt7541; | |
static int anInt7542; | |
static int anInt7543; | |
static int anInt7544; | |
static int anInt7545; | |
static int anInt7546; | |
static int anInt7547; | |
static int anInt7548; | |
static int anInt7549; | |
static int anInt7550; | |
static int anInt7551; | |
static int anInt7552; | |
static Class351 aClass351_7554; | |
static int anInt7555; | |
static int anInt7556; | |
static int anInt7557; | |
static int anInt7558; | |
static int anInt7559; | |
static int anInt7560; | |
static int anInt7561; | |
static int anInt7562; | |
static int anInt7563; | |
static int anInt7564; | |
static int anInt7565; | |
static int anInt7566; | |
static int anInt7567; | |
static int anInt7568; | |
static int anInt7569; | |
static int anInt7570; | |
static int anInt7571; | |
static int anInt7572; | |
static int anInt7573; | |
static int anInt7574; | |
static int anInt7576; | |
static int anInt7578; | |
static int anInt7579; | |
static int anInt7580; | |
static int anInt7581; | |
static int anInt7582; | |
static int anInt7583; | |
static int anInt7584; | |
static int anInt7585; | |
static int anInt7586; | |
static int anInt7587; | |
static int anInt7588; | |
static int anInt7589; | |
static int anInt7590; | |
static int anInt7591; | |
static int anInt7592; | |
static int anInt7593; | |
static int anInt7594; | |
static int anInt7595; | |
static int anInt7596; | |
static int anInt7597; | |
static int anInt7598; | |
static int anInt7599; | |
static int anInt7600; | |
static int anInt7601; | |
static int anInt7602; | |
static int anInt7603; | |
static int anInt7604; | |
static int anInt7605; | |
static int anInt7606; | |
static int anInt7607; | |
static int anInt7608; | |
static int anInt7609; | |
static int anInt7610; | |
static int anInt7611; | |
static int anInt7612; | |
static int anInt7613; | |
static int anInt7614; | |
static int anInt7615; | |
static int anInt7616; | |
static int anInt7617; | |
static int anInt7618; | |
static int anInt7619; | |
static int anInt7620; | |
static int anInt7621; | |
static int anInt7622; | |
static int anInt7623; | |
static int anInt7624; | |
static int anInt7625; | |
static int anInt7627; | |
static int anInt7628; | |
static int anInt7629; | |
static int anInt7630; | |
static int anInt7631; | |
static int anInt7632; | |
static int anInt7633; | |
static int anInt7634; | |
static int anInt7635; | |
static int anInt7637; | |
static int anInt7638; | |
static int anInt7639; | |
static int anInt7640; | |
static int anInt7642; | |
static int anInt7643; | |
static int anInt7644; | |
static int anInt7646; | |
static int anInt7647; | |
static int anInt7648; | |
static int anInt7649; | |
static int anInt7650; | |
static int anInt7651; | |
static int anInt7652; | |
static int anInt7653; | |
static int anInt7654; | |
static int anInt7655; | |
static int anInt7656; | |
static int anInt7657; | |
static int anInt7658; | |
static int anInt7659; | |
static int anInt7660; | |
static int anInt7661; | |
static int anInt7662; | |
static int anInt7663; | |
static int anInt7665; | |
static int errSomethingHeight = 503; | |
static int anInt7667; | |
static int anInt7668; | |
static int anInt7669; | |
static int anInt7670; | |
static int anInt7671; | |
static int anInt7672; | |
static int anInt7673; | |
static int anInt7674; | |
static int anInt7675; | |
static int anInt7676; | |
static int anInt7677; | |
static int anInt7678; | |
static int anInt7679; | |
static int anInt7680; | |
static int anInt7681; | |
static int anInt7682; | |
static int anInt7683; | |
static int anInt7684; | |
static int anInt7685; | |
static int anInt7686; | |
static int anInt7687; | |
static int anInt7689; | |
static int anInt7690; | |
static int anInt7691; | |
static int anInt7692; | |
static int anInt7693; | |
static int anInt7694; | |
static int anInt7695; | |
static int anInt7696; | |
static int anInt7697; | |
static int anInt7698; | |
static int anInt7699; | |
static int anInt7700; | |
static int anInt7701; | |
static int anInt7702; | |
static int anInt7703; | |
static int anInt7704; | |
static int anInt7705; | |
static int anInt7706; | |
static int anInt7708; | |
static int anInt7709; | |
static int anInt7710; | |
static int anInt7714; | |
static Class351 aClass351_7715; | |
static int anInt7716; | |
static int anInt7717; | |
static int anInt7718; | |
static int anInt7719; | |
static int anInt7722; | |
static int anInt7724; | |
static int anInt7726; | |
static int anInt7727; | |
static int anInt7728; | |
static { | |
aClass351_7554 = new Class351(52, 4); | |
aClass351_7715 = new Class351(58, 4); | |
anInt7722 = 0; | |
} | |
int viewportHeight; | |
int viewportWidth; | |
int textureSize = 128; | |
int samples; | |
GlMatrix4f aClass101_Sub3_7729; | |
NativeHeap aNativeHeap7730; | |
int anInt7731; | |
int anInt7733; | |
int time; | |
Class188 aClass188_7736; | |
int anInt7747; | |
int anInt7748; | |
GlMatrix4f viewMatrix; | |
GlMatrix4f invertedViewMatrix; | |
GlMatrix4f skyboxMatrix; | |
float ambientIntensity; | |
int cameraScaleX; | |
int sunScreenX; | |
boolean bigEndian; | |
int sunScreenY; | |
GlFrameBuffer frameBuffer; | |
GlModel aClass64_Sub3_7780; | |
float sunRed; | |
int anInt7782; | |
boolean fragmentShaderSupport; | |
GlModel aClass64_Sub3_7785; | |
int anInt7788; | |
boolean aBoolean7791; | |
float fogStart; | |
boolean aBoolean7793; | |
int projectionScaleY; | |
int maxTextureUnits; | |
FBuffer aClass348_Sub49_Sub1_7798; | |
GlModel aClass64_Sub3_7802; | |
GlModel aClass64_Sub3_7803; | |
int anInt7806; | |
boolean multisamplingSupport; | |
int anInt7809; | |
int projectionCenterY; | |
int anInt7812; | |
int anInt7813; | |
boolean frameBufferBlitSupport; | |
float sunGreen; | |
boolean textureFloatSupport; | |
boolean frameBufferSupport; | |
GlModel aClass64_Sub3_7821; | |
float sunBlue; | |
float[] sunDirection; | |
int near; | |
GlTexture2d aClass258_Sub3_7827; | |
float centerAndClipUppery; | |
boolean texture3dSupport; | |
float intensity; | |
GlVertexBuffer aClass123_7833; | |
GlModel aClass64_Sub3_7834; | |
float centerAndClipUpperX; | |
float centerAndClipLowerY; | |
boolean rectangleTextureSupport; | |
GlModel aClass64_Sub3_7838; | |
GlModel aClass64_Sub3_7840; | |
boolean aBoolean7841; | |
GlModel aClass64_Sub3_7844; | |
boolean materialShadersDisabled; | |
boolean aBoolean7847; | |
int anInt7848; | |
GlVertexBuffer aClass123_7849; | |
int projectionCenterX; | |
int fogColor; | |
boolean cubemapTextureSupport; | |
GlModel aClass64_Sub3_7864; | |
float attenuation; | |
float centerAndClipLowerX; | |
float aFloat7874; | |
float aFloat7875; | |
byte[] aByteArray7879; | |
int[] anIntArray7880; | |
int[] anIntArray7882; | |
int[] anIntArray7883; | |
private int canvasHeight; | |
private long aLong7553; | |
private Canvas aCanvas7575; | |
private Hashtable surfaces = new Hashtable(); | |
private Canvas aCanvas7626; | |
private long aLong7636; | |
private int canvasWidth; | |
private OpenGL glContext; | |
private GlMaterialShaders materialShader; | |
private Class233 particleDrawer; | |
private GlPostProcessing postProcessing; | |
private GlBloom bloom; | |
private GlTextureCache textureCache; | |
private GlMatrix4f aClass101_Sub3_7725; | |
private Deque aClass262_7732; | |
private boolean aBoolean7734; | |
private IFrameBuffer[] drawFbos; | |
private int readFrameBufferStackPointer; | |
private GlFrameBuffer aClass206_7739; | |
private IFrameBuffer currentDrawFbo; | |
private IFrameBuffer[] readFrameBuffers; | |
private int drawFboStackPointer; | |
private IFrameBuffer[] frameBufferStack; | |
private GlSprite aClass105_Sub2_7744; | |
private IFrameBuffer currentReadFrameBuffer; | |
private int frameBufferStackPointer; | |
private Deque aClass262_7749; | |
private int anInt7750; | |
private Deque aClass262_7751; | |
private Deque aClass262_7752; | |
private Deque aClass262_7753; | |
private Deque aClass262_7754; | |
private Deque aClass262_7755; | |
private Deque aClass262_7756; | |
private long aLong7757; | |
private boolean aBoolean7758; | |
private boolean aBoolean7759; | |
private boolean aBoolean7761; | |
private int anInt7762; | |
private boolean depthTestEnabled; | |
private int anInt7764; | |
private int flags; | |
private GlCubeMap skybox; | |
private int offsetX; | |
private int lowerClipY; | |
private boolean aBoolean7774; | |
private GlTexture2dA aClass258_Sub3_Sub1_7776; | |
private float[] projMatrix; | |
private boolean aBoolean7784; | |
private float aFloat7786; | |
private int upperClipY; | |
private int version; | |
private String renderer; | |
private int anInt7796; | |
private IVertexBuffer anInterface2_7797; | |
private int anInt7799; | |
private float aFloat7800; | |
private boolean aBoolean7801; | |
private int anInt7804; | |
private boolean aBoolean7805; | |
private int sunColor; | |
private float[] inverseSunDirection; | |
private int far; | |
private IElementBufferObject elementBufferObject; | |
private int anInt7819; | |
private boolean aBoolean7822; | |
private float fogEnd; | |
private GlTexture[] activeTextures; | |
private float aFloat7829; | |
private int anInt7839; | |
private float projectionD; | |
private boolean multiSampleSupport; | |
private String vendor; | |
private float[] sunPosition; | |
private float orthoSize; | |
private IVertexBuffer anInterface2_7852; | |
private float projectionC; | |
private int upperClipX; | |
private float aFloat7857; | |
private Class348_Sub1[] aClass348_Sub1Array7858; | |
private boolean aBoolean7859; | |
private boolean aBoolean7860; | |
private int anInt7861; | |
private int anInt7862; | |
private int anInt7865; | |
private boolean aBoolean7866; | |
private int offsetY; | |
private int lowerClipX; | |
private boolean aBoolean7869; | |
private boolean aBoolean7870; | |
private boolean vertexBufferSupport; | |
private int activeTextureId; | |
private float[] inverseSunPosition; | |
private int anInt7878; | |
private int amountModels; | |
OpenGlRenderer(Canvas canvas, IRendererAssets var_d, int samples) { | |
super(var_d); | |
particleDrawer = new Class233(); | |
aClass101_Sub3_7725 = new GlMatrix4f(); | |
this.aClass101_Sub3_7729 = new GlMatrix4f(); | |
this.anInt7731 = 3; | |
aBoolean7734 = false; | |
this.anInt7733 = 8; | |
aClass262_7732 = new Deque(); | |
drawFbos = new IFrameBuffer[4]; | |
readFrameBufferStackPointer = -1; | |
drawFboStackPointer = -1; | |
readFrameBuffers = new IFrameBuffer[4]; | |
frameBufferStack = new IFrameBuffer[4]; | |
frameBufferStackPointer = -1; | |
new Queue2(); | |
new HashTable(16); | |
aClass262_7749 = new Deque(); | |
aClass262_7751 = new Deque(); | |
aClass262_7752 = new Deque(); | |
aClass262_7753 = new Deque(); | |
aClass262_7754 = new Deque(); | |
aClass262_7755 = new Deque(); | |
aClass262_7756 = new Deque(); | |
this.viewMatrix = new GlMatrix4f(); | |
this.invertedViewMatrix = new GlMatrix4f(); | |
this.skyboxMatrix = new GlMatrix4f(); | |
offsetX = 0; | |
aFloat7786 = 0.0F; | |
lowerClipY = 0; | |
this.sunRed = 1.0F; | |
this.anInt7806 = -1; | |
this.cameraScaleX = 512; | |
aFloat7800 = -1.0F; | |
sunColor = -1; | |
this.sunGreen = 1.0F; | |
anInt7804 = 8448; | |
aFloat7829 = -1.0F; | |
this.projectionCenterY = 0; | |
this.intensity = -1.0F; | |
this.sunDirection = new float[4]; | |
this.anInt7809 = 0; | |
inverseSunDirection = new float[4]; | |
this.sunBlue = 1.0F; | |
this.projectionScaleY = 512; | |
far = 3584; | |
upperClipX = 0; | |
aFloat7857 = 1.0F; | |
upperClipY = 0; | |
aBoolean7859 = false; | |
sunPosition = new float[4]; | |
orthoSize = 1.0F; | |
this.near = 50; | |
anInt7861 = 8448; | |
this.anInt7813 = 0; | |
this.fogColor = -1; | |
lowerClipX = 0; | |
projMatrix = new float[16]; | |
aBoolean7870 = true; | |
this.attenuation = -1.0F; | |
aClass348_Sub1Array7858 = new Class348_Sub1[Class55.anInt984]; | |
this.projectionCenterX = 0; | |
offsetY = 0; | |
this.aFloat7875 = 3584.0F; | |
this.aFloat7874 = 3584.0F; | |
this.anInt7848 = -1; | |
inverseSunPosition = new float[4]; | |
this.anInt7782 = -1; | |
this.aClass348_Sub49_Sub1_7798 = new FBuffer(8192); | |
this.aByteArray7879 = new byte[16384]; | |
this.anIntArray7880 = new int[1]; | |
this.anIntArray7883 = new int[1]; | |
this.anIntArray7882 = new int[1]; | |
try { | |
aCanvas7575 = aCanvas7626 = canvas; | |
this.samples = samples; | |
if (!LinearGradientSampler.method3098(-30282, "jaclib")) { | |
throw new RuntimeException(""); | |
} | |
if (!LinearGradientSampler.method3098(-30282, "jaggl")) { | |
throw new RuntimeException(""); | |
} | |
try { | |
glContext = new OpenGL(); | |
aLong7636 = aLong7553 = glContext.init(canvas, 8, 8, 8, 24, 0, this.samples); | |
if ((aLong7553 ^ 0xffffffffffffffffL) == -1L) { | |
throw new RuntimeException(""); | |
} | |
method3776(22544); | |
int i_99_ = method3774((byte) -62); | |
if ((i_99_ ^ 0xffffffff) != -1) { | |
throw new RuntimeException(""); | |
} | |
this.anInt7812 = this.bigEndian ? 33639 : 5121; | |
if (renderer.indexOf("radeon") != -1) { | |
int i_100_ = 0; | |
boolean bool = false; | |
boolean bool_101_ = false; | |
String[] strings = (Sampler28.split(renderer.replace('/', ' '), ' ')); | |
for (int i_102_ = 0; i_102_ < strings.length; i_102_++) { | |
String string = strings[i_102_]; | |
try { | |
if ((string.length() ^ 0xffffffff) < -1) { | |
if (string.charAt(0) == 'x' && (string.length() ^ 0xffffffff) <= -4 && (Class50_Sub3 | |
.method468(string.substring(1, 3), 111))) { | |
string = string.substring(1); | |
bool_101_ = true; | |
} | |
if (string.equals("hd")) { | |
bool = true; | |
} else { | |
if (string.startsWith("hd")) { | |
bool = true; | |
string = string.substring(2); | |
} | |
if ((string.length() ^ 0xffffffff) <= -5 && (Class50_Sub3 | |
.method468(string.substring(0, 4), 47))) { | |
i_100_ = (Class348_Sub41.parseInt(string.substring(0, 4))); | |
break; | |
} | |
} | |
} | |
} catch (Exception exception) { | |
/* empty */ | |
} | |
} | |
if (!bool_101_ && !bool) { | |
if ((i_100_ ^ 0xffffffff) <= -7001 && i_100_ <= 7999) { | |
vertexBufferSupport = false; | |
} | |
if (i_100_ >= 7000 && (i_100_ ^ 0xffffffff) >= -9251) { | |
this.texture3dSupport = false; | |
} | |
} | |
if (!bool || (i_100_ ^ 0xffffffff) > -4001) { | |
this.textureFloatSupport = false; | |
} | |
this.rectangleTextureSupport &= glContext.a("GL_ARB_half_float_pixel"); | |
this.aBoolean7847 = true; | |
aBoolean7869 = vertexBufferSupport; | |
} | |
if (vendor.indexOf("intel") != -1) { | |
this.frameBufferSupport = false; | |
} | |
aBoolean7774 = !vendor.equals("s3 graphics"); | |
// Test if vertex buffers can be generated. | |
if (vertexBufferSupport) { | |
try { | |
int[] is = new int[1]; | |
OpenGL.glGenBuffersARB(1, is, 0); | |
} catch (Throwable throwable) { | |
throw new RuntimeException(""); | |
} | |
} | |
Class59_Sub2_Sub1.method566(false, true, (byte) -128); | |
aBoolean7734 = true; | |
textureCache = new GlTextureCache(this, this.resources); | |
method3786(false); | |
this.aClass188_7736 = new Class188(this); | |
// Setup all of the post processing. Only post processing currently supported is bloom. | |
postProcessing = new GlPostProcessing(this); | |
if (postProcessing.isSupported()) { | |
bloom = new GlBloom(this); | |
if (!bloom.isSupported()) { | |
bloom.destroy(); | |
bloom = null; | |
} | |
} | |
materialShader = new GlMaterialShaders(this); | |
method3791(25858); | |
method3745((byte) 123); | |
method3673(); | |
} catch (Throwable throwable) { | |
throwable.printStackTrace(); | |
destroy(); | |
throw new RuntimeException(""); | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.<init>(" + (canvas != null ? "{...}" : "null") + ',' + (var_d != null ? | |
"{...}" : | |
"null") + ',' + samples + ')')); | |
} | |
} | |
public static void method3736(byte i) { | |
aClass351_7554 = null; | |
aClass351_7715 = null; | |
if (i < 27) { | |
aClass351_7715 = null; | |
} | |
} | |
static final void method3743(byte i, Class348_Sub42_Sub12 class348_sub42_sub12) { | |
do { | |
try { | |
anInt7686++; | |
if (i != 6) { | |
aClass351_7715 = null; | |
} | |
if (class348_sub42_sub12 != null) { | |
VerticalGradientSampler.aClass262_9111.addLast(class348_sub42_sub12); | |
Class73.anInt4776++; | |
Object object = null; | |
Class348_Sub42_Sub13 class348_sub42_sub13; | |
if ((class348_sub42_sub12.aBoolean9611) || "".equals(class348_sub42_sub12.aString9601)) { | |
class348_sub42_sub13 = new Class348_Sub42_Sub13(class348_sub42_sub12.aString9601); | |
VertexNormal.anInt166++; | |
} else { | |
long l = (class348_sub42_sub12.aLong9600); | |
for (class348_sub42_sub13 = | |
((Class348_Sub42_Sub13) Class348_Sub42_Sub12.aClass356_9603.get(l)); | |
class348_sub42_sub13 != null; class348_sub42_sub13 = | |
((Class348_Sub42_Sub13) Class348_Sub42_Sub12.aClass356_9603.method3476(true))) { | |
if (class348_sub42_sub13.aString9617.equals(class348_sub42_sub12.aString9601)) { | |
break; | |
} | |
} | |
if (class348_sub42_sub13 == null) { | |
class348_sub42_sub13 = | |
((Class348_Sub42_Sub13) Class259.aClass60_3301.get(l, i ^ 0x3a)); | |
if (class348_sub42_sub13 != null && !(class348_sub42_sub13.aString9617 | |
.equals(class348_sub42_sub12.aString9601))) { | |
class348_sub42_sub13 = null; | |
} | |
if (class348_sub42_sub13 == null) { | |
class348_sub42_sub13 = (new Class348_Sub42_Sub13(class348_sub42_sub12.aString9601)); | |
} | |
Class348_Sub42_Sub12.aClass356_9603.put(l, class348_sub42_sub13); | |
VertexNormal.anInt166++; | |
} | |
} | |
if (!class348_sub42_sub13.method3233(class348_sub42_sub12, -21)) { | |
break; | |
} | |
GlShader.method1868((byte) -39, class348_sub42_sub13); | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.VC(" + i + ',' + ((class348_sub42_sub12 != null) ? "{...}" : "null") + ')')); | |
} | |
break; | |
} while (false); | |
} | |
static final void method3802(int i, int i_315_, int i_316_, int i_317_, int i_318_, int i_319_, | |
int i_320_) { | |
anInt7572++; | |
int i_321_ = Class328_Sub1.playerCount; | |
Queue3.playerSceneTextCount = 0; | |
int[] is = Class286_Sub7.anIntArray6290; | |
for (int i_322_ = 0; ((Class150.anInt2057 + i_321_ ^ 0xffffffff) < (i_322_ | |
^ 0xffffffff)); i_322_++) { | |
Class79 class79 = null; | |
Mobile class318_sub1_sub3_sub3; | |
if (i_321_ > i_322_) { | |
class318_sub1_sub3_sub3 = (BasicLoadingView.players[is[i_322_]]); | |
} else { | |
class318_sub1_sub3_sub3 = (((Class348_Sub22) Class282.aClass356_3654.get( | |
(long) Class74.anIntArray1233[i_322_ + -i_321_])).aClass318_Sub1_Sub3_Sub3_Sub1_6859); | |
class79 = ((Class318_Sub1_Sub3_Sub3_Sub1) class318_sub1_sub3_sub3).aClass79_10505; | |
if (class79.anIntArray1377 != null) { | |
class79 = class79.method794((Mobile.aClass170_10209), i_316_ + -3); | |
if (class79 == null) { | |
continue; | |
} | |
} | |
} | |
if ((class318_sub1_sub3_sub3.anInt10285 >= 0) && ( | |
((Class239_Sub15.anInt6006 ^ 0xffffffff) == ((class318_sub1_sub3_sub3.anInt10301) | |
^ 0xffffffff)) || ((class318_sub1_sub3_sub3.plane ^ 0xffffffff) == ( | |
(Class132.player.plane) ^ 0xffffffff)))) { | |
Class348_Sub13 | |
.getMobileTileScreenCoordinates(class318_sub1_sub3_sub3.method2426(200), i_318_ >> -595777951, i_320_, i_319_, | |
i_315_ >> 2059440961, class318_sub1_sub3_sub3, (byte) 100); | |
if (Class239_Sub21.tileScreenCoordinates[0] >= 0) { | |
if ((class318_sub1_sub3_sub3.aString10292) != null && (i_321_ <= i_322_ | |
|| (NativeBufferSomething.anInt7276 ^ 0xffffffff) == -1 | |
|| NativeBufferSomething.anInt7276 == 3 || (NativeBufferSomething.anInt7276 == 1 | |
&& (KeyboardEvent | |
.method2797(((Player) class318_sub1_sub3_sub3).aString10544, (byte) -63)))) | |
&& Queue3.playerSceneTextCount < NativeLibrary.anInt4814) { | |
NativeLibrary.anIntArray4819[Queue3.playerSceneTextCount] = | |
((ProgressBarConfiguration.aClass143_4962 | |
.method1183(true, class318_sub1_sub3_sub3.aString10292)) / 2); | |
NativeLibrary.playerSceneTextCoordsX[Queue3.playerSceneTextCount] = Class239_Sub21.tileScreenCoordinates[0]; | |
NativeLibrary.anIntArray4813[Queue3.playerSceneTextCount] = Class239_Sub21.tileScreenCoordinates[1]; | |
NativeLibrary.anIntArray4817[Queue3.playerSceneTextCount] = class318_sub1_sub3_sub3.anInt10201; | |
NativeLibrary.anIntArray4806[Queue3.playerSceneTextCount] = class318_sub1_sub3_sub3.anInt10234; | |
NativeLibrary.anIntArray4812[Queue3.playerSceneTextCount] = class318_sub1_sub3_sub3.anInt10264; | |
NativeLibrary.aStringArray4818[Queue3.playerSceneTextCount] = class318_sub1_sub3_sub3.aString10292; | |
Queue3.playerSceneTextCount++; | |
} | |
int i_323_ = Class239_Sub21.tileScreenCoordinates[1] + i; | |
if (!(class318_sub1_sub3_sub3.aBoolean10309) && ( | |
(class318_sub1_sub3_sub3.anInt10223 ^ 0xffffffff) < (Class367_Sub11.gameCycle | |
^ 0xffffffff))) { | |
int i_324_ = -1; | |
int i_325_ = 1; | |
if ((i_322_ ^ 0xffffffff) <= (i_321_ ^ 0xffffffff)) { | |
i_324_ = class79.anInt1373; | |
if ((i_324_ ^ 0xffffffff) == 0) { | |
i_324_ = (class318_sub1_sub3_sub3.method2422((byte) 72).anInt2909); | |
} | |
} else { | |
Player class318_sub1_sub3_sub3_sub2 = (BasicLoadingView.players[is[i_322_]]); | |
i_324_ = (class318_sub1_sub3_sub3.method2422((byte) 72).anInt2909); | |
if (class318_sub1_sub3_sub3_sub2.aBoolean10554) { | |
i_325_ = 2; | |
} | |
} | |
Sprite[] class105s = AbstractMousePressedEvent.aClass105Array7107; | |
if ((i_324_ ^ 0xffffffff) != 0) { | |
Sprite[] class105s_326_ = | |
((Sprite[]) (Class353.aClass60_4346.get((long) i_324_, i_316_ ^ ~0x79))); | |
if (class105s_326_ == null) { | |
SpriteConfig[] class207s = | |
SpriteConfig.method1519(Class21.spriteFileIndex, i_324_, 0); | |
if (class207s != null) { | |
class105s_326_ = new Sprite[class207s.length]; | |
for (int i_327_ = 0; class207s.length > i_327_; i_327_++) { | |
class105s_326_[i_327_] = | |
(Class348_Sub8.rendererToolkit.createSprite(class207s[i_327_], true)); | |
} | |
Class353.aClass60_4346.put(class105s_326_, (long) i_324_, (byte) -94); | |
} | |
} | |
if (class105s_326_ != null && (class105s_326_.length ^ 0xffffffff) <= -3) { | |
class105s = class105s_326_; | |
} | |
} | |
if ((i_325_ ^ 0xffffffff) <= (class105s.length ^ 0xffffffff)) { | |
i_325_ = 1; | |
} | |
Sprite class105 = class105s[0]; | |
Sprite class105_328_ = class105s[i_325_]; | |
i_323_ -= | |
Math.max((ProgressBarConfiguration.aClass143_4962.anInt1988), class105.method969()); | |
int i_329_ = (Class239_Sub21.tileScreenCoordinates[0] + (i_317_ + -(class105.method971() | |
>> 1317367617))); | |
int i_330_ = (class105.method971() * class318_sub1_sub3_sub3.anInt10295 / 255); | |
int i_331_ = class105.method969(); | |
if ((class318_sub1_sub3_sub3.anInt10295 ^ 0xffffffff) < -1 | |
&& (i_330_ ^ 0xffffffff) > -3) { | |
i_330_ = 2; | |
} | |
class105.draw(i_329_, i_323_); | |
Class348_Sub8.rendererToolkit.setClip2(i_329_, i_323_, i_330_ + i_329_, i_331_ + i_323_); | |
class105_328_.draw(i_329_, i_323_); | |
Class348_Sub8.rendererToolkit.setClip(i_317_, i, i_317_ - -i_318_, i_315_ + i); | |
Occluder | |
.method2663(-5590, i_329_, i_329_ + class105.method966(), i_323_, i_323_ + i_331_); | |
} else { | |
i_323_ -= Math.max((ProgressBarConfiguration.aClass143_4962.anInt1988), | |
AbstractMousePressedEvent.aClass105Array7107[0].method969()); | |
} | |
i_323_ -= 2; | |
if (!class318_sub1_sub3_sub3.aBoolean10309) { | |
if (class318_sub1_sub3_sub3.anInt10287 > Class367_Sub11.gameCycle) { | |
Sprite class105 = | |
(Class239_Sub2.aClass105Array5857[(class318_sub1_sub3_sub3.aBoolean10226 ? 2 : 0)]); | |
Sprite class105_332_ = | |
(Class239_Sub2.aClass105Array5857[(!class318_sub1_sub3_sub3.aBoolean10226 ? | |
1 : | |
3)]); | |
int i_333_ = -1; | |
if (class318_sub1_sub3_sub3 instanceof Class318_Sub1_Sub3_Sub3_Sub1) { | |
i_333_ = class79.anInt1382; | |
if (i_333_ == -1) { | |
i_333_ = (class318_sub1_sub3_sub3.method2422((byte) 72).anInt2923); | |
} | |
} else { | |
i_333_ = (class318_sub1_sub3_sub3.method2422((byte) 72).anInt2923); | |
} | |
if ((i_333_ ^ 0xffffffff) != 0) { | |
Sprite[] class105s = | |
((Sprite[]) Class328_Sub2.aClass60_6517.get((long) i_333_, -45)); | |
if (class105s == null) { | |
SpriteConfig[] class207s = | |
SpriteConfig.method1519((Class21.spriteFileIndex), i_333_, 0); | |
if (class207s != null) { | |
class105s = new Sprite[class207s.length]; | |
for (int i_334_ = 0; ((i_334_ ^ 0xffffffff) > (class207s.length | |
^ 0xffffffff)); i_334_++) { | |
class105s[i_334_] = | |
(Class348_Sub8.rendererToolkit.createSprite(class207s[i_334_], true)); | |
} | |
Class328_Sub2.aClass60_6517.put(class105s, (long) i_333_, (byte) -101); | |
} | |
} | |
if (class105s != null && class105s.length == 4) { | |
class105_332_ = (class105s[!(class318_sub1_sub3_sub3.aBoolean10226) ? 1 : 3]); | |
class105 = (class105s[!(class318_sub1_sub3_sub3.aBoolean10226) ? 0 : 2]); | |
} | |
} | |
int i_335_ = (-Class367_Sub11.gameCycle + class318_sub1_sub3_sub3.anInt10287); | |
int i_336_; | |
if ((class318_sub1_sub3_sub3.anInt10227 ^ 0xffffffff) > (i_335_ ^ 0xffffffff)) { | |
i_335_ -= class318_sub1_sub3_sub3.anInt10227; | |
int i_337_ = ((class318_sub1_sub3_sub3.anInt10271 ^ 0xffffffff) != -1 ? | |
(class318_sub1_sub3_sub3.anInt10271 * ( | |
((class318_sub1_sub3_sub3.anInt10210) - i_335_) | |
/ (class318_sub1_sub3_sub3.anInt10271))) : | |
0); | |
i_336_ = (class105.method971() * i_337_ / class318_sub1_sub3_sub3.anInt10210); | |
} else { | |
i_336_ = class105.method971(); | |
} | |
int i_338_ = class105.method969(); | |
i_323_ -= i_338_; | |
int i_339_ = (Class239_Sub21.tileScreenCoordinates[0] + (i_317_ + -(class105.method971() | |
>> -2077907103))); | |
class105.draw(i_339_, i_323_); | |
Class348_Sub8.rendererToolkit.setClip2(i_339_, i_323_, i_339_ - -i_336_, i_323_ - -i_338_); | |
class105_332_.draw(i_339_, i_323_); | |
Class348_Sub8.rendererToolkit.setClip(i_317_, i, i_318_ + i_317_, i - -i_315_); | |
Occluder | |
.method2663(-5590, i_339_, class105.method966() + i_339_, i_323_, i_338_ + i_323_); | |
i_323_ -= 2; | |
} | |
if ((i_321_ ^ 0xffffffff) < (i_322_ ^ 0xffffffff)) { | |
Player class318_sub1_sub3_sub3_sub2 = ((Player) class318_sub1_sub3_sub3); | |
if ((class318_sub1_sub3_sub3_sub2.anInt10540 ^ 0xffffffff) != 0) { | |
i_323_ -= 25; | |
Sprite class105 = | |
(Class318_Sub1_Sub1_Sub1.aClass105Array9959[(class318_sub1_sub3_sub3_sub2.anInt10540)]); | |
class105.draw((-12 + i_317_ + (Class239_Sub21.tileScreenCoordinates[0])), i_323_); | |
Occluder.method2663(-5590, i_317_ + (Class239_Sub21.tileScreenCoordinates[0] + -12), | |
(i_317_ - -Class239_Sub21.tileScreenCoordinates[0] + (-12 + class105.method966())), | |
i_323_, i_323_ + class105.method980()); | |
i_323_ -= 2; | |
} | |
if ((class318_sub1_sub3_sub3_sub2.anInt10522 ^ 0xffffffff) != 0) { | |
i_323_ -= 25; | |
Sprite class105 = | |
(Class264.aClass105Array3378[(class318_sub1_sub3_sub3_sub2.anInt10522)]); | |
class105.draw((-12 + i_317_ + (Class239_Sub21.tileScreenCoordinates[0])), i_323_); | |
Occluder.method2663(-5590, (-12 + Class239_Sub21.tileScreenCoordinates[0] + i_317_), | |
(Class239_Sub21.tileScreenCoordinates[0] + i_317_ - (12 + -class105.method966())), | |
i_323_, i_323_ - -class105.method980()); | |
i_323_ -= 2; | |
} | |
} else if (class79.anInt1375 >= 0 && ((Class264.aClass105Array3378.length ^ 0xffffffff) | |
< (class79.anInt1375 ^ 0xffffffff))) { | |
Sprite class105 = (Class264.aClass105Array3378[class79.anInt1375]); | |
i_323_ -= 25; | |
class105.draw((i_317_ + (Class239_Sub21.tileScreenCoordinates[0]) + -(class105.method971() | |
>> -1621265407)), i_323_); | |
Occluder.method2663(-5590, | |
(Class239_Sub21.tileScreenCoordinates[0] + (i_317_ - (class105.method971() | |
>> -805397247))), | |
(Class239_Sub21.tileScreenCoordinates[0] + (i_317_ - (class105.method971() >> -339613983)) | |
+ class105.method966()), i_323_, class105.method980() + i_323_); | |
i_323_ -= 2; | |
} | |
} | |
if (class318_sub1_sub3_sub3 instanceof Player) { | |
if ((i_322_ ^ 0xffffffff) <= -1) { | |
int i_340_ = 0; | |
HeadIcon[] class302s = Class348_Sub27.headIcons; | |
for (int i_341_ = 0; ((class302s.length ^ 0xffffffff) < (i_341_ | |
^ 0xffffffff)); i_341_++) { | |
HeadIcon class302 = class302s[i_341_]; | |
if (class302 != null && class302.type == 10 && ( | |
(class302.anInt3833 ^ 0xffffffff) == (is[i_322_] ^ 0xffffffff))) { | |
Sprite class105 = (Class239_Sub9.hintHeadIcons[class302.iconId]); | |
if ((class105.method969() ^ 0xffffffff) < (i_340_ ^ 0xffffffff)) { | |
i_340_ = class105.method969(); | |
} | |
class105.draw(-12 + ((Class239_Sub21.tileScreenCoordinates[0]) + i_317_), | |
(i_323_ + -class105.method969())); | |
Occluder.method2663(-5590, -12 + (i_317_ - -(Class239_Sub21.tileScreenCoordinates[0])), | |
(i_317_ + (Class239_Sub21.tileScreenCoordinates[0] + -12 - -class105.method966())), | |
-class105.method969() + i_323_, | |
(i_323_ + -class105.method969() - -class105.method980())); | |
} | |
} | |
if ((i_340_ ^ 0xffffffff) < -1) { | |
i_323_ -= 2 + i_340_; | |
} | |
} | |
} else { | |
int i_342_ = 0; | |
HeadIcon[] class302s = Class348_Sub27.headIcons; | |
for (int i_343_ = 0; class302s.length > i_343_; i_343_++) { | |
HeadIcon class302 = class302s[i_343_]; | |
if (class302 != null && (class302.type ^ 0xffffffff) == -2 && ( | |
(Class74.anIntArray1233[i_322_ - i_321_] ^ 0xffffffff) == (class302.anInt3833 | |
^ 0xffffffff))) { | |
Sprite class105 = (Class239_Sub9.hintHeadIcons[class302.iconId]); | |
if ((i_342_ ^ 0xffffffff) > (class105.method969() ^ 0xffffffff)) { | |
i_342_ = class105.method969(); | |
} | |
if (Class367_Sub11.gameCycle % 20 < 10) { | |
class105.draw((-12 + i_317_ + Class239_Sub21.tileScreenCoordinates[0]), | |
i_323_ + -class105.method969()); | |
Occluder.method2663(-5590, (-12 + i_317_ - -Class239_Sub21.tileScreenCoordinates[0]), | |
(Class239_Sub21.tileScreenCoordinates[0] + (i_317_ + -12) - -class105.method966()), | |
-class105.method969() + i_323_, | |
(-class105.method969() + (i_323_ - -class105.method980()))); | |
} | |
} | |
} | |
if (i_342_ > 0) { | |
i_323_ -= 2 + i_342_; | |
} | |
} | |
int i_344_ = 0; | |
for (/**/; i_344_ < Class132.anInt1905; i_344_++) { | |
int i_345_ = (class318_sub1_sub3_sub3.anIntArray10219[i_344_]); | |
int i_346_ = (class318_sub1_sub3_sub3.anIntArray10259[i_344_]); | |
Class31 class31 = null; | |
int i_347_ = 0; | |
if (i_346_ >= 0) { | |
if ((Class367_Sub11.gameCycle ^ 0xffffffff) <= (i_345_ ^ 0xffffffff)) { | |
continue; | |
} | |
class31 = (Class73.aClass219_4782 | |
.method1601(46, (class318_sub1_sub3_sub3.anIntArray10259[i_344_]))); | |
i_347_ = class31.anInt434; | |
} else if ((i_345_ ^ 0xffffffff) > -1) { | |
continue; | |
} | |
int i_348_ = (class318_sub1_sub3_sub3.anIntArray10304[i_344_]); | |
Class31 class31_349_ = null; | |
if ((i_348_ ^ 0xffffffff) <= -1) { | |
class31_349_ = Class73.aClass219_4782.method1601(46, i_348_); | |
} | |
if (-i_347_ + i_345_ <= Class367_Sub11.gameCycle) { | |
int i_350_ = (class318_sub1_sub3_sub3.anIntArray10303[i_344_]); | |
if ((i_350_ ^ 0xffffffff) <= -1) { | |
class318_sub1_sub3_sub3.anInt10223 = 300 + Class367_Sub11.gameCycle; | |
class318_sub1_sub3_sub3.anInt10295 = i_350_; | |
class318_sub1_sub3_sub3.anIntArray10303[i_344_] = -1; | |
} | |
if (class31 == null) { | |
class318_sub1_sub3_sub3.anIntArray10219[i_344_] = -1; | |
} else { | |
int i_351_ = (class318_sub1_sub3_sub3.method2426(200) / 2); | |
Class348_Sub13 | |
.getMobileTileScreenCoordinates(i_351_, i_318_ >> -1646876255, i_320_, i_319_, i_315_ >> 1160500417, | |
class318_sub1_sub3_sub3, (byte) -107); | |
if (Class239_Sub21.tileScreenCoordinates[0] > -1) { | |
Class239_Sub21.tileScreenCoordinates[0] += Class118.anIntArray1786[i_344_]; | |
Class239_Sub21.tileScreenCoordinates[1] += Class106.anIntArray1636[i_344_]; | |
Object object = null; | |
Object object_352_ = null; | |
Object object_353_ = null; | |
Object object_354_ = null; | |
int i_355_ = 0; | |
int i_356_ = 0; | |
int i_357_ = 0; | |
int i_358_ = 0; | |
int i_359_ = 0; | |
int i_360_ = 0; | |
int i_361_ = 0; | |
int i_362_ = 0; | |
Sprite class105 = null; | |
Sprite class105_363_ = null; | |
Sprite class105_364_ = null; | |
Sprite class105_365_ = null; | |
int i_366_ = 0; | |
int i_367_ = 0; | |
int i_368_ = 0; | |
int i_369_ = 0; | |
int i_370_ = 0; | |
int i_371_ = 0; | |
int i_372_ = 0; | |
int i_373_ = 0; | |
int i_374_ = 0; | |
Sprite class105_375_ = | |
class31.method327((Class348_Sub8.rendererToolkit), (byte) -96); | |
if (class105_375_ != null) { | |
i_355_ = class105_375_.method971(); | |
int i_376_ = class105_375_.method969(); | |
class105_375_.getClip(Class151.anIntArray2062); | |
if ((i_376_ ^ 0xffffffff) < (i_374_ ^ 0xffffffff)) { | |
i_374_ = i_376_; | |
} | |
i_359_ = Class151.anIntArray2062[0]; | |
} | |
Sprite class105_377_ = | |
class31.method331((Class348_Sub8.rendererToolkit), (byte) -75); | |
if (class105_377_ != null) { | |
i_356_ = class105_377_.method971(); | |
int i_378_ = class105_377_.method969(); | |
class105_377_.getClip(Class151.anIntArray2062); | |
if ((i_374_ ^ 0xffffffff) > (i_378_ ^ 0xffffffff)) { | |
i_374_ = i_378_; | |
} | |
i_360_ = Class151.anIntArray2062[0]; | |
} | |
Sprite class105_379_ = class31.method324((Class348_Sub8.rendererToolkit), true); | |
if (class105_379_ != null) { | |
i_357_ = class105_379_.method971(); | |
int i_380_ = class105_379_.method969(); | |
if ((i_380_ ^ 0xffffffff) < (i_374_ ^ 0xffffffff)) { | |
i_374_ = i_380_; | |
} | |
class105_379_.getClip(Class151.anIntArray2062); | |
i_361_ = Class151.anIntArray2062[0]; | |
} | |
Sprite class105_381_ = class31.method325((Class348_Sub8.rendererToolkit), 105); | |
if (class105_381_ != null) { | |
i_358_ = class105_381_.method971(); | |
int i_382_ = class105_381_.method969(); | |
class105_381_.getClip(Class151.anIntArray2062); | |
if ((i_382_ ^ 0xffffffff) < (i_374_ ^ 0xffffffff)) { | |
i_374_ = i_382_; | |
} | |
i_362_ = Class151.anIntArray2062[0]; | |
} | |
if (class31_349_ != null) { | |
class105 = (class31_349_.method327(Class348_Sub8.rendererToolkit, (byte) 110)); | |
if (class105 != null) { | |
i_366_ = class105.method971(); | |
int i_383_ = class105.method969(); | |
if (i_383_ > i_374_) { | |
i_374_ = i_383_; | |
} | |
class105.getClip(Class151.anIntArray2062); | |
i_370_ = Class151.anIntArray2062[0]; | |
} | |
class105_363_ = | |
(class31_349_.method331(Class348_Sub8.rendererToolkit, (byte) -80)); | |
if (class105_363_ != null) { | |
i_367_ = class105_363_.method971(); | |
int i_384_ = class105_363_.method969(); | |
if (i_384_ > i_374_) { | |
i_374_ = i_384_; | |
} | |
class105_363_.getClip(Class151.anIntArray2062); | |
i_371_ = Class151.anIntArray2062[0]; | |
} | |
class105_364_ = (class31_349_.method324(Class348_Sub8.rendererToolkit, true)); | |
if (class105_364_ != null) { | |
i_368_ = class105_364_.method971(); | |
int i_385_ = class105_364_.method969(); | |
class105_364_.getClip(Class151.anIntArray2062); | |
if ((i_374_ ^ 0xffffffff) > (i_385_ ^ 0xffffffff)) { | |
i_374_ = i_385_; | |
} | |
i_372_ = Class151.anIntArray2062[0]; | |
} | |
class105_365_ = | |
(class31_349_.method325(Class348_Sub8.rendererToolkit, i_316_ ^ 0x35)); | |
if (class105_365_ != null) { | |
i_369_ = class105_365_.method971(); | |
int i_386_ = class105_365_.method969(); | |
if (i_386_ > i_374_) { | |
i_374_ = i_386_; | |
} | |
class105_365_.getClip(Class151.anIntArray2062); | |
i_373_ = Class151.anIntArray2062[0]; | |
} | |
} | |
GameFont class324 = Class240.aClass324_4684; | |
GameFont class324_387_ = Class240.aClass324_4684; | |
FontConfig class143 = GlTexture3d.aClass143_8527; | |
int i_388_ = class31.anInt435; | |
FontConfig class143_389_ = GlTexture3d.aClass143_8527; | |
if ((i_388_ ^ 0xffffffff) <= -1) { | |
GameFont class324_390_ = | |
Class14.method232((Class348_Sub8.rendererToolkit), (byte) -53, true, i_388_); | |
FontConfig class143_391_ = (DrawableBufferObject | |
.method1151(-25411, Class348_Sub8.rendererToolkit, i_388_)); | |
if (class324_390_ != null && class143_391_ != null) { | |
class324 = class324_390_; | |
class143 = class143_391_; | |
} | |
} | |
if (class31_349_ != null) { | |
i_388_ = (class31_349_.anInt435); | |
if ((i_388_ ^ 0xffffffff) <= -1) { | |
GameFont class324_392_ = (Class14 | |
.method232(Class348_Sub8.rendererToolkit, (byte) -53, true, i_388_)); | |
FontConfig class143_393_ = (DrawableBufferObject | |
.method1151(-25411, Class348_Sub8.rendererToolkit, i_388_)); | |
if (class324_392_ != null && class143_393_ != null) { | |
class143_389_ = class143_393_; | |
class324_387_ = class324_392_; | |
} | |
} | |
} | |
Object object_394_ = null; | |
String string = null; | |
boolean bool = false; | |
int i_395_ = 0; | |
String string_396_ = | |
(class31.method333((class318_sub1_sub3_sub3.anIntArray10229[i_344_]), 0)); | |
int i_397_ = class143.method1183(true, string_396_); | |
if (class31_349_ != null) { | |
string = (class31_349_ | |
.method333((class318_sub1_sub3_sub3.anIntArray10284[i_344_]), 0)); | |
i_395_ = class143_389_.method1183(true, string); | |
} | |
int i_398_ = 0; | |
if (i_356_ > 0) { | |
i_398_ = i_397_ / i_356_ + 1; | |
} | |
int i_399_ = 0; | |
if (class31_349_ != null && i_367_ > 0) { | |
i_399_ = i_395_ / i_367_ - -1; | |
} | |
int i_400_ = 0; | |
int i_401_ = i_400_; | |
if (i_355_ > 0) { | |
i_400_ += i_355_; | |
} | |
i_400_ += 2; | |
int i_402_ = i_400_; | |
if (i_357_ > 0) { | |
i_400_ += i_357_; | |
} | |
int i_403_ = i_400_; | |
int i_404_ = i_400_; | |
if ((i_356_ ^ 0xffffffff) >= -1) { | |
i_400_ += i_397_; | |
} else { | |
int i_405_ = i_356_ * i_398_; | |
i_404_ += (i_405_ + -i_397_) / 2; | |
i_400_ += i_405_; | |
} | |
int i_406_ = i_400_; | |
if ((i_358_ ^ 0xffffffff) < -1) { | |
i_400_ += i_358_; | |
} | |
int i_407_ = 0; | |
int i_408_ = 0; | |
int i_409_ = 0; | |
int i_410_ = 0; | |
int i_411_ = 0; | |
if (class31_349_ != null) { | |
i_400_ += 2; | |
i_407_ = i_400_; | |
if (i_366_ > 0) { | |
i_400_ += i_366_; | |
} | |
i_400_ += 2; | |
i_408_ = i_400_; | |
if (i_368_ > 0) { | |
i_400_ += i_368_; | |
} | |
i_411_ = i_400_; | |
i_409_ = i_400_; | |
if (i_367_ > 0) { | |
int i_412_ = i_399_ * i_367_; | |
i_411_ += (i_412_ - i_395_) / 2; | |
i_400_ += i_412_; | |
} else { | |
i_400_ += i_395_; | |
} | |
i_410_ = i_400_; | |
if ((i_369_ ^ 0xffffffff) < -1) { | |
i_400_ += i_369_; | |
} | |
} | |
int i_413_ = | |
(-Class367_Sub11.gameCycle + (class318_sub1_sub3_sub3.anIntArray10219[i_344_])); | |
int i_414_ = (-(class31.anInt424 * i_413_ / class31.anInt434) + class31.anInt424); | |
int i_415_ = (-class31.anInt422 + (class31.anInt422 * i_413_ / class31.anInt434)); | |
int i_416_ = (i_317_ + Class239_Sub21.tileScreenCoordinates[0] + -(i_400_ >> -167601311) | |
- -i_414_); | |
int i_417_ = -12 + (i + ((Class239_Sub21.tileScreenCoordinates[1]) - -i_415_)); | |
int i_418_ = i_417_; | |
int i_419_ = i_417_ + i_374_; | |
int i_420_ = 15 + (i_417_ - -(class31.anInt420)); | |
int i_421_ = (i_420_ + -class143.anInt1988); | |
int i_422_ = (i_420_ - -class143.anInt1993); | |
if ((i_421_ ^ 0xffffffff) > (i_418_ ^ 0xffffffff)) { | |
i_418_ = i_421_; | |
} | |
if (i_419_ < i_422_) { | |
i_419_ = i_422_; | |
} | |
int i_423_ = 0; | |
if (class31_349_ != null) { | |
i_423_ = 15 + (i_417_ - -(class31_349_.anInt420)); | |
int i_424_ = (-(class143_389_.anInt1988) + i_423_); | |
if (i_424_ < i_418_) { | |
i_418_ = i_424_; | |
} | |
int i_425_ = ((class143_389_.anInt1993) + i_423_); | |
if ((i_425_ ^ 0xffffffff) < (i_419_ ^ 0xffffffff)) { | |
i_419_ = i_425_; | |
} | |
} | |
int i_426_ = 255; | |
if (class31.anInt426 >= 0) { | |
i_426_ = ((i_413_ << 1167909288) / (-class31.anInt426 + (class31.anInt434))); | |
} | |
if (i_426_ >= 0 && (i_426_ ^ 0xffffffff) > -256) { | |
int i_427_ = i_426_ << 1184399416; | |
int i_428_ = 0xffffff | i_427_; | |
if (class105_375_ != null) { | |
class105_375_.draw((-i_359_ + i_401_ + i_416_), i_417_, 0, i_428_, 1); | |
} | |
if (class105_379_ != null) { | |
class105_379_.draw((-i_361_ + i_402_ + i_416_), i_417_, 0, i_428_, 1); | |
} | |
if (class105_377_ != null) { | |
for (int i_429_ = 0; ((i_429_ ^ 0xffffffff) > (i_398_ | |
^ 0xffffffff)); i_429_++) { | |
class105_377_ | |
.draw((i_403_ + (i_416_ + (-i_360_ - -(i_356_ * i_429_)))), i_417_, 0, | |
i_428_, 1); | |
} | |
} | |
if (class105_381_ != null) { | |
class105_381_.draw(i_406_ + i_416_ + -i_362_, i_417_, 0, i_428_, 1); | |
} | |
class324 | |
.method2576(string_396_, (class31.anInt444 | i_427_), i_420_, i_404_ + i_416_, | |
0, -124); | |
if (class31_349_ != null) { | |
if (class105 != null) { | |
class105.draw((i_416_ + i_407_ - i_370_), i_417_, 0, i_428_, 1); | |
} | |
if (class105_364_ != null) { | |
class105_364_.draw(-i_372_ + (i_408_ + i_416_), i_417_, 0, i_428_, 1); | |
} | |
if (class105_363_ != null) { | |
for (int i_430_ = 0; i_430_ < i_399_; i_430_++) { | |
class105_363_ | |
.draw((i_430_ * i_367_ + i_416_ + (i_409_ + -i_371_)), i_417_, 0, | |
i_428_, 1); | |
} | |
} | |
if (class105_365_ != null) { | |
class105_365_.draw((i_416_ - -i_410_ + -i_373_), i_417_, 0, i_428_, 1); | |
} | |
class324_387_.method2576(string, (i_427_ | (class31_349_.anInt444)), i_423_, | |
i_416_ + i_411_, 0, -125); | |
} | |
} else { | |
if (class105_375_ != null) { | |
class105_375_.draw(i_416_ - (-i_401_ + i_359_), i_417_); | |
} | |
if (class105_379_ != null) { | |
class105_379_.draw(i_416_ - (-i_402_ - -i_361_), i_417_); | |
} | |
if (class105_377_ != null) { | |
for (int i_431_ = 0; i_431_ < i_398_; i_431_++) { | |
class105_377_.draw((i_403_ + i_416_ - (i_360_ - i_431_ * i_356_)), i_417_); | |
} | |
} | |
if (class105_381_ != null) { | |
class105_381_.draw(i_406_ + (i_416_ + -i_362_), i_417_); | |
} | |
class324.method2576(string_396_, (class31.anInt444 | ~0xffffff), i_420_, | |
i_416_ + i_404_, 0, i_316_ ^ ~0x74); | |
if (class31_349_ != null) { | |
if (class105 != null) { | |
class105.draw((-i_370_ + i_416_ + i_407_), i_417_); | |
} | |
if (class105_364_ != null) { | |
class105_364_.draw(i_408_ + (i_416_ + -i_372_), i_417_); | |
} | |
if (class105_363_ != null) { | |
for (int i_432_ = 0; i_399_ > i_432_; i_432_++) { | |
class105_363_ | |
.draw((i_432_ * i_367_ + (-i_371_ + i_416_ + i_409_)), i_417_); | |
} | |
} | |
if (class105_365_ != null) { | |
class105_365_.draw(i_410_ + i_416_ - i_373_, i_417_); | |
} | |
class324_387_.method2576(string, (class31_349_.anInt444) | ~0xffffff, i_423_, | |
i_411_ + i_416_, 0, -119); | |
} | |
} | |
Occluder.method2663(-5590, i_416_, i_416_ + i_400_, i_418_, 1 + i_419_); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
for (int i_433_ = 0; (FileUnpacker.anInt669 ^ 0xffffffff) < (i_433_ ^ 0xffffffff); i_433_++) { | |
int i_434_ = Class258_Sub4.anIntArray8557[i_433_]; | |
Mobile class318_sub1_sub3_sub3; | |
if (i_434_ >= 2048) { | |
class318_sub1_sub3_sub3 = (((Class348_Sub22) Class282.aClass356_3654 | |
.get((long) (-2048 + i_434_))).aClass318_Sub1_Sub3_Sub3_Sub1_6859); | |
} else { | |
class318_sub1_sub3_sub3 = BasicLoadingView.players[i_434_]; | |
} | |
int i_435_ = Class268.anIntArray3432[i_433_]; | |
Mobile class318_sub1_sub3_sub3_436_; | |
if ((i_435_ ^ 0xffffffff) <= -2049) { | |
class318_sub1_sub3_sub3_436_ = (((Class348_Sub22) Class282.aClass356_3654 | |
.get((long) (-2048 + i_435_))).aClass318_Sub1_Sub3_Sub3_Sub1_6859); | |
} else { | |
class318_sub1_sub3_sub3_436_ = BasicLoadingView.players[i_435_]; | |
} | |
MonoChromaticImageCache | |
.method1430(--class318_sub1_sub3_sub3.anInt10261, (byte) 119, i_320_, i_315_, i, i_319_, | |
i_318_, i_317_, class318_sub1_sub3_sub3_436_, class318_sub1_sub3_sub3); | |
} | |
int i_437_ = i_316_ + (ProgressBarConfiguration.aClass143_4962.anInt1993 | |
+ ProgressBarConfiguration.aClass143_4962.anInt1988); | |
for (int i_438_ = 0; i_438_ < Queue3.playerSceneTextCount; i_438_++) { | |
int i_439_ = NativeLibrary.playerSceneTextCoordsX[i_438_]; | |
int i_440_ = NativeLibrary.anIntArray4813[i_438_]; | |
int i_441_ = NativeLibrary.anIntArray4819[i_438_]; | |
boolean bool = true; | |
while (bool) { | |
bool = false; | |
for (int i_442_ = 0; i_438_ > i_442_; i_442_++) { | |
if (i_440_ - -2 > NativeLibrary.anIntArray4813[i_442_] + -i_437_ && (-i_437_ + i_440_ | |
< 2 + NativeLibrary.anIntArray4813[i_442_]) && ((i_439_ + -i_441_ ^ 0xffffffff) > ( | |
(NativeLibrary.playerSceneTextCoordsX[i_442_] - -NativeLibrary.anIntArray4819[i_442_]) | |
^ 0xffffffff)) && ( | |
(-NativeLibrary.anIntArray4819[i_442_] + NativeLibrary.playerSceneTextCoordsX[i_442_]) | |
< i_439_ + i_441_) && ((i_440_ ^ 0xffffffff) < ( | |
-i_437_ + NativeLibrary.anIntArray4813[i_442_] ^ 0xffffffff))) { | |
i_440_ = -i_437_ + NativeLibrary.anIntArray4813[i_442_]; | |
bool = true; | |
} | |
} | |
} | |
NativeLibrary.anIntArray4813[i_438_] = i_440_; | |
String string = NativeLibrary.aStringArray4818[i_438_]; | |
int i_443_ = ProgressBarConfiguration.aClass143_4962.method1183(true, string); | |
int i_444_ = i_439_ + i_317_; | |
int i_445_ = -ProgressBarConfiguration.aClass143_4962.anInt1988 + i_440_ + i; | |
int i_446_ = i_444_ - -i_443_; | |
int i_447_ = i_440_ + i - -ProgressBarConfiguration.aClass143_4962.anInt1993; | |
if (Sampler20.anInt9408 != 0) { | |
i_444_ -= i_443_ >> 799409921; | |
i_446_ -= i_443_ >> 975521729; | |
Deque.aClass324_3326.draw((byte) 118, i_439_ + i_317_, -256, string, -16777216, i_440_ + i); | |
} else { | |
int i_448_ = 16776960; | |
if ((NativeLibrary.anIntArray4817[i_438_] ^ 0xffffffff) > -7) { | |
i_448_ = (Class115.anIntArray1757[NativeLibrary.anIntArray4817[i_438_]]); | |
} | |
if ((NativeLibrary.anIntArray4817[i_438_] ^ 0xffffffff) == -7) { | |
i_448_ = (Class239_Sub15.anInt6006 % 20 >= 10 ? 16776960 : 16711680); | |
} | |
if (NativeLibrary.anIntArray4817[i_438_] == 7) { | |
i_448_ = Class239_Sub15.anInt6006 % 20 < 10 ? 255 : 65535; | |
} | |
if ((NativeLibrary.anIntArray4817[i_438_] ^ 0xffffffff) == -9) { | |
i_448_ = (Class239_Sub15.anInt6006 % 20 >= 10 ? 8454016 : 45056); | |
} | |
if (NativeLibrary.anIntArray4817[i_438_] == 9) { | |
int i_449_ = -NativeLibrary.anIntArray4812[i_438_] + 150; | |
if ((i_449_ ^ 0xffffffff) > -51) { | |
i_448_ = 1280 * i_449_ + 16711680; | |
} else if ((i_449_ ^ 0xffffffff) > -101) { | |
i_448_ = -(327680 * i_449_) + 16384000 + 16776960; | |
} else if (i_449_ < 150) { | |
i_448_ = 5 * (-100 + i_449_) + 65280; | |
} | |
} | |
if (NativeLibrary.anIntArray4817[i_438_] == 10) { | |
int i_450_ = 150 - NativeLibrary.anIntArray4812[i_438_]; | |
if ((i_450_ ^ 0xffffffff) <= -51) { | |
if (i_450_ >= 100) { | |
if (i_450_ < 150) { | |
i_448_ = (-(5 * i_450_) - -500 + 327680 * i_450_ - 32767745); | |
} | |
} else { | |
i_448_ = 33095935 + -(327680 * i_450_); | |
} | |
} else { | |
i_448_ = 16711680 + 5 * i_450_; | |
} | |
} | |
if ((NativeLibrary.anIntArray4817[i_438_] ^ 0xffffffff) == -12) { | |
int i_451_ = 150 - NativeLibrary.anIntArray4812[i_438_]; | |
if (i_451_ >= 50) { | |
if ((i_451_ ^ 0xffffffff) > -101) { | |
i_448_ = 327685 * (-50 + i_451_) + 65280; | |
} else if (i_451_ < 150) { | |
i_448_ = 16777215 + -(327680 * (i_451_ - 100)); | |
} | |
} else { | |
i_448_ = 16777215 + -(i_451_ * 327685); | |
} | |
} | |
int i_452_ = ~0xffffff | i_448_; | |
if ((NativeLibrary.anIntArray4806[i_438_] ^ 0xffffffff) == -1) { | |
Deque.aClass324_3326 | |
.draw((byte) 115, i_439_ + i_317_, i_452_, string, -16777216, i_440_ + i); | |
i_444_ -= i_443_ >> -1527899615; | |
i_446_ -= i_443_ >> 1173651809; | |
} | |
if (NativeLibrary.anIntArray4806[i_438_] == 1) { | |
i_446_ -= i_443_ >> -1547789087; | |
i_444_ -= i_443_ >> 1064426241; | |
Deque.aClass324_3326.method2574(i_452_, i_440_ + i, string, i_317_ - -i_439_, -16777216, | |
Class239_Sub15.anInt6006, false); | |
i_447_ += 5; | |
i_445_ -= 5; | |
} | |
if ((NativeLibrary.anIntArray4806[i_438_] ^ 0xffffffff) == -3) { | |
i_447_ += 5; | |
i_446_ -= -5 + (i_443_ >> 142018977); | |
Deque.aClass324_3326 | |
.method2581(string, i_452_, (Class239_Sub15.anInt6006), i_440_ + i, (byte) -112, | |
-16777216, i_317_ - -i_439_); | |
i_445_ -= 5; | |
i_444_ -= (i_443_ >> -1695666079) - -5; | |
} | |
if (NativeLibrary.anIntArray4806[i_438_] == 3) { | |
i_446_ -= i_443_ >> -2028345439; | |
i_444_ -= i_443_ >> 41564993; | |
i_447_ += 7; | |
Deque.aClass324_3326 | |
.method2577(Class239_Sub15.anInt6006, i + i_440_, string, i_452_, -16777216, | |
150 + -NativeLibrary.anIntArray4812[i_438_], i_439_ + i_317_, -20509); | |
i_445_ -= 7; | |
} | |
if ((NativeLibrary.anIntArray4806[i_438_] ^ 0xffffffff) == -5) { | |
int i_453_ = ((150 + -NativeLibrary.anIntArray4812[i_438_]) * ( | |
ProgressBarConfiguration.aClass143_4962.method1183(true, string) + 100) / 150); | |
Class348_Sub8.rendererToolkit | |
.setClip2(i_317_ - (-i_439_ - -50), i, 50 + (i_439_ + i_317_), i - -i_315_); | |
i_444_ += 50 - i_453_; | |
i_446_ += -i_453_ + 50; | |
Deque.aClass324_3326 | |
.method2576(string, i_452_, i + i_440_, (i_317_ - (-i_439_ - 50) - i_453_), -16777216, | |
i_316_ + -125); | |
Class348_Sub8.rendererToolkit.setClip(i_317_, i, i_318_ + i_317_, i + i_315_); | |
} | |
if (NativeLibrary.anIntArray4806[i_438_] == 5) { | |
int i_454_ = 150 + -NativeLibrary.anIntArray4812[i_438_]; | |
int i_455_ = 0; | |
if (i_454_ >= 25) { | |
if ((i_454_ ^ 0xffffffff) < -126) { | |
i_455_ = i_454_ + -125; | |
} | |
} else { | |
i_455_ = i_454_ - 25; | |
} | |
int i_456_ = (ProgressBarConfiguration.aClass143_4962.anInt1993 | |
+ ProgressBarConfiguration.aClass143_4962.anInt1988); | |
Class348_Sub8.rendererToolkit | |
.setClip2(i_317_, i_440_ + i - (i_456_ - -1), i_318_ + i_317_, 5 + i_440_ + i); | |
i_444_ -= i_443_ >> -1477560799; | |
i_447_ += i_455_; | |
Deque.aClass324_3326 | |
.draw((byte) -105, i_439_ + i_317_, i_452_, string, -16777216, i_455_ + (i + i_440_)); | |
i_445_ += i_455_; | |
i_446_ -= i_443_ >> -1141783167; | |
Class348_Sub8.rendererToolkit.setClip(i_317_, i, i_318_ + i_317_, i_315_ + i); | |
} | |
} | |
Occluder.method2663(i_316_ + -5592, i_444_, 1 + i_446_, i_445_, 1 + i_447_); | |
} | |
} | |
final void configureFog(int i, int i_0_, int i_1_) { | |
if ((this.fogColor ^ 0xffffffff) != (i ^ 0xffffffff) || (this.anInt7782 ^ 0xffffffff) != (i_0_ | |
^ 0xffffffff) || this.anInt7813 != i_1_) { | |
this.anInt7782 = i_0_; | |
this.fogColor = i; | |
this.anInt7813 = i_1_; | |
updateFog(0xff0000); | |
method3732(92); | |
} | |
anInt7694++; | |
} | |
final void method3728(boolean bool) { | |
if (aBoolean7784 != bool) { | |
aBoolean7784 = bool; | |
toggleLighting((byte) -121); | |
flags &= ~0x7; | |
} | |
anInt7683++; | |
} | |
final AbstractModel createModel(ModelConfig class124, int i, int i_2_, int i_3_, int i_4_) { | |
try { | |
anInt7579++; | |
return new GlModel(this, class124, i, i_3_, i_4_, i_2_); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.EG(" + (class124 != null ? "{...}" : "null") + ',' + i + ',' + i_2_ + ',' + i_3_ + ',' | |
+ i_4_ + ')')); | |
} | |
} | |
final void setTextureCombiners(int i, int i_6_) { | |
if (activeTextureId != 0) { | |
// GL_COMBINE_RGB | |
// GL_COMBINE_ALPHA | |
OpenGL.glTexEnvi(8960, 34161, i); | |
OpenGL.glTexEnvi(8960, 34162, i_6_); | |
} else { | |
boolean bool = false; | |
if (anInt7804 != i) { | |
OpenGL.glTexEnvi(8960, 34161, i); | |
bool = true; | |
anInt7804 = i; | |
} | |
if ((anInt7861 ^ 0xffffffff) != (i_6_ ^ 0xffffffff)) { | |
OpenGL.glTexEnvi(8960, 34162, i_6_); | |
anInt7861 = i_6_; | |
bool = true; | |
} | |
if (bool) { | |
flags &= ~0x1d; | |
} | |
} | |
anInt7655++; | |
} | |
private final void loadFrustrumProjection(byte i) { | |
OpenGL.glMatrixMode(5889); | |
anInt7693++; | |
OpenGL.glLoadMatrixf(projMatrix, 0); | |
OpenGL.glMatrixMode(5888); | |
} | |
final void setSkybox(CubeMap skybox) { | |
try { | |
anInt7550++; | |
this.skybox = (GlCubeMap) skybox; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.DF(" + (skybox != null ? "{...}" : "null") + ')'); | |
} | |
} | |
final IVertexBuffer createVertexBuffer(int i, boolean bool, int i_8_, byte[] src, int i_9_) { | |
try { | |
if (i != 2) { | |
method3781((byte) -13, 54); | |
} | |
anInt7530++; | |
if (vertexBufferSupport && (!bool || aBoolean7869)) { | |
return new VertexBufferObject(this, i_8_, src, i_9_, bool); | |
} | |
return new Class119_Sub1(this, i_8_, src, i_9_); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.VB(" + i + ',' + bool + ',' + i_8_ + ',' + (src != null ? "{...}" : "null") + ',' | |
+ i_9_ + ')')); | |
} | |
} | |
final void setupProjection(int i, int i_10_, int i_11_, int i_12_) { | |
this.cameraScaleX = i_11_; | |
this.projectionScaleY = i_12_; | |
this.projectionCenterY = i_10_; | |
this.projectionCenterX = i; | |
anInt7558++; | |
setupProjection(96); | |
method3772((byte) 124); | |
if (anInt7865 == 3) { | |
method3747(); | |
} else if ((anInt7865 ^ 0xffffffff) == -3) { | |
loadFrustrumProjection((byte) 119); | |
} | |
} | |
private final void method3732(int i) { | |
if (!aBoolean7801 || this.anInt7782 < 0) { | |
OpenGL.glDisable(2912); | |
} else { | |
OpenGL.glEnable(2912); | |
} | |
int i_13_ = 96 % (i / 63); | |
anInt7629++; | |
} | |
final IElementBufferObject createElementBufferObject(int i, int i_15_, byte[] is, boolean bool) { | |
try { | |
anInt7565++; | |
if (vertexBufferSupport && (!bool || aBoolean7869)) { | |
return new ElementBufferObject(this, i, is, i_15_, bool); | |
} | |
return new Class119_Sub2(this, i, is, i_15_); | |
} catch (RuntimeException ex) { | |
throw Class348_Sub17.method2929(ex, | |
("qo.G(" + i + ',' + i_15_ + ',' + (is != null ? "{...}" : "null") + ',' + bool + ')')); | |
} | |
} | |
final void popMatrix(boolean bool) { | |
OpenGL.glPopMatrix(); | |
anInt7696++; | |
if (bool != true) { | |
this.sunScreenX = 37; | |
} | |
} | |
final Class348_Sub1 method3690(int i, int i_16_, int i_17_, int i_18_, int i_19_, float f) { | |
anInt7559++; | |
return new Class348_Sub1_Sub1(i, i_16_, i_17_, i_18_, i_19_, f); | |
} | |
final void method3735(int i) { | |
if (i != 9473) { | |
method3661(-10, -73, null, null); | |
} | |
if ((flags ^ 0xffffffff) != -5) { | |
method3763(i ^ 0x3201); | |
method3807(false); | |
method3728(false); | |
setDepthTestEnabled(false); | |
method3748(false); | |
method3757(-2, -111); | |
setColorBlendMode(1, 1); | |
flags = 4; | |
} | |
anInt7514++; | |
} | |
final int getFar() { | |
anInt7706++; | |
return far; | |
} | |
final void method3636(int i, int i_20_, int i_21_, int i_22_, int i_23_, int i_24_, aa var_aa, | |
int i_25_, int i_26_) { | |
try { | |
anInt7727++; | |
aa_Sub1 var_aa_Sub1 = (aa_Sub1) var_aa; | |
GlTexture2dA class258_sub3_sub1 = var_aa_Sub1.aClass258_Sub3_Sub1_5193; | |
method3792(110); | |
bindTexture(var_aa_Sub1.aClass258_Sub3_Sub1_5193); | |
setColorBlendMode(i_24_, 1); | |
setTextureCombiners(7681, 8448); | |
method3762(34167, 768, (byte) -87, 0); | |
float f = (class258_sub3_sub1.s / (float) (class258_sub3_sub1.width0)); | |
float f_27_ = (class258_sub3_sub1.u / (float) (class258_sub3_sub1.height0)); | |
float f_28_ = (float) i_21_ - (float) i; | |
float f_29_ = (float) i_22_ - (float) i_20_; | |
float f_30_ = (float) (1.0 / Math.sqrt((double) (f_29_ * f_29_ + f_28_ * f_28_))); | |
f_28_ *= f_30_; | |
OpenGL.glColor4ub((byte) (i_23_ >> 1509112720), (byte) (i_23_ >> 1465269896), (byte) i_23_, | |
(byte) (i_23_ >> -1039413416)); | |
f_29_ *= f_30_; | |
OpenGL.glBegin(1); | |
OpenGL.glTexCoord2f((float) (-i_25_ + i) * f, f_27_ * (float) (i_20_ + -i_26_)); | |
OpenGL.glVertex2f((float) i + 0.35F, 0.35F + (float) i_20_); | |
OpenGL.glTexCoord2f(f * (float) (i_21_ + -i_25_), (float) (-i_26_ + i_22_) * f_27_); | |
OpenGL.glVertex2f(0.35F + (f_28_ + (float) i_21_), 0.35F + ((float) i_22_ + f_29_)); | |
OpenGL.glEnd(); | |
method3762(5890, 768, (byte) -87, 0); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.ME(" + i + ',' + i_20_ + ',' + i_21_ + ',' + i_22_ + ',' + i_23_ + ',' + i_24_ + ',' | |
+ (var_aa != null ? "{...}" : "null") + ',' + i_25_ + ',' + i_26_ + ')')); | |
} | |
} | |
final int[] getProjectionConfig() { | |
anInt7704++; | |
return (new int[] {this.projectionCenterX, this.projectionCenterY, this.cameraScaleX, | |
this.projectionScaleY}); | |
} | |
final synchronized void method3737(int i, byte i_31_, int i_32_) { | |
anInt7676++; | |
IntegerNode class348_sub35 = new IntegerNode(i_32_); | |
class348_sub35.nodeKey = (long) i; | |
int i_33_ = -124 / ((i_31_ - 79) / 39); | |
aClass262_7752.addLast(class348_sub35); | |
} | |
final void setActiveTexture(int id) { | |
if (id != activeTextureId) { | |
OpenGL.glActiveTexture(33984 + id); | |
activeTextureId = id; | |
} | |
anInt7526++; | |
} | |
final IVertexBuffer createVertexBufferObject(int i, Buffer buffer, boolean bool, int i_35_, | |
int i_36_) { | |
try { | |
if (i != 8448) { | |
this.aClass64_Sub3_7844 = null; | |
} | |
anInt7605++; | |
if (vertexBufferSupport && (!bool || aBoolean7869)) { | |
return new VertexBufferObject(this, i_35_, buffer, i_36_, bool); | |
} | |
return new Class119_Sub1(this, i_35_, buffer); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.OG(" + i + ',' + (buffer != null ? "{...}" : "null") + ',' + bool + ',' + i_35_ + ',' | |
+ i_36_ + ')')); | |
} | |
} | |
private final void method3740(int i) { | |
if ((anInt7865 ^ 0xffffffff) != -3) { | |
anInt7865 = 2; | |
loadFrustrumProjection((byte) 125); | |
method3754((byte) 90); | |
flags &= ~0x7; | |
} | |
if (i != -14388) { | |
this.time = -85; | |
} | |
anInt7678++; | |
} | |
final boolean method3644() { | |
anInt7556++; | |
return true; | |
} | |
final GlCubeMapTexture getSkybox() { | |
anInt7581++; | |
if (skybox != null) { | |
return skybox.getTexture((byte) -121); | |
} | |
return null; | |
} | |
final void projectToClippedScreenSpace(int x, int y, int z, int zp, int[] is) { | |
try { | |
anInt7681++; | |
float zz = (((float) z * (this.viewMatrix.m22)) + ((float) y * (this.viewMatrix.m12) | |
+ (this.viewMatrix.m02) * (float) x) + (this.viewMatrix.m32)); | |
if ((float) this.near > zz || (float) far < zz) { | |
is[0] = is[1] = is[2] = -1; | |
} else { | |
int xx = (int) ((this.viewMatrix.m30 + ((this.viewMatrix.m10) * (float) y + ((float) x | |
* (this.viewMatrix.m00)) + (this.viewMatrix.m20) * (float) z)) | |
* (float) this.cameraScaleX / (float) zp); | |
int yy = (int) ((float) this.projectionScaleY * ((this.viewMatrix.m31) + ( | |
(this.viewMatrix.m01) * (float) x + ((float) y * (this.viewMatrix.m11)) + ((float) z | |
* (this.viewMatrix.m21)))) / (float) zp); | |
if ((float) xx >= this.centerAndClipLowerX && this.centerAndClipUpperX >= (float) xx | |
&& this.centerAndClipLowerY <= (float) yy && this.centerAndClipUppery >= (float) yy) { | |
is[2] = (int) zz; | |
is[1] = (int) (-this.centerAndClipLowerY + (float) yy); | |
is[0] = (int) (-this.centerAndClipLowerX + (float) xx); | |
} else { | |
is[0] = is[1] = is[2] = -1; | |
} | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.projectToClippedScreenSpace(" + x + ',' + y + ',' + z + ',' + zp + ',' + (is != null ? | |
"{...}" : | |
"null") + ')')); | |
} | |
} | |
final void EA(int i, int i_42_, int i_43_, int i_44_) { | |
anInt7532++; | |
if (!this.materialShadersDisabled) { | |
throw new RuntimeException(""); | |
} | |
this.anInt7788 = i; | |
this.anInt7806 = i_42_; | |
this.anInt7848 = i_43_; | |
this.anInt7809 = i_44_; | |
if (aBoolean7859) { | |
materialShader.aClass286_Sub1_1586.method2141(false); | |
materialShader.aClass286_Sub1_1586.method2143(34336); | |
} | |
} | |
private final void method3742(int i) { | |
anInt7638++; | |
if ((anInt7865 ^ 0xffffffff) != -4) { | |
anInt7865 = 3; | |
method3747(); | |
method3754((byte) 89); | |
flags &= ~0x7; | |
} | |
if (i != 3) { | |
anInt7799 = -50; | |
} | |
} | |
final boolean forceClear() { | |
anInt7703++; | |
return true; | |
} | |
final void method3744(float f, int i, float f_45_) { | |
if (i != 770) { | |
this.fogStart = 0.31055084F; | |
} | |
anInt7571++; | |
aFloat7786 = f; | |
aFloat7857 = f_45_; | |
updateFog(16711680); | |
} | |
private final void method3745(byte i) { | |
anInt7680++; | |
if (aCanvas7575 != null) { | |
Dimension dimension = aCanvas7575.getSize(); | |
canvasWidth = dimension.width; | |
canvasHeight = dimension.height; | |
} else { | |
canvasWidth = canvasHeight = 0; | |
} | |
if (i > 61) { | |
if (currentDrawFbo == null) { | |
this.viewportWidth = canvasWidth; | |
this.viewportHeight = canvasHeight; | |
updateViewport(true); | |
} | |
method3755(-32); | |
resetClip(); | |
} | |
} | |
final void setMaterial(int id, boolean bool, boolean bool_46_) { | |
anInt7631++; | |
if ((id ^ 0xffffffff) != (anInt7796 ^ 0xffffffff) | |
|| aBoolean7859 == !this.materialShadersDisabled) { | |
GlTexture2d texture = null; | |
int combinerMode = 0; | |
byte param1 = 0; | |
int param2 = 0; | |
byte type = !this.materialShadersDisabled ? (byte) 0 : (byte) 3; | |
if (id >= 0) { | |
texture = textureCache.getTexture(id, 256); | |
Material material = this.resources.getMaterial(id); | |
if (material.translateStepX != 0 || material.translateStepY != 0) { | |
int i_52_ = material.small ? 64 : 128; | |
int i_53_ = i_52_ * 50; | |
translateMatrix( | |
(float) (material.translateStepX * (this.time % i_53_)) / (float) i_53_, | |
((float) (this.time % i_53_ * material.translateStepY) / (float) i_53_), | |
0.0F); | |
} else { | |
loadTextureIdentityMatrix(-21974); | |
} | |
if (!this.materialShadersDisabled) { | |
type = material.type; | |
param2 = material.param2; | |
param1 = material.param1; | |
} | |
combinerMode = material.combinerMode; | |
} else { | |
loadTextureIdentityMatrix(-21974); | |
} | |
materialShader.setShader(param1, bool, type, param2, (byte) 12, bool_46_); | |
if (!materialShader.bindTexture(combinerMode, (byte) -124, texture)) { | |
bindTexture(texture); | |
setTextureBlendMode(combinerMode); | |
} | |
aBoolean7859 = this.materialShadersDisabled; | |
anInt7796 = id; | |
} | |
flags &= ~0x7; | |
} | |
private final void method3747() { | |
anInt7597++; | |
float left = ((float) -this.projectionCenterX * orthoSize / (float) this.cameraScaleX); | |
float top = (orthoSize * (float) -this.projectionCenterY / (float) this.projectionScaleY); | |
float right = (orthoSize * (float) (-this.projectionCenterX + this.viewportWidth) | |
/ (float) this.cameraScaleX); | |
float bottom = (orthoSize * (float) (this.viewportHeight - this.projectionCenterY) | |
/ (float) this.projectionScaleY); | |
OpenGL.glMatrixMode(5889); | |
OpenGL.glLoadIdentity(); | |
if (left != right && top != bottom) { | |
OpenGL | |
.glOrtho((double) left, (double) right, (double) -bottom, (double) -top, (double) this.near, | |
(double) far); | |
} | |
OpenGL.glMatrixMode(5888); | |
} | |
final boolean isPostProcessingSupported() { | |
anInt7542++; | |
return !(bloom == null || (this.samples ^ 0xffffffff) < -2 && !aBoolean7822); | |
} | |
final void method3748(boolean bool) { | |
anInt7710++; | |
if (aBoolean7759 != bool) { | |
aBoolean7759 = bool; | |
method3795(-30199); | |
flags &= ~0x1f; | |
} | |
} | |
final void getClip(int[] is) { | |
try { | |
is[1] = lowerClipY; | |
is[3] = upperClipY; | |
is[0] = lowerClipX; | |
anInt7580++; | |
is[2] = upperClipX; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.getClip(" + (is != null ? "{...}" : "null") + ')'); | |
} | |
} | |
final void Q(int i, int i_57_, int i_58_, int i_59_, int i_60_, int i_61_, byte[] is, int i_62_, | |
int i_63_) { | |
try { | |
anInt7540++; | |
float f; | |
float f_64_; | |
if (aClass258_Sub3_Sub1_7776 == null || (aClass258_Sub3_Sub1_7776.width ^ 0xffffffff) > (i_58_ | |
^ 0xffffffff) || (aClass258_Sub3_Sub1_7776.length ^ 0xffffffff) > (i_59_ ^ 0xffffffff)) { | |
aClass258_Sub3_Sub1_7776 = | |
Class371.method3583(false, is, 6406, i_59_, this, -45, 6406, i_58_); | |
aClass258_Sub3_Sub1_7776.configure(false, false); | |
f = aClass258_Sub3_Sub1_7776.u; | |
f_64_ = (aClass258_Sub3_Sub1_7776.s); | |
} else { | |
aClass258_Sub3_Sub1_7776.method1970(0, 0, i_58_, false, 0, i_59_, 6406, 123, is, 0); | |
f = ((float) i_59_ * (aClass258_Sub3_Sub1_7776.u) | |
/ (float) (aClass258_Sub3_Sub1_7776.length)); | |
f_64_ = | |
((float) i_58_ * (aClass258_Sub3_Sub1_7776.s) / (float) (aClass258_Sub3_Sub1_7776.width)); | |
} | |
method3792(58); | |
bindTexture(aClass258_Sub3_Sub1_7776); | |
setColorBlendMode(i_63_, 1); | |
OpenGL.glColor4ub((byte) (i_60_ >> -774897008), (byte) (i_60_ >> -1275297560), (byte) i_60_, | |
(byte) (i_60_ >> -1810921544)); | |
setFogColor(i_61_, 120); | |
setTextureCombiners(34165, 34165); | |
method3762(34166, 768, (byte) -87, 0); | |
method3762(5890, 770, (byte) -87, 2); | |
method3775(0, 770, 34166); | |
method3775(2, 770, 5890); | |
float f_65_ = (float) i; | |
float f_66_ = (float) i_57_; | |
float f_67_ = (float) i_58_ + f_65_; | |
float f_68_ = (float) i_59_ + f_66_; | |
OpenGL.glBegin(7); | |
OpenGL.glTexCoord2f(0.0F, 0.0F); | |
OpenGL.glVertex2f(f_65_, f_66_); | |
OpenGL.glTexCoord2f(0.0F, f_64_); | |
OpenGL.glVertex2f(f_65_, f_68_); | |
OpenGL.glTexCoord2f(f, f_64_); | |
OpenGL.glVertex2f(f_67_, f_68_); | |
OpenGL.glTexCoord2f(f, 0.0F); | |
OpenGL.glVertex2f(f_67_, f_66_); | |
OpenGL.glEnd(); | |
method3762(5890, 768, (byte) -87, 0); | |
method3762(34166, 770, (byte) -87, 2); | |
method3775(0, 770, 5890); | |
method3775(2, 770, 34166); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.Q(" + i + ',' + i_57_ + ',' + i_58_ + ',' + i_59_ + ',' + i_60_ + ',' + i_61_ + ',' + ( | |
is != null ? | |
"{...}" : | |
"null") + ',' + i_62_ + ',' + i_63_ + ')')); | |
} | |
} | |
final void method3684(ParticleColl class98) { | |
try { | |
particleDrawer.draw(this, (byte) -119, -1, class98); | |
anInt7569++; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.EF(" + (class98 != null ? "{...}" : "null") + ')'); | |
} | |
} | |
final void setTextureColor(float r, float g, float b, float a) { | |
InputStream_Sub2.fogColors[2] = b; | |
anInt7576++; | |
InputStream_Sub2.fogColors[0] = r; | |
InputStream_Sub2.fogColors[1] = g; | |
InputStream_Sub2.fogColors[3] = a; | |
// GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR | |
OpenGL.glTexEnvfv(8960, 8705, InputStream_Sub2.fogColors, 0); | |
} | |
final void setViewMatrix(Matrix4f matrix) { | |
do { | |
try { | |
anInt7549++; | |
this.viewMatrix.set(matrix); | |
this.invertedViewMatrix.set(this.viewMatrix); | |
this.invertedViewMatrix.invertTransformsYZ(); | |
this.skyboxMatrix.translate(this.invertedViewMatrix); | |
if ((anInt7865 ^ 0xffffffff) == -2) { | |
break; | |
} | |
method3754((byte) 89); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.DE(" + (matrix != null ? "{...}" : "null") + ')'); | |
} | |
break; | |
} while (false); | |
} | |
final void method3750(int i, IVertexBuffer interface2) { | |
try { | |
if (i <= 39) { | |
this.anInt7782 = 120; | |
} | |
if (interface2 != anInterface2_7852) { | |
if (vertexBufferSupport) { | |
OpenGL.glBindBufferARB(34962, interface2.method10(true)); | |
} | |
anInterface2_7852 = interface2; | |
} | |
anInt7552++; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.D(" + i + ',' + (interface2 != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void method3676(int i, int i_72_, int i_73_, int i_74_, int i_75_, int i_76_, int i_77_, | |
int i_78_, int i_79_, int i_80_, int i_81_, int i_82_, int i_83_) { | |
method3778((byte) -123); | |
anInt7567++; | |
setColorBlendMode(i_83_, 1); | |
OpenGL.glBegin(4); | |
OpenGL.glColor4ub((byte) (i_80_ >> -922029488), (byte) (i_80_ >> -363075352), (byte) i_80_, | |
(byte) (i_80_ >> -738592904)); | |
OpenGL.glVertex3f((float) i + 0.35F, (float) i_72_ + 0.35F, (float) i_73_); | |
OpenGL.glColor4ub((byte) (i_81_ >> 367288016), (byte) (i_81_ >> 1217613608), (byte) i_81_, | |
(byte) (i_81_ >> -1536249672)); | |
OpenGL.glVertex3f((float) i_74_ + 0.35F, (float) i_75_ + 0.35F, (float) i_76_); | |
OpenGL.glColor4ub((byte) (i_82_ >> -142028400), (byte) (i_82_ >> -1588100216), (byte) i_82_, | |
(byte) (i_82_ >> -377920360)); | |
OpenGL.glVertex3f(0.35F + (float) i_77_, (float) i_78_ + 0.35F, (float) i_79_); | |
OpenGL.glEnd(); | |
} | |
final void method3672() { | |
anInt7702++; | |
if (this.frameBufferSupport) { | |
if (currentDrawFbo != aClass206_7739) { | |
throw new RuntimeException(); | |
} | |
aClass206_7739.unbindTarget(0); | |
aClass206_7739.unbindTarget(8); | |
popFrameBuffer(aClass206_7739); | |
} else { | |
if (!aBoolean7866) { | |
throw new RuntimeException(""); | |
} | |
aClass105_Sub2_7744.method979(0, 0, this.viewportWidth, this.viewportHeight, 0, 0); | |
glContext.setSurface(aLong7636); | |
} | |
this.viewportWidth = canvasWidth; | |
aClass105_Sub2_7744 = null; | |
this.viewportHeight = canvasHeight; | |
method3755(-32); | |
updateViewport(true); | |
resetClip(); | |
} | |
final void pushDrawFrameBuffer(IFrameBuffer frameBuffer) { | |
try { | |
anInt7548++; | |
if (drawFboStackPointer >= 3) { | |
throw new RuntimeException(); | |
} | |
if (drawFboStackPointer >= 0) { | |
drawFbos[drawFboStackPointer].unbindDraw(); | |
} | |
currentDrawFbo = drawFbos[++drawFboStackPointer] = frameBuffer; | |
currentDrawFbo.bindDraw(); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, ("qo.NG(" + (frameBuffer != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void setDepthTestEnabled(boolean bool) { | |
if (!bool != !depthTestEnabled) { | |
if (!bool) { | |
OpenGL.glDisable(2929); | |
} else { | |
OpenGL.glEnable(2929); | |
} | |
depthTestEnabled = bool; | |
flags &= ~0x1f; | |
} | |
anInt7726++; | |
} | |
final GameFont createFont(FontConfig class143, SpriteConfig[] sprites, boolean bool) { | |
try { | |
anInt7574++; | |
return new GlFont(this, class143, sprites, bool); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.JE(" + (class143 != null ? "{...}" : "null") + ',' + (sprites != null ? | |
"{...}" : | |
"null") + ',' + bool + ')')); | |
} | |
} | |
final void fillQuad(int x, int y, int width, int height, int color, int blendMode) { | |
anInt7601++; | |
float x0 = (float) x + 0.35F; | |
float y0 = (float) y + 0.35F; | |
float x1 = (float) width + x0; | |
method3778((byte) -127); | |
float y1 = y0 + (float) height; | |
setColorBlendMode(blendMode, 1); | |
OpenGL.glColor4ub((byte) (color >> 569861520), (byte) (color >> 1465495208), (byte) color, | |
(byte) (color >> -928002024)); | |
if (multiSampleSupport) { | |
OpenGL.glDisable(32925); | |
} | |
OpenGL.glBegin(7); | |
OpenGL.glVertex2f(x0, y0); | |
OpenGL.glVertex2f(x0, y1); | |
OpenGL.glVertex2f(x1, y1); | |
OpenGL.glVertex2f(x1, y0); | |
OpenGL.glEnd(); | |
if (multiSampleSupport) { | |
OpenGL.glEnable(32925); | |
} | |
} | |
final void configureSun(int color, float intensity, float attenuation, float x, float y, | |
float z) { | |
anInt7633++; | |
boolean updatedColor = (sunColor ^ 0xffffffff) != (color ^ 0xffffffff); | |
if (updatedColor || this.intensity != intensity || attenuation != this.attenuation) { | |
this.intensity = intensity; | |
sunColor = color; | |
this.attenuation = attenuation; | |
if (updatedColor) { | |
this.sunBlue = (float) (sunColor & 0xff) / 255.0F; | |
this.sunRed = (float) (0xff0000 & sunColor) / 1.671168E7F; | |
this.sunGreen = (float) (0xff00 & sunColor) / 65280.0F; | |
setAmbientLighting(-93); | |
} | |
setSunDiffuseLighting(29890); | |
} | |
if (x != sunPosition[0] || sunPosition[1] != y || sunPosition[2] != z) { | |
sunPosition[2] = z; | |
sunPosition[1] = y; | |
sunPosition[0] = x; | |
inverseSunPosition[0] = -x; | |
inverseSunPosition[2] = -z; | |
inverseSunPosition[1] = -y; | |
float imagnitude = (float) (1.0 / Math.sqrt((double) (z * z + (y * y + x * x)))); | |
this.sunDirection[0] = imagnitude * x; | |
this.sunDirection[2] = z * imagnitude; | |
this.sunDirection[1] = imagnitude * y; | |
inverseSunDirection[2] = -this.sunDirection[2]; | |
inverseSunDirection[1] = -this.sunDirection[1]; | |
inverseSunDirection[0] = -this.sunDirection[0]; | |
setSunPosition(); | |
this.sunScreenY = (int) (256.0F * z / y); | |
this.sunScreenX = (int) (256.0F * x / y); | |
} | |
} | |
final int method3679(int i, int i_98_) { | |
anInt7634++; | |
return i | i_98_; | |
} | |
final void clearColorBuffer(int color) { | |
anInt7592++; | |
setColorBlendMode(0, 1); | |
OpenGL | |
.glClearColor((float) (color & 0xff0000) / 1.671168E7F, (float) (0xff00 & color) / 65280.0F, | |
(float) (0xff & color) / 255.0F, (float) (color >>> -968601000) / 255.0F); | |
// GL_COLOR_BUFFER_BIT 16384 | |
OpenGL.glClear(16384); | |
} | |
final void method3650(int i) { | |
anInt7646++; | |
} | |
final void setColorBlendMode(int i, int i_103_) { | |
if (i_103_ != 1) { | |
this.rectangleTextureSupport = false; | |
} | |
if (i != anInt7764) { | |
boolean bool; | |
int i_104_; | |
boolean bool_105_; | |
if ((i ^ 0xffffffff) == -2) { | |
bool_105_ = true; | |
i_104_ = 1; | |
bool = true; | |
} else if (i != 2) { | |
if ((i ^ 0xffffffff) != -129) { | |
bool = false; | |
i_104_ = 0; | |
bool_105_ = true; | |
} else { | |
i_104_ = 3; | |
bool_105_ = true; | |
bool = true; | |
} | |
} else { | |
bool_105_ = true; | |
i_104_ = 2; | |
bool = false; | |
} | |
if (!aBoolean7758 != !bool_105_) { | |
OpenGL.glColorMask(bool_105_, bool_105_, bool_105_, true); | |
aBoolean7758 = bool_105_; | |
} | |
if (!bool != !aBoolean7761) { | |
if (!bool) { | |
OpenGL.glDisable(3008); | |
} else { | |
OpenGL.glEnable(3008); | |
} | |
aBoolean7761 = bool; | |
} | |
if ((i_104_ ^ 0xffffffff) != (anInt7762 ^ 0xffffffff)) { | |
if (i_104_ == 1) { | |
OpenGL.glEnable(3042); | |
OpenGL.glBlendFunc(770, 771); | |
} else if (i_104_ == 2) { | |
OpenGL.glEnable(3042); | |
OpenGL.glBlendFunc(1, 1); | |
} else if (i_104_ == 3) { | |
OpenGL.glEnable(3042); | |
OpenGL.glBlendFunc(774, 1); | |
} else { | |
OpenGL.glDisable(3042); | |
} | |
anInt7762 = i_104_; | |
} | |
anInt7764 = i; | |
flags &= ~0x1c; | |
} | |
anInt7591++; | |
} | |
private final void method3754(byte i) { | |
anInt7689++; | |
if (i > 77) { | |
OpenGL.glLoadIdentity(); | |
OpenGL.glMultMatrixf(this.invertedViewMatrix.get(), 0); | |
if (aBoolean7859) { | |
materialShader.aClass286_Sub1_1586.method2141(false); | |
} | |
setSunPosition(); | |
method3783(0); | |
} | |
} | |
final void method3755(int i) { | |
if (anInt7865 != 0) { | |
flags &= ~0x1f; | |
anInt7865 = 0; | |
} | |
if (i == -32) { | |
anInt7708++; | |
} | |
} | |
final void drawArrays(int mode, int first, int count) { | |
anInt7555++; | |
OpenGL.glDrawArrays(mode, first, count); | |
} | |
final void drawHorizontalLine(int i, int i_109_, int i_110_, int i_111_, int i_112_) { | |
method3778((byte) -119); | |
anInt7525++; | |
setColorBlendMode(i_112_, 1); | |
float f = (float) i + 0.35F; | |
OpenGL.glColor4ub((byte) (i_111_ >> -396044880), (byte) (i_111_ >> -86733240), (byte) i_111_, | |
(byte) (i_111_ >> -339234760)); | |
float f_113_ = (float) i_109_ + 0.35F; | |
OpenGL.glBegin(1); | |
OpenGL.glVertex2f(f, f_113_); | |
OpenGL.glVertex2f((float) i_110_ + f, f_113_); | |
OpenGL.glEnd(); | |
} | |
final void setTextureSize(int i) { | |
anInt7635++; | |
if ((i ^ 0xffffffff) > -129 || (i ^ 0xffffffff) < -1025) { | |
throw new IllegalArgumentException(); | |
} | |
this.textureSize = i; | |
textureCache.clear((byte) -110); | |
} | |
final void setAmbientLightIntensity(float f) { | |
if (this.ambientIntensity != f) { | |
this.ambientIntensity = f; | |
setAmbientLighting(-105); | |
} | |
anInt7668++; | |
} | |
final void method3757(int i, int i_114_) { | |
setMaterial(true, i, -104); | |
anInt7649++; | |
if (i_114_ > -43) { | |
toggleLighting((byte) 85); | |
} | |
} | |
final void method3758(boolean bool, GlMatrix4f class101_sub3) { | |
try { | |
OpenGL.glPushMatrix(); | |
if (bool != false) { | |
method3650(51); | |
} | |
anInt7653++; | |
OpenGL.glMultMatrixf(class101_sub3.get(), 0); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.WC(" + bool + ',' + (class101_sub3 != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final Sprite method3683(int i, int i_115_, int i_116_, int i_117_, boolean bool) { | |
anInt7582++; | |
return new GlSprite(this, i, i_115_, i_116_, i_117_); | |
} | |
final void drawElements(int count, int target, IElementBufferObject elementBuffer, int offset) { | |
try { | |
anInt7619++; | |
int type = elementBuffer.getType(-5711); | |
offset *= getSize(type, 4); | |
bind(elementBuffer); | |
OpenGL | |
.glDrawElements(target, count, type, (elementBuffer.getAddress((byte) 78) + (long) offset)); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.MA(" + count + ',' + target + ',' + (elementBuffer != null ? "{...}" : "null") + ',' | |
+ offset + ')')); | |
} | |
} | |
final synchronized void cleanup(int i) { | |
anInt7699++; | |
int i_122_ = 0; | |
i &= 0x7fffffff; | |
while (!aClass262_7751.isEmpty()) { | |
IntegerNode class348_sub35 = (IntegerNode) aClass262_7751.pollFirst(8); | |
Class328_Sub3.anIntArray6522[i_122_++] = (int) class348_sub35.nodeKey; | |
this.anInt7747 -= class348_sub35.anInt6976; | |
if (i_122_ == 1000) { | |
OpenGL.glDeleteBuffersARB(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
} | |
if (i_122_ > 0) { | |
OpenGL.glDeleteBuffersARB(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
while (!aClass262_7752.isEmpty()) { | |
IntegerNode class348_sub35 = (IntegerNode) aClass262_7752.pollFirst(8); | |
Class328_Sub3.anIntArray6522[i_122_++] = (int) class348_sub35.nodeKey; | |
this.anInt7748 -= class348_sub35.anInt6976; | |
if (i_122_ == 1000) { | |
OpenGL.glDeleteTextures(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
} | |
if (i_122_ > 0) { | |
OpenGL.glDeleteTextures(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
while (!aClass262_7753.isEmpty()) { | |
IntegerNode class348_sub35 = (IntegerNode) aClass262_7753.pollFirst(8); | |
Class328_Sub3.anIntArray6522[i_122_++] = class348_sub35.anInt6976; | |
if ((i_122_ ^ 0xffffffff) == -1001) { | |
OpenGL.glDeleteFramebuffersEXT(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
} | |
if (i_122_ > 0) { | |
OpenGL.glDeleteFramebuffersEXT(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
while (!aClass262_7754.isEmpty()) { | |
IntegerNode class348_sub35 = (IntegerNode) aClass262_7754.pollFirst(8); | |
Class328_Sub3.anIntArray6522[i_122_++] = (int) class348_sub35.nodeKey; | |
anInt7750 -= class348_sub35.anInt6976; | |
if ((i_122_ ^ 0xffffffff) == -1001) { | |
OpenGL.glDeleteRenderbuffersEXT(i_122_, Class328_Sub3.anIntArray6522, 0); | |
i_122_ = 0; | |
} | |
} | |
if (i_122_ > 0) { | |
OpenGL.glDeleteRenderbuffersEXT(i_122_, Class328_Sub3.anIntArray6522, 0); | |
boolean bool = false; | |
} | |
while (!aClass262_7749.isEmpty()) { | |
IntegerNode class348_sub35 = (IntegerNode) aClass262_7749.pollFirst(8); | |
OpenGL.glDeleteLists((int) class348_sub35.nodeKey, class348_sub35.anInt6976); | |
} | |
while (!aClass262_7755.isEmpty()) { | |
Node class348 = aClass262_7755.pollFirst(8); | |
OpenGL.glDeleteProgramARB((int) class348.nodeKey); | |
} | |
while (!aClass262_7756.isEmpty()) { | |
Node class348 = aClass262_7756.pollFirst(8); | |
OpenGL.glDeleteObjectARB(class348.nodeKey); | |
} | |
while (!aClass262_7749.isEmpty()) { | |
IntegerNode class348_sub35 = (IntegerNode) aClass262_7749.pollFirst(8); | |
OpenGL.glDeleteLists((int) class348_sub35.nodeKey, class348_sub35.anInt6976); | |
} | |
textureCache.method3469(8218); | |
if ((E() ^ 0xffffffff) < -100663297 && 60000L + aLong7757 < Class62.getCurrentTimeMillis()) { | |
System.gc(); | |
aLong7757 = Class62.getCurrentTimeMillis(); | |
} | |
this.time = i; | |
} | |
final void drawLine(int x0, int y0, int x1, int y1, int color, int i_127_) { | |
method3778((byte) -124); | |
anInt7611++; | |
setColorBlendMode(i_127_, 1); | |
float width = (float) x1 - (float) x0; | |
float length = (float) -y0 + (float) y1; | |
if (width == 0.0F && length == 0.0F) { | |
width = 1.0F; | |
} else { | |
float p = (float) (1.0 / Math.sqrt((double) (width * width + length * length))); | |
width *= p; | |
length *= p; | |
} | |
OpenGL.glColor4ub((byte) (color >> -2077419600), (byte) (color >> 1360079592), (byte) color, | |
(byte) (color >> 1738929368)); | |
OpenGL.glBegin(1); | |
OpenGL.glVertex2f(0.35F + (float) x0, (float) y0 + 0.35F); | |
OpenGL.glVertex2f(0.35F + (width + (float) x1), 0.35F + (length + (float) y1)); | |
OpenGL.glEnd(); | |
} | |
final void b(int i, int i_130_, int i_131_, int i_132_, double d) { | |
anInt7535++; | |
} | |
final void method3760(int i) { | |
if (i != 1) { | |
drawElements(65, -33, null, -33); | |
} | |
anInt7643++; | |
if ((flags ^ 0xffffffff) != -17) { | |
method3742(3); | |
method3807(true); | |
setDepthTestEnabled(true); | |
method3748(true); | |
setColorBlendMode(1, i); | |
flags = 16; | |
} | |
} | |
final void setTextureBlendMode(int mode) { | |
anInt7654++; | |
// GL_REPLACE | |
if ((mode ^ 0xffffffff) == -2) { | |
setTextureCombiners(7681, 7681); | |
// GL_MODULATE | |
} else if (mode == 0) { | |
setTextureCombiners(8448, 8448); | |
} else if (mode != 2) { | |
if ((mode ^ 0xffffffff) != -4) { | |
if (mode == 4) { | |
setTextureCombiners(34023, 34023); | |
} | |
} else { | |
setTextureCombiners(260, 8448); | |
} | |
} else { | |
setTextureCombiners(34165, 7681); | |
} | |
} | |
final boolean method3695() { | |
anInt7547++; | |
return true; | |
} | |
final void method3762(int i, int i_134_, byte i_135_, int i_136_) { | |
anInt7671++; | |
OpenGL.glTexEnvi(8960, 34176 - -i_136_, i); | |
OpenGL.glTexEnvi(8960, i_136_ + 34192, i_134_); | |
if (i_135_ != -87) { | |
r(48, 67, -20, 106, -89, 67, 104); | |
} | |
} | |
private final void method3763(int i) { | |
anInt7516++; | |
if (anInt7865 != 1) { | |
OpenGL.glMatrixMode(5889); | |
OpenGL.glLoadIdentity(); | |
if ((this.viewportWidth ^ 0xffffffff) < -1 && this.viewportHeight > 0) { | |
OpenGL | |
.glOrtho(0.0, (double) this.viewportWidth, (double) this.viewportHeight, 0.0, -1.0, 1.0); | |
} | |
OpenGL.glMatrixMode(5888); | |
OpenGL.glLoadIdentity(); | |
anInt7865 = 1; | |
flags &= ~0x18; | |
} | |
if (i != 5888) { | |
method3763(-122); | |
} | |
} | |
final void popDrawFrameBuffer(IFrameBuffer frameBuffer) { | |
try { | |
anInt7586++; | |
if (drawFboStackPointer < 0 || drawFbos[drawFboStackPointer] != frameBuffer) { | |
throw new RuntimeException(); | |
} | |
drawFbos[drawFboStackPointer--] = null; | |
frameBuffer.unbindDraw(); | |
if (drawFboStackPointer < 0) { | |
currentDrawFbo = null; | |
} else { | |
currentDrawFbo = drawFbos[drawFboStackPointer]; | |
currentDrawFbo.bindDraw(); | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, ("qo.FA(" + (frameBuffer != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final synchronized void method3765(byte i, int i_137_) { | |
anInt7566++; | |
Node class348 = new Node(); | |
class348.nodeKey = (long) i_137_; | |
if (i <= 64) { | |
method3685(null, -38); | |
} | |
aClass262_7755.addLast(class348); | |
} | |
final void loadMatrix(byte i, GlMatrix4f class101_sub3) { | |
do { | |
try { | |
anInt7623++; | |
OpenGL.glLoadMatrixf(class101_sub3.get(), 0); | |
if (i == 55) { | |
break; | |
} | |
pushReadFrameBuffer(null); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.GC(" + i + ',' + (class101_sub3 != null ? "{...}" : "null") + ')')); | |
} | |
break; | |
} while (false); | |
} | |
final void configureBloom(float threshold, float sourceIntensity, float bloomIntensity) { | |
Sampler24.bloomIntensity = bloomIntensity; | |
Class75_Sub1.thresholdBrightness = threshold; | |
anInt7685++; | |
Class239_Sub26.sourceIntensity = sourceIntensity; | |
} | |
final void method3701(Canvas canvas) { | |
do { | |
try { | |
anInt7674++; | |
if (canvas == aCanvas7626) { | |
throw new RuntimeException(); | |
} | |
if (!surfaces.containsKey(canvas)) { | |
break; | |
} | |
Long var_long = (Long) surfaces.get(canvas); | |
glContext.releaseSurface(canvas, var_long.longValue()); | |
surfaces.remove(canvas); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.AG(" + (canvas != null ? "{...}" : "null") + ')'); | |
} | |
break; | |
} while (false); | |
} | |
private final void loadTextureIdentityMatrix(int i) { | |
anInt7599++; | |
if (aBoolean7860) { | |
// GL_TEXTURE | |
OpenGL.glMatrixMode(5890); | |
OpenGL.glLoadIdentity(); | |
// GL_MODELVIEW | |
OpenGL.glMatrixMode(5888); | |
aBoolean7860 = false; | |
} | |
} | |
final boolean method3670() { | |
anInt7557++; | |
return true; | |
} | |
final void za(int i, int i_140_, int i_141_, int i_142_, int i_143_) { | |
if (i_141_ < 0) { | |
i_141_ = -i_141_; | |
} | |
anInt7728++; | |
if ((i + i_141_ ^ 0xffffffff) <= (lowerClipX ^ 0xffffffff) && upperClipX >= -i_141_ + i | |
&& lowerClipY <= i_140_ + i_141_ && (upperClipY ^ 0xffffffff) <= (i_140_ + -i_141_ | |
^ 0xffffffff)) { | |
method3778((byte) -117); | |
setColorBlendMode(i_143_, 1); | |
OpenGL.glColor4ub((byte) (i_142_ >> -202869680), (byte) (i_142_ >> -114727128), (byte) i_142_, | |
(byte) (i_142_ >> -1918896680)); | |
float f = (float) i + 0.35F; | |
float f_144_ = (float) i_140_ + 0.35F; | |
int i_145_ = i_141_ << -1645082495; | |
if (aFloat7829 > (float) i_145_) { | |
OpenGL.glBegin(7); | |
OpenGL.glVertex2f(1.0F + f, 1.0F + f_144_); | |
OpenGL.glVertex2f(f + 1.0F, -1.0F + f_144_); | |
OpenGL.glVertex2f(-1.0F + f, f_144_ - 1.0F); | |
OpenGL.glVertex2f(-1.0F + f, f_144_ + 1.0F); | |
OpenGL.glEnd(); | |
} else if (aFloat7800 >= (float) i_145_) { | |
OpenGL.glEnable(2832); | |
OpenGL.glPointSize((float) i_145_); | |
OpenGL.glBegin(0); | |
OpenGL.glVertex2f(f, f_144_); | |
OpenGL.glEnd(); | |
OpenGL.glDisable(2832); | |
} else { | |
OpenGL.glBegin(6); | |
OpenGL.glVertex2f(f, f_144_); | |
int i_146_ = 262144 / (6 * i_141_); | |
if (i_146_ > 64) { | |
if (i_146_ > 512) { | |
i_146_ = 512; | |
} | |
} else { | |
i_146_ = 64; | |
} | |
i_146_ = ThresholdSampler.getHighestBit(i_146_); | |
OpenGL.glVertex2f((float) i_141_ + f, f_144_); | |
for (int i_147_ = 16384 + -i_146_; (i_147_ ^ 0xffffffff) < -1; i_147_ -= i_146_) { | |
OpenGL.glVertex2f((float) i_141_ * (Class348_Sub23.cos[i_147_]) + f, | |
(float) i_141_ * (Class348_Sub23.sin[i_147_]) + f_144_); | |
} | |
OpenGL.glVertex2f(f + (float) i_141_, f_144_); | |
OpenGL.glEnd(); | |
} | |
} | |
} | |
final void method3659(int i) { | |
method3776(22544); | |
anInt7541++; | |
} | |
private final void toggleLighting(byte i) { | |
anInt7519++; | |
if (i >= -69) { | |
this.aClass64_Sub3_7802 = null; | |
} | |
if (!aBoolean7784 || aBoolean7805) { | |
OpenGL.glDisable(2896); | |
} else { | |
OpenGL.glEnable(2896); | |
} | |
} | |
final void destroy() { | |
for (Node class348 = aClass262_7732.getFirst(); | |
class348 != null; class348 = aClass262_7732.getNext()) { | |
((za_Sub1) class348).method3440(-82); | |
} | |
anInt7563++; | |
if (postProcessing != null) { | |
postProcessing.method279((byte) -126); | |
} | |
if (glContext != null) { | |
method3797(0); | |
Enumeration enumeration = surfaces.keys(); | |
while (enumeration.hasMoreElements()) { | |
Canvas canvas = (Canvas) enumeration.nextElement(); | |
Long surfacePointer = (Long) surfaces.get(canvas); | |
glContext.releaseSurface(canvas, surfacePointer.longValue()); | |
} | |
glContext.release(); | |
glContext = null; | |
} | |
if (aBoolean7734) { | |
GlSkyboxShader.method2173(true, 12, false); | |
aBoolean7734 = false; | |
} | |
} | |
final void method3673() { | |
anInt7568++; | |
if (aBoolean7774 && (this.viewportWidth ^ 0xffffffff) < -1 | |
&& (this.viewportHeight ^ 0xffffffff) < -1) { | |
int i = lowerClipX; | |
int i_148_ = upperClipX; | |
int i_149_ = lowerClipY; | |
int i_150_ = upperClipY; | |
resetClip(); | |
OpenGL.glReadBuffer(1028); | |
OpenGL.glDrawBuffer(1029); | |
method3755(-32); | |
method3807(false); | |
method3728(false); | |
setDepthTestEnabled(false); | |
method3748(false); | |
bindTexture(null); | |
method3757(-2, -88); | |
setTextureBlendMode(1); | |
setColorBlendMode(0, 1); | |
OpenGL.glMatrixMode(5889); | |
OpenGL.glLoadIdentity(); | |
OpenGL.glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); | |
OpenGL.glMatrixMode(5888); | |
OpenGL.glLoadIdentity(); | |
OpenGL.glRasterPos2i(0, 0); | |
OpenGL.glCopyPixels(0, 0, this.viewportWidth, this.viewportHeight, 6144); | |
OpenGL.glFlush(); | |
OpenGL.glReadBuffer(1029); | |
OpenGL.glDrawBuffer(1029); | |
setClip(i, i_149_, i_148_, i_150_); | |
} | |
} | |
final CubeMap createTexturedCubeMap(int i, int i_151_, int i_152_, int i_153_, int i_154_, | |
int i_155_) { | |
anInt7515++; | |
if (this.cubemapTextureSupport) { | |
return new GlTexturedCubeMap(this, i, i_151_, i_152_, i_153_, i_154_, i_155_); | |
} | |
return null; | |
} | |
final synchronized void method3769(long l, boolean bool) { | |
try { | |
if (bool != false) { | |
aClass262_7751 = null; | |
} | |
anInt7533++; | |
Node class348 = new Node(); | |
class348.nodeKey = l; | |
aClass262_7756.addLast(class348); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, "qo.CD(" + l + ',' + bool + ')'); | |
} | |
} | |
final void popFrameBuffer(IFrameBuffer frameBuffer) { | |
do { | |
try { | |
anInt7598++; | |
if (this.frameBufferBlitSupport) { | |
popReadFrameBuffer(frameBuffer); | |
popDrawFrameBuffer(frameBuffer); | |
} else { | |
if (frameBufferStackPointer < 0 | |
|| frameBufferStack[frameBufferStackPointer] != frameBuffer) { | |
throw new RuntimeException(); | |
} | |
frameBufferStack[frameBufferStackPointer--] = null; | |
frameBuffer.unbind(); | |
if ((frameBufferStackPointer ^ 0xffffffff) > -1) { | |
currentReadFrameBuffer = currentDrawFbo = null; | |
} else { | |
currentReadFrameBuffer = currentDrawFbo = frameBufferStack[frameBufferStackPointer]; | |
currentReadFrameBuffer.bind(); | |
} | |
} | |
this.anInt7788 = 30; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.FD(" + (frameBuffer != null ? "{...}" : "null") + ')')); | |
} | |
break; | |
} while (false); | |
} | |
final void bindTexture(GlTexture texture) { | |
try { | |
anInt7673++; | |
GlTexture activeTexture = activeTextures[activeTextureId]; | |
if (activeTexture != texture) { | |
if (texture == null) { | |
OpenGL.glDisable(activeTexture.type); | |
} else { | |
if (activeTexture != null) { | |
if ((texture.type ^ 0xffffffff) != (activeTexture.type ^ 0xffffffff)) { | |
OpenGL.glDisable(activeTexture.type); | |
OpenGL.glEnable(texture.type); | |
} | |
} else { | |
OpenGL.glEnable(texture.type); | |
} | |
OpenGL.glBindTexture(texture.type, texture.getId()); | |
} | |
activeTextures[activeTextureId] = texture; | |
} | |
flags &= ~0x1; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, ("qo.VA(" + (texture != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void disableBloom() { | |
if (bloom != null && bloom.isEnabled()) { | |
postProcessing.disableProcess(bloom); | |
textureCache.clear((byte) -110); | |
} | |
anInt7612++; | |
} | |
final void method3674(int i, int i_157_, int i_158_, int i_159_, int i_160_, int i_161_, | |
int i_162_, int i_163_, int i_164_) { | |
anInt7656++; | |
if ((i ^ 0xffffffff) != (i_158_ ^ 0xffffffff) || i_157_ != i_159_) { | |
method3778((byte) -119); | |
setColorBlendMode(i_161_, 1); | |
float f = (float) i_158_ - (float) i; | |
float f_165_ = (float) i_159_ - (float) i_157_; | |
float f_166_ = (float) (1.0 / Math.sqrt((double) (f_165_ * f_165_ + f * f))); | |
f *= f_166_; | |
f_165_ *= f_166_; | |
OpenGL.glColor4ub((byte) (i_160_ >> -407472976), (byte) (i_160_ >> 530490792), (byte) i_160_, | |
(byte) (i_160_ >> -460617384)); | |
i_164_ %= i_162_ + i_163_; | |
float f_167_ = (float) i_162_ * f; | |
float f_168_ = f_165_ * (float) i_162_; | |
float f_169_ = 0.0F; | |
float f_170_ = 0.0F; | |
float f_171_ = f_167_; | |
float f_172_ = f_168_; | |
if (i_164_ <= i_162_) { | |
f_172_ = (float) (-i_164_ + i_162_) * f_165_; | |
f_171_ = f * (float) (-i_164_ + i_162_); | |
} else { | |
f_170_ = (float) (i_163_ + i_162_ - i_164_) * f_165_; | |
f_169_ = (float) (i_163_ + i_162_ - i_164_) * f; | |
} | |
float f_173_ = f_169_ + (0.35F + (float) i); | |
float f_174_ = 0.35F + (float) i_157_ + f_170_; | |
float f_175_ = f * (float) i_163_; | |
float f_176_ = f_165_ * (float) i_163_; | |
for (; ; ) { | |
if ((i_158_ ^ 0xffffffff) >= (i ^ 0xffffffff)) { | |
if ((float) i_158_ + 0.35F > f_173_) { | |
break; | |
} | |
if (f_173_ + f_171_ < (float) i_158_) { | |
f_171_ = -f_173_ + (float) i_158_; | |
} | |
} else { | |
if (f_173_ > (float) i_158_ + 0.35F) { | |
break; | |
} | |
if (f_173_ + f_171_ > (float) i_158_) { | |
f_171_ = -f_173_ + (float) i_158_; | |
} | |
} | |
if (i_157_ >= i_159_) { | |
if ((float) i_159_ + 0.35F > f_174_) { | |
break; | |
} | |
if (f_172_ + f_174_ < (float) i_159_) { | |
f_172_ = (float) i_159_ - f_174_; | |
} | |
} else { | |
if ((float) i_159_ + 0.35F < f_174_) { | |
break; | |
} | |
if (f_172_ + f_174_ > (float) i_159_) { | |
f_172_ = -f_174_ + (float) i_159_; | |
} | |
} | |
OpenGL.glBegin(1); | |
OpenGL.glVertex2f(f_173_, f_174_); | |
OpenGL.glVertex2f(f_173_ + f_171_, f_172_ + f_174_); | |
OpenGL.glEnd(); | |
f_174_ += f_172_ + f_176_; | |
f_173_ += f_175_ + f_171_; | |
f_171_ = f_167_; | |
f_172_ = f_168_; | |
} | |
} | |
} | |
final void bindCanvas(Canvas canvas, int i, int i_177_) { | |
do { | |
try { | |
anInt7544++; | |
if (aCanvas7626 == canvas) { | |
throw new RuntimeException(); | |
} | |
if (surfaces.containsKey(canvas)) { | |
break; | |
} | |
if (!canvas.isShowing()) { | |
throw new RuntimeException(); | |
} | |
try { | |
Class canvasClass = Class.forName("java.awt.Canvas"); | |
Method ignoreRepaint = canvasClass.getMethod("setIgnoreRepaint", Boolean.TYPE); | |
ignoreRepaint.invoke(canvas, Boolean.TRUE); | |
} catch (Exception exception) { | |
/* empty */ | |
} | |
long surfacePointer = glContext.prepareSurface(canvas); | |
if (surfacePointer == -1L) { | |
throw new RuntimeException(); | |
} | |
surfaces.put(canvas, new Long(surfacePointer)); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.VF(" + (canvas != null ? "{...}" : "null") + ',' + i + ',' + i_177_ + ')')); | |
} | |
break; | |
} while (false); | |
} | |
private final void method3772(byte i) { | |
this.centerAndClipUpperX = (float) (-this.projectionCenterX + upperClipX); | |
anInt7709++; | |
this.centerAndClipLowerX = (float) (-this.projectionCenterX + lowerClipX); | |
this.centerAndClipLowerY = (float) (-this.projectionCenterY + lowerClipY); | |
if (i < 123) { | |
X(-79); | |
} | |
this.centerAndClipUppery = (float) (upperClipY + -this.projectionCenterY); | |
} | |
final NativeBufferSomething method3702(int i) { | |
anInt7538++; | |
za_Sub1 var_za_Sub1 = new za_Sub1(i); | |
aClass262_7732.addLast(var_za_Sub1); | |
return var_za_Sub1; | |
} | |
final s method3648(int i, int i_178_, int[][] is, int[][] is_179_, int i_180_, int i_181_, | |
int i_182_) { | |
try { | |
anInt7600++; | |
return new s_Sub2(this, i_181_, i_182_, i, i_178_, is, is_179_, i_180_); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.VE(" + i + ',' + i_178_ + ',' + (is != null ? "{...}" : "null") + ',' + ( | |
is_179_ != null ? "{...}" : "null") + ',' + i_180_ + ',' + i_181_ + ',' + i_182_ + ')')); | |
} | |
} | |
final boolean method3682() { | |
anInt7705++; | |
return true; | |
} | |
final void pushFrameBuffer(IFrameBuffer frameBuffer) { | |
try { | |
anInt7617++; | |
if (this.frameBufferBlitSupport) { | |
pushReadFrameBuffer(frameBuffer); | |
pushDrawFrameBuffer(frameBuffer); | |
} else { | |
if (frameBufferStackPointer >= 3) { | |
throw new RuntimeException(); | |
} | |
if (frameBufferStackPointer >= 0) { | |
frameBufferStack[frameBufferStackPointer].unbind(); | |
} | |
currentReadFrameBuffer = | |
currentDrawFbo = frameBufferStack[++frameBufferStackPointer] = frameBuffer; | |
currentReadFrameBuffer.bind(); | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, ("qo.JB(" + (frameBuffer != null ? "{...}" : "null") + ')')); | |
} | |
} | |
private final int method3774(byte i) { | |
anInt7518++; | |
int i_183_ = 0; | |
vendor = OpenGL.glGetString(7936).toLowerCase(); | |
renderer = OpenGL.glGetString(7937).toLowerCase(); | |
if (vendor.indexOf("microsoft") != -1) { | |
i_183_ |= 0x1; | |
} | |
if (vendor.indexOf("brian paul") != -1 || vendor.indexOf("mesa") != -1) { | |
i_183_ |= 0x1; | |
} | |
String string = OpenGL.glGetString(7938); | |
String[] strings = Sampler28.split(string.replace('.', ' '), ' '); | |
if (strings.length >= 2) { | |
try { | |
int i_184_ = Class348_Sub41.parseInt(strings[0]); | |
int i_185_ = Class348_Sub41.parseInt(strings[1]); | |
version = i_184_ * 10 - -i_185_; | |
} catch (NumberFormatException numberformatexception) { | |
i_183_ |= 0x4; | |
} | |
} else { | |
i_183_ |= 0x4; | |
} | |
if ((version ^ 0xffffffff) > -13) { | |
i_183_ |= 0x2; | |
} | |
if (!glContext.a("GL_ARB_multitexture")) { | |
i_183_ |= 0x8; | |
} | |
if (!glContext.a("GL_ARB_texture_env_combine")) { | |
i_183_ |= 0x20; | |
} | |
if (i > -58) { | |
return 48; | |
} | |
int[] is = new int[1]; | |
OpenGL.glGetIntegerv(34018, is, 0); | |
this.maxTextureUnits = is[0]; | |
OpenGL.glGetIntegerv(34929, is, 0); | |
anInt7799 = is[0]; | |
OpenGL.glGetIntegerv(34930, is, 0); | |
anInt7819 = is[0]; | |
if (this.maxTextureUnits < 2 || (anInt7799 ^ 0xffffffff) > -3 | |
|| (anInt7819 ^ 0xffffffff) > -3) { | |
i_183_ |= 0x10; | |
} | |
this.bigEndian = Stream.c(); | |
aBoolean7866 = glContext.arePbuffersAvailable(); | |
vertexBufferSupport = glContext.a("GL_ARB_vertex_buffer_object"); | |
multiSampleSupport = glContext.a("GL_ARB_multisample"); | |
this.aBoolean7841 = glContext.a("GL_ARB_vertex_program"); | |
glContext.a("GL_ARB_fragment_program"); | |
this.aBoolean7791 = glContext.a("GL_ARB_vertex_shader"); | |
this.fragmentShaderSupport = glContext.a("GL_ARB_fragment_shader"); | |
this.texture3dSupport = glContext.a("GL_EXT_texture3D"); | |
this.rectangleTextureSupport = glContext.a("GL_ARB_texture_rectangle"); | |
this.cubemapTextureSupport = glContext.a("GL_ARB_texture_cube_map"); | |
this.textureFloatSupport = glContext.a("GL_ARB_texture_float"); | |
this.aBoolean7793 = false; | |
this.frameBufferSupport = glContext.a("GL_EXT_framebuffer_object"); | |
this.frameBufferBlitSupport = glContext.a("GL_EXT_framebuffer_blit"); | |
this.multisamplingSupport = glContext.a("GL_EXT_framebuffer_multisample"); | |
aBoolean7822 = this.multisamplingSupport & this.frameBufferBlitSupport; | |
OpenGL.glGetFloatv(2834, InputStream_Sub2.fogColors, 0); | |
aFloat7829 = InputStream_Sub2.fogColors[0]; | |
aFloat7800 = InputStream_Sub2.fogColors[1]; | |
if (i_183_ != 0) { | |
return i_183_; | |
} | |
return 0; | |
} | |
final void method3703(int i, int i_186_, int i_187_, int i_188_, int i_189_, int i_190_, | |
aa var_aa, int i_191_, int i_192_, int i_193_, int i_194_, int i_195_) { | |
try { | |
anInt7618++; | |
if (i_187_ != i || (i_186_ ^ 0xffffffff) != (i_188_ ^ 0xffffffff)) { | |
aa_Sub1 var_aa_Sub1 = (aa_Sub1) var_aa; | |
GlTexture2dA class258_sub3_sub1 = var_aa_Sub1.aClass258_Sub3_Sub1_5193; | |
method3792(90); | |
bindTexture(var_aa_Sub1.aClass258_Sub3_Sub1_5193); | |
setColorBlendMode(i_190_, 1); | |
setTextureCombiners(7681, 8448); | |
method3762(34167, 768, (byte) -87, 0); | |
float f = (class258_sub3_sub1.s / (float) (class258_sub3_sub1.width0)); | |
float f_196_ = (class258_sub3_sub1.u / (float) (class258_sub3_sub1.height0)); | |
float f_197_ = (float) -i + (float) i_187_; | |
float f_198_ = (float) i_188_ - (float) i_186_; | |
float f_199_ = (float) (1.0 / Math.sqrt((double) (f_197_ * f_197_ + f_198_ * f_198_))); | |
OpenGL | |
.glColor4ub((byte) (i_189_ >> -1912919152), (byte) (i_189_ >> 2066160904), (byte) i_189_, | |
(byte) (i_189_ >> 1342572312)); | |
f_197_ *= f_199_; | |
f_198_ *= f_199_; | |
i_195_ %= i_194_ + i_193_; | |
float f_200_ = (float) i_193_ * f_197_; | |
float f_201_ = f_198_ * (float) i_193_; | |
float f_202_ = 0.0F; | |
float f_203_ = 0.0F; | |
float f_204_ = f_200_; | |
float f_205_ = f_201_; | |
if (i_195_ <= i_193_) { | |
f_204_ = f_197_ * (float) (-i_195_ + i_193_); | |
f_205_ = f_198_ * (float) (i_193_ + -i_195_); | |
} else { | |
f_203_ = (float) (-i_195_ + (i_193_ - -i_194_)) * f_198_; | |
f_202_ = (float) (i_193_ - -i_194_ - i_195_) * f_197_; | |
} | |
float f_206_ = f_202_ + ((float) i + 0.35F); | |
float f_207_ = (float) i_186_ + 0.35F + f_203_; | |
float f_208_ = (float) i_194_ * f_197_; | |
float f_209_ = (float) i_194_ * f_198_; | |
for (; ; ) { | |
if ((i_187_ ^ 0xffffffff) < (i ^ 0xffffffff)) { | |
if (f_206_ > 0.35F + (float) i_187_) { | |
break; | |
} | |
if ((float) i_187_ < f_206_ + f_204_) { | |
f_204_ = (float) i_187_ - f_206_; | |
} | |
} else { | |
if ((float) i_187_ + 0.35F > f_206_) { | |
break; | |
} | |
if ((float) i_187_ > f_206_ + f_204_) { | |
f_204_ = -f_206_ + (float) i_187_; | |
} | |
} | |
if (i_188_ <= i_186_) { | |
if (0.35F + (float) i_188_ > f_207_) { | |
break; | |
} | |
if ((float) i_188_ > f_207_ + f_205_) { | |
f_205_ = (float) i_188_ - f_207_; | |
} | |
} else { | |
if (f_207_ > 0.35F + (float) i_188_) { | |
break; | |
} | |
if ((float) i_188_ < f_205_ + f_207_) { | |
f_205_ = (float) i_188_ - f_207_; | |
} | |
} | |
OpenGL.glBegin(1); | |
OpenGL.glTexCoord2f(f * ((float) -i_191_ + f_206_), f_196_ * ((float) -i_192_ + f_207_)); | |
OpenGL.glVertex2f(f_206_, f_207_); | |
OpenGL.glTexCoord2f((f_206_ + f_204_ - (float) i_191_) * f, | |
(((float) -i_192_ + (f_207_ + f_205_)) * f_196_)); | |
OpenGL.glVertex2f(f_204_ + f_206_, f_207_ + f_205_); | |
OpenGL.glEnd(); | |
f_206_ += f_204_ + f_208_; | |
f_207_ += f_205_ + f_209_; | |
f_205_ = f_201_; | |
f_204_ = f_200_; | |
} | |
method3762(5890, 768, (byte) -87, 0); | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.IF(" + i + ',' + i_186_ + ',' + i_187_ + ',' + i_188_ + ',' + i_189_ + ',' + i_190_ | |
+ ',' + (var_aa != null ? "{...}" : "null") + ',' + i_191_ + ',' + i_192_ + ',' + i_193_ | |
+ ',' + i_194_ + ',' + i_195_ + ')')); | |
} | |
} | |
final void X(int i) { | |
this.anInt7731 = 0; | |
anInt7521++; | |
for (/**/; (i ^ 0xffffffff) < -2; i >>= 1) { | |
this.anInt7731++; | |
} | |
this.anInt7733 = 1 << this.anInt7731; | |
} | |
final aa method3661(int i, int i_210_, int[] is, int[] is_211_) { | |
try { | |
anInt7589++; | |
return RuntimeException_Sub1.method4009(i, is, is_211_, 0, this, i_210_); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.RF(" + i + ',' + i_210_ + ',' + (is != null ? "{...}" : "null") + ',' + ( | |
is_211_ != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void getViewportDimensions(int[] is) { | |
try { | |
is[0] = this.viewportWidth; | |
anInt7675++; | |
is[1] = this.viewportHeight; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.KE(" + (is != null ? "{...}" : "null") + ')'); | |
} | |
} | |
final void method3651(NativeBufferSomething var_za) { | |
do { | |
try { | |
this.aNativeHeap7730 = ((za_Sub1) var_za).nativeHeap; | |
anInt7573++; | |
if (anInterface2_7797 != null) { | |
break; | |
} | |
FBuffer class348_sub49_sub1 = new FBuffer(80); | |
if (!this.bigEndian) { | |
class348_sub49_sub1.writeFloatLE(-1.0F); | |
class348_sub49_sub1.writeFloatLE(-1.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(-1.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(-1.0F); | |
class348_sub49_sub1.writeFloatLE(1.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
class348_sub49_sub1.writeFloatLE(0.0F); | |
} else { | |
class348_sub49_sub1.method3400(-1.0F, (byte) -122); | |
class348_sub49_sub1.method3400(-1.0F, (byte) -103); | |
class348_sub49_sub1.method3400(0.0F, (byte) -113); | |
class348_sub49_sub1.method3400(0.0F, (byte) -112); | |
class348_sub49_sub1.method3400(1.0F, (byte) -124); | |
class348_sub49_sub1.method3400(1.0F, (byte) -99); | |
class348_sub49_sub1.method3400(-1.0F, (byte) -95); | |
class348_sub49_sub1.method3400(0.0F, (byte) -94); | |
class348_sub49_sub1.method3400(1.0F, (byte) -118); | |
class348_sub49_sub1.method3400(1.0F, (byte) -112); | |
class348_sub49_sub1.method3400(1.0F, (byte) -89); | |
class348_sub49_sub1.method3400(1.0F, (byte) -102); | |
class348_sub49_sub1.method3400(0.0F, (byte) -109); | |
class348_sub49_sub1.method3400(1.0F, (byte) -109); | |
class348_sub49_sub1.method3400(0.0F, (byte) -112); | |
class348_sub49_sub1.method3400(-1.0F, (byte) -101); | |
class348_sub49_sub1.method3400(1.0F, (byte) -93); | |
class348_sub49_sub1.method3400(0.0F, (byte) -123); | |
class348_sub49_sub1.method3400(0.0F, (byte) -110); | |
class348_sub49_sub1.method3400(0.0F, (byte) -113); | |
} | |
anInterface2_7797 = createVertexBuffer(2, false, 20, (class348_sub49_sub1.bytes), | |
(class348_sub49_sub1.position)); | |
this.aClass123_7849 = new GlVertexBuffer(anInterface2_7797, 5126, 3, 0); | |
this.aClass123_7833 = new GlVertexBuffer(anInterface2_7797, 5126, 2, 12); | |
particleDrawer.method1654(643267468, this); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.PF(" + (var_za != null ? "{...}" : "null") + ')'); | |
} | |
break; | |
} while (false); | |
} | |
final void A(int i, aa var_aa, int i_212_, int i_213_) { | |
try { | |
anInt7695++; | |
aa_Sub1 var_aa_Sub1 = (aa_Sub1) var_aa; | |
GlTexture2dA class258_sub3_sub1 = var_aa_Sub1.aClass258_Sub3_Sub1_5193; | |
method3792(119); | |
bindTexture(var_aa_Sub1.aClass258_Sub3_Sub1_5193); | |
setColorBlendMode(1, 1); | |
setTextureCombiners(7681, 8448); | |
method3762(34167, 768, (byte) -87, 0); | |
float f = (class258_sub3_sub1.s / (float) (class258_sub3_sub1.width0)); | |
float f_214_ = (class258_sub3_sub1.u / (float) (class258_sub3_sub1.height0)); | |
OpenGL.glColor4ub((byte) (i >> 880062864), (byte) (i >> -1724466520), (byte) i, | |
(byte) (i >> 586918264)); | |
OpenGL.glBegin(7); | |
OpenGL | |
.glTexCoord2f(f * (float) (lowerClipX + -i_212_), (float) (lowerClipY + -i_213_) * f_214_); | |
OpenGL.glVertex2i(lowerClipX, lowerClipY); | |
OpenGL | |
.glTexCoord2f(f * (float) (-i_212_ + lowerClipX), f_214_ * (float) (-i_213_ + upperClipY)); | |
OpenGL.glVertex2i(lowerClipX, upperClipY); | |
OpenGL | |
.glTexCoord2f((float) (-i_212_ + upperClipX) * f, (float) (upperClipY + -i_213_) * f_214_); | |
OpenGL.glVertex2i(upperClipX, upperClipY); | |
OpenGL | |
.glTexCoord2f(f * (float) (-i_212_ + upperClipX), f_214_ * (float) (-i_213_ + lowerClipY)); | |
OpenGL.glVertex2i(upperClipX, lowerClipY); | |
OpenGL.glEnd(); | |
method3762(5890, 768, (byte) -87, 0); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.A(" + i + ',' + (var_aa != null ? "{...}" : "null") + ',' + i_212_ + ',' + i_213_ | |
+ ')')); | |
} | |
} | |
final boolean method3694() { | |
anInt7593++; | |
return false; | |
} | |
final Interface13 method3624(int i, int i_215_) { | |
anInt7679++; | |
return null; | |
} | |
final void method3775(int i, int i_216_, int i_217_) { | |
anInt7531++; | |
OpenGL.glTexEnvi(8960, 34184 + i, i_217_); | |
OpenGL.glTexEnvi(8960, 34200 + i, i_216_); | |
} | |
private final void method3776(int i) { | |
anInt7609++; | |
if (i != 22544) { | |
this.aNativeHeap7730 = null; | |
} | |
int i_218_ = 0; | |
while (!glContext.b()) { | |
if ((i_218_++ ^ 0xffffffff) < -6) { | |
throw new RuntimeException(""); | |
} | |
Class286_Sub5.sleep(1000L); | |
} | |
} | |
final void drawLine(int x0, int y0, int i_220_, int i_221_, int i_222_, int width, | |
int blend) { | |
anInt7662++; | |
OpenGL.glLineWidth((float) width); | |
drawLine(x0, y0, i_220_, i_221_, i_222_, blend); | |
OpenGL.glLineWidth(1.0F); | |
} | |
final void enableMaterialShaders(int i, int i_225_, int i_226_, int i_227_) { | |
anInt7660++; | |
this.anInt7788 = i; | |
this.anInt7848 = i_226_; | |
this.anInt7806 = i_225_; | |
this.materialShadersDisabled = true; | |
this.anInt7809 = i_227_; | |
} | |
private final void update(int i) { | |
anInt7632++; | |
projMatrix[10] = projectionC; | |
projMatrix[14] = projectionD; | |
this.aFloat7875 = (float) far; | |
this.aFloat7874 = (projMatrix[14] - (float) far) / projMatrix[10]; | |
} | |
final void setClip2(int i, int i_228_, int i_229_, int i_230_) { | |
if ((lowerClipY ^ 0xffffffff) > (i_228_ ^ 0xffffffff)) { | |
lowerClipY = i_228_; | |
} | |
anInt7648++; | |
if (upperClipY > i_230_) { | |
upperClipY = i_230_; | |
} | |
if ((lowerClipX ^ 0xffffffff) > (i ^ 0xffffffff)) { | |
lowerClipX = i; | |
} | |
if (i_229_ < upperClipX) { | |
upperClipX = i_229_; | |
} | |
OpenGL.glEnable(3089); | |
method3772((byte) 125); | |
updateClip((byte) 11); | |
} | |
final void resizeSurface(Canvas canvas, int i, int i_231_) { | |
do { | |
try { | |
anInt7701++; | |
long l = 0L; | |
if (canvas != null && aCanvas7626 != canvas) { | |
if (surfaces.containsKey(canvas)) { | |
Long var_long = (Long) surfaces.get(canvas); | |
l = var_long.longValue(); | |
} | |
} else { | |
l = aLong7553; | |
} | |
if (l == 0L) { | |
throw new RuntimeException(); | |
} | |
glContext.surfaceResized(l); | |
if (aCanvas7575 != canvas) { | |
break; | |
} | |
method3745((byte) 117); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.HF(" + (canvas != null ? "{...}" : "null") + ',' + i + ',' + i_231_ + ')')); | |
} | |
break; | |
} while (false); | |
} | |
final Sprite createSprite(int[] is, int i, int i_232_, int i_233_, int i_234_, boolean bool) { | |
try { | |
anInt7522++; | |
return new GlSprite(this, i_233_, i_234_, is, i, i_232_); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.BE(" + (is != null ? "{...}" : "null") + ',' + i + ',' + i_232_ + ',' + i_233_ + ',' | |
+ i_234_ + ',' + bool + ')')); | |
} | |
} | |
private final void method3778(byte i) { | |
if (flags != 1) { | |
method3763(5888); | |
method3807(false); | |
method3728(false); | |
setDepthTestEnabled(false); | |
method3748(false); | |
bindTexture(null); | |
method3757(-2, -45); | |
setTextureBlendMode(1); | |
flags = 1; | |
} | |
if (i <= -115) { | |
anInt7594++; | |
} | |
} | |
private final void setSunDiffuseLighting(int i) { | |
InputStream_Sub2.fogColors[3] = 1.0F; | |
anInt7588++; | |
InputStream_Sub2.fogColors[0] = this.intensity * this.sunRed; | |
InputStream_Sub2.fogColors[1] = this.sunGreen * this.intensity; | |
if (i == 29890) { | |
InputStream_Sub2.fogColors[2] = this.sunBlue * this.intensity; | |
// GL_LIGHT0, GL_DIFFUSE | |
OpenGL.glLightfv(16384, 4609, InputStream_Sub2.fogColors, 0); | |
InputStream_Sub2.fogColors[2] = this.sunBlue * -this.attenuation; | |
InputStream_Sub2.fogColors[3] = 1.0F; | |
InputStream_Sub2.fogColors[1] = this.sunGreen * -this.attenuation; | |
InputStream_Sub2.fogColors[0] = this.sunRed * -this.attenuation; | |
// GL_LIGHT1, GL_DIFFUSE | |
OpenGL.glLightfv(16385, 4609, InputStream_Sub2.fogColors, 0); | |
} | |
} | |
final synchronized void method3780(int i, int i_235_, int i_236_) { | |
anInt7616++; | |
IntegerNode class348_sub35 = new IntegerNode(i); | |
class348_sub35.nodeKey = (long) i_236_; | |
aClass262_7751.addLast(class348_sub35); | |
} | |
final int getAmountModels() { | |
anInt7562++; | |
int i = amountModels; | |
amountModels = 0; | |
return i; | |
} | |
final int method3781(byte i, int i_237_) { | |
anInt7613++; | |
if ((i_237_ ^ 0xffffffff) == -2) { | |
return 7681; | |
} | |
if ((i_237_ ^ 0xffffffff) == -1) { | |
return 8448; | |
} | |
if (i_237_ != 2) { | |
if ((i_237_ ^ 0xffffffff) != -4) { | |
if (i_237_ == 4) { | |
return 34023; | |
} | |
} else { | |
return 260; | |
} | |
} else { | |
return 34165; | |
} | |
if (i != 17) { | |
far = -39; | |
} | |
throw new IllegalArgumentException(); | |
} | |
final void pushReadFrameBuffer(IFrameBuffer interface11) { | |
try { | |
anInt7640++; | |
if (readFrameBufferStackPointer >= 3) { | |
throw new RuntimeException(); | |
} | |
if (readFrameBufferStackPointer >= 0) { | |
readFrameBuffers[readFrameBufferStackPointer].unbindRead(); | |
} | |
currentReadFrameBuffer = readFrameBuffers[++readFrameBufferStackPointer] = interface11; | |
currentReadFrameBuffer.bindRead(); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, ("qo.HD(" + (interface11 != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void drawQuad(int i, int i_238_, int i_239_, int i_240_, int i_241_, int i_242_) { | |
anInt7615++; | |
float x0 = 0.35F + (float) i; | |
float y0 = 0.35F + (float) i_238_; | |
float x1 = x0 + (float) i_239_ - 1.0F; | |
method3778((byte) -119); | |
float y1 = -1.0F + (y0 + (float) i_240_); | |
setColorBlendMode(i_242_, 1); | |
OpenGL.glColor4ub((byte) (i_241_ >> 499977360), (byte) (i_241_ >> -1876422360), (byte) i_241_, | |
(byte) (i_241_ >> 1065854040)); | |
if (multiSampleSupport) { | |
OpenGL.glDisable(32925); | |
} | |
OpenGL.glBegin(2); | |
OpenGL.glVertex2f(x0, y0); | |
OpenGL.glVertex2f(x0, y1); | |
OpenGL.glVertex2f(x1, y1); | |
OpenGL.glVertex2f(x1, y0); | |
OpenGL.glEnd(); | |
if (multiSampleSupport) { | |
OpenGL.glEnable(32925); | |
} | |
} | |
final void projectToScreenSpace(int x, int y, int z, int[] result) { | |
try { | |
anInt7637++; | |
// Translates a set of model space coordinates to screen space. | |
// Calculate the z coordinate. | |
float zz = | |
(float) x * viewMatrix.m02 + viewMatrix.m12 * (float) y + viewMatrix.m22 * (float) z | |
+ viewMatrix.m32; | |
if (zz == 0.0F) { | |
result[0] = result[1] = result[2] = -1; | |
} else { | |
// x` = x/z | |
// y` = y/z | |
int xx = (int) (( | |
((viewMatrix.m00 * (float) x + viewMatrix.m10 * (float) y) + viewMatrix.m20 * (float) z) | |
+ viewMatrix.m30) * (float) cameraScaleX / zz); | |
int yy = (int) (((float) x * viewMatrix.m01 + viewMatrix.m11 * (float) y | |
+ viewMatrix.m21 * (float) z + viewMatrix.m31) | |
* (float) projectionScaleY / zz); | |
// Normalize after clip | |
result[0] = (int) ((float) xx - centerAndClipLowerX); | |
result[1] = (int) ((float) yy - centerAndClipLowerY); | |
result[2] = (int) zz; | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.projectToClippedScreenSpace(" + x + ',' + y + ',' + z + ',' + (result != null ? | |
"{...}" : | |
"null") + ')')); | |
} | |
} | |
final Matrix4f createMatrix4f() { | |
anInt7716++; | |
return new GlMatrix4f(); | |
} | |
final boolean enableBloom() { | |
anInt7670++; | |
if (bloom != null) { | |
if (!bloom.isEnabled()) { | |
if (!postProcessing.enableProcess(bloom)) { | |
return false; | |
} | |
textureCache.clear((byte) -110); | |
} | |
return true; | |
} | |
return false; | |
} | |
private final void method3783(int i) { | |
anInt7527++; | |
int i_250_; | |
for (i_250_ = i; anInt7862 > i_250_; i_250_++) { | |
Class348_Sub1 class348_sub1 = aClass348_Sub1Array7858[i_250_]; | |
Class328_Sub1.aFloatArray6514[0] = (float) class348_sub1.method2724(-1); | |
int i_251_ = i_250_ + 16386; | |
Class328_Sub1.aFloatArray6514[1] = (float) class348_sub1.method2722(127); | |
Class328_Sub1.aFloatArray6514[2] = (float) class348_sub1.method2717((byte) 77); | |
Class328_Sub1.aFloatArray6514[3] = 1.0F; | |
OpenGL.glLightfv(i_251_, 4611, Class328_Sub1.aFloatArray6514, 0); | |
int i_252_ = class348_sub1.method2720(-1); | |
float f = class348_sub1.method2721(-76) / 255.0F; | |
Class328_Sub1.aFloatArray6514[2] = (float) Class139.bitAnd(i_252_, 255) * f; | |
Class328_Sub1.aFloatArray6514[0] = | |
((float) (Class139.bitAnd(16762087, i_252_) >> -23446704) * f); | |
Class328_Sub1.aFloatArray6514[1] = | |
((float) (Class139.bitAnd(i_252_, 65533) >> -42240920) * f); | |
OpenGL.glLightfv(i_251_, 4609, Class328_Sub1.aFloatArray6514, 0); | |
OpenGL.glLightf(i_251_, 4617, | |
1.0F / (float) (class348_sub1.method2723(-1) * class348_sub1.method2723(-1))); | |
OpenGL.glEnable(i_251_); | |
} | |
for (/**/; (i_250_ ^ 0xffffffff) > (anInt7839 ^ 0xffffffff); i_250_++) { | |
OpenGL.glDisable(i_250_ + 16386); | |
} | |
anInt7839 = anInt7862; | |
} | |
final void method3784(byte i) { | |
if (flags != 8) { | |
method3740(-14388); | |
method3807(true); | |
setDepthTestEnabled(true); | |
method3748(true); | |
setColorBlendMode(1, 1); | |
flags = 8; | |
} | |
anInt7665++; | |
if (i != -62) { | |
aCanvas7626 = null; | |
} | |
} | |
final int getSize(int type, int i_253_) { | |
anInt7682++; | |
if ((type ^ 0xffffffff) == -5122 || type == 5120) { | |
return 1; | |
} | |
if (i_253_ != 4) { | |
this.aBoolean7793 = false; | |
} | |
if (type == 5123 || type == 5122) { | |
return 2; | |
} | |
if (type == 5125 || type == 5124 || (type ^ 0xffffffff) == -5127) { | |
return 4; | |
} | |
throw new IllegalArgumentException(""); | |
} | |
final void method3685(ParticleColl class98, int i) { | |
try { | |
particleDrawer.draw(this, (byte) -116, i, class98); | |
anInt7687++; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.FG(" + (class98 != null ? "{...}" : "null") + ',' + i + ')')); | |
} | |
} | |
private final void method3786(boolean bool) { | |
anInt7630++; | |
activeTextures = new GlTexture[this.maxTextureUnits]; | |
this.aClass258_Sub3_7827 = new GlTexture2d(this, 3553, 6408, 1, 1); | |
new GlTexture2d(this, 3553, 6408, 1, 1); | |
new GlTexture2d(this, 3553, 6408, 1, 1); | |
this.aClass64_Sub3_7864 = new GlModel(this); | |
this.aClass64_Sub3_7838 = new GlModel(this); | |
this.aClass64_Sub3_7803 = new GlModel(this); | |
this.aClass64_Sub3_7834 = new GlModel(this); | |
this.aClass64_Sub3_7840 = new GlModel(this); | |
this.aClass64_Sub3_7780 = new GlModel(this); | |
this.aClass64_Sub3_7802 = new GlModel(this); | |
this.aClass64_Sub3_7821 = new GlModel(this); | |
if (bool == false) { | |
this.aClass64_Sub3_7844 = new GlModel(this); | |
this.aClass64_Sub3_7785 = new GlModel(this); | |
if (this.frameBufferSupport) { | |
this.frameBuffer = new GlFrameBuffer(this); | |
new GlFrameBuffer(this); | |
} | |
} | |
} | |
private final void setAmbientLighting(int i) { | |
InputStream_Sub2.fogColors[3] = 1.0F; | |
anInt7661++; | |
InputStream_Sub2.fogColors[0] = this.ambientIntensity * this.sunRed; | |
InputStream_Sub2.fogColors[2] = this.sunBlue * this.ambientIntensity; | |
InputStream_Sub2.fogColors[1] = this.sunGreen * this.ambientIntensity; | |
// GL_LIGHT_MODEL_AMBIENT | |
OpenGL.glLightModelfv(2899, InputStream_Sub2.fogColors, 0); | |
if (i >= -13) { | |
drawFboStackPointer = 102; | |
} | |
} | |
final RendererInfo getRendererInfo() { | |
anInt7607++; | |
int i = -1; | |
if (vendor.indexOf("nvidia") == -1) { | |
if ((vendor.indexOf("intel") ^ 0xffffffff) != 0) { | |
i = 32902; | |
} else if (vendor.indexOf("ati") != -1) { | |
i = 4098; | |
} | |
} else { | |
i = 4318; | |
} | |
return new RendererInfo(i, "OpenGL", version, renderer, 0L); | |
} | |
final void projectToScreenSpaceClipped(int x, int y, int z, int[] is) { | |
try { | |
anInt7528++; | |
float zz = (((float) y * (this.viewMatrix.m12)) + (this.viewMatrix.m02) * (float) x | |
+ (this.viewMatrix.m22) * (float) z + (this.viewMatrix.m32)); | |
if (zz < (float) this.near || zz > (float) far) { | |
is[0] = is[1] = is[2] = -1; | |
} else { | |
int xx = (int) ( | |
(float) this.cameraScaleX * (((float) y * (this.viewMatrix.m10)) | |
+ (this.viewMatrix.m00) * (float) x + (this.viewMatrix.m20) * (float) z | |
+ (this.viewMatrix.m30)) / zz); | |
int yy = (int) ((this.viewMatrix.m31 + (((float) x * (this.viewMatrix.m01)) | |
+ (this.viewMatrix.m11) * (float) y + (this.viewMatrix.m21) * (float) z)) | |
* (float) this.projectionScaleY / zz); | |
if ((this.centerAndClipLowerX <= (float) xx) && (float) xx | |
<= this.centerAndClipUpperX && this.centerAndClipLowerY <= (float) yy | |
&& this.centerAndClipUppery >= (float) yy) { | |
is[2] = (int) zz; | |
is[0] = (int) (-this.centerAndClipLowerX + (float) xx); | |
is[1] = (int) (-this.centerAndClipLowerY + (float) yy); | |
} else { | |
is[0] = is[1] = is[2] = -1; | |
} | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.projectToScreenSpaceClipped(" + x + ',' + y + ',' + z + ',' + (is != null ? | |
"{...}" : | |
"null") + ')')); | |
} | |
} | |
final void pushMatrix(int i) { | |
anInt7647++; | |
OpenGL.glPushMatrix(); | |
} | |
final void F(int i, int i_258_) { | |
anInt7719++; | |
} | |
final void method3687(Interface4 interface4) { | |
try { | |
anInt7590++; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.IA(" + (interface4 != null ? "{...}" : "null") + ')'); | |
} | |
} | |
final void setClip(int i, int i_259_, int i_260_, int i_261_) { | |
if (i_259_ < 0) { | |
i_259_ = 0; | |
} | |
anInt7717++; | |
if ((this.viewportWidth ^ 0xffffffff) > (i_260_ ^ 0xffffffff)) { | |
i_260_ = this.viewportWidth; | |
} | |
if ((i ^ 0xffffffff) > -1) { | |
i = 0; | |
} | |
if ((this.viewportHeight ^ 0xffffffff) > (i_261_ ^ 0xffffffff)) { | |
i_261_ = this.viewportHeight; | |
} | |
upperClipX = i_260_; | |
upperClipY = i_261_; | |
lowerClipY = i_259_; | |
lowerClipX = i; | |
OpenGL.glEnable(3089); | |
method3772((byte) 126); | |
updateClip((byte) 11); | |
} | |
final void setOrtho(byte i, float f) { | |
if (orthoSize != f) { | |
orthoSize = f; | |
if (anInt7865 == 3) { | |
method3747(); | |
} | |
} | |
if (i <= -101) { | |
anInt7545++; | |
} | |
} | |
final void resetClip() { | |
lowerClipY = 0; | |
anInt7642++; | |
upperClipY = this.viewportHeight; | |
upperClipX = this.viewportWidth; | |
lowerClipX = 0; | |
// GL_SCISSOR_TEST | |
OpenGL.glDisable(3089); | |
method3772((byte) 125); | |
} | |
final void C(boolean bool) { | |
aBoolean7870 = bool; | |
anInt7602++; | |
method3795(-30199); | |
} | |
final void method3663() { | |
anInt7604++; | |
} | |
final void setViewportOffset(int i_263_, int i_262_) { | |
anInt7724++; | |
offsetY = i_262_; | |
offsetX = i_263_; | |
updateViewport(true); | |
updateClip((byte) 11); | |
} | |
final int getCoordinateFlags(int x, int y, int z, int x1, int y1, int z1) { | |
anInt7652++; | |
int flags = 0; | |
float zz0 = | |
(((float) z * (this.viewMatrix.m22)) + ((float) x * this.viewMatrix.m02 + ((float) y | |
* (this.viewMatrix.m12))) + (this.viewMatrix.m32)); | |
if (zz0 < 1.0F) { | |
zz0 = 1.0F; | |
} | |
float zz1 = | |
(((float) z1 * (this.viewMatrix.m22)) + (((float) y1 * (this.viewMatrix.m12)) | |
+ (this.viewMatrix.m02) * (float) x1) + (this.viewMatrix.m32)); | |
if (zz1 < 1.0F) { | |
zz1 = 1.0F; | |
} | |
// 0x10 outside of near | |
// 0x20 outside of far | |
if (((float) this.near > zz0 && (float) this.near > zz1)) { | |
flags |= 0x10; | |
} else { | |
if (zz0 > (float) far && zz1 > (float) far) { | |
flags |= 0x20; | |
} | |
} | |
int xx0 = (int) ( | |
((this.viewMatrix.m20) * (float) z + ((this.viewMatrix.m10 * (float) y) + ( | |
this.viewMatrix.m00 * (float) x)) + (this.viewMatrix.m30)) * (float) this.cameraScaleX | |
/ zz0); | |
int xx1 = (int) ((float) this.cameraScaleX * (((float) z1 * this.viewMatrix.m20) + ( | |
(this.viewMatrix.m00 * (float) x1) + (this.viewMatrix.m10 * (float) y1)) | |
+ this.viewMatrix.m30) / zz1); | |
if (!((float) xx0 < this.centerAndClipLowerX) || !(this.centerAndClipLowerX | |
> (float) xx1)) { | |
if ((float) xx0 > this.centerAndClipUpperX && (float) xx1 > this.centerAndClipUpperX) { | |
flags |= 0x2; | |
} | |
} else { | |
flags |= 0x1; | |
} | |
int i_273_ = (int) ((float) this.projectionScaleY * ((this.viewMatrix.m21) * (float) z + ( | |
(float) y * this.viewMatrix.m11 + (float) x * this.viewMatrix.m01) + this.viewMatrix.m31) | |
/ zz0); | |
int i_274_ = (int) (((this.viewMatrix.m31) + (((float) x1 * this.viewMatrix.m01) | |
+ (float) y1 * this.viewMatrix.m11 + (this.viewMatrix.m21 * (float) z1))) | |
* (float) this.projectionScaleY / zz1); | |
if (!((float) i_273_ < this.centerAndClipLowerY) || !(this.centerAndClipLowerY | |
> (float) i_274_)) { | |
if ((float) i_273_ > this.centerAndClipUppery && (float) i_274_ > this.centerAndClipUppery) { | |
flags |= 0x8; | |
} | |
} else { | |
flags |= 0x4; | |
} | |
return flags; | |
} | |
final boolean method3693() { | |
anInt7684++; | |
return true; | |
} | |
final Sprite method3629(int i, int i_275_, boolean bool) { | |
anInt7625++; | |
return new GlSprite(this, i, i_275_, bool); | |
} | |
final void method3678(int i) { | |
anInt7663++; | |
method3797(0); | |
} | |
private final void method3791(int i) { | |
anInt7543++; | |
method3757(-2, -69); | |
for (int i_276_ = this.maxTextureUnits - 1; i_276_ >= 0; i_276_--) { | |
setActiveTexture(i_276_); | |
bindTexture(null); | |
OpenGL.glTexEnvi(8960, 8704, 34160); | |
} | |
setTextureCombiners(8448, 8448); | |
method3762(34168, 770, (byte) -87, 2); | |
loadTextureIdentityMatrix(-21974); | |
anInt7764 = 1; | |
OpenGL.glEnable(3042); | |
OpenGL.glBlendFunc(770, 771); | |
anInt7762 = 1; | |
OpenGL.glEnable(3008); | |
OpenGL.glAlphaFunc(516, 0.0F); | |
aBoolean7761 = true; | |
OpenGL.glColorMask(true, true, true, true); | |
aBoolean7758 = true; | |
method3807(true); | |
method3728(true); | |
setDepthTestEnabled(true); | |
method3748(true); | |
method3755(i ^ ~0x651d); | |
glContext.setSwapInterval(0); | |
OpenGL.glShadeModel(7425); | |
OpenGL.glClearDepth(1.0F); | |
OpenGL.glDepthFunc(515); | |
OpenGL.glPolygonMode(1028, 6914); | |
OpenGL.glEnable(2884); | |
OpenGL.glCullFace(1029); | |
OpenGL.glMatrixMode(5888); | |
OpenGL.glLoadIdentity(); | |
OpenGL.glColorMaterial(1028, 5634); | |
OpenGL.glEnable(2903); | |
float[] fs = {0.0F, 0.0F, 0.0F, 1.0F}; | |
for (int i_277_ = 0; i_277_ < 8; i_277_++) { | |
int i_278_ = 16384 + i_277_; | |
OpenGL.glLightfv(i_278_, 4608, fs, 0); | |
OpenGL.glLightf(i_278_, 4615, 0.0F); | |
OpenGL.glLightf(i_278_, 4616, 0.0F); | |
} | |
OpenGL.glEnable(16384); | |
OpenGL.glEnable(16385); | |
OpenGL.glFogf(2914, 0.95F); | |
OpenGL.glFogi(2917, 9729); | |
if (i != 25858) { | |
this.aClass64_Sub3_7864 = null; | |
} | |
OpenGL.glHint(3156, 4353); | |
sunColor = this.fogColor = -1; | |
resetClip(); | |
} | |
final void method3792(int i) { | |
if (i < 45) { | |
update(-72); | |
} | |
if (flags != 2) { | |
method3763(5888); | |
method3807(false); | |
method3728(false); | |
setDepthTestEnabled(false); | |
method3748(false); | |
method3757(-2, -67); | |
flags = 2; | |
} | |
anInt7608++; | |
} | |
final int getAmountPolygons() { | |
anInt7551++; | |
int i = anInt7878; | |
anInt7878 = 0; | |
return i; | |
} | |
final void bind(IElementBufferObject interface8) { | |
do { | |
try { | |
anInt7560++; | |
if (elementBufferObject == interface8) { | |
break; | |
} | |
if (vertexBufferSupport) { | |
OpenGL.glBindBufferARB(34963, interface8.method33(-23923)); | |
} | |
elementBufferObject = interface8; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.OE(" + ',' + (interface8 != null ? "{...}" : "null") + ')')); | |
} | |
break; | |
} while (false); | |
} | |
final void initializeVertexAttributes(GlVertexBuffer locationBuffer, GlVertexBuffer colorBuffer, | |
int i, GlVertexBuffer textureBuffer, GlVertexBuffer normalBuffer) { | |
try { | |
if (locationBuffer != null) { | |
method3750(i + 26493, locationBuffer.vertexBuffer); | |
OpenGL.glVertexPointer(locationBuffer.aByte1814, locationBuffer.aShort1810, | |
anInterface2_7852.method13((byte) -97), | |
(anInterface2_7852.method12((byte) 42) - -(long) (locationBuffer.aByte1812))); | |
OpenGL.glEnableClientState(32884); | |
} else { | |
OpenGL.glDisableClientState(32884); | |
} | |
anInt7529++; | |
if (normalBuffer != null) { | |
method3750(56, normalBuffer.vertexBuffer); | |
OpenGL.glNormalPointer(normalBuffer.aShort1810, anInterface2_7852.method13((byte) -97), | |
(anInterface2_7852.method12((byte) 42) - -(long) (normalBuffer.aByte1812))); | |
OpenGL.glEnableClientState(32885); | |
} else { | |
OpenGL.glDisableClientState(32885); | |
} | |
if (colorBuffer != null) { | |
method3750(67, colorBuffer.vertexBuffer); | |
OpenGL.glColorPointer(colorBuffer.aByte1814, colorBuffer.aShort1810, | |
anInterface2_7852.method13((byte) -97), | |
(anInterface2_7852.method12((byte) 42) + (long) (colorBuffer.aByte1812))); | |
OpenGL.glEnableClientState(32886); | |
} else { | |
OpenGL.glDisableClientState(32886); | |
} | |
if (i == -26411) { | |
if (textureBuffer != null) { | |
method3750(119, textureBuffer.vertexBuffer); | |
OpenGL.glTexCoordPointer(textureBuffer.aByte1814, textureBuffer.aShort1810, | |
anInterface2_7852.method13((byte) -97), | |
(anInterface2_7852.method12((byte) 42) - -(long) textureBuffer.aByte1812)); | |
OpenGL.glEnableClientState(32888); | |
} else { | |
OpenGL.glDisableClientState(32888); | |
} | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.KB(" + (locationBuffer != null ? "{...}" : "null") + ',' + (colorBuffer != null ? | |
"{...}" : | |
"null") + ',' + i + ',' + (textureBuffer != null ? "{...}" : "null") + ',' + ( | |
normalBuffer != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final int method3704() { | |
anInt7672++; | |
return 4; | |
} | |
final Interface4 method3634(Interface3 interface3, Interface13 interface13) { | |
try { | |
anInt7596++; | |
return null; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.NB(" + (interface3 != null ? "{...}" : "null") + ',' + (interface13 != null ? | |
"{...}" : | |
"null") + ')')); | |
} | |
} | |
final Matrix4f getViewMatrix() { | |
anInt7650++; | |
return this.viewMatrix; | |
} | |
private final void method3795(int i) { | |
OpenGL.glDepthMask(aBoolean7759 && aBoolean7870); | |
anInt7578++; | |
if (i != -30199) { | |
getClip(null); | |
} | |
} | |
final Matrix4f getModelMatrix() { | |
anInt7587++; | |
return aClass101_Sub3_7725; | |
} | |
final int getNear() { | |
anInt7628++; | |
return this.near; | |
} | |
final void clearDepthBuffer() { | |
anInt7534++; | |
method3748(true); | |
OpenGL.glClear(256); | |
} | |
final void method3647(boolean bool) { | |
anInt7691++; | |
} | |
final void setSunPosition() { | |
// GL_POSITION | |
OpenGL.glLightfv(16384, 4611, this.sunDirection, 0); | |
anInt7536++; | |
OpenGL.glLightfv(16385, 4611, inverseSunDirection, 0); | |
} | |
final boolean method3639() { | |
anInt7667++; | |
return materialShader.isEffectSupported((byte) -91, 3); | |
} | |
final boolean isBloomEnabled() { | |
anInt7537++; | |
return bloom != null && bloom.isEnabled(); | |
} | |
final void method3642(int i, Class348_Sub1[] class348_sub1s) { | |
do { | |
try { | |
for (int i_282_ = 0; i_282_ < i; i_282_++) { | |
aClass348_Sub1Array7858[i_282_] = class348_sub1s[i_282_]; | |
} | |
anInt7610++; | |
anInt7862 = i; | |
if ((anInt7865 ^ 0xffffffff) == -2) { | |
break; | |
} | |
method3783(0); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.FF(" + i + ',' + (class348_sub1s != null ? "{...}" : "null") + ')')); | |
} | |
break; | |
} while (false); | |
} | |
final void method3630(boolean bool) { | |
anInt7620++; | |
} | |
private final void method3797(int i) { | |
if (i != 0) { | |
this.anIntArray7883 = null; | |
} | |
anInt7546++; | |
glContext.a(); | |
} | |
final void disableMaterialShaders() { | |
anInt7524++; | |
this.materialShadersDisabled = false; | |
} | |
final int r(int i, int i_283_, int i_284_, int i_285_, int i_286_, int i_287_, int i_288_) { | |
anInt7669++; | |
float f = (((float) i_284_ * (this.viewMatrix.m22)) + ((float) i_283_ * (this.viewMatrix.m12) | |
+ (float) i * (this.viewMatrix.m02)) + (this.viewMatrix.m32)); | |
float f_289_ = | |
(((float) i_287_ * (this.viewMatrix.m22)) + ((this.viewMatrix.m02) * (float) i_285_ + ( | |
(float) i_286_ * (this.viewMatrix.m12))) + (this.viewMatrix.m32)); | |
int i_290_ = 0; | |
if (!(f < (float) this.near) || !((float) this.near > f_289_)) { | |
if ((float) far < f && f_289_ > (float) far) { | |
i_290_ |= 0x20; | |
} | |
} else { | |
i_290_ |= 0x10; | |
} | |
int i_291_ = (int) ((float) this.cameraScaleX * ((this.viewMatrix.m20) * (float) i_284_ + ( | |
(this.viewMatrix.m10 * (float) i_283_) + (this.viewMatrix.m00 * (float) i)) | |
+ this.viewMatrix.m30) / (float) i_288_); | |
int i_292_ = (int) ((float) this.cameraScaleX * ((this.viewMatrix.m30) + ( | |
(this.viewMatrix.m20 * (float) i_287_) + (((float) i_285_ * (this.viewMatrix.m00)) | |
+ (this.viewMatrix.m10) * (float) i_286_))) / (float) i_288_); | |
if (!(this.centerAndClipLowerX > (float) i_291_) || !(this.centerAndClipLowerX | |
> (float) i_292_)) { | |
if (this.centerAndClipUpperX < (float) i_291_ && (float) i_292_ > this.centerAndClipUpperX) { | |
i_290_ |= 0x2; | |
} | |
} else { | |
i_290_ |= 0x1; | |
} | |
int i_293_ = (int) (((this.viewMatrix.m31) + ((this.viewMatrix.m21 * (float) i_284_) + ( | |
(this.viewMatrix.m01 * (float) i) + ((float) i_283_ * (this.viewMatrix.m11))))) | |
* (float) this.projectionScaleY / (float) i_288_); | |
int i_294_ = (int) ((float) this.projectionScaleY * (((float) i_287_ * this.viewMatrix.m21) + ( | |
(float) i_286_ * this.viewMatrix.m11 + (this.viewMatrix.m01 * (float) i_285_)) | |
+ this.viewMatrix.m31) / (float) i_288_); | |
if (!(this.centerAndClipLowerY > (float) i_293_) || !((float) i_294_ | |
< this.centerAndClipLowerY)) { | |
if ((float) i_293_ > this.centerAndClipUppery && this.centerAndClipUppery < (float) i_294_) { | |
i_290_ |= 0x8; | |
} | |
} else { | |
i_290_ |= 0x4; | |
} | |
return i_290_; | |
} | |
final int getSize(int i) { | |
anInt7698++; | |
if (i != 6406 && i != 6409) { | |
if ((i ^ 0xffffffff) != -6411 && i != 34846 && i != 34844) { | |
if (i == 6407) { | |
return 3; | |
} | |
if ((i ^ 0xffffffff) == -6409 || (i ^ 0xffffffff) == -34848) { | |
return 4; | |
} | |
if ((i ^ 0xffffffff) == -34844) { | |
return 6; | |
} | |
if ((i ^ 0xffffffff) == -34843) { | |
return 8; | |
} | |
if (i == 6402) { | |
return 3; | |
} | |
if ((i ^ 0xffffffff) == -6402) { | |
return 1; | |
} | |
} else { | |
return 2; | |
} | |
} else { | |
return 1; | |
} | |
throw new IllegalArgumentException(""); | |
} | |
private final void translateMatrix(float u, float v, float w) { | |
OpenGL.glMatrixMode(5890); | |
anInt7585++; | |
if (aBoolean7860) { | |
OpenGL.glLoadIdentity(); | |
} | |
OpenGL.glTranslatef(u, v, w); | |
OpenGL.glMatrixMode(5888); | |
aBoolean7860 = true; | |
} | |
final synchronized void method3800(int i, int i_299_) { | |
anInt7570++; | |
IntegerNode class348_sub35 = new IntegerNode(i_299_); | |
if (i > 71) { | |
aClass262_7753.addLast(class348_sub35); | |
} | |
} | |
final void handlePostProcessing() { | |
postProcessing.handle(); | |
anInt7595++; | |
} | |
final void drawVerticalLine(int i, int i_300_, int i_301_, int i_302_, int i_303_) { | |
method3778((byte) -124); | |
anInt7583++; | |
setColorBlendMode(i_303_, 1); | |
float f = 0.35F + (float) i; | |
OpenGL.glColor4ub((byte) (i_302_ >> -994374448), (byte) (i_302_ >> 1427975400), (byte) i_302_, | |
(byte) (i_302_ >> -267048680)); | |
float f_304_ = (float) i_300_ + 0.35F; | |
OpenGL.glBegin(1); | |
OpenGL.glVertex2f(f, f_304_); | |
OpenGL.glVertex2f(f, (float) i_301_ + f_304_); | |
OpenGL.glEnd(); | |
} | |
final int E() { | |
anInt7539++; | |
return (anInt7750 + this.anInt7748 + this.anInt7747); | |
} | |
final CubeMap createBlendedCubeMap(CubeMap first, CubeMap second, float alpha, CubeMap previous) { | |
try { | |
anInt7658++; | |
if (first != null && second != null && this.cubemapTextureSupport | |
&& this.frameBufferSupport) { | |
GlBlendedCubeMap blended = null; | |
GlCubeMap class299_sub1 = (GlCubeMap) first; | |
GlCubeMap class299_sub1_307_ = (GlCubeMap) second; | |
GlCubeMapTexture secondText = class299_sub1.getTexture((byte) -121); | |
GlCubeMapTexture firstText = class299_sub1_307_.getTexture((byte) -121); | |
if (secondText != null && firstText != null) { | |
int maximumSize = | |
((firstText.size >= secondText.size) ? firstText.size : secondText.size); | |
if (previous != first && second != previous && previous instanceof GlBlendedCubeMap) { | |
GlBlendedCubeMap previousBlendedCubeMap = (GlBlendedCubeMap) previous; | |
if (maximumSize == previousBlendedCubeMap.getSize(65534)) { | |
blended = previousBlendedCubeMap; | |
} | |
} | |
if (blended == null) { | |
blended = new GlBlendedCubeMap(this, maximumSize); | |
} | |
if (blended.combine(secondText, alpha, firstText)) { | |
return blended; | |
} | |
} | |
} | |
if (alpha < 0.5F) { | |
return first; | |
} | |
return second; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.SD(" + (first != null ? "{...}" : "null") + ',' + (second != null ? "{...}" : "null") | |
+ ',' + alpha + ',' + (previous != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void setSurface(Canvas canvas) { | |
try { | |
aCanvas7575 = null; | |
anInt7621++; | |
aLong7636 = 0L; | |
if (canvas == null || canvas == aCanvas7626) { | |
aCanvas7575 = aCanvas7626; | |
aLong7636 = aLong7553; | |
} else if (surfaces.containsKey(canvas)) { | |
Long var_long = (Long) surfaces.get(canvas); | |
aLong7636 = var_long.longValue(); | |
aCanvas7575 = canvas; | |
} | |
if (aCanvas7575 == null || aLong7636 == 0L) { | |
throw new RuntimeException(); | |
} | |
glContext.setSurface(aLong7636); | |
method3745((byte) 92); | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, "qo.MF(" + (canvas != null ? "{...}" : "null") + ')'); | |
} | |
} | |
final void setMaterial(boolean bool, int i, int i_310_) { | |
int i_311_ = 57 / ((39 - i_310_) / 52); | |
anInt7644++; | |
setMaterial(i, bool, true); | |
} | |
final int method3667(int i, int i_312_) { | |
anInt7627++; | |
return i_312_ ^ i & i_312_; | |
} | |
final void swapBuffers(Rectangle[] rectangles, int i, int i_313_, int i_314_) | |
throws Exception_Sub1 { | |
try { | |
swapBuffers(i_313_, i_314_); | |
anInt7584++; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.UA(" + (rectangles != null ? "{...}" : "null") + ',' + i + ',' + i_313_ + ',' + i_314_ | |
+ ')')); | |
} | |
} | |
private final void updateFog(int i) { | |
fogEnd = -aFloat7786 + (float) (far - this.anInt7813); | |
anInt7639++; | |
this.fogStart = fogEnd - aFloat7857 * (float) this.anInt7782; | |
if ((float) this.near > this.fogStart) { | |
this.fogStart = (float) this.near; | |
} | |
// GL_FOG_START | |
// GL_FOG_END | |
// GL_FOG_COLOR | |
OpenGL.glFogf(2915, this.fogStart); | |
OpenGL.glFogf(2916, fogEnd); | |
InputStream_Sub2.fogColors[0] = | |
((float) Class139.bitAnd(0xff0000, this.fogColor) / 1.671168E7F); | |
InputStream_Sub2.fogColors[1] = ((float) Class139.bitAnd(this.fogColor, 0xff00) / 65280.0F); | |
InputStream_Sub2.fogColors[2] = ((float) Class139.bitAnd(this.fogColor, 255) / 255.0F); | |
OpenGL.glFogfv(2918, InputStream_Sub2.fogColors, 0); | |
} | |
final void setLightingEnabled(boolean bool, byte i) { | |
if (!bool == aBoolean7805) { | |
aBoolean7805 = bool; | |
toggleLighting((byte) -117); | |
} | |
if (i < -56) { | |
anInt7564++; | |
} | |
} | |
final void swapBuffers(int i, int i_457_) throws Exception_Sub1 { | |
try { | |
glContext.swapBuffers(); | |
} catch (Exception exception) { | |
/* empty */ | |
} | |
anInt7624++; | |
} | |
final void setNearAndFar(int i, int i_458_) { | |
anInt7606++; | |
if (i != this.near || far != i_458_) { | |
near = i; | |
far = i_458_; | |
setupProjection(98); | |
updateFog(16711680); | |
if ((anInt7865 ^ 0xffffffff) == -4) { | |
method3747(); | |
} else if (anInt7865 == 2) { | |
loadFrustrumProjection((byte) 121); | |
} | |
} | |
} | |
final void initializePostProcessing(int i, int i_459_, int width, int length) { | |
postProcessing.initialize(i, i_459_, width, length); | |
anInt7651++; | |
} | |
final void popReadFrameBuffer(IFrameBuffer interface11) { | |
try { | |
anInt7697++; | |
if (readFrameBufferStackPointer < 0 | |
|| interface11 != readFrameBuffers[readFrameBufferStackPointer]) { | |
throw new RuntimeException(); | |
} | |
readFrameBuffers[readFrameBufferStackPointer--] = null; | |
interface11.unbindRead(); | |
if (readFrameBufferStackPointer < 0) { | |
currentReadFrameBuffer = null; | |
} else { | |
currentReadFrameBuffer = readFrameBuffers[readFrameBufferStackPointer]; | |
currentReadFrameBuffer.bindRead(); | |
} | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17 | |
.method2929(runtimeexception, ("qo.CA(" + (interface11 != null ? "{...}" : "null") + ')')); | |
} | |
} | |
final void method3631(int i) { | |
anInt7520++; | |
if ((i ^ 0xffffffff) != -2) { | |
throw new IllegalArgumentException(""); | |
} | |
} | |
final Interface3 method3665(int i, int i_462_) { | |
anInt7561++; | |
return null; | |
} | |
private final void setupProjection(int i) { | |
anInt7614++; | |
float[] mat = projMatrix; | |
float left = (float) -(near * projectionCenterX) / (float) cameraScaleX; | |
float right = (float) (near * (viewportWidth - projectionCenterX)) / (float) cameraScaleX; | |
float top = (float) (near * this.projectionCenterY) / (float) projectionScaleY; | |
float bottom = | |
(float) -((viewportHeight - projectionCenterY) * near) / (float) projectionScaleY; | |
if (right == left || bottom == top) { | |
mat[13] = 0.0F; | |
mat[15] = 1.0F; | |
mat[3] = 0.0F; | |
mat[11] = 0.0F; | |
mat[12] = 0.0F; | |
mat[4] = 0.0F; | |
mat[6] = 0.0F; | |
mat[8] = 0.0F; | |
mat[7] = 0.0F; | |
mat[1] = 0.0F; | |
mat[10] = 1.0F; | |
mat[14] = 0.0F; | |
mat[5] = 1.0F; | |
mat[0] = 1.0F; | |
mat[9] = 0.0F; | |
mat[2] = 0.0F; | |
} else { | |
float n = 2.0F * (float) near; | |
mat[0] = n / (right - left); | |
mat[1] = 0.0F; | |
mat[2] = 0.0F; | |
mat[3] = 0.0F; | |
mat[4] = 0.0F; | |
mat[5] = n / (top - bottom); | |
mat[6] = 0.0F; | |
mat[7] = 0.0F; | |
mat[8] = (right + left) / (right - left); | |
mat[9] = (top + bottom) / (-bottom + top); | |
mat[10] = projectionC = (float) -(far + this.near) / (float) (far - this.near); | |
mat[11] = -1.0F; | |
mat[12] = 0.0F; | |
mat[13] = 0.0F; | |
mat[14] = projectionD = -((float) far * n) / (float) (far - this.near); | |
mat[15] = 0.0F; | |
} | |
update(-24051); | |
} | |
final void finish() { | |
anInt7692++; | |
OpenGL.glFinish(); | |
} | |
final Sprite createSprite(SpriteConfig class207, boolean bool) { | |
try { | |
anInt7657++; | |
int[] is = new int[(class207.packedWidth * class207.packedHeight)]; | |
int i = 0; | |
int i_467_ = 0; | |
if (class207.alphaIndex != null) { | |
for (int i_468_ = 0; class207.packedHeight > i_468_; i_468_++) { | |
for (int i_469_ = 0; ((class207.packedWidth ^ 0xffffffff) < (i_469_ | |
^ 0xffffffff)); i_469_++) { | |
is[i_467_++] = (Class273.method2057((class207.alphaIndex[i] << 1325175288), | |
(class207.palette[Class139.bitAnd((class207.index[i]), 255)]))); | |
i++; | |
} | |
} | |
} else { | |
for (int i_470_ = 0; class207.packedHeight > i_470_; i_470_++) { | |
for (int i_471_ = 0; ((i_471_ ^ 0xffffffff) > (class207.packedWidth | |
^ 0xffffffff)); i_471_++) { | |
int i_472_ = (class207.palette[0xff & (class207.index[i++])]); | |
is[i_467_++] = i_472_ == 0 ? 0 : Class273.method2057(-16777216, i_472_); | |
} | |
} | |
} | |
Sprite class105 = this | |
.createSprite(class207.packedWidth, is, (byte) 94, 0, class207.packedWidth, | |
class207.packedHeight); | |
class105.method985(class207.offsetX, class207.offsetY, class207.paddingX, class207.paddingY); | |
return class105; | |
} catch (RuntimeException runtimeexception) { | |
throw Class348_Sub17.method2929(runtimeexception, | |
("qo.GF(" + (class207 != null ? "{...}" : "null") + ',' + bool + ')')); | |
} | |
} | |
final void method3807(boolean bool) { | |
anInt7517++; | |
if (!bool != !aBoolean7801) { | |
aBoolean7801 = bool; | |
method3732(-87); | |
flags &= ~0x1f; | |
} | |
} | |
final void setFogColor(int i, int i_473_) { | |
InputStream_Sub2.fogColors[2] = (float) Class139.bitAnd(i, 255) / 255.0F; | |
if (i_473_ <= 116) { | |
this.cameraScaleX = 76; | |
} | |
InputStream_Sub2.fogColors[3] = (float) (i >>> 444720536) / 255.0F; | |
InputStream_Sub2.fogColors[1] = (float) Class139.bitAnd(i, 65280) / 65280.0F; | |
anInt7659++; | |
InputStream_Sub2.fogColors[0] = (float) Class139.bitAnd(16711680, i) / 1.671168E7F; | |
OpenGL.glTexEnvfv(8960, 8705, InputStream_Sub2.fogColors, 0); | |
} | |
final int[] na(int i, int i_474_, int i_475_, int i_476_) { | |
anInt7622++; | |
int[] is = new int[i_475_ * i_476_]; | |
for (int i_477_ = 0; i_476_ > i_477_; i_477_++) { | |
OpenGL.glReadPixelsi(i, (-i_474_ + this.viewportHeight + -i_477_), i_475_, 1, 32993, | |
this.anInt7812, is, i_475_ * i_477_); | |
} | |
return is; | |
} | |
private final void updateViewport(boolean bool) { | |
OpenGL.glViewport(offsetX, offsetY, this.viewportWidth, this.viewportHeight); | |
anInt7718++; | |
if (bool != true) { | |
this.aClass64_Sub3_7780 = null; | |
} | |
} | |
final boolean method3699() { | |
anInt7700++; | |
return multiSampleSupport && !(isBloomEnabled() && !aBoolean7822); | |
} | |
final synchronized void method3810(int i, int i_478_, int i_479_) { | |
if (i_479_ < -57) { | |
anInt7677++; | |
IntegerNode class348_sub35 = new IntegerNode(i_478_); | |
class348_sub35.nodeKey = (long) i; | |
aClass262_7754.addLast(class348_sub35); | |
} | |
} | |
private final void updateClip(byte i) { | |
anInt7690++; | |
if (i == 11) { | |
if ((lowerClipX ^ 0xffffffff) >= (upperClipX ^ 0xffffffff) && lowerClipY <= upperClipY) { | |
OpenGL.glScissor(offsetX + lowerClipX, (offsetY + this.viewportHeight - upperClipY), | |
-lowerClipX + upperClipX, -lowerClipY + upperClipY); | |
} else { | |
OpenGL.glScissor(0, 0, 0, 0); | |
} | |
} | |
} | |
final boolean isMultipleRenderingCoresSupported() { | |
anInt7603++; | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment