Fix tileSize -> iconTileSize. Stupid MCP

This commit is contained in:
Christian Weeks 2012-05-15 22:34:17 -04:00
parent 319758bd33
commit ddb1085064
10 changed files with 83 additions and 83 deletions

View file

@ -73,7 +73,7 @@
for (int var5 = 0; var5 < var3.field_1129_e; ++var5)
{
- GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, var3.field_1126_b % 16 * 16 + var4 * 16, var3.field_1126_b / 16 * 16 + var5 * 16, 16, 16, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_1605_e);
+ GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, var3.field_1126_b % 16 * TextureFX.tileSize + var4 * TextureFX.tileSize, var3.field_1126_b / 16 * TextureFX.tileSize + var5 * TextureFX.tileSize, TextureFX.tileSize, TextureFX.tileSize, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_1605_e);
+ GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, var3.field_1126_b % 16 * TextureFX.iconTileSize + var4 * TextureFX.iconTileSize, var3.field_1126_b / 16 * TextureFX.iconTileSize + var5 * TextureFX.iconTileSize, TextureFX.iconTileSize, TextureFX.iconTileSize, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, this.field_1605_e);
}
}
}
@ -104,7 +104,7 @@
+ for (Object tex : field_1604_f) {
+ ((TextureFX)tex).onTexturePackChange(tileSize, tileSizeSquare, tileSizeMask, tileSizeSquareMask);
+ }
+ TextureFX.tileSize = tileSize;
+ TextureFX.iconTileSize = tileSize;
+ TextureFX.tileSizeSquare = tileSizeSquare;
+ TextureFX.tileSizeMask = tileSizeMask;
+ TextureFX.tileSizeSquareMask = tileSizeSquareMask;

View file

