Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void drawLogo(float f)
- {
- ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
- int h = scaledresolution.getScaledHeight();
- int w = scaledresolution.getScaledWidth();
- int k = 120 * scaledresolution.scaleFactor;
- if(logoEffects == null)
- {
- logoEffects = new LogoEffectRandomizer[minecraftLogo[0].length()][minecraftLogo.length];
- for(int i = 0; i < logoEffects.length; i++)
- {
- for(int j = 0; j < logoEffects[i].length; j++)
- {
- logoEffects[i][j] = new LogoEffectRandomizer(this, i, j);
- }
- }
- }
- GL11.glMatrixMode(5889 /*GL_PROJECTION*/);
- GL11.glPushMatrix();
- GL11.glLoadIdentity();
- GLU.gluPerspective(70F, (float)mc.displayWidth / (float)k, 0.05F, 100F);
- GL11.glViewport(0, mc.displayHeight - k, mc.displayWidth, k);
- GL11.glMatrixMode(5888 /*GL_MODELVIEW0_ARB*/);
- GL11.glPushMatrix();
- GL11.glLoadIdentity();
- GL11.glDisable(2884 /*GL_CULL_FACE*/);
- GL11.glCullFace(1029 /*GL_BACK*/);
- GL11.glDepthMask(true);
- RenderBlocks renderblocks = new RenderBlocks();
- for(int l = 0; l < 3; l++)
- {
- GL11.glPushMatrix();
- GL11.glTranslatef(0.4F, 0.6F, -13F);
- if(l == 0)
- {
- GL11.glClear(256);
- GL11.glTranslatef(0.0F, -0.4F, 0.0F);
- GL11.glScalef(0.98F, 1.0F, 1.0F);
- GL11.glEnable(3042 /*GL_BLEND*/);
- GL11.glBlendFunc(770, 771);
- }
- if(l == 1)
- {
- GL11.glDisable(3042 /*GL_BLEND*/);
- GL11.glClear(256);
- }
- if(l == 2)
- {
- GL11.glEnable(3042 /*GL_BLEND*/);
- GL11.glBlendFunc(768, 1);
- }
- GL11.glScalef(1.0F, -1F, 1.0F);
- GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
- GL11.glScalef(0.89F, 1.0F, 0.4F);
- GL11.glTranslatef((float)(-minecraftLogo[0].length()) * 0.5F, (float)(-minecraftLogo.length) * 0.5F, 0.0F);
- GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/terrain.png"));
- if(l == 0)
- {
- GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/black.png"));
- }
- for(int i1 = 0; i1 < minecraftLogo.length; i1++)
- {
- for(int j1 = 0; j1 < minecraftLogo[i1].length(); j1++)
- {
- char c = minecraftLogo[i1].charAt(j1);
- if(c == ' ')
- {
- continue;
- }
- GL11.glPushMatrix();
- LogoEffectRandomizer logoeffectrandomizer = logoEffects[j1][i1];
- float f1 = (float)(logoeffectrandomizer.field_1311_b + (logoeffectrandomizer.field_1312_a - logoeffectrandomizer.field_1311_b) * (double)f);
- float f2 = 1.0F;
- float f3 = 1.0F;
- float f4 = 0.0F;
- if(l == 0)
- {
- f2 = f1 * 0.04F + 1.0F;
- f3 = 1.0F / f2;
- f1 = 0.0F;
- }
- GL11.glTranslatef(j1, i1, f1);
- GL11.glScalef(f2, f2, f2);
- GL11.glRotatef(f4, 0.0F, 1.0F, 0.0F);
- Block block = null;
- switch(c)
- {
- case 71: // 'G'
- block = Block.ice;
- break;
- case 35: // '#'
- block = Block.glowStone;
- break;
- case 36: // '$'
- block = Block.blockSteel;
- break;
- case 64: // '@'
- block = Block.blockGold;
- break;
- case 63: // '?'
- block = Block.blockLapis;
- break;
- }
- renderblocks.func_1238_a(block, f3);
- GL11.glPopMatrix();
- }
- }
- GL11.glPopMatrix();
- }
- GL11.glDisable(3042 /*GL_BLEND*/);
- GL11.glMatrixMode(5889 /*GL_PROJECTION*/);
- GL11.glPopMatrix();
- GL11.glMatrixMode(5888 /*GL_MODELVIEW0_ARB*/);
- GL11.glPopMatrix();
- GL11.glViewport(0, 0, mc.displayWidth, mc.displayHeight);
- GL11.glEnable(2884 /*GL_CULL_FACE*/);
- }
- public static Random getRand()
- {
- return rand;
- }
- private static final Random rand = new Random();
- private float updateCounter1;
- // Removed splashText for now.. incase we decide to implement
- // something, such as motd?
- public static String splashText1 = "";
- private GuiButton multiplayerButton1;
- // Even'd out the logo too! (changed: T)
- String minecraftLogo[] = {
- "#########################################################################",
- "# #",
- "# G GGG GG GG G GGG GGG G G GGG GG G #",
- "# G G G G G G G G G G G G G G G G #",
- "# G G G G G G G G G G G G G G G #",
- "# G G G G G G G G G GGG G G GGG G G G #",
- "# G G G G G G G G G G G G G G G G #",
- "# G G G G G G G G G G G G G G G G #",
- "# G GGG GG G GG G GGG G GGG G GG #",
- "# #",
- "#########################################################################" };
- private LogoEffectRandomizer logoEffects[][];
- }
Add Comment
Please, Sign In to add comment