Commit 0d3780f8 authored by Human Gamer's avatar Human Gamer

Fixed OBJ->DIF Collision Crash

parent a0682250
Pipeline #1879270 skipped
...@@ -176,8 +176,8 @@ public class InteriorBuilder ...@@ -176,8 +176,8 @@ public class InteriorBuilder
short textureIndex = (short)textures.indexOfObject(face.getTexture()); short textureIndex = (short)textures.indexOfObject(face.getTexture());
int texGenIndex = texGenEQs.indexOfIndex(face.getTexGen()); int texGenIndex = texGenEQs.indexOfIndex(face.getTexGen());
short lightCount = 0; short lightCount = 0;
byte surfaceFlags = 0; byte surfaceFlags = 16;
int fanMask = 0; int fanMask = 15;
int lightStateInfoStart = 0; int lightStateInfoStart = 0;
int mapOffsetX = 0; int mapOffsetX = 0;
int mapOffsetY = 0; int mapOffsetY = 0;
...@@ -228,7 +228,7 @@ public class InteriorBuilder ...@@ -228,7 +228,7 @@ public class InteriorBuilder
// NormalLMapIndices may be more complicated // NormalLMapIndices may be more complicated
int[] normalLMapIndices = new int[surfaces.sizeIndices()]; int[] normalLMapIndices = new int[surfaces.sizeIndices()];
for (int i = 0; i < surfaces.sizeIndices(); i++) for (int i = 0; i < surfaces.sizeIndices(); i++)
normalLMapIndices[i] = i; normalLMapIndices[i] = 0;//i;
result.setNormalLMapIndices(normalLMapIndices); result.setNormalLMapIndices(normalLMapIndices);
System.out.println("Adding AlarmLMapIndices"); System.out.println("Adding AlarmLMapIndices");
...@@ -243,9 +243,17 @@ public class InteriorBuilder ...@@ -243,9 +243,17 @@ public class InteriorBuilder
System.out.println("Adding LightMaps"); System.out.println("Adding LightMaps");
// TODO: Light Maps // TODO: Light Maps
result.setLightMaps(new BufferedImage[0]); BufferedImage lightMap = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
result.setLightDirMaps(new BufferedImage[0]); for (int i = 0; i < 256; i++)
result.setLightMapKeep(new boolean[0]); {
for (int j = 0; j < 256; j++)
{
lightMap.setRGB(i, j, 0x000000);
}
}
result.setLightMaps(new BufferedImage[]{lightMap});
result.setLightDirMaps(new BufferedImage[]{lightMap});
result.setLightMapKeep(new boolean[]{false});
System.out.println("Adding Solid Leaf Surfaces"); System.out.println("Adding Solid Leaf Surfaces");
// TODO: Solid Leaf Surfaces // TODO: Solid Leaf Surfaces
...@@ -357,7 +365,7 @@ public class InteriorBuilder ...@@ -357,7 +365,7 @@ public class InteriorBuilder
System.out.println("Building CoordBin Indices"); System.out.println("Building CoordBin Indices");
short[] coordBinIndices = new short[coordBins.length]; short[] coordBinIndices = new short[coordBins.length];
for (short i = 0; i < coordBins.length; i++) for (short i = 0; i < coordBins.length; i++)
coordBinIndices[i] = i; coordBinIndices[i] = 0;//i;
result.setCoordBinIndices(coordBinIndices); result.setCoordBinIndices(coordBinIndices);
System.out.println("Adding CoordBinMode"); System.out.println("Adding CoordBinMode");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment