Skip to content

Commit

Permalink
revert this naming stratergy- formats are different in more than one …
Browse files Browse the repository at this point in the history
…place
  • Loading branch information
Shadowrs committed Jul 7, 2022
1 parent 61fdf67 commit ea9a7bc
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ public ModelDefinition load(int modelId, byte[] b)

if (b[b.length - 1] == -3 && b[b.length - 2] == -1)
{
decodeNew_v2(def, b);
decodeType3(def, b);
}
else if (b[b.length - 1] == -2 && b[b.length - 2] == -1)
{
decodeOld_v2(def, b);
decodeType2(def, b);
}
else if (b[b.length - 1] == -1 && b[b.length - 2] == -1)
{
decodeNew_v1(def, b);
decodeType1(def, b);
}
else
{
decodeOld_v1(def, b);
decodeOldFormat(def, b);
}

def.computeNormals();
Expand All @@ -34,7 +34,7 @@ else if (b[b.length - 1] == -1 && b[b.length - 2] == -1)
return def;
}

void decodeNew_v2(ModelDefinition def, byte[] var1)
void decodeType3(ModelDefinition def, byte[] var1)
{
InputStream stream1 = new InputStream(var1);
InputStream stream2 = new InputStream(var1);
Expand Down Expand Up @@ -395,7 +395,7 @@ void decodeNew_v2(ModelDefinition def, byte[] var1)

}

void decodeOld_v2(ModelDefinition def, byte[] var1)
void decodeType2(ModelDefinition def, byte[] var1)
{
boolean usesFaceRenderTypes = false;
boolean usesFaceTextures = false;
Expand Down Expand Up @@ -731,7 +731,7 @@ void decodeOld_v2(ModelDefinition def, byte[] var1)

}

void decodeNew_v1(ModelDefinition def, byte[] var1)
void decodeType1(ModelDefinition def, byte[] var1)
{
InputStream stream1 = new InputStream(var1);
InputStream stream2 = new InputStream(var1);
Expand Down Expand Up @@ -1071,7 +1071,7 @@ void decodeNew_v1(ModelDefinition def, byte[] var1)

}

void decodeOld_v1(ModelDefinition def, byte[] inputData)
void decodeOldFormat(ModelDefinition def, byte[] inputData)
{
boolean usesFaceRenderTypes = false;
boolean usesFaceTextures = false;
Expand Down

0 comments on commit ea9a7bc

Please sign in to comment.