public static RawImage GetFloor(int labdata, int floor) { LabData ld = LabData.GetLabData(labdata); FloorData floordata = ld.GetFloor(floor); int texture = floordata.Texture; return(GameData.Floors3D.Open(texture)); }
public LabData(Stream input) { BinaryReader reader = new BinaryReader(input); reader.ReadByte(); Scale1 = reader.ReadByte(); CameraHeight = reader.ReadByte(); CameraAngle = reader.ReadByte(); reader.ReadInt16(); Background = reader.ReadByte(); reader.ReadBytes(3); FogDistance = reader.ReadByte(); reader.ReadBytes(13); MaxLightStrength = reader.ReadByte(); reader.ReadByte(); Scale2 = reader.ReadByte(); reader.ReadBytes(3); ViewDistance = reader.ReadByte(); reader.ReadBytes(7); short numobjects = reader.ReadInt16(); Objects = new ObjectData[numobjects]; for (int i = 0; i < numobjects; i++) { Objects[i] = new ObjectData(reader); } short numfloors = reader.ReadInt16(); Floors = new FloorData[numfloors]; for (int i = 0; i < numfloors; i++) { Floors[i] = new FloorData(reader); } short numoinfos = reader.ReadInt16(); ObjectInfos = new ObjectInfo[numoinfos]; for (int i = 0; i < numoinfos; i++) { ObjectInfos[i] = new ObjectInfo(reader); } short numwalls = reader.ReadInt16(); Walls = new WallData[numwalls]; for (int i = 0; i < numwalls; i++) { Walls[i] = new WallData(reader); } }
public LabData(Stream input) { BinaryReader reader = new BinaryReader(input); reader.ReadByte(); Scale1 = reader.ReadByte(); CameraHeight = reader.ReadByte(); CameraAngle = reader.ReadByte(); reader.ReadInt16(); Background = reader.ReadByte(); reader.ReadBytes(3); FogDistance = reader.ReadByte(); reader.ReadBytes(13); MaxLightStrength = reader.ReadByte(); reader.ReadByte(); Scale2 = reader.ReadByte(); reader.ReadBytes(3); ViewDistance = reader.ReadByte(); reader.ReadBytes(7); short numobjects = reader.ReadInt16(); Objects = new ObjectData[numobjects]; for(int i = 0; i < numobjects; i++) { Objects[i] = new ObjectData(reader); } short numfloors = reader.ReadInt16(); Floors = new FloorData[numfloors]; for(int i = 0; i < numfloors; i++) { Floors[i] = new FloorData(reader); } short numoinfos = reader.ReadInt16(); ObjectInfos = new ObjectInfo[numoinfos]; for(int i = 0; i < numoinfos; i++) { ObjectInfos[i] = new ObjectInfo(reader); } short numwalls = reader.ReadInt16(); Walls = new WallData[numwalls]; for(int i = 0; i < numwalls; i++) { Walls[i] = new WallData(reader); } }