示例#1
0
            internal override Region ReadEntry(BinaryReaderEx br)
            {
                RegionType type = br.GetEnum32 <RegionType>(br.Position + 0x8);

                switch (type)
                {
                case RegionType.General:
                    var general = new Region.General(br);
                    General.Add(general);
                    return(general);

                case RegionType.Unk00:
                    var unk00 = new Region.Unk00(br);
                    Unk00s.Add(unk00);
                    return(unk00);

                case RegionType.InvasionPoint:
                    var invasion = new Region.InvasionPoint(br);
                    InvasionPoints.Add(invasion);
                    return(invasion);

                case RegionType.EnvironmentMapPoint:
                    var envMapPoint = new Region.EnvironmentMapPoint(br);
                    EnvironmentMapPoints.Add(envMapPoint);
                    return(envMapPoint);

                case RegionType.Sound:
                    var sound = new Region.Sound(br);
                    Sounds.Add(sound);
                    return(sound);

                case RegionType.SFX:
                    var sfx = new Region.SFX(br);
                    SFX.Add(sfx);
                    return(sfx);

                case RegionType.WindSFX:
                    var windSFX = new Region.WindSFX(br);
                    WindSFX.Add(windSFX);
                    return(windSFX);

                case RegionType.SpawnPoint:
                    var spawnPoint = new Region.SpawnPoint(br);
                    SpawnPoints.Add(spawnPoint);
                    return(spawnPoint);

                case RegionType.Message:
                    var message = new Region.Message(br);
                    Messages.Add(message);
                    return(message);

                case RegionType.WalkRoute:
                    var walkRoute = new Region.WalkRoute(br);
                    WalkRoutes.Add(walkRoute);
                    return(walkRoute);

                case RegionType.Unk12:
                    var unk12 = new Region.Unk12(br);
                    Unk12s.Add(unk12);
                    return(unk12);

                case RegionType.WarpPoint:
                    var warpPoint = new Region.WarpPoint(br);
                    WarpPoints.Add(warpPoint);
                    return(warpPoint);

                case RegionType.ActivationArea:
                    var activationArea = new Region.ActivationArea(br);
                    ActivationAreas.Add(activationArea);
                    return(activationArea);

                case RegionType.Event:
                    var ev = new Region.Event(br);
                    Events.Add(ev);
                    return(ev);

                case RegionType.EnvironmentMapEffectBox:
                    var envMapEffectBox = new Region.EnvironmentMapEffectBox(br);
                    EnvironmentMapEffectBoxes.Add(envMapEffectBox);
                    return(envMapEffectBox);

                case RegionType.WindArea:
                    var windArea = new Region.WindArea(br);
                    WindAreas.Add(windArea);
                    return(windArea);

                case RegionType.MufflingBox:
                    var muffBox = new Region.MufflingBox(br);
                    MufflingBoxes.Add(muffBox);
                    return(muffBox);

                case RegionType.MufflingPortal:
                    var muffPortal = new Region.MufflingPortal(br);
                    MufflingPortals.Add(muffPortal);
                    return(muffPortal);

                default:
                    throw new NotImplementedException($"Unsupported region type: {type}");
                }
            }
示例#2
0
            internal override Region ReadEntry(BinaryReaderEx br)
            {
                RegionType type = br.GetEnum32 <RegionType>(br.Position + 8);

                switch (type)
                {
                case RegionType.Region0:
                    var region0 = new Region.Region0(br);
                    Region0s.Add(region0);
                    return(region0);

                case RegionType.InvasionPoint:
                    var invasionPoint = new Region.InvasionPoint(br);
                    InvasionPoints.Add(invasionPoint);
                    return(invasionPoint);

                case RegionType.EnvironmentMapPoint:
                    var environmentMapPoint = new Region.EnvironmentMapPoint(br);
                    EnvironmentMapPoints.Add(environmentMapPoint);
                    return(environmentMapPoint);

                case RegionType.Sound:
                    var sound = new Region.Sound(br);
                    Sounds.Add(sound);
                    return(sound);

                case RegionType.SFX:
                    var sfx = new Region.SFX(br);
                    SFXs.Add(sfx);
                    return(sfx);

                case RegionType.WindSFX:
                    var windSFX = new Region.WindSFX(br);
                    WindSFXs.Add(windSFX);
                    return(windSFX);

                case RegionType.SpawnPoint:
                    var spawnPoint = new Region.SpawnPoint(br);
                    SpawnPoints.Add(spawnPoint);
                    return(spawnPoint);

                case RegionType.WalkRoute:
                    var walkRoute = new Region.WalkRoute(br);
                    WalkRoutes.Add(walkRoute);
                    return(walkRoute);

                case RegionType.WarpPoint:
                    var warpPoint = new Region.WarpPoint(br);
                    WarpPoints.Add(warpPoint);
                    return(warpPoint);

                case RegionType.ActivationArea:
                    var activationArea = new Region.ActivationArea(br);
                    ActivationAreas.Add(activationArea);
                    return(activationArea);

                case RegionType.Event:
                    var evt = new Region.Event(br);
                    Events.Add(evt);
                    return(evt);

                case RegionType.EnvironmentMapEffectBox:
                    var environmentMapEffectBox = new Region.EnvironmentMapEffectBox(br);
                    EnvironmentMapEffectBoxes.Add(environmentMapEffectBox);
                    return(environmentMapEffectBox);

                case RegionType.WindArea:
                    var windArea = new Region.WindArea(br);
                    WindAreas.Add(windArea);
                    return(windArea);

                case RegionType.MufflingBox:
                    var mufflingBox = new Region.MufflingBox(br);
                    MufflingBoxes.Add(mufflingBox);
                    return(mufflingBox);

                case RegionType.MufflingPortal:
                    var mufflingPortal = new Region.MufflingPortal(br);
                    MufflingPortals.Add(mufflingPortal);
                    return(mufflingPortal);

                case RegionType.Region23:
                    var region23 = new Region.Region23(br);
                    Region23s.Add(region23);
                    return(region23);

                case RegionType.Region24:
                    var region24 = new Region.Region24(br);
                    Region24s.Add(region24);
                    return(region24);

                case RegionType.PartsGroup:
                    var partsGroup = new Region.PartsGroup(br);
                    PartsGroups.Add(partsGroup);
                    return(partsGroup);

                case RegionType.AutoDrawGroup:
                    var autoDrawGroup = new Region.AutoDrawGroup(br);
                    AutoDrawGroups.Add(autoDrawGroup);
                    return(autoDrawGroup);

                case RegionType.Other:
                    var other = new Region.Other(br);
                    Others.Add(other);
                    return(other);

                default:
                    throw new NotImplementedException($"Unimplemented region type: {type}");
                }
            }