import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.net.URI;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Random;
import org.apache.commons.io.Charsets;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.Project;
public class blq extends awb
{
private static final Random b = new Random();
private float c;
private String d;
private auq e;
private int p;
private bhy q;
private boolean r = true;
private static boolean s;
private static boolean t;
private final Object u = new Object();
private String v;
private String w;
private static final bjl x = new bjl("texts/splashes.txt");
private static final bjl y = new bjl("textures/gui/title/minecraft.png");
private static final bjl[] z = { new bjl("textures/gui/title/background/panorama_0.png"), new bjl("textures/gui/title/background/panorama_1.png"), new bjl("textures/gui/title/background/panorama_2.png"), new bjl("textures/gui/title/background/panorama_3.png"), new bjl("textures/gui/title/background/panorama_4.png"), new bjl("textures/gui/title/background/panorama_5.png") };
public static final String a = "Please click " + a.t + "here" + a.v + " for more information.";
private int A;
private int B;
private int C;
private int D;
private int E;
private int F;
private bjl G;
private auq H;
public blq()
{
this.d = "missingno";
BufferedReader localBufferedReader = null;
try {
ArrayList localArrayList = new ArrayList();
localBufferedReader = new BufferedReader(new InputStreamReader(ats.w().K().a(x).b(), Charsets.UTF_8));
while ((str2 = localBufferedReader.readLine()) != null) {
str2 = str2.trim();
if (!str2.isEmpty()) {
localArrayList.add(str2);
}
}
do
{
this.d = ((String)localArrayList.get(b.nextInt(localArrayList.size())));
}while (this.d.hashCode() == 125780783);
} catch (IOException localIOException2) {
} finally {
if (localBufferedReader != null)
try {
localBufferedReader.close();
}
catch (IOException localIOException4)
{
}
}
this.c = b.nextFloat();
this.v = "";
String str1 = System.getProperty("os_architecture");
String str2 = System.getProperty("java_version");
if ("ppc".equalsIgnoreCase(str1)) {
this.v = ("" + a.r + "Notice!" + a.v + " PowerPC compatibility will be dropped in Minecraft 1.6");
this.w = "http://tinyurl.com/javappc";
} else if ((str2 != null) && (str2.startsWith("1.5"))) {
this.v = ("" + a.r + "Notice!" + a.v + " Java 1.5 compatibility will be dropped in Minecraft 1.6");
this.w = "http://tinyurl.com/javappc";
}
}
public void c()
{
this.p += 1;
}
public boolean f()
{
return false;
}
protected void a(char paramChar, int paramInt)
{
}
public void A_()
{
this.q = new bhy(256, 256);
this.G = this.f.J().a("background", this.q);
Calendar localCalendar = Calendar.getInstance();
localCalendar.setTime(new Date());
if ((localCalendar.get(2) + 1 == 11) && (localCalendar.get(5) == 9))
this.d = "Happy birthday, ez!";
else if ((localCalendar.get(2) + 1 == 6) && (localCalendar.get(5) == 1))
this.d = "Happy birthday, Notch!";
else if ((localCalendar.get(2) + 1 == 12) && (localCalendar.get(5) == 24))
this.d = "Merry X-mas!";
else if ((localCalendar.get(2) + 1 == 1) && (localCalendar.get(5) == 1))
this.d = "Happy new year!";
else if ((localCalendar.get(2) + 1 == 10) && (localCalendar.get(5) == 31)) {
this.d = "OOoooOOOoooo! Spooky!";
}
int i = 24;
int j = this.h / 4 + 48;
if (this.f.p())
c(j, 24);
else {
b(j, 24);
}
g();
this.i.add(new auq(0, this.g / 2 - 100, j + 72 + 12, 98, 20, bjy.a("menu.options")));
this.i.add(new auq(4, this.g / 2 + 2, j + 72 + 12, 98, 20, bjy.a("menu.quit")));
this.i.add(new avn(5, this.g / 2 - 124, j + 72 + 12));
synchronized (this.u) {
this.B = this.o.a(this.v);
this.A = this.o.a(a);
int k = Math.max(this.B, this.A);
this.C = ((this.g - k) / 2);
this.D = (((auq)this.i.get(0)).e - 24);
this.E = (this.C + k);
this.F = (this.D + 24);
}
}
private void g() {
if (this.r)
if (!s) {
s = true;
new blr(this).start();
}
else if (t) {
h();
}
}
private void h()
{
this.H.i = true;
}
private void b(int paramInt1, int paramInt2) {
this.i.add(new auq(1, this.g / 2 - 100, paramInt1, bjy.a("menu.singleplayer")));
this.i.add(new auq(2, this.g / 2 - 100, paramInt1 + paramInt2 * 1, bjy.a("menu.multiplayer")));
this.i.add(this.H = new auq(14, this.g / 2 - 100, paramInt1 + paramInt2 * 2, bjy.a("menu.online")));
this.H.i = false;
}
private void c(int paramInt1, int paramInt2) {
this.i.add(new auq(11, this.g / 2 - 100, paramInt1, bjy.a("menu.playdemo")));
this.i.add(this.e = new auq(12, this.g / 2 - 100, paramInt1 + paramInt2 * 1, bjy.a("menu.resetdemo")));
amc localamc = this.f.b();
alp localalp = localamc.c("Demo_World");
if (localalp == null)
this.e.h = false;
}
protected void a(auq paramauq)
{
if (paramauq.g == 0) {
this.f.a(new avt(this, this.f.u));
}
if (paramauq.g == 5) {
this.f.a(new avo(this, this.f.u, this.f.M()));
}
if (paramauq.g == 1) {
this.f.a(new awe(this));
}
if (paramauq.g == 2) {
this.f.a(new avk(this));
}
if ((paramauq.g == 14) && (this.H.i)) {
i();
}
if (paramauq.g == 4) {
this.f.f();
}
if (paramauq.g == 11) {
this.f.a("Demo_World", "Demo_World", ji.a);
}
if (paramauq.g == 12) {
amc localamc = this.f.b();
alp localalp = localamc.c("Demo_World");
if (localalp != null) {
auu localauu = awe.a(this, localalp.k(), 12);
this.f.a(localauu);
}
}
}
private void i() {
azw localazw = new azw(this.f.H());
try {
if (localazw.c().booleanValue())
this.f.a(new ayb(this));
else
this.f.a(new ayw(this));
}
catch (bam localbam) {
this.f.an().c(localbam.toString());
} catch (IOException localIOException) {
this.f.an().c(localIOException.getLocalizedMessage());
}
}
public void a(boolean paramBoolean, int paramInt)
{
Object localObject1;
if ((paramBoolean) && (paramInt == 12)) {
localObject1 = this.f.b();
((amc)localObject1).d();
((amc)localObject1).e("Demo_World");
this.f.a(this);
} else if (paramInt == 13) {
if (paramBoolean) {
try {
localObject1 = Class.forName("java.awt.Desktop");
Object localObject2 = ((Class)localObject1).getMethod("getDesktop", new Class[0]).invoke(null, new Object[0]);
((Class)localObject1).getMethod("browse", new Class[] { URI.class }).invoke(localObject2, new Object[] { new URI(this.w) });
} catch (Throwable localThrowable) {
localThrowable.printStackTrace();
}
}
this.f.a(this);
}
}
private void b(int paramInt1, int paramInt2, float paramFloat) {
bfn localbfn = bfn.a;
GL11.glMatrixMode(5889);
GL11.glPushMatrix();
GL11.glLoadIdentity();
Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
GL11.glMatrixMode(5888);
GL11.glPushMatrix();
GL11.glLoadIdentity();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
GL11.glEnable(3042);
GL11.glDisable(3008);
GL11.glDisable(2884);
GL11.glDepthMask(false);
GL11.glBlendFunc(770, 771);
int i = 8;
for (int j = 0; j < i * i; j++) {
GL11.glPushMatrix();
float f1 = (j % i / i - 0.5F) / 64.0F;
float f2 = (j / i / i - 0.5F) / 64.0F;
float f3 = 0.0F;
GL11.glTranslatef(f1, f2, f3);
GL11.glRotatef(lr.a((this.p + paramFloat) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-(this.p + paramFloat) * 0.1F, 0.0F, 1.0F, 0.0F);
for (int k = 0; k < 6; k++) {
GL11.glPushMatrix();
if (k == 1) GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
if (k == 2) GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
if (k == 3) GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
if (k == 4) GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
if (k == 5) GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
this.f.J().a(z[k]);
localbfn.b();
localbfn.a(16777215, 255 / (j + 1));
float f4 = 0.0F;
localbfn.a(-1.0D, -1.0D, 1.0D, 0.0F + f4, 0.0F + f4);
localbfn.a(1.0D, -1.0D, 1.0D, 1.0F - f4, 0.0F + f4);
localbfn.a(1.0D, 1.0D, 1.0D, 1.0F - f4, 1.0F - f4);
localbfn.a(-1.0D, 1.0D, 1.0D, 0.0F + f4, 1.0F - f4);
localbfn.a();
GL11.glPopMatrix();
}
GL11.glPopMatrix();
GL11.glColorMask(true, true, true, false);
}
localbfn.b(0.0D, 0.0D, 0.0D);
GL11.glColorMask(true, true, true, true);
GL11.glMatrixMode(5889);
GL11.glPopMatrix();
GL11.glMatrixMode(5888);
GL11.glPopMatrix();
GL11.glDepthMask(true);
GL11.glEnable(2884);
GL11.glEnable(3008);
GL11.glEnable(2929);
}
private void a(float paramFloat) {
this.f.J().a(this.G);
GL11.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glColorMask(true, true, true, false);
bfn localbfn = bfn.a;
localbfn.b();
int i = 3;
for (int j = 0; j < i; j++) {
localbfn.a(1.0F, 1.0F, 1.0F, 1.0F / (j + 1));
int k = this.g;
int m = this.h;
float f = (j - i / 2) / 256.0F;
localbfn.a(k, m, this.n, 0.0F + f, 0.0D);
localbfn.a(k, 0.0D, this.n, 1.0F + f, 0.0D);
localbfn.a(0.0D, 0.0D, this.n, 1.0F + f, 1.0D);
localbfn.a(0.0D, m, this.n, 0.0F + f, 1.0D);
}
localbfn.a();
GL11.glColorMask(true, true, true, true);
}
private void c(int paramInt1, int paramInt2, float paramFloat) {
GL11.glViewport(0, 0, 256, 256);
b(paramInt1, paramInt2, paramFloat);
GL11.glDisable(3553);
GL11.glEnable(3553);
a(paramFloat);
a(paramFloat);
a(paramFloat);
a(paramFloat);
a(paramFloat);
a(paramFloat);
a(paramFloat);
a(paramFloat);
GL11.glViewport(0, 0, this.f.d, this.f.e);
bfn localbfn = bfn.a;
localbfn.b();
float f1 = this.g > this.h ? 120.0F / this.g : 120.0F / this.h;
float f2 = this.h * f1 / 256.0F;
float f3 = this.g * f1 / 256.0F;
GL11.glTexParameteri(3553, 10241, 9729);
GL11.glTexParameteri(3553, 10240, 9729);
localbfn.a(1.0F, 1.0F, 1.0F, 1.0F);
int i = this.g;
int j = this.h;
localbfn.a(0.0D, j, this.n, 0.5F - f2, 0.5F + f3);
localbfn.a(i, j, this.n, 0.5F - f2, 0.5F - f3);
localbfn.a(i, 0.0D, this.n, 0.5F + f2, 0.5F - f3);
localbfn.a(0.0D, 0.0D, this.n, 0.5F + f2, 0.5F + f3);
localbfn.a();
}
public void a(int paramInt1, int paramInt2, float paramFloat)
{
c(paramInt1, paramInt2, paramFloat);
bfn localbfn = bfn.a;
int i = 274;
int j = this.g / 2 - i / 2;
int k = 30;
a(0, 0, this.g, this.h, -2130706433, 16777215);
a(0, 0, this.g, this.h, 0, -2147483648);
this.f.J().a(y);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
if (this.c < 0.0001D) {
b(j + 0, k + 0, 0, 0, 99, 44);
b(j + 99, k + 0, 129, 0, 27, 44);
b(j + 99 + 26, k + 0, 126, 0, 3, 44);
b(j + 99 + 26 + 3, k + 0, 99, 0, 26, 44);
b(j + 155, k + 0, 0, 45, 155, 44);
} else {
b(j + 0, k + 0, 0, 0, 155, 44);
b(j + 155, k + 0, 0, 45, 155, 44);
}
localbfn.d(16777215);
GL11.glPushMatrix();
GL11.glTranslatef(this.g / 2 + 90, 70.0F, 0.0F);
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
float f = 1.8F - lr.e(lr.a((float)(ats.F() % 1000L) / 1000.0F * 3.141593F * 2.0F) * 0.1F);
f = f * 100.0F / (this.o.a(this.d) + 32);
GL11.glScalef(f, f, f);
a(this.o, this.d, 0, -8, 16776960);
GL11.glPopMatrix();
String str1 = "Minecraft 1.6.2";
if (this.f.p()) {
str1 = str1 + " Demo";
}
b(this.o, str1, 2, this.h - 10, 16777215);
String str2 = "Copyright Mojang AB. Do not distribute!";
b(this.o, str2, this.g - this.o.a(str2) - 2, this.h - 10, 16777215);
if ((this.v != null) && (this.v.length() > 0)) {
a(this.C - 2, this.D - 2, this.E + 2, this.F - 1, 1428160512);
b(this.o, this.v, this.C, this.D, 16777215);
b(this.o, a, (this.g - this.A) / 2, ((auq)this.i.get(0)).e - 12, 16777215);
}
super.a(paramInt1, paramInt2, paramFloat);
}
protected void a(int paramInt1, int paramInt2, int paramInt3)
{
super.a(paramInt1, paramInt2, paramInt3);
synchronized (this.u) {
if ((this.v.length() > 0) && (paramInt1 >= this.C) && (paramInt1 <= this.E) && (paramInt2 >= this.D) && (paramInt2 <= this.F)) {
bcu localbcu = new bcu(this, this.w, 13, true);
localbcu.h();
this.f.a(localbcu);
}
}
}
}