@ -33,9 +33,9 @@
- int var4 = this.field_1126_b / 16 * 16;
- var2.getRGB(var3, var4, 16, 16, this.field_4230_h, 0, 16);
+ BufferedImage var2 = ImageIO.read(field_4231_g.field_6298_C.field_6534_a.func_6481_a("/gui/items.png"));
+ int var3 = this.field_1126_b % 16 * tileSize;
+ int var4 = this.field_1126_b / 16 * tileSize;
+ var2.getRGB(var3, var4, tileSize, tileSize, this.field_4230_h, 0, tileSize);
+ int var3 = this.field_1126_b % 16 * iconTileSize;
+ int var4 = this.field_1126_b / 16 * iconTileSize;
+ var2.getRGB(var3, var4, iconTileSize, iconTileSize, this.field_4230_h, 0, iconTileSize);
}
catch (IOException var5)
{
@ -53,14 +53,14 @@
int var18;
- for (var9 = -4; var9 <= 4; ++var9)
+ for (var9 = -(tileSize >> 2); var9 <= (tileSize >> 2); ++var9)
+ for (var9 = -(iconTileSize >> 2); var9 <= (iconTileSize >> 2); ++var9)
{
- var10 = (int)(8.5D + var26 * (double)var9 * 0.3D);
- var11 = (int)(7.5D - var24 * (double)var9 * 0.3D * 0.5D);
- var12 = var11 * 16 + var10;
+ var10 = (int)((tileSize >> 1) + 0.5D + var26 * (double)var9 * 0.3D);
+ var11 = (int)((tileSize >> 1) - 0.5D - var24 * (double)var9 * 0.3D * 0.5D);
+ var12 = var11 * tileSize + var10;
+ var10 = (int)((iconTileSize >> 1) + 0.5D + var26 * (double)var9 * 0.3D);
+ var11 = (int)((iconTileSize >> 1) - 0.5D - var24 * (double)var9 * 0.3D * 0.5D);
+ var12 = var11 * iconTileSize + var10;
var13 = 100;
var14 = 100;
var15 = 100;
@ -69,14 +69,14 @@
}
- for (var9 = -8; var9 <= 16; ++var9)
+ for (var9 = -(tileSize>>2); var9 <= tileSize; ++var9)
+ for (var9 = -(iconTileSize>>2); var9 <= iconTileSize; ++var9)
{
- var10 = (int)(8.5D + var24 * (double)var9 * 0.3D);
- var11 = (int)(7.5D + var26 * (double)var9 * 0.3D * 0.5D);
- var12 = var11 * 16 + var10;
+ var10 = (int)((tileSize >> 1) + 0.5D + var24 * (double)var9 * 0.3D);
+ var11 = (int)((tileSize >> 1) - 0.5D + var26 * (double)var9 * 0.3D * 0.5D);
+ var12 = var11 * tileSize + var10;
+ var10 = (int)((iconTileSize >> 1) + 0.5D + var24 * (double)var9 * 0.3D);
+ var11 = (int)((iconTileSize >> 1) - 0.5D + var26 * (double)var9 * 0.3D * 0.5D);
+ var12 = var11 * iconTileSize + var10;
var13 = var9 >= 0 ? 255 : 100;
var14 = var9 >= 0 ? 20 : 100;
var15 = var9 >= 0 ? 20 : 100;

View file

@ -4,7 +4,7 @@
public int field_1130_d = 0;
public int field_1129_e = 1;
public int field_1128_f = 0;
+ public static int tileSize = 16;
+ public static int iconTileSize = 16;
+ public static int tileSizeSquare = 256;
+ public static int tileSizeMask = 15;
+ public static int tileSizeSquareMask = 255;

View file

@ -16,8 +16,8 @@
+ public void onTexturePackChange(int newTileSize, int newTileSizeSquare, int newTileSizeMask, int newTileSizeSquareMask)
+ {
+ super.onTexturePackChange(newTileSize, newTileSizeSquare, newTileSizeMask, newTileSizeSquareMask);
+ fireTileSize = tileSize + (tileSize >> 2);
+ fireGridSize = fireTileSize * tileSize;
+ fireTileSize = iconTileSize + (iconTileSize >> 2);
+ fireGridSize = fireTileSize * iconTileSize;
+ if (field_1132_h.length != fireGridSize) {
+ field_1133_g = new float[fireGridSize];
+ field_1132_h = new float[fireGridSize];
@ -31,11 +31,11 @@
int var6;
- for (int var1 = 0; var1 < 16; ++var1)
+ float fireFactor1 = 3.0F + (float)(tileSize >> 4);
+ float fireFactor1 = 3.0F + (float)(iconTileSize >> 4);
+
+ float fireFactor2 = 1.07F - (tileSize >> 4) *0.01F;
+ float fireFactor2 = 1.07F - (iconTileSize >> 4) *0.01F;
+
+ for (int var1 = 0; var1 < tileSize; ++var1)
+ for (int var1 = 0; var1 < iconTileSize; ++var1)
{
- for (int var2 = 0; var2 < 20; ++var2)
+ for (int var2 = 0; var2 < fireTileSize; ++var2)
@ -44,17 +44,17 @@
- var4 = this.field_1133_g[var1 + (var2 + 1) % 20 * 16] * (float)var3;
+ var3 = fireTileSize - 2;//(tileSize >> 3);
+
+ var4 = this.field_1133_g[var1 + (var2 + 1) % fireTileSize * tileSize] * (float)var3;
+ var4 = this.field_1133_g[var1 + (var2 + 1) % fireTileSize * iconTileSize] * (float)var3;
for (int var5 = var1 - 1; var5 <= var1 + 1; ++var5)
{
for (var6 = var2; var6 <= var2 + 1; ++var6)
{
- if (var5 >= 0 && var6 >= 0 && var5 < 16 && var6 < 20)
+ if (var5 >= 0 && var6 >= 0 && var5 < tileSize && var6 < fireTileSize)
+ if (var5 >= 0 && var6 >= 0 && var5 < iconTileSize && var6 < fireTileSize)
{
- var4 += this.field_1133_g[var5 + var6 * 16];
+ var4 += this.field_1133_g[var5 + var6 * tileSize];
+ var4 += this.field_1133_g[var5 + var6 * iconTileSize];
}
++var3;
@ -62,13 +62,13 @@
}
- this.field_1132_h[var1 + var2 * 16] = var4 / ((float)var3 * 1.0600001F);
+ this.field_1132_h[var1 + var2 * tileSize] = var4 / ((float)var3 * fireFactor2);
+ this.field_1132_h[var1 + var2 * iconTileSize] = var4 / ((float)var3 * fireFactor2);
- if (var2 >= 19)
+ if (var2 >= fireTileSize - (tileSize >> 4))
+ if (var2 >= fireTileSize - (iconTileSize >> 4))
{
- this.field_1132_h[var1 + var2 * 16] = (float)(Math.random() * Math.random() * Math.random() * 4.0D + Math.random() * 0.10000000149011612D + 0.20000000298023224D);
+ this.field_1132_h[var1 + var2 * tileSize] = (float)(Math.random() * Math.random() * Math.random() * fireFactor1 + Math.random() * 0.1F + 0.2F);
+ this.field_1132_h[var1 + var2 * iconTileSize] = (float)(Math.random() * Math.random() * Math.random() * fireFactor1 + Math.random() * 0.1F + 0.2F);
}
}
}

View file

@ -24,10 +24,10 @@
int var9;
- for (int var1 = 0; var1 < 16; ++var1)
+ for (int var1 = 0; var1 < tileSize; ++var1)
+ for (int var1 = 0; var1 < iconTileSize; ++var1)
{
- for (var2 = 0; var2 < 16; ++var2)
+ for (var2 = 0; var2 < tileSize; ++var2)
+ for (var2 = 0; var2 < iconTileSize; ++var2)
{
var3 = 0.0F;
int var4 = (int)(MathHelper.func_1106_a((float)var2 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
@ -36,29 +36,29 @@
var8 = var6 + var4 & 15;
var9 = var7 + var5 & 15;
- var3 += this.field_1147_g[var8 + var9 * 16];
+ var3 += this.field_1147_g[var8 + var9 * tileSize];
+ var3 += this.field_1147_g[var8 + var9 * iconTileSize];
}
}
- this.field_1146_h[var1 + var2 * 16] = var3 / 10.0F + (this.field_1145_i[(var1 + 0 & 15) + (var2 + 0 & 15) * 16] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 0 & 15) * 16] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 1 & 15) * 16] + this.field_1145_i[(var1 + 0 & 15) + (var2 + 1 & 15) * 16]) / 4.0F * 0.8F;
- this.field_1145_i[var1 + var2 * 16] += this.field_1144_j[var1 + var2 * 16] * 0.01F;
+ this.field_1146_h[var1 + var2 * tileSize] = var3 / 10.0F + (this.field_1145_i[(var1 + 0 & 15) + (var2 + 0 & 15) * tileSize] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 0 & 15) * tileSize] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 1 & 15) * tileSize] + this.field_1145_i[(var1 + 0 & 15) + (var2 + 1 & 15) * tileSize]) / 4.0F * 0.8F;
+ this.field_1145_i[var1 + var2 * tileSize] += this.field_1144_j[var1 + var2 * tileSize] * 0.01F;
+ this.field_1146_h[var1 + var2 * iconTileSize] = var3 / 10.0F + (this.field_1145_i[(var1 + 0 & 15) + (var2 + 0 & 15) * iconTileSize] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 0 & 15) * iconTileSize] + this.field_1145_i[(var1 + 1 & 15) + (var2 + 1 & 15) * iconTileSize] + this.field_1145_i[(var1 + 0 & 15) + (var2 + 1 & 15) * iconTileSize]) / 4.0F * 0.8F;
+ this.field_1145_i[var1 + var2 * iconTileSize] += this.field_1144_j[var1 + var2 * iconTileSize] * 0.01F;
- if (this.field_1145_i[var1 + var2 * 16] < 0.0F)
+ if (this.field_1145_i[var1 + var2 * tileSize] < 0.0F)
+ if (this.field_1145_i[var1 + var2 * iconTileSize] < 0.0F)
{
- this.field_1145_i[var1 + var2 * 16] = 0.0F;
+ this.field_1145_i[var1 + var2 * tileSize] = 0.0F;
+ this.field_1145_i[var1 + var2 * iconTileSize] = 0.0F;
}
- this.field_1144_j[var1 + var2 * 16] -= 0.06F;
+ this.field_1144_j[var1 + var2 * tileSize] -= 0.06F;
+ this.field_1144_j[var1 + var2 * iconTileSize] -= 0.06F;
if (Math.random() < 0.005D)
{
- this.field_1144_j[var1 + var2 * 16] = 1.5F;
+ this.field_1144_j[var1 + var2 * tileSize] = 1.5F;
+ this.field_1144_j[var1 + var2 * iconTileSize] = 1.5F;
}
}
}

