And some tweaks to the texture handling

This commit is contained in:
Christian Weeks 2012-05-18 20:17:07 -04:00
parent a40ba43957
commit 2dcd1c4065
3 changed files with 32 additions and 12 deletions

View file

@ -47,11 +47,15 @@
{
var3 = 0.0F;
int var4 = (int)(MathHelper.func_1106_a((float)var2 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
@@ -36,23 +52,23 @@
@@ -34,25 +50,25 @@
{
for (var7 = var2 - 1; var7 <= var2 + 1; ++var7)
{
var8 = var6 + var4 & 15;
var9 = var7 + var5 & 15;
- var8 = var6 + var4 & 15;
- var9 = var7 + var5 & 15;
- var3 += this.field_1147_g[var8 + var9 * 16];
+ var8 = var6 + var4 & tileSizeMask;
+ var9 = var7 + var5 & tileSizeMask;
+ var3 += this.field_1147_g[var8 + var9 * iconTileSize];
}
}

View file

@ -1,6 +1,18 @@
--- ../src-base/minecraft/net/minecraft/src/TextureWatchFX.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src-work/minecraft/net/minecraft/src/TextureWatchFX.java 0000-00-00 00:00:00.000000000 -0000
@@ -18,15 +18,22 @@
@@ -2,7 +2,11 @@
import java.awt.image.BufferedImage;
import java.io.IOException;
+import java.util.logging.Level;
+
import javax.imageio.ImageIO;
+
+import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraft.client.Minecraft;
public class TextureWatchFX extends TextureFX
@@ -18,22 +22,39 @@
super(Item.field_4023_aQ.func_27009_a(0));
this.field_4225_g = p_i364_1_;
this.field_1128_f = 1;
@ -28,9 +40,11 @@
+ var2 = ImageIO.read(field_4225_g.field_6298_C.field_6534_a.func_6481_a("/misc/dial.png"));
+ var2.getRGB(0, 0, iconTileSize, iconTileSize, this.field_4223_i, 0, iconTileSize);
}
catch (IOException var5)
catch (Exception var5)
{
@@ -34,6 +41,15 @@
- var5.printStackTrace();
+ FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, String.format("A problem occurred with the watch texture: animation will be disabled"), var5);
+ errored = true;
}
}
@ -46,7 +60,7 @@
public void func_783_a()
{
double var1 = 0.0D;
@@ -77,7 +93,7 @@
@@ -77,7 +98,7 @@
double var5 = Math.sin(this.field_4222_j);
double var7 = Math.cos(this.field_4222_j);
@ -55,7 +69,7 @@
{
int var10 = this.field_4224_h[var9] >> 24 & 255;
int var11 = this.field_4224_h[var9] >> 16 & 255;
@@ -86,12 +102,12 @@
@@ -86,12 +107,12 @@
if (var11 == var13 && var12 == 0 && var13 > 0)
{

View file

@ -27,7 +27,7 @@
public void func_783_a()
{
++this.field_1154_k;
@@ -22,9 +40,9 @@
@@ -22,39 +40,39 @@
int var5;
int var6;
@ -39,11 +39,13 @@
{
var3 = 0.0F;
@@ -32,29 +50,29 @@
for (int var4 = var1 - 1; var4 <= var1 + 1; ++var4)
{
var5 = var4 & 15;
var6 = var2 & 15;
- var5 = var4 & 15;
- var6 = var2 & 15;
- var3 += this.field_1158_g[var5 + var6 * 16];
+ var5 = var4 & tileSizeMask;
+ var6 = var2 & tileSizeMask;
+ var3 += this.field_1158_g[var5 + var6 * iconTileSize];
}