예제 #1
0
        public FbnBinaryList <T> ReadList <T>(FbnBinaryChunkType type, int field04) where T : class, IFbnListEntry
        {
            var list = new FbnBinaryList <T>(type, field04);

            ReadList(list);
            return(list);
        }
예제 #2
0
        public IFbnListEntry ReadListEntry(FbnBinaryChunkType type)
        {
            IFbnListEntry entry;

            switch (type)
            {
            case FbnBinaryChunkType.HitTriggerList:
            case FbnBinaryChunkType.Type19:
            case FbnBinaryChunkType.Type22:
                entry = ReadObject <FbnTriggerVolume>();
                break;

            case FbnBinaryChunkType.EntranceList:
                entry = ReadObject <FbnEntrance>();
                break;

            case FbnBinaryChunkType.HitDefinitionList:
                entry = ReadObject <FbnHitDefinition>();
                break;

            case FbnBinaryChunkType.Type8:
                entry = ReadObject <FbnBlock8Entry>();
                break;

            case FbnBinaryChunkType.Type9:
                entry = ReadObject <FbnBlock9Entry>();
                break;

            case FbnBinaryChunkType.Type10:
                entry = ReadObject <FbnBlock10Entry>();
                break;

            case FbnBinaryChunkType.Type11:
                entry = ReadObject <FbnBlock11Entry>();
                break;

            case FbnBinaryChunkType.MessageTriggerList:
                entry = ReadObject <FbnMessageTrigger>();
                break;

            case FbnBinaryChunkType.Type18:
                entry = ReadObject <FbnBlock18Entry>();
                break;

            default:
                throw new NotImplementedException($"Reading block type {type} is not yet implemented");
            }

            return(entry);
        }
예제 #3
0
 public FbnBinaryList(FbnBinaryChunkType type, int field04) : base(type, field04)
 {
     mList = new List <T>();
 }
예제 #4
0
 protected FbnBinaryChunk(FbnBinaryChunkType type, int field04)
 {
     Type    = type;
     Field04 = field04;
 }