Beispiel #1
0
        public Variant(Stream stream)
        {
            _stream = new LibStream(stream);

            VariantName        = _stream.ReadUnicodeString(0x48, 32);
            VariantDescription = _stream.ReadString(0x68, 128);
            VariantAuthor      = _stream.ReadString(0xE8, 16);
        }
Beispiel #2
0
        public Variant(Stream stream)
        {
            _stream = new LibStream(stream);

            VariantName = _stream.ReadUnicodeString(0x48, 32);
            VariantDescription = _stream.ReadString(0x68, 128);
            VariantAuthor = _stream.ReadString(0xE8, 16);
        }
Beispiel #3
0
        public static VariantType Detect(Stream stream)
        {
            LibStream _stream = new LibStream(stream);

            // Validate the Magic
            if (_stream.ReadString(0, 4) != "_blf")
                return VariantType.Invalid;

            // Check what the file variant is.
            switch (_stream.ReadString(0x138, 4))
            {
                case "mapv":
                    return VariantType.ForgeVariant;
                case "mpvr":
                    return VariantType.GameVariant;
                default:
                    return VariantType.Invalid;
            }
        }
Beispiel #4
0
        public static VariantType Detect(Stream stream)
        {
            LibStream _stream = new LibStream(stream);

            // Validate the Magic
            if (_stream.ReadString(0, 4) != "_blf")
            {
                return(VariantType.Invalid);
            }

            // Check what the file variant is.
            switch (_stream.ReadString(0x138, 4))
            {
            case "mapv":
                return(VariantType.ForgeVariant);

            case "mpvr":
                return(VariantType.GameVariant);

            default:
                return(VariantType.Invalid);
            }
        }