View file

@ -25,10 +25,10 @@
int var9;
- for (int var1 = 0; var1 < 16; ++var1)
+ for (int var1 = 0; var1 < tileSize; ++var1)
+ for (int var1 = 0; var1 < iconTileSize; ++var1)
{
- for (var2 = 0; var2 < 16; ++var2)
+ for (var2 = 0; var2 < tileSize; ++var2)
+ for (var2 = 0; var2 < iconTileSize; ++var2)
{
var3 = 0.0F;
int var4 = (int)(MathHelper.func_1106_a((float)var2 * (float)Math.PI * 2.0F / 16.0F) * 1.2F);
@ -41,29 +41,29 @@
- var3 += this.field_1143_g[var8 + var9 * 16];
+ var8 = var6 + var4 & tileSizeMask;
+ var9 = var7 + var5 & tileSizeMask;
+ var3 += this.field_1143_g[var8 + var9 * tileSize];
+ var3 += this.field_1143_g[var8 + var9 * iconTileSize];
}
}
- this.field_1142_h[var1 + var2 * 16] = var3 / 10.0F + (this.field_1141_i[(var1 + 0 & 15) + (var2 + 0 & 15) * 16] + this.field_1141_i[(var1 + 1 & 15) + (var2 + 0 & 15) * 16] + this.field_1141_i[(var1 + 1 & 15) + (var2 + 1 & 15) * 16] + this.field_1141_i[(var1 + 0 & 15) + (var2 + 1 & 15) * 16]) / 4.0F * 0.8F;
- this.field_1141_i[var1 + var2 * 16] += this.field_1140_j[var1 + var2 * 16] * 0.01F;
+ this.field_1142_h[var1 + var2 * tileSize] = var3 / 10.0F + (this.field_1141_i[(var1 + 0 & tileSizeMask) + (var2 + 0 & tileSizeMask) * tileSize] + this.field_1141_i[(var1 + 1 & tileSizeMask) + (var2 + 0 & tileSizeMask) * tileSize] + this.field_1141_i[(var1 + 1 & tileSizeMask) + (var2 + 1 & tileSizeMask) * tileSize] + this.field_1141_i[(var1 + 0 & tileSizeMask) + (var2 + 1 & tileSizeMask) * tileSize]) / 4.0F * 0.8F;
+ this.field_1141_i[var1 + var2 * tileSize] += this.field_1140_j[var1 + var2 * tileSize] * 0.01F;
+ this.field_1142_h[var1 + var2 * iconTileSize] = var3 / 10.0F + (this.field_1141_i[(var1 + 0 & tileSizeMask) + (var2 + 0 & tileSizeMask) * iconTileSize] + this.field_1141_i[(var1 + 1 & tileSizeMask) + (var2 + 0 & tileSizeMask) * iconTileSize] + this.field_1141_i[(var1 + 1 & tileSizeMask) + (var2 + 1 & tileSizeMask) * iconTileSize] + this.field_1141_i[(var1 + 0 & tileSizeMask) + (var2 + 1 & tileSizeMask) * iconTileSize]) / 4.0F * 0.8F;
+ this.field_1141_i[var1 + var2 * iconTileSize] += this.field_1140_j[var1 + var2 * iconTileSize] * 0.01F;
- if (this.field_1141_i[var1 + var2 * 16] < 0.0F)
+ if (this.field_1141_i[var1 + var2 * tileSize] < 0.0F)
+ if (this.field_1141_i[var1 + var2 * iconTileSize] < 0.0F)
{
- this.field_1141_i[var1 + var2 * 16] = 0.0F;
+ this.field_1141_i[var1 + var2 * tileSize] = 0.0F;
+ this.field_1141_i[var1 + var2 * iconTileSize] = 0.0F;
}
- this.field_1140_j[var1 + var2 * 16] -= 0.06F;
+ this.field_1140_j[var1 + var2 * tileSize] -= 0.06F;
+ this.field_1140_j[var1 + var2 * iconTileSize] -= 0.06F;
if (Math.random() < 0.005D)
{
- this.field_1140_j[var1 + var2 * 16] = 1.5F;
+ this.field_1140_j[var1 + var2 * tileSize] = 1.5F;
+ this.field_1140_j[var1 + var2 * iconTileSize] = 1.5F;
}
}
}
@ -75,7 +75,7 @@
+ for (var2 = 0; var2 < tileSizeSquare; ++var2)
{
- var3 = this.field_1143_g[var2 - this.field_1139_k / 3 * 16 & 255] * 2.0F;
+ var3 = this.field_1143_g[(var2 - this.field_1139_k / 3 * tileSize) & tileSizeSquareMask] * 2.0F;
+ var3 = this.field_1143_g[(var2 - this.field_1139_k / 3 * iconTileSize) & tileSizeSquareMask] * 2.0F;
if (var3 > 1.0F)
{

View file

@ -21,10 +21,10 @@
for (int var2 = 0; var2 < 32; ++var2)
{
- for (int var3 = 0; var3 < 16; ++var3)
+ for (int var3 = 0; var3 < tileSize; ++var3)
+ for (int var3 = 0; var3 < iconTileSize; ++var3)
{
- for (int var4 = 0; var4 < 16; ++var4)
+ for (int var4 = 0; var4 < tileSize; ++var4)
+ for (int var4 = 0; var4 < iconTileSize; ++var4)
{
float var5 = 0.0F;
int var6;
@ -35,10 +35,10 @@
- float var8 = (float)(var6 * 16) * 0.5F;
- float var9 = ((float)var3 - var7) / 16.0F * 2.0F;
- float var10 = ((float)var4 - var8) / 16.0F * 2.0F;
+ float var7 = (float)(var6 * tileSize) * 0.5F;
+ float var8 = (float)(var6 * tileSize) * 0.5F;
+ float var9 = ((float)var3 - var7) / (float)tileSize * 2.0F;
+ float var10 = ((float)var4 - var8) / (float)tileSize * 2.0F;
+ float var7 = (float)(var6 * iconTileSize) * 0.5F;
+ float var8 = (float)(var6 * iconTileSize) * 0.5F;
+ float var9 = ((float)var3 - var7) / (float)iconTileSize * 2.0F;
+ float var10 = ((float)var4 - var8) / (float)iconTileSize * 2.0F;
if (var9 < -1.0F)
{
@ -47,7 +47,7 @@
int var14 = (int)(var5 * var5 * var5 * var5 * 255.0F);
int var15 = (int)(var5 * 100.0F + 155.0F);
- int var16 = var4 * 16 + var3;
+ int var16 = var4 * tileSize + var3;
+ int var16 = var4 * iconTileSize + var3;
this.field_4226_h[var2][var16 * 4 + 0] = (byte)var13;
this.field_4226_h[var2][var16 * 4 + 1] = (byte)var14;
this.field_4226_h[var2][var16 * 4 + 2] = (byte)var6;

View file

@ -21,11 +21,11 @@
- var2 = ImageIO.read(Minecraft.class.getResource("/misc/dial.png"));
- var2.getRGB(0, 0, 16, 16, this.field_4223_i, 0, 16);
+ BufferedImage var2 = ImageIO.read(field_4225_g.field_6298_C.field_6534_a.func_6481_a("/gui/items.png"));
+ int var3 = this.field_1126_b % 16 * tileSize;
+ int var4 = this.field_1126_b / 16 * tileSize;
+ var2.getRGB(var3, var4, tileSize, tileSize, this.field_4224_h, 0, tileSize);
+ int var3 = this.field_1126_b % 16 * iconTileSize;
+ int var4 = this.field_1126_b / 16 * iconTileSize;
+ var2.getRGB(var3, var4, iconTileSize, iconTileSize, this.field_4224_h, 0, iconTileSize);
+ var2 = ImageIO.read(field_4225_g.field_6298_C.field_6534_a.func_6481_a("/misc/dial.png"));
+ var2.getRGB(0, 0, tileSize, tileSize, this.field_4223_i, 0, tileSize);
+ var2.getRGB(0, 0, iconTileSize, iconTileSize, this.field_4223_i, 0, iconTileSize);
}
catch (IOException var5)
{
@ -60,15 +60,15 @@
{
- double var14 = -((double)(var9 % 16) / 15.0D - 0.5D);
- double var16 = (double)(var9 / 16) / 15.0D - 0.5D;
+ double var14 = -((double)(var9 % tileSize) / tileSizeMask - 0.5D);
+ double var16 = (double)(var9 / tileSize) / tileSizeMask - 0.5D;
+ double var14 = -((double)(var9 % iconTileSize) / tileSizeMask - 0.5D);
+ double var16 = (double)(var9 / iconTileSize) / tileSizeMask - 0.5D;
int var18 = var11;
- int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * 16.0D);
- int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * 16.0D);
- int var21 = (var19 & 15) + (var20 & 15) * 16;
+ int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * tileSize);
+ int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * tileSize);
+ int var21 = (var19 & tileSizeMask) + (var20 & tileSizeMask) * tileSize;
+ int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * iconTileSize);
+ int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * iconTileSize);
+ int var21 = (var19 & tileSizeMask) + (var20 & tileSizeMask) * iconTileSize;
var10 = this.field_4223_i[var21] >> 24 & 255;
var11 = (this.field_4223_i[var21] >> 16 & 255) * var11 / 255;
var12 = (this.field_4223_i[var21] >> 8 & 255) * var18 / 255;

View file

@ -25,10 +25,10 @@
int var6;
- for (var1 = 0; var1 < 16; ++var1)
+ for (var1 = 0; var1 < tileSize; ++var1)
+ for (var1 = 0; var1 < iconTileSize; ++var1)
{
- for (var2 = 0; var2 < 16; ++var2)
+ for (var2 = 0; var2 < tileSize; ++var2)
+ for (var2 = 0; var2 < iconTileSize; ++var2)
{
var3 = 0.0F;
@ -37,37 +37,37 @@
var5 = var4 & 15;
var6 = var2 & 15;
- var3 += this.field_1158_g[var5 + var6 * 16];
+ var3 += this.field_1158_g[var5 + var6 * tileSize];
+ var3 += this.field_1158_g[var5 + var6 * iconTileSize];
}
- this.field_1157_h[var1 + var2 * 16] = var3 / 3.3F + this.field_1156_i[var1 + var2 * 16] * 0.8F;
+ this.field_1157_h[var1 + var2 * tileSize] = var3 / 3.3F + this.field_1156_i[var1 + var2 * tileSize] * 0.8F;
+ this.field_1157_h[var1 + var2 * iconTileSize] = var3 / 3.3F + this.field_1156_i[var1 + var2 * iconTileSize] * 0.8F;
}
}
- for (var1 = 0; var1 < 16; ++var1)
+ for (var1 = 0; var1 < tileSize; ++var1)
+ for (var1 = 0; var1 < iconTileSize; ++var1)
{
- for (var2 = 0; var2 < 16; ++var2)
+ for (var2 = 0; var2 < tileSize; ++var2)
+ for (var2 = 0; var2 < iconTileSize; ++var2)
{
- this.field_1156_i[var1 + var2 * 16] += this.field_1155_j[var1 + var2 * 16] * 0.05F;
+ this.field_1156_i[var1 + var2 * tileSize] += this.field_1155_j[var1 + var2 * tileSize] * 0.05F;
+ this.field_1156_i[var1 + var2 * iconTileSize] += this.field_1155_j[var1 + var2 * iconTileSize] * 0.05F;
- if (this.field_1156_i[var1 + var2 * 16] < 0.0F)
+ if (this.field_1156_i[var1 + var2 * tileSize] < 0.0F)
+ if (this.field_1156_i[var1 + var2 * iconTileSize] < 0.0F)
{
- this.field_1156_i[var1 + var2 * 16] = 0.0F;
+ this.field_1156_i[var1 + var2 * tileSize] = 0.0F;
+ this.field_1156_i[var1 + var2 * iconTileSize] = 0.0F;
}
- this.field_1155_j[var1 + var2 * 16] -= 0.1F;
+ this.field_1155_j[var1 + var2 * tileSize] -= 0.1F;
+ this.field_1155_j[var1 + var2 * iconTileSize] -= 0.1F;
if (Math.random() < 0.05D)
{
- this.field_1155_j[var1 + var2 * 16] = 0.5F;
+ this.field_1155_j[var1 + var2 * tileSize] = 0.5F;
+ this.field_1155_j[var1 + var2 * iconTileSize] = 0.5F;
}
}
}

