Start on rendering
This commit is contained in:
parent
3c51e176be
commit
e738c5f06d
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="18" />
|
<bytecodeTargetLevel target="17" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
|
@ -23,3 +23,9 @@ tasks.withType(JavaCompile) {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: './lwjgl-rundir/', include: '*.jar')
|
implementation fileTree(dir: './lwjgl-rundir/', include: '*.jar')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register('copyDebugJar', Copy) {
|
||||||
|
project.delete("lwjgl-rundir/eaglercraft.jar")
|
||||||
|
from layout.buildDirectory.file("build/libs/eaglercraft.jar")
|
||||||
|
into layout.buildDirectory.dir("lwjgl-rundir/")
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -564,10 +564,4 @@ public class TextureTerrainMap implements IconRegister {
|
||||||
public Icon getMissingIcon() {
|
public Icon getMissingIcon() {
|
||||||
return missingImage;
|
return missingImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Icon registerIcon(String var1) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'registerIcon'");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,10 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.EaglerImage;
|
import net.lax1dude.eaglercraft.EaglerImage;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import org.lwjgl.input.Mouse;
|
import net.lax1dude.eaglercraft.glemu.EffectPipeline;
|
||||||
import org.lwjgl.opengl.Display;
|
import net.lax1dude.eaglercraft.glemu.EffectPipelineFXAA;
|
||||||
import org.lwjgl.opengl.GL11;
|
import net.lax1dude.eaglercraft.glemu.GameOverlayFramebuffer;
|
||||||
import org.lwjgl.opengl.GLContext;
|
import net.lax1dude.eaglercraft.glemu.vector.Matrix4f;
|
||||||
import org.lwjgl.util.glu.Project;
|
|
||||||
|
|
||||||
public class EntityRenderer
|
public class EntityRenderer
|
||||||
{
|
{
|
||||||
|
@ -392,7 +391,7 @@ public class EntityRenderer
|
||||||
if (var2.getHealth() <= 0.0F)
|
if (var2.getHealth() <= 0.0F)
|
||||||
{
|
{
|
||||||
var4 = (float)var2.deathTime + par1;
|
var4 = (float)var2.deathTime + par1;
|
||||||
GL11.glRotatef(40.0F - 8000.0F / (var4 + 200.0F), 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(40.0F - 8000.0F / (var4 + 200.0F), 0.0F, 0.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var3 >= 0.0F)
|
if (var3 >= 0.0F)
|
||||||
|
@ -400,9 +399,9 @@ public class EntityRenderer
|
||||||
var3 /= (float)var2.maxHurtTime;
|
var3 /= (float)var2.maxHurtTime;
|
||||||
var3 = MathHelper.sin(var3 * var3 * var3 * var3 * (float)Math.PI);
|
var3 = MathHelper.sin(var3 * var3 * var3 * var3 * (float)Math.PI);
|
||||||
var4 = var2.attackedAtYaw;
|
var4 = var2.attackedAtYaw;
|
||||||
GL11.glRotatef(-var4, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(-var4, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(-var3 * 14.0F, 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(-var3 * 14.0F, 0.0F, 0.0F, 1.0F);
|
||||||
GL11.glRotatef(var4, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(var4, 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,10 +417,10 @@ public class EntityRenderer
|
||||||
float var4 = -(var2.distanceWalkedModified + var3 * par1);
|
float var4 = -(var2.distanceWalkedModified + var3 * par1);
|
||||||
float var5 = var2.prevCameraYaw + (var2.cameraYaw - var2.prevCameraYaw) * par1;
|
float var5 = var2.prevCameraYaw + (var2.cameraYaw - var2.prevCameraYaw) * par1;
|
||||||
float var6 = var2.prevCameraPitch + (var2.cameraPitch - var2.prevCameraPitch) * par1;
|
float var6 = var2.prevCameraPitch + (var2.cameraPitch - var2.prevCameraPitch) * par1;
|
||||||
GL11.glTranslatef(MathHelper.sin(var4 * (float)Math.PI) * var5 * 0.5F, -Math.abs(MathHelper.cos(var4 * (float)Math.PI) * var5), 0.0F);
|
EaglerAdapter.glTranslatef(MathHelper.sin(var4 * (float)Math.PI) * var5 * 0.5F, -Math.abs(MathHelper.cos(var4 * (float)Math.PI) * var5), 0.0F);
|
||||||
GL11.glRotatef(MathHelper.sin(var4 * (float)Math.PI) * var5 * 3.0F, 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(MathHelper.sin(var4 * (float)Math.PI) * var5 * 3.0F, 0.0F, 0.0F, 1.0F);
|
||||||
GL11.glRotatef(Math.abs(MathHelper.cos(var4 * (float)Math.PI - 0.2F) * var5) * 5.0F, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(Math.abs(MathHelper.cos(var4 * (float)Math.PI - 0.2F) * var5) * 5.0F, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glRotatef(var6, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(var6, 1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,12 +434,12 @@ public class EntityRenderer
|
||||||
double var4 = var2.prevPosX + (var2.posX - var2.prevPosX) * (double)par1;
|
double var4 = var2.prevPosX + (var2.posX - var2.prevPosX) * (double)par1;
|
||||||
double var6 = var2.prevPosY + (var2.posY - var2.prevPosY) * (double)par1 - (double)var3;
|
double var6 = var2.prevPosY + (var2.posY - var2.prevPosY) * (double)par1 - (double)var3;
|
||||||
double var8 = var2.prevPosZ + (var2.posZ - var2.prevPosZ) * (double)par1;
|
double var8 = var2.prevPosZ + (var2.posZ - var2.prevPosZ) * (double)par1;
|
||||||
GL11.glRotatef(this.prevCamRoll + (this.camRoll - this.prevCamRoll) * par1, 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(this.prevCamRoll + (this.camRoll - this.prevCamRoll) * par1, 0.0F, 0.0F, 1.0F);
|
||||||
|
|
||||||
if (var2.isPlayerSleeping())
|
if (var2.isPlayerSleeping())
|
||||||
{
|
{
|
||||||
var3 = (float)((double)var3 + 1.0D);
|
var3 = (float)((double)var3 + 1.0D);
|
||||||
GL11.glTranslatef(0.0F, 0.3F, 0.0F);
|
EaglerAdapter.glTranslatef(0.0F, 0.3F, 0.0F);
|
||||||
|
|
||||||
if (!this.mc.gameSettings.debugCamEnable)
|
if (!this.mc.gameSettings.debugCamEnable)
|
||||||
{
|
{
|
||||||
|
@ -450,11 +449,11 @@ public class EntityRenderer
|
||||||
{
|
{
|
||||||
int var11 = this.mc.theWorld.getBlockMetadata(MathHelper.floor_double(var2.posX), MathHelper.floor_double(var2.posY), MathHelper.floor_double(var2.posZ));
|
int var11 = this.mc.theWorld.getBlockMetadata(MathHelper.floor_double(var2.posX), MathHelper.floor_double(var2.posY), MathHelper.floor_double(var2.posZ));
|
||||||
int var12 = var11 & 3;
|
int var12 = var11 & 3;
|
||||||
GL11.glRotatef((float)(var12 * 90), 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef((float)(var12 * 90), 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
|
EaglerAdapter.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
|
||||||
GL11.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.mc.gameSettings.thirdPersonView > 0)
|
else if (this.mc.gameSettings.thirdPersonView > 0)
|
||||||
|
@ -467,9 +466,9 @@ public class EntityRenderer
|
||||||
{
|
{
|
||||||
var28 = this.prevDebugCamYaw + (this.debugCamYaw - this.prevDebugCamYaw) * par1;
|
var28 = this.prevDebugCamYaw + (this.debugCamYaw - this.prevDebugCamYaw) * par1;
|
||||||
var13 = this.prevDebugCamPitch + (this.debugCamPitch - this.prevDebugCamPitch) * par1;
|
var13 = this.prevDebugCamPitch + (this.debugCamPitch - this.prevDebugCamPitch) * par1;
|
||||||
GL11.glTranslatef(0.0F, 0.0F, (float)(-var27));
|
EaglerAdapter.glTranslatef(0.0F, 0.0F, (float)(-var27));
|
||||||
GL11.glRotatef(var13, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(var13, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glRotatef(var28, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(var28, 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -508,126 +507,148 @@ public class EntityRenderer
|
||||||
|
|
||||||
if (this.mc.gameSettings.thirdPersonView == 2)
|
if (this.mc.gameSettings.thirdPersonView == 2)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glRotatef(var2.rotationPitch - var13, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(var2.rotationPitch - var13, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glRotatef(var2.rotationYaw - var28, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(var2.rotationYaw - var28, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glTranslatef(0.0F, 0.0F, (float)(-var27));
|
EaglerAdapter.glTranslatef(0.0F, 0.0F, (float)(-var27));
|
||||||
GL11.glRotatef(var28 - var2.rotationYaw, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(var28 - var2.rotationYaw, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(var13 - var2.rotationPitch, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(var13 - var2.rotationPitch, 1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glTranslatef(0.0F, 0.0F, -0.1F);
|
EaglerAdapter.glTranslatef(0.0F, 0.0F, -0.1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.mc.gameSettings.debugCamEnable)
|
if (!this.mc.gameSettings.debugCamEnable)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glTranslatef(0.0F, var3, 0.0F);
|
EaglerAdapter.glTranslatef(0.0F, var3, 0.0F);
|
||||||
var4 = var2.prevPosX + (var2.posX - var2.prevPosX) * (double)par1;
|
var4 = var2.prevPosX + (var2.posX - var2.prevPosX) * (double)par1;
|
||||||
var6 = var2.prevPosY + (var2.posY - var2.prevPosY) * (double)par1 - (double)var3;
|
var6 = var2.prevPosY + (var2.posY - var2.prevPosY) * (double)par1 - (double)var3;
|
||||||
var8 = var2.prevPosZ + (var2.posZ - var2.prevPosZ) * (double)par1;
|
var8 = var2.prevPosZ + (var2.posZ - var2.prevPosZ) * (double)par1;
|
||||||
this.cloudFog = this.mc.renderGlobal.hasCloudFog(var4, var6, var8, par1);
|
this.cloudFog = this.mc.renderGlobal.hasCloudFog(var4, var6, var8, par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final Matrix4f tmpMatrix = new Matrix4f();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets up projection, view effects, camera position/rotation
|
* sets up projection, view effects, camera position/rotation
|
||||||
*/
|
*/
|
||||||
private void setupCameraTransform(float par1, int par2)
|
private void setupCameraTransform(float par1, int par2) {
|
||||||
{
|
|
||||||
this.farPlaneDistance = (float) (256 >> this.mc.gameSettings.renderDistance);
|
this.farPlaneDistance = (float) (256 >> this.mc.gameSettings.renderDistance);
|
||||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_PROJECTION);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
float var3 = 0.07F;
|
float var3 = 0.07F;
|
||||||
|
|
||||||
if (this.mc.gameSettings.anaglyph)
|
if (this.mc.gameSettings.anaglyph) {
|
||||||
{
|
EaglerAdapter.glTranslatef((float) (-(par2 * 2 - 1)) * var3, 0.0F, 0.0F);
|
||||||
GL11.glTranslatef((float)(-(par2 * 2 - 1)) * var3, 0.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.cameraZoom != 1.0D)
|
if (this.cameraZoom != 1.0D) {
|
||||||
{
|
EaglerAdapter.glTranslatef((float) this.cameraYaw, (float) (-this.cameraPitch), 0.0F);
|
||||||
GL11.glTranslatef((float)this.cameraYaw, (float)(-this.cameraPitch), 0.0F);
|
EaglerAdapter.glScalef((float)this.cameraZoom, (float)this.cameraZoom, 1.0F);
|
||||||
GL11.glScaled(this.cameraZoom, this.cameraZoom, 1.0D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Project.gluPerspective(this.getFOVModifier(par1, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
|
float i = startup / 500.0f - 0.4f;
|
||||||
|
if(i > 1.0f) i = 1.0f;
|
||||||
|
if(i < 0.0f) i = 0.0f;
|
||||||
|
float i2 = i * i;
|
||||||
|
if(i2 > 0.0f) {
|
||||||
|
float f = (float)((EaglerAdapter.steadyTimeMillis() % 10000000l) * 0.0002);
|
||||||
|
f += MathHelper.sin(f * 5.0f) * 0.2f;
|
||||||
|
i2 *= MathHelper.sin(f) + MathHelper.sin(f * 1.5f + 0.6f) + MathHelper.sin(f * 0.7f + 1.7f) +
|
||||||
|
MathHelper.sin(f * 3.0f + 3.0f) + MathHelper.sin(f * 5.25f + 1.2f);
|
||||||
|
}
|
||||||
|
EaglerAdapter.gluPerspective(this.getFOVModifier(par1, true) * (1.0f + i2 * 0.007f), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
|
||||||
float var4;
|
float var4;
|
||||||
|
|
||||||
if (this.mc.playerController.enableEverythingIsScrewedUpMode())
|
if (this.mc.playerController.enableEverythingIsScrewedUpMode()) {
|
||||||
{
|
|
||||||
var4 = 0.6666667F;
|
var4 = 0.6666667F;
|
||||||
GL11.glScalef(1.0F, var4, 1.0F);
|
EaglerAdapter.glScalef(1.0F, var4, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_MODELVIEW);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
|
|
||||||
if (this.mc.gameSettings.anaglyph)
|
if (this.mc.gameSettings.anaglyph) {
|
||||||
{
|
EaglerAdapter.glTranslatef((float) (par2 * 2 - 1) * 0.1F, 0.0F, 0.0F);
|
||||||
GL11.glTranslatef((float)(par2 * 2 - 1) * 0.1F, 0.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hurtCameraEffect(par1);
|
this.hurtCameraEffect(par1);
|
||||||
|
|
||||||
if (this.mc.gameSettings.viewBobbing)
|
if (this.mc.gameSettings.viewBobbing) {
|
||||||
{
|
|
||||||
this.setupViewBobbing(par1);
|
this.setupViewBobbing(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i2 = i * i;
|
||||||
|
if(i > 0.0f) {
|
||||||
|
|
||||||
|
float f = (float)((EaglerAdapter.steadyTimeMillis() % 10000000l) * 0.00012);
|
||||||
|
f += MathHelper.sin(f * 3.0f) * 0.2f;
|
||||||
|
i2 *= MathHelper.sin(f * 1.2f + 1.0f) + MathHelper.sin(f * 1.5f + 0.8f) * 3.0f + MathHelper.sin(f * 0.6f + 3.0f) +
|
||||||
|
MathHelper.sin(f * 4.3f) + MathHelper.sin(f * 5.25f + 0.5f);
|
||||||
|
EaglerAdapter.glRotatef(i2 * 1.3f, 0.0f, 0.0f, 1.0f);
|
||||||
|
|
||||||
|
tmpMatrix.setIdentity();
|
||||||
|
|
||||||
|
f *= 2.5f;
|
||||||
|
f += MathHelper.sin(f * 3.0f + 1.0f) * 0.2f;
|
||||||
|
f *= 1.3f;
|
||||||
|
f += 3.3413f;
|
||||||
|
i2 = MathHelper.sin(f * 1.5f + 0.7f) + MathHelper.sin(f * 0.6f + 1.7f) +
|
||||||
|
MathHelper.sin(f * 7.0f + 3.0f) * 0.3f;
|
||||||
|
i2 *= i2;
|
||||||
|
tmpMatrix.m10 = i2 * 0.02f;
|
||||||
|
tmpMatrix.m30 = i2 * 0.028f;
|
||||||
|
|
||||||
|
EaglerAdapter.glMultMatrixf(tmpMatrix); // shear the fuck out of the matrix
|
||||||
|
}
|
||||||
|
|
||||||
var4 = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * par1;
|
var4 = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * par1;
|
||||||
|
|
||||||
if (var4 > 0.0F)
|
if (var4 > 0.0F) {
|
||||||
{
|
|
||||||
byte var5 = 20;
|
byte var5 = 20;
|
||||||
|
|
||||||
if (this.mc.thePlayer.isPotionActive(Potion.confusion))
|
if (this.mc.thePlayer.isPotionActive(Potion.confusion)) {
|
||||||
{
|
|
||||||
var5 = 7;
|
var5 = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
float var6 = 5.0F / (var4 * var4 + 5.0F) - var4 * 0.04F;
|
float var6 = 5.0F / (var4 * var4 + 5.0F) - var4 * 0.04F;
|
||||||
var6 *= var6;
|
var6 *= var6;
|
||||||
GL11.glRotatef(((float)this.rendererUpdateCount + par1) * (float)var5, 0.0F, 1.0F, 1.0F);
|
EaglerAdapter.glRotatef(((float) this.rendererUpdateCount + par1) * (float) var5, 0.0F, 1.0F, 1.0F);
|
||||||
GL11.glScalef(1.0F / var6, 1.0F, 1.0F);
|
EaglerAdapter.glScalef(1.0F / var6, 1.0F, 1.0F);
|
||||||
GL11.glRotatef(-((float)this.rendererUpdateCount + par1) * (float)var5, 0.0F, 1.0F, 1.0F);
|
EaglerAdapter.glRotatef(-((float) this.rendererUpdateCount + par1) * (float) var5, 0.0F, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.orientCamera(par1);
|
this.orientCamera(par1);
|
||||||
|
|
||||||
if (this.debugViewDirection > 0)
|
if (this.debugViewDirection > 0) {
|
||||||
{
|
|
||||||
int var7 = this.debugViewDirection - 1;
|
int var7 = this.debugViewDirection - 1;
|
||||||
|
|
||||||
if (var7 == 1)
|
if (var7 == 1) {
|
||||||
{
|
EaglerAdapter.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var7 == 2)
|
if (var7 == 2) {
|
||||||
{
|
EaglerAdapter.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var7 == 3)
|
if (var7 == 3) {
|
||||||
{
|
EaglerAdapter.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var7 == 4)
|
if (var7 == 4) {
|
||||||
{
|
EaglerAdapter.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var7 == 5)
|
if (var7 == 5) {
|
||||||
{
|
EaglerAdapter.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -635,66 +656,78 @@ public class EntityRenderer
|
||||||
/**
|
/**
|
||||||
* Render player hand
|
* Render player hand
|
||||||
*/
|
*/
|
||||||
private void renderHand(float par1, int par2)
|
private void renderHand(float par1, int par2) {
|
||||||
{
|
if (this.debugViewDirection <= 0) {
|
||||||
if (this.debugViewDirection <= 0)
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_PROJECTION);
|
||||||
{
|
EaglerAdapter.glLoadIdentity();
|
||||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
|
||||||
GL11.glLoadIdentity();
|
|
||||||
float var3 = 0.07F;
|
float var3 = 0.07F;
|
||||||
|
|
||||||
if (this.mc.gameSettings.anaglyph)
|
float i = startup / 500.0f - 0.4f;
|
||||||
{
|
if(i > 1.0f) i = 1.0f;
|
||||||
GL11.glTranslatef((float)(-(par2 * 2 - 1)) * var3, 0.0F, 0.0F);
|
if(i < 0.0f) i = 0.0f;
|
||||||
|
float i2 = i * i;
|
||||||
|
if(i2 > 0.0f) {
|
||||||
|
float f = (float)((EaglerAdapter.steadyTimeMillis() % 10000000l) * 0.0003);
|
||||||
|
f += MathHelper.sin(f * 3.0f) * 0.2f;
|
||||||
|
i2 *= MathHelper.sin(f * 1.2f + 1.0f) + MathHelper.sin(f * 1.5f + 0.8f) * 3.0f + MathHelper.sin(f * 0.6f + 3.0f) +
|
||||||
|
MathHelper.sin(f * 4.3f) + MathHelper.sin(f * 5.25f + 0.5f);
|
||||||
|
i2 *= i2;
|
||||||
|
EaglerAdapter.gluPerspectiveFlat(this.getFOVModifier(par1, false) + i2 * 0.3f, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, 10f);
|
||||||
|
f += 3.132123f;
|
||||||
|
float j = MathHelper.sin(f * 1.3f + 1.1f) + MathHelper.sin(f * 1.3f + 0.8f) * 3.0f + MathHelper.sin(f * 0.5f + 2.0f);
|
||||||
|
i2 = j * 0.5f + i2 * 0.2f;
|
||||||
|
EaglerAdapter.glRotatef(i2 * 0.8f, 0.0f, 0.0f, 1.0f);
|
||||||
|
|
||||||
|
f += 1.123123f;
|
||||||
|
j = MathHelper.sin(f * 1.3f + 1.1f) + MathHelper.sin(f * 1.3f + 0.8f) * 3.0f + MathHelper.sin(f * 0.5f + 2.0f);
|
||||||
|
i2 = j * 0.5f + i2 * 0.2f;
|
||||||
|
EaglerAdapter.glRotatef(i2 * 0.5f, 1.0f, 0.0f, 0.0f);
|
||||||
|
}else {
|
||||||
|
EaglerAdapter.gluPerspectiveFlat(this.getFOVModifier(par1, false), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, 10f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.cameraZoom != 1.0D)
|
if (this.mc.gameSettings.anaglyph) {
|
||||||
{
|
EaglerAdapter.glTranslatef((float) (-(par2 * 2 - 1)) * var3, 0.0F, 0.0F);
|
||||||
GL11.glTranslatef((float)this.cameraYaw, (float)(-this.cameraPitch), 0.0F);
|
|
||||||
GL11.glScaled(this.cameraZoom, this.cameraZoom, 1.0D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Project.gluPerspective(this.getFOVModifier(par1, false), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
|
if (this.cameraZoom != 1.0D) {
|
||||||
|
EaglerAdapter.glTranslatef((float) this.cameraYaw, (float) (-this.cameraPitch), 0.0F);
|
||||||
|
EaglerAdapter.glScalef((float)this.cameraZoom, (float)this.cameraZoom, 1.0F);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.mc.playerController.enableEverythingIsScrewedUpMode())
|
if (this.mc.playerController.enableEverythingIsScrewedUpMode()) {
|
||||||
{
|
|
||||||
float var4 = 0.6666667F;
|
float var4 = 0.6666667F;
|
||||||
GL11.glScalef(1.0F, var4, 1.0F);
|
EaglerAdapter.glScalef(1.0F, var4, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_MODELVIEW);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
|
|
||||||
if (this.mc.gameSettings.anaglyph)
|
if (this.mc.gameSettings.anaglyph) {
|
||||||
{
|
EaglerAdapter.glTranslatef((float) (par2 * 2 - 1) * 0.1F, 0.0F, 0.0F);
|
||||||
GL11.glTranslatef((float)(par2 * 2 - 1) * 0.1F, 0.0F, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
EaglerAdapter.glPushMatrix();
|
||||||
this.hurtCameraEffect(par1);
|
this.hurtCameraEffect(par1);
|
||||||
|
|
||||||
if (this.mc.gameSettings.viewBobbing)
|
if (this.mc.gameSettings.viewBobbing) {
|
||||||
{
|
|
||||||
this.setupViewBobbing(par1);
|
this.setupViewBobbing(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode())
|
if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode()) {
|
||||||
{
|
|
||||||
this.enableLightmap((double) par1);
|
this.enableLightmap((double) par1);
|
||||||
this.itemRenderer.renderItemInFirstPerson(par1);
|
this.itemRenderer.renderItemInFirstPerson(par1);
|
||||||
this.disableLightmap((double) par1);
|
this.disableLightmap((double) par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
EaglerAdapter.glPopMatrix();
|
||||||
|
|
||||||
if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping())
|
if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping()) {
|
||||||
{
|
|
||||||
this.itemRenderer.renderOverlays(par1);
|
this.itemRenderer.renderOverlays(par1);
|
||||||
this.hurtCameraEffect(par1);
|
this.hurtCameraEffect(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.gameSettings.viewBobbing)
|
if (this.mc.gameSettings.viewBobbing) {
|
||||||
{
|
|
||||||
this.setupViewBobbing(par1);
|
this.setupViewBobbing(par1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -706,7 +739,7 @@ public class EntityRenderer
|
||||||
public void disableLightmap(double par1)
|
public void disableLightmap(double par1)
|
||||||
{
|
{
|
||||||
OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
||||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
|
||||||
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -905,9 +938,9 @@ public class EntityRenderer
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endSection();
|
this.mc.mcProfiler.endSection();
|
||||||
boolean var2 = Display.isActive();
|
boolean var2 = EaglerAdapter.isFocused();
|
||||||
|
|
||||||
if (!var2 && this.mc.gameSettings.pauseOnLostFocus && (!this.mc.gameSettings.touchscreen || !Mouse.isButtonDown(1)))
|
if (!var2 && this.mc.gameSettings.pauseOnLostFocus)
|
||||||
{
|
{
|
||||||
if (Minecraft.getSystemTime() - this.prevFrameTime > 500L)
|
if (Minecraft.getSystemTime() - this.prevFrameTime > 500L)
|
||||||
{
|
{
|
||||||
|
@ -959,8 +992,8 @@ public class EntityRenderer
|
||||||
ScaledResolution var13 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
ScaledResolution var13 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
||||||
int var14 = var13.getScaledWidth();
|
int var14 = var13.getScaledWidth();
|
||||||
int var15 = var13.getScaledHeight();
|
int var15 = var13.getScaledHeight();
|
||||||
int var16 = Mouse.getX() * var14 / this.mc.displayWidth;
|
int var16 = EaglerAdapter.mouseGetX() * var14 / this.mc.displayWidth;
|
||||||
int var17 = var15 - Mouse.getY() * var15 / this.mc.displayHeight - 1;
|
int var17 = var15 - EaglerAdapter.mouseGetY() * var15 / this.mc.displayHeight - 1;
|
||||||
int var18 = performanceToFps(this.mc.gameSettings.limitFramerate);
|
int var18 = performanceToFps(this.mc.gameSettings.limitFramerate);
|
||||||
|
|
||||||
if (this.mc.theWorld != null)
|
if (this.mc.theWorld != null)
|
||||||
|
@ -988,18 +1021,18 @@ public class EntityRenderer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
|
EaglerAdapter.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
|
||||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_PROJECTION);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_MODELVIEW);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
this.setupOverlayRendering();
|
this.setupOverlayRendering();
|
||||||
this.renderEndNanoTime = System.nanoTime();
|
this.renderEndNanoTime = System.nanoTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mc.currentScreen != null)
|
if (this.mc.currentScreen != null)
|
||||||
{
|
{
|
||||||
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
EaglerAdapter.glClear(EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1027,8 +1060,8 @@ public class EntityRenderer
|
||||||
this.updateLightmap(par1);
|
this.updateLightmap(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_CULL_FACE);
|
||||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_DEPTH_TEST);
|
||||||
|
|
||||||
if (this.mc.renderViewEntity == null)
|
if (this.mc.renderViewEntity == null)
|
||||||
{
|
{
|
||||||
|
@ -1053,19 +1086,19 @@ public class EntityRenderer
|
||||||
|
|
||||||
if (anaglyphField == 0)
|
if (anaglyphField == 0)
|
||||||
{
|
{
|
||||||
GL11.glColorMask(false, true, true, false);
|
EaglerAdapter.glColorMask(false, true, true, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glColorMask(true, false, false, false);
|
EaglerAdapter.glColorMask(true, false, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("clear");
|
this.mc.mcProfiler.endStartSection("clear");
|
||||||
GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
|
EaglerAdapter.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
|
||||||
this.updateFogColor(par1);
|
this.updateFogColor(par1);
|
||||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
|
EaglerAdapter.glClear(EaglerAdapter.GL_COLOR_BUFFER_BIT | EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_CULL_FACE);
|
||||||
this.mc.mcProfiler.endStartSection("camera");
|
this.mc.mcProfiler.endStartSection("camera");
|
||||||
this.setupCameraTransform(par1, var13);
|
this.setupCameraTransform(par1, var13);
|
||||||
ActiveRenderInfo.updateRenderInfo(this.mc.thePlayer, this.mc.gameSettings.thirdPersonView == 2);
|
ActiveRenderInfo.updateRenderInfo(this.mc.thePlayer, this.mc.gameSettings.thirdPersonView == 2);
|
||||||
|
@ -1079,12 +1112,12 @@ public class EntityRenderer
|
||||||
var5.renderSky(par1);
|
var5.renderSky(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_FOG);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_FOG);
|
||||||
this.setupFog(1, par1);
|
this.setupFog(1, par1);
|
||||||
|
|
||||||
if (this.mc.gameSettings.ambientOcclusion != 0)
|
if (this.mc.gameSettings.ambientOcclusion != 0)
|
||||||
{
|
{
|
||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_SMOOTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("culling");
|
this.mc.mcProfiler.endStartSection("culling");
|
||||||
|
@ -1114,12 +1147,12 @@ public class EntityRenderer
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("prepareterrain");
|
this.mc.mcProfiler.endStartSection("prepareterrain");
|
||||||
this.setupFog(0, par1);
|
this.setupFog(0, par1);
|
||||||
GL11.glEnable(GL11.GL_FOG);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_FOG);
|
||||||
TextureMap.locationBlocksTexture.bindTexture();
|
TextureMap.locationBlocksTexture.bindTexture();
|
||||||
RenderHelper.disableStandardItemLighting();
|
RenderHelper.disableStandardItemLighting();
|
||||||
this.mc.mcProfiler.endStartSection("terrain");
|
this.mc.mcProfiler.endStartSection("terrain");
|
||||||
var5.sortAndRender(var4, 0, (double)par1);
|
var5.sortAndRender(var4, 0, (double)par1);
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_FLAT);
|
||||||
EntityPlayer var17;
|
EntityPlayer var17;
|
||||||
|
|
||||||
if (this.debugViewDirection == 0)
|
if (this.debugViewDirection == 0)
|
||||||
|
@ -1139,20 +1172,20 @@ public class EntityRenderer
|
||||||
if (this.mc.objectMouseOver != null && var4.isInsideOfMaterial(Material.water) && var4 instanceof EntityPlayer && !this.mc.gameSettings.hideGUI)
|
if (this.mc.objectMouseOver != null && var4.isInsideOfMaterial(Material.water) && var4 instanceof EntityPlayer && !this.mc.gameSettings.hideGUI)
|
||||||
{
|
{
|
||||||
var17 = (EntityPlayer)var4;
|
var17 = (EntityPlayer)var4;
|
||||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST);
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.mc.mcProfiler.endStartSection("outline");
|
||||||
var5.drawSelectionBox(var17, this.mc.objectMouseOver, 0, par1);
|
var5.drawSelectionBox(var17, this.mc.objectMouseOver, 0, par1);
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_CULL_FACE);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GL11.glDepthMask(true);
|
EaglerAdapter.glDepthMask(true);
|
||||||
this.setupFog(0, par1);
|
this.setupFog(0, par1);
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_CULL_FACE);
|
||||||
TextureMap.locationBlocksTexture.bindTexture();
|
TextureMap.locationBlocksTexture.bindTexture();
|
||||||
|
|
||||||
if (this.mc.gameSettings.fancyGraphics)
|
if (this.mc.gameSettings.fancyGraphics)
|
||||||
|
@ -1161,26 +1194,26 @@ public class EntityRenderer
|
||||||
|
|
||||||
if (this.mc.gameSettings.ambientOcclusion != 0)
|
if (this.mc.gameSettings.ambientOcclusion != 0)
|
||||||
{
|
{
|
||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_SMOOTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glColorMask(false, false, false, false);
|
EaglerAdapter.glColorMask(false, false, false, false);
|
||||||
int var18 = var5.sortAndRender(var4, 1, (double)par1);
|
int var18 = var5.sortAndRender(var4, 1, (double)par1);
|
||||||
|
|
||||||
if (this.mc.gameSettings.anaglyph)
|
if (this.mc.gameSettings.anaglyph)
|
||||||
{
|
{
|
||||||
if (anaglyphField == 0)
|
if (anaglyphField == 0)
|
||||||
{
|
{
|
||||||
GL11.glColorMask(false, true, true, true);
|
EaglerAdapter.glColorMask(false, true, true, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glColorMask(true, false, false, true);
|
EaglerAdapter.glColorMask(true, false, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glColorMask(true, true, true, true);
|
EaglerAdapter.glColorMask(true, true, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var18 > 0)
|
if (var18 > 0)
|
||||||
|
@ -1188,7 +1221,7 @@ public class EntityRenderer
|
||||||
var5.renderAllRenderLists(1, (double)par1);
|
var5.renderAllRenderLists(1, (double)par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_FLAT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1196,27 +1229,27 @@ public class EntityRenderer
|
||||||
var5.sortAndRender(var4, 1, (double)par1);
|
var5.sortAndRender(var4, 1, (double)par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glDepthMask(true);
|
EaglerAdapter.glDepthMask(true);
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_CULL_FACE);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||||
|
|
||||||
if (this.cameraZoom == 1.0D && var4 instanceof EntityPlayer && !this.mc.gameSettings.hideGUI && this.mc.objectMouseOver != null && !var4.isInsideOfMaterial(Material.water))
|
if (this.cameraZoom == 1.0D && var4 instanceof EntityPlayer && !this.mc.gameSettings.hideGUI && this.mc.objectMouseOver != null && !var4.isInsideOfMaterial(Material.water))
|
||||||
{
|
{
|
||||||
var17 = (EntityPlayer)var4;
|
var17 = (EntityPlayer)var4;
|
||||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST);
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.mc.mcProfiler.endStartSection("outline");
|
||||||
var5.drawSelectionBox(var17, this.mc.objectMouseOver, 0, par1);
|
var5.drawSelectionBox(var17, this.mc.objectMouseOver, 0, par1);
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.mcProfiler.endStartSection("destroyProgress");
|
this.mc.mcProfiler.endStartSection("destroyProgress");
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE);
|
||||||
var5.drawBlockDamageTexture(Tessellator.instance, (EntityPlayer)var4, par1);
|
var5.drawBlockDamageTexture(Tessellator.instance, (EntityPlayer)var4, par1);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||||
this.mc.mcProfiler.endStartSection("weather");
|
this.mc.mcProfiler.endStartSection("weather");
|
||||||
this.renderRainSnow(par1);
|
this.renderRainSnow(par1);
|
||||||
GL11.glDisable(GL11.GL_FOG);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_FOG);
|
||||||
|
|
||||||
if (var4.posY >= 128.0D)
|
if (var4.posY >= 128.0D)
|
||||||
{
|
{
|
||||||
|
@ -1227,7 +1260,7 @@ public class EntityRenderer
|
||||||
|
|
||||||
if (this.cameraZoom == 1.0D)
|
if (this.cameraZoom == 1.0D)
|
||||||
{
|
{
|
||||||
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
EaglerAdapter.glClear(EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
||||||
this.renderHand(par1, var13);
|
this.renderHand(par1, var13);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1238,7 +1271,7 @@ public class EntityRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glColorMask(true, true, true, false);
|
EaglerAdapter.glColorMask(true, true, true, false);
|
||||||
this.mc.mcProfiler.endSection();
|
this.mc.mcProfiler.endSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1250,13 +1283,13 @@ public class EntityRenderer
|
||||||
if (this.mc.gameSettings.shouldRenderClouds())
|
if (this.mc.gameSettings.shouldRenderClouds())
|
||||||
{
|
{
|
||||||
this.mc.mcProfiler.endStartSection("clouds");
|
this.mc.mcProfiler.endStartSection("clouds");
|
||||||
GL11.glPushMatrix();
|
EaglerAdapter.glPushMatrix();
|
||||||
this.setupFog(0, par2);
|
this.setupFog(0, par2);
|
||||||
GL11.glEnable(GL11.GL_FOG);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_FOG);
|
||||||
par1RenderGlobal.renderClouds(par2);
|
par1RenderGlobal.renderClouds(par2);
|
||||||
GL11.glDisable(GL11.GL_FOG);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_FOG);
|
||||||
this.setupFog(1, par2);
|
this.setupFog(1, par2);
|
||||||
GL11.glPopMatrix();
|
EaglerAdapter.glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1380,11 +1413,11 @@ public class EntityRenderer
|
||||||
int var44 = MathHelper.floor_double(var41.posY);
|
int var44 = MathHelper.floor_double(var41.posY);
|
||||||
int var45 = MathHelper.floor_double(var41.posZ);
|
int var45 = MathHelper.floor_double(var41.posZ);
|
||||||
Tessellator var8 = Tessellator.instance;
|
Tessellator var8 = Tessellator.instance;
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_CULL_FACE);
|
||||||
GL11.glNormal3f(0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.01F);
|
EaglerAdapter.glAlphaFunc(EaglerAdapter.GL_GREATER, 0.01F);
|
||||||
locationSnowPng.bindTexture();
|
locationSnowPng.bindTexture();
|
||||||
double var9 = var41.lastTickPosX + (var41.posX - var41.lastTickPosX) * (double)par1;
|
double var9 = var41.lastTickPosX + (var41.posX - var41.lastTickPosX) * (double)par1;
|
||||||
double var11 = var41.lastTickPosY + (var41.posY - var41.lastTickPosY) * (double)par1;
|
double var11 = var41.lastTickPosY + (var41.posY - var41.lastTickPosY) * (double)par1;
|
||||||
|
@ -1406,7 +1439,7 @@ public class EntityRenderer
|
||||||
var16 = 10;
|
var16 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
var17 = false;
|
var17 = false;
|
||||||
|
|
||||||
for (int var20 = var45 - var16; var20 <= var45 + var16; ++var20)
|
for (int var20 = var45 - var16; var20 <= var45 + var16; ++var20)
|
||||||
|
@ -1517,9 +1550,9 @@ public class EntityRenderer
|
||||||
var8.draw();
|
var8.draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_CULL_FACE);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
EaglerAdapter.glAlphaFunc(EaglerAdapter.GL_GREATER, 0.1F);
|
||||||
this.disableLightmap((double)par1);
|
this.disableLightmap((double)par1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1530,13 +1563,13 @@ public class EntityRenderer
|
||||||
public void setupOverlayRendering()
|
public void setupOverlayRendering()
|
||||||
{
|
{
|
||||||
ScaledResolution var1 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
ScaledResolution var1 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
||||||
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
EaglerAdapter.glClear(EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
||||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_PROJECTION);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
GL11.glOrtho(0.0D, var1.getScaledWidth_double(), var1.getScaledHeight_double(), 0.0D, 1000.0D, 3000.0D);
|
EaglerAdapter.glOrtho(0.0F, var1.getScaledWidth(), var1.getScaledHeight(), 0.0F, 1000.0F, 3000.0F);
|
||||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
EaglerAdapter.glMatrixMode(EaglerAdapter.GL_MODELVIEW);
|
||||||
GL11.glLoadIdentity();
|
EaglerAdapter.glLoadIdentity();
|
||||||
GL11.glTranslatef(0.0F, 0.0F, -2000.0F);
|
EaglerAdapter.glTranslatef(0.0F, 0.0F, -2000.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1706,7 +1739,7 @@ public class EntityRenderer
|
||||||
this.fogColorBlue = var18;
|
this.fogColorBlue = var18;
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glClearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F);
|
EaglerAdapter.glClearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1725,23 +1758,22 @@ public class EntityRenderer
|
||||||
|
|
||||||
if (par1 == 999)
|
if (par1 == 999)
|
||||||
{
|
{
|
||||||
GL11.glFog(GL11.GL_FOG_COLOR, this.setFogColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
EaglerAdapter.glFog(EaglerAdapter.GL_FOG_COLOR, this.setFogColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||||
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_LINEAR);
|
EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_MODE, EaglerAdapter.GL_LINEAR);
|
||||||
GL11.glFogf(GL11.GL_FOG_START, 0.0F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, 0.0F);
|
||||||
GL11.glFogf(GL11.GL_FOG_END, 8.0F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_END, 8.0F);
|
||||||
|
|
||||||
if (GLContext.getCapabilities().GL_NV_fog_distance)
|
//if (EaglerAdapter.NVFogDistanceInstalled) {
|
||||||
{
|
// EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_DISTANCE_MODE, EaglerAdapter.GL_EYE_RADIAL);
|
||||||
GL11.glFogi(34138, 34139);
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
GL11.glFogf(GL11.GL_FOG_START, 0.0F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, 0.0F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glFog(GL11.GL_FOG_COLOR, this.setFogColorBuffer(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F));
|
EaglerAdapter.glFog(EaglerAdapter.GL_FOG_COLOR, this.setFogColorBuffer(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F));
|
||||||
GL11.glNormal3f(0.0F, -1.0F, 0.0F);
|
EaglerAdapter.glNormal3f(0.0F, -1.0F, 0.0F);
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
int var5 = ActiveRenderInfo.getBlockIdAtEntityViewpoint(this.mc.theWorld, var3, par2);
|
int var5 = ActiveRenderInfo.getBlockIdAtEntityViewpoint(this.mc.theWorld, var3, par2);
|
||||||
float var6;
|
float var6;
|
||||||
|
|
||||||
|
@ -1755,46 +1787,46 @@ public class EntityRenderer
|
||||||
var6 = 5.0F + (this.farPlaneDistance - 5.0F) * (1.0F - (float)var7 / 20.0F);
|
var6 = 5.0F + (this.farPlaneDistance - 5.0F) * (1.0F - (float)var7 / 20.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_LINEAR);
|
EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_MODE, EaglerAdapter.GL_LINEAR);
|
||||||
|
|
||||||
if (par1 < 0)
|
if (par1 < 0)
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_START, 0.0F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, 0.0F);
|
||||||
GL11.glFogf(GL11.GL_FOG_END, var6 * 0.8F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_END, var6 * 0.8F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_START, var6 * 0.25F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, var6 * 0.25F);
|
||||||
GL11.glFogf(GL11.GL_FOG_END, var6);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_END, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GLContext.getCapabilities().GL_NV_fog_distance)
|
// if (GLContext.getCapabilities().GL_NV_fog_distance)
|
||||||
{
|
// {
|
||||||
GL11.glFogi(34138, 34139);
|
// EaglerAdapter.glFogi(34138, 34139);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
else if (this.cloudFog)
|
else if (this.cloudFog)
|
||||||
{
|
{
|
||||||
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP);
|
EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_MODE, EaglerAdapter.GL_EXP);
|
||||||
GL11.glFogf(GL11.GL_FOG_DENSITY, 0.1F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_DENSITY, 0.1F);
|
||||||
}
|
}
|
||||||
else if (var5 > 0 && Block.blocksList[var5].blockMaterial == Material.water)
|
else if (var5 > 0 && Block.blocksList[var5].blockMaterial == Material.water)
|
||||||
{
|
{
|
||||||
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP);
|
EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_MODE, EaglerAdapter.GL_EXP);
|
||||||
|
|
||||||
if (var3.isPotionActive(Potion.waterBreathing))
|
if (var3.isPotionActive(Potion.waterBreathing))
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_DENSITY, 0.05F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_DENSITY, 0.05F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_DENSITY, 0.1F - (float)EnchantmentHelper.getRespiration(var3) * 0.03F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_DENSITY, 0.1F - (float)EnchantmentHelper.getRespiration(var3) * 0.03F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (var5 > 0 && Block.blocksList[var5].blockMaterial == Material.lava)
|
else if (var5 > 0 && Block.blocksList[var5].blockMaterial == Material.lava)
|
||||||
{
|
{
|
||||||
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP);
|
EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_MODE, EaglerAdapter.GL_EXP);
|
||||||
GL11.glFogf(GL11.GL_FOG_DENSITY, 2.0F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_DENSITY, 2.0F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1826,33 +1858,33 @@ public class EntityRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_LINEAR);
|
EaglerAdapter.glFogi(EaglerAdapter.GL_FOG_MODE, EaglerAdapter.GL_LINEAR);
|
||||||
|
|
||||||
if (par1 < 0)
|
if (par1 < 0)
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_START, 0.0F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, 0.0F);
|
||||||
GL11.glFogf(GL11.GL_FOG_END, var6 * 0.8F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_END, var6 * 0.8F);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_START, var6 * 0.25F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, var6 * 0.25F);
|
||||||
GL11.glFogf(GL11.GL_FOG_END, var6);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_END, var6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GLContext.getCapabilities().GL_NV_fog_distance)
|
// if (GLContext.getCapabilities().GL_NV_fog_distance)
|
||||||
{
|
// {
|
||||||
GL11.glFogi(34138, 34139);
|
// EaglerAdapter.glFogi(34138, 34139);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (this.mc.theWorld.provider.doesXZShowFog((int)var3.posX, (int)var3.posZ))
|
if (this.mc.theWorld.provider.doesXZShowFog((int)var3.posX, (int)var3.posZ))
|
||||||
{
|
{
|
||||||
GL11.glFogf(GL11.GL_FOG_START, var6 * 0.05F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_START, var6 * 0.05F);
|
||||||
GL11.glFogf(GL11.GL_FOG_END, Math.min(var6, 192.0F) * 0.5F);
|
EaglerAdapter.glFogf(EaglerAdapter.GL_FOG_END, Math.min(var6, 192.0F) * 0.5F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_COLOR_MATERIAL);
|
||||||
GL11.glColorMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT);
|
EaglerAdapter.glColorMaterial(EaglerAdapter.GL_FRONT, EaglerAdapter.GL_AMBIENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import org.lwjgl.opengl.GL11;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
public class Gui
|
public class Gui
|
||||||
{
|
{
|
||||||
|
@ -61,18 +61,18 @@ public class Gui
|
||||||
float var7 = (float)(par4 >> 8 & 255) / 255.0F;
|
float var7 = (float)(par4 >> 8 & 255) / 255.0F;
|
||||||
float var8 = (float)(par4 & 255) / 255.0F;
|
float var8 = (float)(par4 & 255) / 255.0F;
|
||||||
Tessellator var9 = Tessellator.instance;
|
Tessellator var9 = Tessellator.instance;
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GL11.glColor4f(var6, var7, var8, var10);
|
EaglerAdapter.glColor4f(var6, var7, var8, var10);
|
||||||
var9.startDrawingQuads();
|
var9.startDrawingQuads();
|
||||||
var9.addVertex((double)par0, (double)par3, 0.0D);
|
var9.addVertex((double)par0, (double)par3, 0.0D);
|
||||||
var9.addVertex((double)par2, (double)par3, 0.0D);
|
var9.addVertex((double)par2, (double)par3, 0.0D);
|
||||||
var9.addVertex((double)par2, (double)par1, 0.0D);
|
var9.addVertex((double)par2, (double)par1, 0.0D);
|
||||||
var9.addVertex((double)par0, (double)par1, 0.0D);
|
var9.addVertex((double)par0, (double)par1, 0.0D);
|
||||||
var9.draw();
|
var9.draw();
|
||||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_TEXTURE_2D);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,11 +88,11 @@ public class Gui
|
||||||
float var12 = (float)(par6 >> 16 & 255) / 255.0F;
|
float var12 = (float)(par6 >> 16 & 255) / 255.0F;
|
||||||
float var13 = (float)(par6 >> 8 & 255) / 255.0F;
|
float var13 = (float)(par6 >> 8 & 255) / 255.0F;
|
||||||
float var14 = (float)(par6 & 255) / 255.0F;
|
float var14 = (float)(par6 & 255) / 255.0F;
|
||||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_SMOOTH);
|
||||||
Tessellator var15 = Tessellator.instance;
|
Tessellator var15 = Tessellator.instance;
|
||||||
var15.startDrawingQuads();
|
var15.startDrawingQuads();
|
||||||
var15.setColorRGBA_F(var8, var9, var10, var7);
|
var15.setColorRGBA_F(var8, var9, var10, var7);
|
||||||
|
@ -102,10 +102,10 @@ public class Gui
|
||||||
var15.addVertex((double)par1, (double)par4, (double)this.zLevel);
|
var15.addVertex((double)par1, (double)par4, (double)this.zLevel);
|
||||||
var15.addVertex((double)par3, (double)par4, (double)this.zLevel);
|
var15.addVertex((double)par3, (double)par4, (double)this.zLevel);
|
||||||
var15.draw();
|
var15.draw();
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_FLAT);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST);
|
||||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_TEXTURE_2D);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import org.lwjgl.opengl.GL11;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
public class GuiButton extends Gui
|
public class GuiButton extends Gui
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ public class GuiButton extends Gui
|
||||||
{
|
{
|
||||||
FontRenderer var4 = par1Minecraft.fontRenderer;
|
FontRenderer var4 = par1Minecraft.fontRenderer;
|
||||||
buttonTextures.bindTexture();
|
buttonTextures.bindTexture();
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||||
int var5 = this.getHoverState(this.field_82253_i);
|
int var5 = this.getHoverState(this.field_82253_i);
|
||||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + var5 * 20, this.width / 2, this.height);
|
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + var5 * 20, this.width / 2, this.height);
|
||||||
|
|
|
@ -9,9 +9,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import org.lwjgl.input.Keyboard;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import org.lwjgl.input.Mouse;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
public class GuiScreen extends Gui
|
public class GuiScreen extends Gui
|
||||||
{
|
{
|
||||||
|
@ -168,12 +166,12 @@ public class GuiScreen extends Gui
|
||||||
*/
|
*/
|
||||||
public void handleInput()
|
public void handleInput()
|
||||||
{
|
{
|
||||||
while (Mouse.next())
|
while (EaglerAdapter.mouseNext())
|
||||||
{
|
{
|
||||||
this.handleMouseInput();
|
this.handleMouseInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (Keyboard.next())
|
while (EaglerAdapter.keysNext())
|
||||||
{
|
{
|
||||||
this.handleKeyboardInput();
|
this.handleKeyboardInput();
|
||||||
}
|
}
|
||||||
|
@ -184,11 +182,11 @@ public class GuiScreen extends Gui
|
||||||
*/
|
*/
|
||||||
public void handleMouseInput()
|
public void handleMouseInput()
|
||||||
{
|
{
|
||||||
int var1 = Mouse.getEventX() * this.width / this.mc.displayWidth;
|
int var1 = EaglerAdapter.mouseGetEventX() * this.width / this.mc.displayWidth;
|
||||||
int var2 = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
|
int var2 = this.height - EaglerAdapter.mouseGetEventY() * this.height / this.mc.displayHeight - 1;
|
||||||
int var3 = Mouse.getEventButton();
|
int var3 = EaglerAdapter.mouseGetEventButton();
|
||||||
|
|
||||||
if (Mouse.getEventButtonState())
|
if (EaglerAdapter.mouseGetEventButtonState())
|
||||||
{
|
{
|
||||||
if (this.mc.gameSettings.touchscreen && this.field_92018_d++ > 0)
|
if (this.mc.gameSettings.touchscreen && this.field_92018_d++ > 0)
|
||||||
{
|
{
|
||||||
|
@ -221,10 +219,10 @@ public class GuiScreen extends Gui
|
||||||
*/
|
*/
|
||||||
public void handleKeyboardInput()
|
public void handleKeyboardInput()
|
||||||
{
|
{
|
||||||
if (Keyboard.getEventKeyState())
|
if (EaglerAdapter.getEventKeyState())
|
||||||
{
|
{
|
||||||
int var1 = Keyboard.getEventKey();
|
int var1 = EaglerAdapter.getEventKey();
|
||||||
char var2 = Keyboard.getEventCharacter();
|
char var2 = EaglerAdapter.getEventChar();
|
||||||
|
|
||||||
if (var1 == 87)
|
if (var1 == 87)
|
||||||
{
|
{
|
||||||
|
@ -271,11 +269,11 @@ public class GuiScreen extends Gui
|
||||||
*/
|
*/
|
||||||
public void drawBackground(int par1)
|
public void drawBackground(int par1)
|
||||||
{
|
{
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_FOG);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_FOG);
|
||||||
Tessellator var2 = Tessellator.instance;
|
Tessellator var2 = Tessellator.instance;
|
||||||
optionsBackground.bindTexture();
|
optionsBackground.bindTexture();
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
EaglerAdapter.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
float var3 = 32.0F;
|
float var3 = 32.0F;
|
||||||
var2.startDrawingQuads();
|
var2.startDrawingQuads();
|
||||||
var2.setColorOpaque_I(4210752);
|
var2.setColorOpaque_I(4210752);
|
||||||
|
@ -296,13 +294,11 @@ public class GuiScreen extends Gui
|
||||||
|
|
||||||
public void confirmClicked(boolean par1, int par2) {}
|
public void confirmClicked(boolean par1, int par2) {}
|
||||||
|
|
||||||
public static boolean isCtrlKeyDown()
|
public static boolean isCtrlKeyDown() {
|
||||||
{
|
return EaglerAdapter.isKeyDown(29) || EaglerAdapter.isKeyDown(157) || EaglerAdapter.isKeyDown(219) || EaglerAdapter.isKeyDown(220);
|
||||||
return Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isShiftKeyDown()
|
public static boolean isShiftKeyDown() {
|
||||||
{
|
return EaglerAdapter.isKeyDown(42) || EaglerAdapter.isKeyDown(54);
|
||||||
return Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -596,7 +596,7 @@ public class Minecraft
|
||||||
this.currentScreen.onGuiClosed();
|
this.currentScreen.onGuiClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.statFileWriter.syncStats();
|
//this.statFileWriter.syncStats();
|
||||||
|
|
||||||
if (par1GuiScreen == null && this.theWorld == null)
|
if (par1GuiScreen == null && this.theWorld == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import org.lwjgl.opengl.GL11;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
public class ModelRenderer
|
public class ModelRenderer
|
||||||
{
|
{
|
||||||
|
@ -126,14 +126,14 @@ public class ModelRenderer
|
||||||
this.compileDisplayList(par1);
|
this.compileDisplayList(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
|
EaglerAdapter.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
|
||||||
int var2;
|
int var2;
|
||||||
|
|
||||||
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F)
|
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F)
|
||||||
{
|
{
|
||||||
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F)
|
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glCallList(this.displayList);
|
EaglerAdapter.glCallList(this.displayList);
|
||||||
|
|
||||||
if (this.childModels != null)
|
if (this.childModels != null)
|
||||||
{
|
{
|
||||||
|
@ -145,8 +145,8 @@ public class ModelRenderer
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
EaglerAdapter.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
||||||
GL11.glCallList(this.displayList);
|
EaglerAdapter.glCallList(this.displayList);
|
||||||
|
|
||||||
if (this.childModels != null)
|
if (this.childModels != null)
|
||||||
{
|
{
|
||||||
|
@ -156,30 +156,30 @@ public class ModelRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glTranslatef(-this.rotationPointX * par1, -this.rotationPointY * par1, -this.rotationPointZ * par1);
|
EaglerAdapter.glTranslatef(-this.rotationPointX * par1, -this.rotationPointY * par1, -this.rotationPointZ * par1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
EaglerAdapter.glPushMatrix();
|
||||||
GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
EaglerAdapter.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
||||||
|
|
||||||
if (this.rotateAngleZ != 0.0F)
|
if (this.rotateAngleZ != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rotateAngleY != 0.0F)
|
if (this.rotateAngleY != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rotateAngleX != 0.0F)
|
if (this.rotateAngleX != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glCallList(this.displayList);
|
EaglerAdapter.glCallList(this.displayList);
|
||||||
|
|
||||||
if (this.childModels != null)
|
if (this.childModels != null)
|
||||||
{
|
{
|
||||||
|
@ -189,10 +189,10 @@ public class ModelRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
EaglerAdapter.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ);
|
EaglerAdapter.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -208,26 +208,26 @@ public class ModelRenderer
|
||||||
this.compileDisplayList(par1);
|
this.compileDisplayList(par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
EaglerAdapter.glPushMatrix();
|
||||||
GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
EaglerAdapter.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
||||||
|
|
||||||
if (this.rotateAngleY != 0.0F)
|
if (this.rotateAngleY != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rotateAngleX != 0.0F)
|
if (this.rotateAngleX != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rotateAngleZ != 0.0F)
|
if (this.rotateAngleZ != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glCallList(this.displayList);
|
EaglerAdapter.glCallList(this.displayList);
|
||||||
GL11.glPopMatrix();
|
EaglerAdapter.glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -250,26 +250,26 @@ public class ModelRenderer
|
||||||
{
|
{
|
||||||
if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F)
|
if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
EaglerAdapter.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
EaglerAdapter.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1);
|
||||||
|
|
||||||
if (this.rotateAngleZ != 0.0F)
|
if (this.rotateAngleZ != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rotateAngleY != 0.0F)
|
if (this.rotateAngleY != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rotateAngleX != 0.0F)
|
if (this.rotateAngleX != 0.0F)
|
||||||
{
|
{
|
||||||
GL11.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(this.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ public class ModelRenderer
|
||||||
private void compileDisplayList(float par1)
|
private void compileDisplayList(float par1)
|
||||||
{
|
{
|
||||||
this.displayList = GLAllocation.generateDisplayLists(1);
|
this.displayList = GLAllocation.generateDisplayLists(1);
|
||||||
GL11.glNewList(this.displayList, GL11.GL_COMPILE);
|
EaglerAdapter.glNewList(this.displayList, EaglerAdapter.GL_COMPILE);
|
||||||
Tessellator var2 = Tessellator.instance;
|
Tessellator var2 = Tessellator.instance;
|
||||||
|
|
||||||
for (int var3 = 0; var3 < this.cubeList.size(); ++var3)
|
for (int var3 = 0; var3 < this.cubeList.size(); ++var3)
|
||||||
|
@ -290,7 +290,7 @@ public class ModelRenderer
|
||||||
((ModelBox)this.cubeList.get(var3)).render(var2, par1);
|
((ModelBox)this.cubeList.get(var3)).render(var2, par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEndList();
|
EaglerAdapter.glEndList();
|
||||||
this.compiled = true;
|
this.compiled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import org.lwjgl.opengl.GL11;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
public class RenderHelper
|
public class RenderHelper
|
||||||
{
|
{
|
||||||
|
@ -15,10 +15,10 @@ public class RenderHelper
|
||||||
*/
|
*/
|
||||||
public static void disableStandardItemLighting()
|
public static void disableStandardItemLighting()
|
||||||
{
|
{
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_LIGHT0);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHT0);
|
||||||
GL11.glDisable(GL11.GL_LIGHT1);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHT1);
|
||||||
GL11.glDisable(GL11.GL_COLOR_MATERIAL);
|
EaglerAdapter.glDisable(EaglerAdapter.GL_COLOR_MATERIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,24 +26,24 @@ public class RenderHelper
|
||||||
*/
|
*/
|
||||||
public static void enableStandardItemLighting()
|
public static void enableStandardItemLighting()
|
||||||
{
|
{
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_LIGHTING);
|
||||||
GL11.glEnable(GL11.GL_LIGHT0);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_LIGHT0);
|
||||||
GL11.glEnable(GL11.GL_LIGHT1);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_LIGHT1);
|
||||||
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
EaglerAdapter.glEnable(EaglerAdapter.GL_COLOR_MATERIAL);
|
||||||
GL11.glColorMaterial(GL11.GL_FRONT_AND_BACK, GL11.GL_AMBIENT_AND_DIFFUSE);
|
EaglerAdapter.glColorMaterial(EaglerAdapter.GL_FRONT_AND_BACK, EaglerAdapter.GL_AMBIENT_AND_DIFFUSE);
|
||||||
float var0 = 0.4F;
|
float var0 = 0.4F;
|
||||||
float var1 = 0.6F;
|
float var1 = 0.6F;
|
||||||
float var2 = 0.0F;
|
float var2 = 0.0F;
|
||||||
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, setColorBuffer(field_82884_b.xCoord, field_82884_b.yCoord, field_82884_b.zCoord, 0.0D));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT0, EaglerAdapter.GL_POSITION, setColorBuffer(field_82884_b.xCoord, field_82884_b.yCoord, field_82884_b.zCoord, 0.0D));
|
||||||
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, setColorBuffer(var1, var1, var1, 1.0F));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT0, EaglerAdapter.GL_DIFFUSE, setColorBuffer(var1, var1, var1, 1.0F));
|
||||||
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT0, EaglerAdapter.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||||
GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(var2, var2, var2, 1.0F));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT0, EaglerAdapter.GL_SPECULAR, setColorBuffer(var2, var2, var2, 1.0F));
|
||||||
GL11.glLight(GL11.GL_LIGHT1, GL11.GL_POSITION, setColorBuffer(field_82885_c.xCoord, field_82885_c.yCoord, field_82885_c.zCoord, 0.0D));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT1, EaglerAdapter.GL_POSITION, setColorBuffer(field_82885_c.xCoord, field_82885_c.yCoord, field_82885_c.zCoord, 0.0D));
|
||||||
GL11.glLight(GL11.GL_LIGHT1, GL11.GL_DIFFUSE, setColorBuffer(var1, var1, var1, 1.0F));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT1, EaglerAdapter.GL_DIFFUSE, setColorBuffer(var1, var1, var1, 1.0F));
|
||||||
GL11.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT1, EaglerAdapter.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
|
||||||
GL11.glLight(GL11.GL_LIGHT1, GL11.GL_SPECULAR, setColorBuffer(var2, var2, var2, 1.0F));
|
EaglerAdapter.glLight(EaglerAdapter.GL_LIGHT1, EaglerAdapter.GL_SPECULAR, setColorBuffer(var2, var2, var2, 1.0F));
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
EaglerAdapter.glShadeModel(EaglerAdapter.GL_FLAT);
|
||||||
GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(var0, var0, var0, 1.0F));
|
EaglerAdapter.glLightModel(EaglerAdapter.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(var0, var0, var0, 1.0F));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,10 +70,10 @@ public class RenderHelper
|
||||||
*/
|
*/
|
||||||
public static void enableGUIStandardItemLighting()
|
public static void enableGUIStandardItemLighting()
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
EaglerAdapter.glPushMatrix();
|
||||||
GL11.glRotatef(-30.0F, 0.0F, 1.0F, 0.0F);
|
EaglerAdapter.glRotatef(-30.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glRotatef(165.0F, 1.0F, 0.0F, 0.0F);
|
EaglerAdapter.glRotatef(165.0F, 1.0F, 0.0F, 0.0F);
|
||||||
enableStandardItemLighting();
|
enableStandardItemLighting();
|
||||||
GL11.glPopMatrix();
|
EaglerAdapter.glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
public class TextureClock extends TextureAtlasSprite
|
public class TextureClock extends TextureStitched
|
||||||
{
|
{
|
||||||
private double field_94239_h;
|
private double field_94239_h;
|
||||||
private double field_94240_i;
|
private double field_94240_i;
|
||||||
|
@ -11,8 +11,6 @@ public class TextureClock extends TextureAtlasSprite
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateAnimation()
|
public void updateAnimation()
|
||||||
{
|
|
||||||
if (!this.framesTextureData.isEmpty())
|
|
||||||
{
|
{
|
||||||
Minecraft var1 = Minecraft.getMinecraft();
|
Minecraft var1 = Minecraft.getMinecraft();
|
||||||
double var2 = 0.0D;
|
double var2 = 0.0D;
|
||||||
|
@ -55,16 +53,13 @@ public class TextureClock extends TextureAtlasSprite
|
||||||
this.field_94239_h += this.field_94240_i;
|
this.field_94239_h += this.field_94240_i;
|
||||||
int var6;
|
int var6;
|
||||||
|
|
||||||
for (var6 = (int)((this.field_94239_h + 1.0D) * (double)this.framesTextureData.size()) % this.framesTextureData.size(); var6 < 0; var6 = (var6 + this.framesTextureData.size()) % this.framesTextureData.size())
|
for (var6 = (int) ((this.field_94239_h + 1.0D) * (double) this.textureList.size()) % this.textureList.size(); var6 < 0; var6 = (var6 + this.textureList.size()) % this.textureList.size()) {
|
||||||
{
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var6 != this.frameCounter)
|
if (var6 != this.frameCounter) {
|
||||||
{
|
|
||||||
this.frameCounter = var6;
|
this.frameCounter = var6;
|
||||||
TextureUtil.uploadTextureSub((int[])this.framesTextureData.get(this.frameCounter), this.width, this.height, this.originX, this.originY, false, false);
|
this.textureSheet.func_104062_b(this.originX, this.originY, (Texture) this.textureList.get(this.frameCounter));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
public class TextureCompass extends TextureAtlasSprite
|
public class TextureCompass extends TextureStitched
|
||||||
{
|
{
|
||||||
public static TextureCompass compassTexture;
|
public static TextureCompass compassTexture;
|
||||||
/** Current compass heading in radians */
|
/** Current compass heading in radians */
|
||||||
|
@ -33,8 +33,6 @@ public class TextureCompass extends TextureAtlasSprite
|
||||||
* Updates the compass based on the given x,z coords and camera direction
|
* Updates the compass based on the given x,z coords and camera direction
|
||||||
*/
|
*/
|
||||||
public void updateCompass(World par1World, double par2, double par4, double par6, boolean par8, boolean par9)
|
public void updateCompass(World par1World, double par2, double par4, double par6, boolean par8, boolean par9)
|
||||||
{
|
|
||||||
if (!this.framesTextureData.isEmpty())
|
|
||||||
{
|
{
|
||||||
double var10 = 0.0D;
|
double var10 = 0.0D;
|
||||||
|
|
||||||
|
@ -87,16 +85,13 @@ public class TextureCompass extends TextureAtlasSprite
|
||||||
|
|
||||||
int var18;
|
int var18;
|
||||||
|
|
||||||
for (var18 = (int)((this.currentAngle / (Math.PI * 2D) + 1.0D) * (double)this.framesTextureData.size()) % this.framesTextureData.size(); var18 < 0; var18 = (var18 + this.framesTextureData.size()) % this.framesTextureData.size())
|
for (var18 = (int) ((this.currentAngle / (Math.PI * 2D) + 1.0D) * (double) this.textureList.size()) % this.textureList.size(); var18 < 0; var18 = (var18 + this.textureList.size()) % this.textureList.size()) {
|
||||||
{
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var18 != this.frameCounter)
|
if (var18 != this.frameCounter) {
|
||||||
{
|
|
||||||
this.frameCounter = var18;
|
this.frameCounter = var18;
|
||||||
TextureUtil.uploadTextureSub((int[])this.framesTextureData.get(this.frameCounter), this.width, this.height, this.originX, this.originY, false, false);
|
this.textureSheet.func_104062_b(this.originX, this.originY, (Texture) this.textureList.get(this.frameCounter));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue