Guest User

Untitled

a guest
Jun 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.99 KB | None | 0 0
  1. private void drawLogo(float f)
  2. {
  3. ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
  4. int h = scaledresolution.getScaledHeight();
  5. int w = scaledresolution.getScaledWidth();
  6. int k = 120 * scaledresolution.scaleFactor;
  7. if(logoEffects == null)
  8. {
  9. logoEffects = new LogoEffectRandomizer[minecraftLogo[0].length()][minecraftLogo.length];
  10. for(int i = 0; i < logoEffects.length; i++)
  11. {
  12. for(int j = 0; j < logoEffects[i].length; j++)
  13. {
  14. logoEffects[i][j] = new LogoEffectRandomizer(this, i, j);
  15. }
  16.  
  17. }
  18.  
  19. }
  20. GL11.glMatrixMode(5889 /*GL_PROJECTION*/);
  21. GL11.glPushMatrix();
  22. GL11.glLoadIdentity();
  23. GLU.gluPerspective(70F, (float)mc.displayWidth / (float)k, 0.05F, 100F);
  24. GL11.glViewport(0, mc.displayHeight - k, mc.displayWidth, k);
  25. GL11.glMatrixMode(5888 /*GL_MODELVIEW0_ARB*/);
  26. GL11.glPushMatrix();
  27. GL11.glLoadIdentity();
  28. GL11.glDisable(2884 /*GL_CULL_FACE*/);
  29. GL11.glCullFace(1029 /*GL_BACK*/);
  30. GL11.glDepthMask(true);
  31. RenderBlocks renderblocks = new RenderBlocks();
  32. for(int l = 0; l < 3; l++)
  33. {
  34. GL11.glPushMatrix();
  35. GL11.glTranslatef(0.4F, 0.6F, -13F);
  36. if(l == 0)
  37. {
  38. GL11.glClear(256);
  39. GL11.glTranslatef(0.0F, -0.4F, 0.0F);
  40. GL11.glScalef(0.98F, 1.0F, 1.0F);
  41. GL11.glEnable(3042 /*GL_BLEND*/);
  42. GL11.glBlendFunc(770, 771);
  43. }
  44. if(l == 1)
  45. {
  46. GL11.glDisable(3042 /*GL_BLEND*/);
  47. GL11.glClear(256);
  48. }
  49. if(l == 2)
  50. {
  51. GL11.glEnable(3042 /*GL_BLEND*/);
  52. GL11.glBlendFunc(768, 1);
  53. }
  54. GL11.glScalef(1.0F, -1F, 1.0F);
  55. GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
  56. GL11.glScalef(0.89F, 1.0F, 0.4F);
  57. GL11.glTranslatef((float)(-minecraftLogo[0].length()) * 0.5F, (float)(-minecraftLogo.length) * 0.5F, 0.0F);
  58. GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/terrain.png"));
  59. if(l == 0)
  60. {
  61. GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/title/black.png"));
  62. }
  63. for(int i1 = 0; i1 < minecraftLogo.length; i1++)
  64. {
  65. for(int j1 = 0; j1 < minecraftLogo[i1].length(); j1++)
  66. {
  67. char c = minecraftLogo[i1].charAt(j1);
  68. if(c == ' ')
  69. {
  70. continue;
  71. }
  72. GL11.glPushMatrix();
  73. LogoEffectRandomizer logoeffectrandomizer = logoEffects[j1][i1];
  74. float f1 = (float)(logoeffectrandomizer.field_1311_b + (logoeffectrandomizer.field_1312_a - logoeffectrandomizer.field_1311_b) * (double)f);
  75. float f2 = 1.0F;
  76. float f3 = 1.0F;
  77. float f4 = 0.0F;
  78. if(l == 0)
  79. {
  80. f2 = f1 * 0.04F + 1.0F;
  81. f3 = 1.0F / f2;
  82. f1 = 0.0F;
  83. }
  84. GL11.glTranslatef(j1, i1, f1);
  85. GL11.glScalef(f2, f2, f2);
  86. GL11.glRotatef(f4, 0.0F, 1.0F, 0.0F);
  87. Block block = null;
  88. switch(c)
  89. {
  90. case 71: // 'G'
  91. block = Block.ice;
  92. break;
  93.  
  94. case 35: // '#'
  95. block = Block.glowStone;
  96. break;
  97.  
  98. case 36: // '$'
  99. block = Block.blockSteel;
  100. break;
  101.  
  102. case 64: // '@'
  103. block = Block.blockGold;
  104. break;
  105.  
  106. case 63: // '?'
  107. block = Block.blockLapis;
  108. break;
  109. }
  110. renderblocks.func_1238_a(block, f3);
  111. GL11.glPopMatrix();
  112. }
  113.  
  114. }
  115.  
  116. GL11.glPopMatrix();
  117. }
  118.  
  119. GL11.glDisable(3042 /*GL_BLEND*/);
  120. GL11.glMatrixMode(5889 /*GL_PROJECTION*/);
  121. GL11.glPopMatrix();
  122. GL11.glMatrixMode(5888 /*GL_MODELVIEW0_ARB*/);
  123. GL11.glPopMatrix();
  124. GL11.glViewport(0, 0, mc.displayWidth, mc.displayHeight);
  125. GL11.glEnable(2884 /*GL_CULL_FACE*/);
  126. }
  127.  
  128. public static Random getRand()
  129. {
  130. return rand;
  131. }
  132.  
  133. private static final Random rand = new Random();
  134. private float updateCounter1;
  135. // Removed splashText for now.. incase we decide to implement
  136. // something, such as motd?
  137. public static String splashText1 = "";
  138. private GuiButton multiplayerButton1;
  139. // Even'd out the logo too! (changed: T)
  140. String minecraftLogo[] = {
  141. "#########################################################################",
  142. "# #",
  143. "# G GGG GG GG G GGG GGG G G GGG GG G #",
  144. "# G G G G G G G G G G G G G G G G #",
  145. "# G G G G G G G G G G G G G G G #",
  146. "# G G G G G G G G G GGG G G GGG G G G #",
  147. "# G G G G G G G G G G G G G G G G #",
  148. "# G G G G G G G G G G G G G G G G #",
  149. "# G GGG GG G GG G GGG G GGG G GG #",
  150. "# #",
  151. "#########################################################################" };
  152. private LogoEffectRandomizer logoEffects[][];
  153. }
Add Comment
Please, Sign In to add comment