internal override Event ReadEntry(BinaryReaderEx br) { EventType type = br.GetEnum32 <EventType>(br.Position + 0xC); switch (type) { case EventType.Treasure: return(Treasures.EchoAdd(new Event.Treasure(br))); case EventType.Generator: return(Generators.EchoAdd(new Event.Generator(br))); case EventType.ObjAct: return(ObjActs.EchoAdd(new Event.ObjAct(br))); case EventType.MapOffset: return(MapOffsets.EchoAdd(new Event.MapOffset(br))); case EventType.PseudoMultiplayer: return(PseudoMultiplayers.EchoAdd(new Event.PseudoMultiplayer(br))); case EventType.PatrolInfo: return(PatrolInfo.EchoAdd(new Event.PatrolInfo(br))); case EventType.PlatoonInfo: return(PlatoonInfo.EchoAdd(new Event.PlatoonInfo(br))); case EventType.Other: return(Others.EchoAdd(new Event.Other(br))); default: throw new NotImplementedException($"Unsupported event type: {type}"); } }
internal override Event ReadEntry(BinaryReaderEx br) { EventType type = br.GetEnum8 <EventType>(br.Position + br.VarintSize + 4); switch (type) { case EventType.Light: return(Lights.EchoAdd(new Event.Light(br))); case EventType.Shadow: return(Shadows.EchoAdd(new Event.Shadow(br))); case EventType.Fog: return(Fogs.EchoAdd(new Event.Fog(br))); case EventType.BGColor: return(BGColors.EchoAdd(new Event.BGColor(br))); case EventType.MapOffset: return(MapOffsets.EchoAdd(new Event.MapOffset(br))); case EventType.Warp: return(Warps.EchoAdd(new Event.Warp(br))); case EventType.CheapMode: return(CheapModes.EchoAdd(new Event.CheapMode(br))); default: throw new NotImplementedException($"Unimplemented event type: {type}"); } }
internal override Event ReadEntry(BinaryReaderEx br) { EventType type = br.GetEnum32 <EventType>(br.Position + 8); switch (type) { case EventType.Light: return(Lights.EchoAdd(new Event.Light(br))); case EventType.Sound: return(Sounds.EchoAdd(new Event.Sound(br))); case EventType.SFX: return(SFX.EchoAdd(new Event.SFX(br))); case EventType.Wind: return(Wind.EchoAdd(new Event.Wind(br))); case EventType.Treasure: return(Treasures.EchoAdd(new Event.Treasure(br))); case EventType.Generator: return(Generators.EchoAdd(new Event.Generator(br))); case EventType.Message: return(Messages.EchoAdd(new Event.Message(br))); case EventType.ObjAct: return(ObjActs.EchoAdd(new Event.ObjAct(br))); case EventType.SpawnPoint: return(SpawnPoints.EchoAdd(new Event.SpawnPoint(br))); case EventType.MapOffset: return(MapOffsets.EchoAdd(new Event.MapOffset(br))); case EventType.Navmesh: return(Navmeshes.EchoAdd(new Event.Navmesh(br))); case EventType.Environment: return(Environments.EchoAdd(new Event.Environment(br))); case EventType.PseudoMultiplayer: return(PseudoMultiplayers.EchoAdd(new Event.PseudoMultiplayer(br))); default: throw new NotImplementedException($"Unsupported event type: {type}"); } }