View file

@ -27,10 +27,10 @@
-
- for (var1 = 0; var1 < 16; ++var1)
+
+ for (var1 = 0; var1 < tileSize; ++var1)
+ for (var1 = 0; var1 < iconTileSize; ++var1)
{
- for (var2 = 0; var2 < 16; ++var2)
+ for (var2 = 0; var2 < tileSize; ++var2)
+ for (var2 = 0; var2 < iconTileSize; ++var2)
{
var3 = 0.0F;
@ -41,37 +41,37 @@
- var3 += this.field_1138_g[var5 + var6 * 16];
+ var5 = var1 & tileSizeMask;
+ var6 = var4 & tileSizeMask;
+ var3 += this.field_1138_g[var5 + var6 * tileSize];
+ var3 += this.field_1138_g[var5 + var6 * iconTileSize];
}
- this.field_1137_h[var1 + var2 * 16] = var3 / 3.2F + this.field_1136_i[var1 + var2 * 16] * 0.8F;
+ this.field_1137_h[var1 + var2 * tileSize] = var3 / 3.2F + this.field_1136_i[var1 + var2 * tileSize] * 0.8F;
+ this.field_1137_h[var1 + var2 * iconTileSize] = var3 / 3.2F + this.field_1136_i[var1 + var2 * iconTileSize] * 0.8F;
}
}
- for (var1 = 0; var1 < 16; ++var1)
+ for (var1 = 0; var1 < tileSize; ++var1)
+ for (var1 = 0; var1 < iconTileSize; ++var1)
{
- for (var2 = 0; var2 < 16; ++var2)
+ for (var2 = 0; var2 < tileSize; ++var2)
+ for (var2 = 0; var2 < iconTileSize; ++var2)
{
- this.field_1136_i[var1 + var2 * 16] += this.field_1135_j[var1 + var2 * 16] * 0.05F;
+ this.field_1136_i[var1 + var2 * tileSize] += this.field_1135_j[var1 + var2 * tileSize] * 0.05F;
+ this.field_1136_i[var1 + var2 * iconTileSize] += this.field_1135_j[var1 + var2 * iconTileSize] * 0.05F;
- if (this.field_1136_i[var1 + var2 * 16] < 0.0F)
+ if (this.field_1136_i[var1 + var2 * tileSize] < 0.0F)
+ if (this.field_1136_i[var1 + var2 * iconTileSize] < 0.0F)
{
- this.field_1136_i[var1 + var2 * 16] = 0.0F;
+ this.field_1136_i[var1 + var2 * tileSize] = 0.0F;
+ this.field_1136_i[var1 + var2 * iconTileSize] = 0.0F;
}
- this.field_1135_j[var1 + var2 * 16] -= 0.3F;
+ this.field_1135_j[var1 + var2 * tileSize] -= 0.3F;
+ this.field_1135_j[var1 + var2 * iconTileSize] -= 0.3F;
if (Math.random() < 0.2D)
{
- this.field_1135_j[var1 + var2 * 16] = 0.5F;
+ this.field_1135_j[var1 + var2 * tileSize] = 0.5F;
+ this.field_1135_j[var1 + var2 * iconTileSize] = 0.5F;
}
}
}
@ -83,7 +83,7 @@
+ for (var2 = 0; var2 < tileSizeSquare; ++var2)
{
- var3 = this.field_1138_g[var2 - this.field_1134_k * 16 & 255];
+ var3 = this.field_1138_g[var2 - this.field_1134_k * tileSize & tileSizeSquareMask];
+ var3 = this.field_1138_g[var2 - this.field_1134_k * iconTileSize & tileSizeSquareMask];
if (var3 > 1.0F)
{