push patches

This commit is contained in:
Christian Weeks 2012-05-14 12:22:46 -04:00
parent 028fc2505b
commit 5c48a3c146
4 changed files with 45 additions and 6 deletions

View file

@ -25,16 +25,18 @@
this.func_6250_c("Startup");
this.field_6286_O = new OpenGlCapsChecker();
this.field_6301_A.func_340_a(this.field_6304_y);
@@ -745,7 +749,9 @@
@@ -744,9 +748,11 @@
this.field_6327_b.func_6467_a(this.field_9237_P.field_1378_c);
}
Profiler.func_40661_c("gameRenderer");
+ FMLClientHandler.instance().onRenderTickStart(this.field_9237_P.field_1378_c);
Profiler.func_40661_c("gameRenderer");
this.field_9243_r.func_4136_b(this.field_9237_P.field_1378_c);
+ FMLClientHandler.instance().onRenderTickEnd(this.field_9237_P.field_1378_c);
Profiler.func_40662_b();
+ FMLClientHandler.instance().onRenderTickEnd(this.field_9237_P.field_1378_c);
}
GL11.glFlush();
@@ -1340,6 +1346,7 @@
this.func_28001_B();
}

View file

@ -9,7 +9,17 @@
import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
@@ -459,23 +462,29 @@
@@ -16,6 +19,9 @@
import javax.imageio.ImageIO;
import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
+
public class RenderEngine
{
public static boolean field_1609_a = false;
@@ -459,23 +465,37 @@
for (int var2 = 0; var2 < this.field_1604_f.size(); ++var2)
{
TextureFX var3 = (TextureFX)this.field_1604_f.get(var2);
@ -18,14 +28,22 @@
+ var3.func_782_a(this);
+ var1 = var3.field_1126_b;
+ }
+ Profiler.func_40663_a("hdTextureHandling");
+ int tileSize = GL11.glGetTexLevelParameteri(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH ) >>4;
+ var3.textureGridSize = tileSize * tileSize;
+ var3.textureLength = tileSize;
+ if (var3.field_1127_a==null || var3.field_1127_a.length!= var3.textureGridSize << 2) {
+ var3.field_1127_a = new byte[var3.textureGridSize << 2];
+ }
+ Profiler.func_40662_b();
var3.field_1131_c = this.field_1602_h.field_1578_g;
+ Profiler.func_40663_a(var3.getClass().getSimpleName());
var3.func_783_a();
+ Profiler.func_40662_b();
+ if (var3.field_1127_a.length!=var3.textureGridSize<<2) {
+ FMLCommonHandler.instance().getFMLLogger().warning(String.format("Detected a texture FX discrepancy in %s (%d, %d)",var3.getClass().getSimpleName(), var3.field_1127_a.length, var3.textureGridSize<<2));
+ continue;
+ }
this.field_1605_e.clear();
this.field_1605_e.put(var3.field_1127_a);
this.field_1605_e.position(0).limit(var3.field_1127_a.length);
@ -45,7 +63,7 @@
}
}
}
@@ -635,4 +644,8 @@
@@ -635,4 +655,8 @@
GL11.glBindTexture(GL11.GL_TEXTURE_2D, p_1076_1_);
}
}

View file

@ -55,7 +55,7 @@
public void func_783_a()
{
+ if (field_4226_h[0].length!=textureLength) {
+ if (field_4226_h[0].length!=textureGridSize << 4) {
+ setupPortalTextures();
+ }
++this.field_4227_g;

View file

@ -38,6 +38,7 @@ import net.minecraft.src.NetworkManager;
import net.minecraft.src.Packet1Login;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.Packet3Chat;
import net.minecraft.src.Profiler;
import net.minecraft.src.ServerRegistry;
import net.minecraft.src.StringTranslate;
import net.minecraft.src.World;
@ -597,4 +598,22 @@ public class FMLServerHandler implements IFMLSidedHandler
{
return null;
}
/* (non-Javadoc)
* @see cpw.mods.fml.common.IFMLSidedHandler#profileStart(java.lang.String)
*/
@Override
public void profileStart(String profileLabel)
{
Profiler.func_40518_a(profileLabel);
}
/* (non-Javadoc)
* @see cpw.mods.fml.common.IFMLSidedHandler#profileEnd()
*/
@Override
public void profileEnd()
{
Profiler.func_40517_a();
}
}