public BSP30map (string filename) { if (File.Exists ("Assets/Bsp/" + filename) == false) { Debug.LogError ("Bsp not found"); } BSPfile = new BinaryReader (File.Open ("Assets/Bsp/" + filename, FileMode.Open)); header = new BSPHeader (BSPfile); bspInfo = new BspInfo (); ReadEntities (); ReadFaces (); ReadEdges (); ReadVerts (); ReadTexinfo (); ReadLightLump (); ReadTextures (); ReadMarkSurfaces (); ReadLeafs (); ReadPlanes (); ReadNodes (); ReadModels (); ReadVisData (); Debug.Log("data start "); Debug.Log("Entity char length " + entityLump.rawEntities.Length.ToString()); Debug.Log("number of Faces " + bspInfo.mapNum_faces.ToString()); // Debug.Log("number of edges " + bspInfo. Debug.Log("lightmap length " + bspInfo.mapNum_lighting.ToString()); Debug.Log("number of verts " + bspInfo.mapNum_verts.ToString()); Debug.Log("number of Faces " + bspInfo.mapNum_faces.ToString()); Debug.Log("textures " + bspInfo.mapNum_textures.ToString()); Debug.Log("marksurf " + markSurfacesLump.markSurfaces.Length.ToString()); Debug.Log("VisData Length: " + bspInfo.mapNum_visability.ToString()); Debug.Log("leaf limp Length: " + leafLump.numLeafs.ToString()); Debug.Log("plane Length: " + planeLump.planes.Length.ToString()); Debug.Log("node lump Length: " + nodeLump.nodes.Length.ToString()); Debug.Log("models " + modelLump.models.Length.ToString()); Debug.Log("data end "); bspInfo.mapNum_clipnodes = header.directory [9].length / 8; ReadPVS (); BSPfile.BaseStream.Dispose (); if (NumTexLoadFromWad > 0) { Debug.Log ("Reading in textures from wad"); findNullTextures ();//number of textures we need to load from the wad files } }
public BSP30map(string filename) { if (File.Exists("Assets/Bsp/" + filename) == false) { Debug.LogError("Bsp not found"); } BSPfile = new BinaryReader(File.Open("Assets/Bsp/" + filename, FileMode.Open)); header = new BSPHeader(BSPfile); bspInfo = new BspInfo(); ReadEntities(); ReadFaces(); ReadEdges(); ReadVerts(); ReadTexinfo(); ReadLightLump(); ReadTextures(); ReadMarkSurfaces(); ReadLeafs(); ReadPlanes(); ReadNodes(); ReadModels(); ReadVisData(); Debug.Log("data start "); Debug.Log("Entity char length " + entityLump.rawEntities.Length.ToString()); Debug.Log("number of Faces " + bspInfo.mapNum_faces.ToString()); // Debug.Log("number of edges " + bspInfo. Debug.Log("lightmap length " + bspInfo.mapNum_lighting.ToString()); Debug.Log("number of verts " + bspInfo.mapNum_verts.ToString()); Debug.Log("number of Faces " + bspInfo.mapNum_faces.ToString()); Debug.Log("textures " + bspInfo.mapNum_textures.ToString()); Debug.Log("marksurf " + markSurfacesLump.markSurfaces.Length.ToString()); Debug.Log("VisData Length: " + bspInfo.mapNum_visability.ToString()); Debug.Log("leaf limp Length: " + leafLump.numLeafs.ToString()); Debug.Log("plane Length: " + planeLump.planes.Length.ToString()); Debug.Log("node lump Length: " + nodeLump.nodes.Length.ToString()); Debug.Log("models " + modelLump.models.Length.ToString()); Debug.Log("data end "); bspInfo.mapNum_clipnodes = header.directory [9].length / 8; ReadPVS(); BSPfile.BaseStream.Dispose(); if (NumTexLoadFromWad > 0) { Debug.Log("Reading in textures from wad"); findNullTextures(); //number of textures we need to load from the wad files } }
public BSP29map(string filename) { BSPfile = new BinaryReader(File.Open("Assets/Resources/Maps/" + filename, FileMode.Open)); header = new BSPHeader(BSPfile); palette = new BSPColors(); ReadEntities(); ReadFaces(); ReadEdges(); ReadVerts(); ReadTexinfo(); ReadTextures(); ReadModels(); ReadLightMaps(); BSPfile.BaseStream.Dispose(); }
public BSPMap(string mapFileName) { palette = new BSPPalette("palette.lmp"); bspFile = new BinaryReader(File.Open("Assets/Resources/Maps/" + mapFileName, FileMode.Open)); header = new BSPHeader(bspFile); LoadEntities(bspFile); LoadPlanes(bspFile); LoadTextures(bspFile); LoadVertices(bspFile); LoadNodes(bspFile); LoadTextureInfo(bspFile); LoadLeaves(bspFile); LoadFaces(bspFile); LoadEdges(bspFile); LoadModels(bspFile); bspFile.Close(); }
public BSP29map(string filename, bool overrideTextures) { BSPfile = new BinaryReader(File.Open("Assets/Resources/Maps/" + filename, FileMode.Open)); header = new BSPHeader(BSPfile); palette = new BSPColors(false); transparent_palette = new BSPColors(true); ReadEntities(); ReadFaces(); ReadEdges(); ReadVerts(); ReadTexinfo(); ReadTextures(overrideTextures); ReadModels(); ReadLightMaps(); SerialiseTextures(overrideTextures); BSPfile.BaseStream.Dispose(); }