www.pudn.com > BlackCross.rar > gameObjectInits.java
import java.io.InputStream;
class gameObjectInits
{
gameObjectInit inits[];
public gameObjectInits()
{
inits = new gameObjectInit[40];
for(int i = 0; i < 40; i++)
inits[i] = new gameObjectInit();
}
public void load(int i, int j)
{
byte abyte0[] = new byte[45];
try
{
InputStream inputstream = getClass().getResourceAsStream("/sets/obj" + i + ".set");
inputstream.read(abyte0, 0, 2);
int k = (abyte0[0] * abyte0[1]) / 45;
for(int l = 0; l < 40; l++)
inits[l].imageNumber = -1;
for(int j1 = 0; j1 < k; j1++)
{
inputstream.read(abyte0, 0, 1);
byte byte0 = abyte0[0];
inputstream.read(abyte0, 0, 44);
inits[byte0].type = abyte0[0];
inits[byte0].imageNumber = abyte0[1];
inits[byte0].imageFileNumber = abyte0[2];
inits[byte0].numberOfAnimations = abyte0[3];
for(int i1 = 0; i1 < 5; i1++)
{
inits[byte0].creations[i1].type = abyte0[4 + i1 * 6];
inits[byte0].creations[i1].offset[0] = abyte0[5 + i1 * 6];
inits[byte0].creations[i1].offset[1] = abyte0[6 + i1 * 6];
inits[byte0].creations[i1].timer = abyte0[7 + i1 * 6];
if(inits[byte0].creations[i1].timer < 0)
{
inits[byte0].creations[i1].timer *= -1;
if(j == 0)
inits[byte0].creations[i1].timer *= 2;
if(j == 2)
inits[byte0].creations[i1].timer /= 2;
}
inits[byte0].creations[i1].init = abyte0[8 + i1 * 6];
inits[byte0].creations[i1].offsetRotation = abyte0[9 + i1 * 6];
}
inits[byte0].script = abyte0[34];
inits[byte0].hierarchy = abyte0[35];
inits[byte0].clip = abyte0[36];
inits[byte0].colSize[0] = abyte0[37];
inits[byte0].colSize[1] = abyte0[38];
inits[byte0].animType = abyte0[39];
inits[byte0].animSpeed = abyte0[40];
inits[byte0].hits = abyte0[41];
inits[byte0].speed = abyte0[42];
inits[byte0].score = abyte0[43];
}
inputstream.close();
}
catch(Exception exception) { }
}
}