public LingoScriptChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; input.ReadInt32(); input.ReadInt32(); input.ReadInt32(); input.ReadInt32(); input.ReadInt16(); ScriptNumber = input.ReadInt16(); Remnants.Enqueue(input.ReadInt16()); input.ReadBEInt32(); input.ReadBEInt32(); Remnants.Enqueue(input.ReadBEInt32()); input.ReadBEInt32(); Type = input.ReadInt32(); //TODO: enum, Behav=0, Global=2 Remnants.Enqueue(input.ReadInt32()); CastMemberRef = input.ReadInt16(); //scriptId Remnants.Enqueue(input.ReadBEInt16()); //factoryNameId? Pool = new LingoValuePool(this, ref input); }
public ScriptContextChunk(ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); int entryCount = input.ReadBigEndian <int>(); input.ReadBigEndian <int>(); short entryOffset = input.ReadBigEndian <short>(); //TODO: Research input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <int>()); //0 Type = input.ReadBigEndian <int>(); //TODO: Enum Remnants.Enqueue(input.ReadBigEndian <int>()); NameListChunkId = input.ReadBigEndian <int>(); Remnants.Enqueue(input.ReadBigEndian <short>()); //validCount Remnants.Enqueue(input.ReadBytes(2)); //flags, short? Remnants.Enqueue(input.ReadBigEndian <short>()); //freePtr input.Position = Header.Offset + entryOffset; Sections = new List <ScriptContextSection>(entryCount); for (int i = 0; i < entryCount; i++) { Sections.Add(new ScriptContextSection(input)); } }
public ScriptChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); input.ReadInt32(); input.ReadInt32(); input.ReadInt16(); ScriptNumber = input.ReadInt16(); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadBEInt32()); // -1 Remnants.Enqueue(input.ReadBEInt32()); // 0 Remnants.Enqueue(input.ReadBEInt32()); Remnants.Enqueue(input.ReadBEInt32()); // 0 BehaviourScript = input.ReadInt32(); //enum, Behav=0, Global=2 Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt16()); //scriptId Remnants.Enqueue(input.ReadBEInt16()); Pool = new LingoValuePool(this, ref input); }
public HFloorItem(HPacket packet) : base(packet) { Id = packet.ReadInt32(); TypeId = packet.ReadInt32(); var tile = new HPoint(packet.ReadInt32(), packet.ReadInt32()); Facing = (HDirection)packet.ReadInt32(); tile.Z = double.Parse(packet.ReadUTF8(), CultureInfo.InvariantCulture); Tile = tile; Remnants.Enqueue(packet.ReadUTF8()); Remnants.Enqueue(packet.ReadInt32()); Category = packet.ReadInt32(); Stuff = ReadData(packet, Category); SecondsToExpiration = packet.ReadInt32(); UsagePolicy = packet.ReadInt32(); OwnerId = packet.ReadInt32(); if (TypeId < 0) { Remnants.Enqueue(packet.ReadUTF8()); } }
public HItem(HPacket packet) : base(packet) { Remnants.Enqueue(packet.ReadInt32()); string unknown1 = packet.ReadUTF8(); Remnants.Enqueue(unknown1); Id = packet.ReadInt32(); TypeId = packet.ReadInt32(); Remnants.Enqueue(packet.ReadInt32()); Category = packet.ReadInt32(); Stuff = ReadData(packet, Category); IsGroupable = packet.ReadBoolean(); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); SecondsToExpiration = packet.ReadInt32(); HasRentPeriodStarted = packet.ReadBoolean(); RoomId = packet.ReadInt32(); if (unknown1 == "S") { SlotId = packet.ReadUTF8(); Remnants.Enqueue(packet.ReadInt32()); } }
public ScriptContextChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Sections = new List <ScriptContextSection>(input.ReadInt32()); input.ReadInt32(); short entryOffset = input.ReadInt16(); input.ReadInt16(); Remnants.Enqueue(input.ReadInt32()); //0 Type = input.ReadInt32(); //TODO: Enum Remnants.Enqueue(input.ReadInt32()); NameListChunkId = input.ReadInt32(); ValidCount = input.ReadInt16(); //validCount - tremor "length" Flags = input.ReadInt16(); //TODO: 1, 5 FreeChunkId = input.ReadInt16(); input.Position = entryOffset; for (int i = 0; i < Sections.Capacity; i++) { Sections.Add(new ScriptContextSection(ref input)); } }
public XtraListChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadInt32()); int xtraCount = input.ReadInt32(); for (int i = 0; i < xtraCount; i++) { long xtraEndOffset = input.Position + input.ReadInt32() + 4; int unk2 = input.ReadInt32(); int unk3 = input.ReadInt32(); //Flags or just booleans? Guid guid = new Guid(input.ReadBytes(16)); int[] offsets = new int[input.ReadInt16() + 1]; for (int j = 0; j < offsets.Length; j++) { offsets[j] = input.ReadInt32(); } do { byte unk4 = input.ReadByte(); // 1 when kind = URL byte kind = input.ReadByte(); // 2 -> Name | 0 -> URL, 5 -> File, x32 ?!? no idea string str = input.ReadString(); input.ReadByte(); }while (input.Position != xtraEndOffset); } }
public HEntity(HPacket packet) : base(packet) { Id = packet.ReadInt32(); Name = packet.ReadUTF8(); Motto = packet.ReadUTF8(); FigureId = packet.ReadUTF8(); Index = packet.ReadInt32(); Tile = new HPoint(packet.ReadInt32(), packet.ReadInt32(), double.Parse(packet.ReadUTF8(), CultureInfo.InvariantCulture)); Remnants.Enqueue(packet.ReadInt32()); EntityType = packet.ReadInt32(); switch (EntityType) { case 1: { Gender = (HGender)packet.ReadUTF8().ToLower()[0]; Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadInt32()); FavoriteGroup = packet.ReadUTF8(); Remnants.Enqueue(packet.ReadUTF8()); Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadBoolean()); break; } case 2: { Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadUTF8()); Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadBoolean()); Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadUTF8()); break; } case 4: { Remnants.Enqueue(packet.ReadUTF8()); Remnants.Enqueue(packet.ReadInt32()); Remnants.Enqueue(packet.ReadUTF8()); for (int j = packet.ReadInt32(); j > 0; j--) { Remnants.Enqueue(packet.ReadUInt16()); } break; } } }
public FavoriteColorsChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadInt32()); //1 Remnants.Enqueue(input.ReadInt32()); //1 for (int i = 0; i < Colors.Length; i++) { Colors[i] = Color.FromArgb(input.ReadByte(), input.ReadByte(), input.ReadByte()); } }
public ScoreChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { int totalLength = input.ReadInt32(); int headerType = input.ReadInt32(); //-3 int spritePropertiesOffsetThingy = input.ReadInt32(); int[] spritePropertyOffsets = new int[input.ReadInt32() + 1]; int notationOffset = input.ReadInt32() * sizeof(int) + 12 + spritePropertiesOffsetThingy; //..* 4 *.. int lastSpritePropertyOffset = input.ReadInt32(); for (int i = 0; i < spritePropertyOffsets.Length; i++) { spritePropertyOffsets[i] = input.ReadInt32(); } //notationOffset int frameEndOffset = input.ReadInt32(); Remnants.Enqueue(input.ReadInt32()); Frames = new Frame[input.ReadInt32()]; short framesType = input.ReadInt16(); //13, 14 short channelLength = input.ReadInt16(); short lastChannelMax = input.ReadInt16(); //1006 short lastChannel = input.ReadInt16(); for (int i = 0; i < Frames.Length; i++) { Frames[i] = new Frame(ref input); } int[] spritePropertyOffsetIndices = new int[input.ReadInt32()]; for (int i = 0; i < spritePropertyOffsetIndices.Length; i++) { spritePropertyOffsetIndices[i] = input.ReadInt32(); } SpriteProperties[] spriteProperties = new SpriteProperties[spritePropertyOffsetIndices.Length]; for (int i = 0; i < spritePropertyOffsetIndices.Length; i++) { int spritePropertyOffset = spritePropertyOffsets[spritePropertyOffsetIndices[i]]; input.Position = notationOffset + spritePropertyOffset; spriteProperties[i] = new SpriteProperties(ref input); } }
public ScoreChunk(ShockwaveReader input, ChunkHeader header) : base(header) { int totalLength = input.ReadBigEndian <int>(); int headerType = input.ReadBigEndian <int>(); //-3 int spritePropertiesOffsetThingy = input.ReadBigEndian <int>(); int[] spritePropertyOffsets = new int[input.ReadBigEndian <int>() + 1]; int notationOffset = input.ReadBigEndian <int>() * 4 + 12 + spritePropertiesOffsetThingy; int lastSpritePropertyOffset = input.ReadBigEndian <int>(); for (int i = 0; i < spritePropertyOffsets.Length; i++) { spritePropertyOffsets[i] = input.ReadBigEndian <int>(); } Debug.Assert(input.Position == (Header.Offset + notationOffset), "What"); int frameEndOffset = input.ReadBigEndian <int>(); Remnants.Enqueue(input.ReadBigEndian <int>()); Frames = new Frame[input.ReadBigEndian <int>()]; short framesType = input.ReadBigEndian <short>(); //13, 14 short channelLength = input.ReadBigEndian <short>(); short lastChannelMax = input.ReadBigEndian <short>(); //1006 short lastChannel = input.ReadBigEndian <short>(); for (int i = 0; i < Frames.Length; i++) { Frames[i] = new Frame(input); } int[] spritePropertyOffsetIndices = new int[input.ReadBigEndian <int>()]; for (int i = 0; i < spritePropertyOffsetIndices.Length; i++) { spritePropertyOffsetIndices[i] = input.ReadBigEndian <int>(); } SpriteProperties[] spriteProperties = new SpriteProperties[spritePropertyOffsetIndices.Length]; for (int i = 0; i < spritePropertyOffsetIndices.Length; i++) { int spritePropertyOffset = spritePropertyOffsets[spritePropertyOffsetIndices[i]]; input.Position = Header.Offset + notationOffset + spritePropertyOffset; spriteProperties[i] = new SpriteProperties(input); } }
public InitialMapChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { MemoryMapOffsets = new int[input.ReadBEInt32()]; for (int i = 0; i < MemoryMapOffsets.Length; i++) { MemoryMapOffsets[i] = input.ReadBEInt32(); } Version = (DirectorVersion)input.ReadBEInt32(); input.ReadBEInt16(); input.ReadBEInt16(); //TODO: verify, note: what the hell is going on, how I didn't notice these before input.ReadBEInt32(); Remnants.Enqueue(input.ReadBEInt32()); }
public CastMemberPropertiesChunk(ShockwaveReader input, ChunkHeader header) : base(header) { Type = (CastType)input.ReadBigEndian <int>(); input.ReadBigEndian <int>(); int dataLength = input.ReadBigEndian <int>(); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Common = new CommonMemberProperties(input); Properties = ReadTypeProperties(input, dataLength); }
public AfterburnerMapChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.ReadByte(); Remnants.Enqueue(input.Read7BitEncodedInt()); using var deflaterInput = CreateDeflateReader(ref input); Remnants.Enqueue(deflaterInput.Read7BitEncodedInt()); Remnants.Enqueue(deflaterInput.Read7BitEncodedInt()); Entries = new AfterBurnerMapEntry[deflaterInput.Read7BitEncodedInt()]; for (int i = 0; i < Entries.Length; i++) { Entries[i] = new AfterBurnerMapEntry(deflaterInput); } }
public SortOrderChunk(ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Entries = new List <int>(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); for (int i = 0; i < Entries.Capacity; i++) { Entries.Add(input.ReadBigEndian <int>()); } }
public AfterburnerMapChunk(ShockwaveReader input, ChunkHeader header) : base(header) { input.ReadByte(); Remnants.Enqueue(input.Read7BitEncodedInt()); var decompressedInput = WrapDecompressor(input); Remnants.Enqueue(decompressedInput.Read7BitEncodedInt()); Remnants.Enqueue(decompressedInput.Read7BitEncodedInt()); Entries = new List <AfterBurnerMapEntry>(decompressedInput.Read7BitEncodedInt()); for (int i = 0; i < Entries.Capacity; i++) { Entries.Add(new AfterBurnerMapEntry(decompressedInput)); } }
public GridChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadInt32()); Width = input.ReadInt16(); Height = input.ReadInt16(); Display = (GridDisplay)input.ReadInt16(); GridColor = input.ReadInt16(); Guides = new Guide[input.ReadInt16()]; GuideColor = input.ReadInt16(); for (int i = 0; i < Guides.Length; i++) { Guides[i] = new Guide(ref input); } }
public NameTableChunk(ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); input.ReadBigEndian <int>(); input.ReadBigEndian <int>(); short nameOffset = input.ReadBigEndian <short>(); Names = new List <string>(input.ReadBigEndian <short>()); input.Position = Header.Offset + nameOffset; for (int i = 0; i < Names.Capacity; i++) { Names.Add(input.ReadString()); } }
public CastMemberPropertiesChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; Type = (CastType)input.ReadInt32(); input.ReadInt32(); int dataLength = input.ReadInt32(); Remnants.Enqueue(input.ReadInt32()); //TOOD: Why is DIRAPI checking this 24/7 if its a constant(?) 0x14 Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Common = new CommonMemberProperties(ref input); Properties = ReadTypeProperties(ref input, dataLength); }
public MovieCastListChunk(ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadBigEndian <int>()); Entries = new List <CastListEntry>(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Unknowns = new int[input.ReadBigEndian <int>()]; for (int i = 0; i < Unknowns.Length; i++) { Unknowns[i] = input.ReadBigEndian <int>(); } input.ReadBigEndian <int>(); for (int i = 0; i < Entries.Capacity; i++) { Entries.Add(new CastListEntry(input)); } }
public MemoryMapChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.ReadBEInt16(); input.ReadBEInt16(); int entryCountMax = input.ReadBEInt32(); int entryCount = input.ReadBEInt32(); LastJunkId = input.ReadBEInt32(); Remnants.Enqueue(input.ReadBEInt32()); LastFreeId = input.ReadBEInt32(); Entries = new ChunkEntry[entryCount]; for (int i = 0; i < Entries.Length; i++) { Entries[i] = new ChunkEntry(ref input, i); } }
public ScoreReferenceChunk(ShockwaveReader input, ChunkHeader header) : base(header) { input.ReadBigEndian <int>(); input.ReadBigEndian <int>(); int entryCount = input.ReadBigEndian <int>(); int validCount = input.ReadBigEndian <int>(); input.ReadBigEndian <short>(); input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <int>()); Entries = new Dictionary <short, int>(entryCount); for (int i = 0; i < entryCount; i++) { Entries.Add(input.ReadBigEndian <short>(), input.ReadBigEndian <int>()); } }
public HFriendData(HPacket packet) : base(packet) { Id = packet.ReadInt32(); Username = packet.ReadUTF8(); Gender = (packet.ReadInt32() == 1 ? HGender.Male : HGender.Female); IsOnline = packet.ReadBoolean(); CanFollow = packet.ReadBoolean(); Figure = packet.ReadUTF8(); CategoryId = packet.ReadInt32(); Motto = packet.ReadUTF8(); RealName = packet.ReadUTF8(); Remnants.Enqueue(packet.ReadUTF8()); IsPersisted = packet.ReadBoolean(); Remnants.Enqueue(packet.ReadBoolean()); IsPocketHabboUser = packet.ReadBoolean(); RelationshipStatus = (HRelationship)packet.ReadUInt16(); }
public MovieCastListChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; input.ReadInt32(); Entries = new List <CastListEntry>(input.ReadInt32()); Remnants.Enqueue(input.ReadInt16()); Unknowns = new int[input.ReadInt32()]; for (int i = 0; i < Unknowns.Length; i++) { Unknowns[i] = input.ReadInt32(); } input.ReadInt32(); for (int i = 0; i < Entries.Capacity; i++) { Entries.Add(new CastListEntry(ref input)); } }
public LingoNameChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); input.ReadInt32(); input.ReadInt32(); short nameOffset = input.ReadInt16(); Names = new List <string>(input.ReadInt16()); input.Position = nameOffset; for (int i = 0; i < Names.Capacity; i++) { Names.Add(input.ReadString()); } }
public MemoryMapChunk(ShockwaveReader input, ChunkHeader header) : base(header) { Remnants.Enqueue(input.ReadInt16()); input.ReadInt16(); int entryCountMax = input.ReadInt32(); int entryCount = input.ReadInt32(); LastJunkId = input.ReadInt32(); Remnants.Enqueue(input.ReadInt32()); LastFreeId = input.ReadInt32(); Entries = new ChunkEntry[entryCount]; for (int i = 0; i < Entries.Length; i++) { var entry = new ChunkEntry(input); entry.Header.Id = i; Entries[i] = entry; } }
public HEntityUpdate(HPacket packet) : base(packet) { Index = packet.ReadInt32(); Tile = new HPoint(packet.ReadInt32(), packet.ReadInt32(), double.Parse(packet.ReadUTF8(), CultureInfo.InvariantCulture)); HeadFacing = (HDirection)packet.ReadInt32(); BodyFacing = (HDirection)packet.ReadInt32(); string action = packet.ReadUTF8(); Remnants.Enqueue(action); string[] actionData = action.Split( new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); foreach (string actionInfo in actionData) { string[] actionValues = actionInfo.Split(' '); if (actionValues.Length < 2) { continue; } if (string.IsNullOrWhiteSpace(actionValues[0])) { continue; } switch (actionValues[0]) { case "flatctrl": { IsController = true; break; } case "mv": { string[] values = actionValues[1].Split(','); if (values.Length >= 3) { MovingTo = new HPoint(int.Parse(values[0]), int.Parse(values[1]), double.Parse(values[2], CultureInfo.InvariantCulture)); } Action = HAction.Move; break; } case "sit": { Action = HAction.Sit; Stance = HStance.Sit; break; } case "lay": { Action = HAction.Lay; Stance = HStance.Lay; break; } case "sign": { Sign = (HSign)int.Parse(actionValues[1]); Action = HAction.Sign; break; } } } }
public ConfigChunk(ShockwaveReader input, ChunkHeader header) : base(header) { input.ReadBigEndian <short>(); Version = (DirectorVersion)input.ReadBigEndian <ushort>(); StageRectangle = input.ReadRect(); MinMember = input.ReadBigEndian <short>(); //Obsolete MaxMember = input.ReadBigEndian <short>(); //Obsolete Tempo = input.ReadByte(); Remnants.Enqueue(input.ReadByte()); byte g = input.ReadByte(); byte b = input.ReadByte(); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); //https://www.youtube.com/watch?v=sA_eCl4Txzs byte r = input.ReadByte(); StageBackgroundColor = Color.FromArgb(r, g, b); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadByte()); //-2 when version < 0x551 Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadBigEndian <int>()); MovieVersion = (DirectorVersion)input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <short>());//16? Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); RandomNumber = input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <int>()); Remnants.Enqueue(input.ReadBigEndian <int>()); OldDefaultPalette = input.ReadBigEndian <short>(); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <int>()); DefaultPalette = input.ReadBigEndian <int>(); //TODO: Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); DownloadFramesBeforePlaying = input.ReadBigEndian <int>(); //90 //Zeros Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); Remnants.Enqueue(input.ReadBigEndian <short>()); }
public ConfigChunk(ref ShockwaveReader input, ChunkHeader header) : base(header) { input.IsBigEndian = true; input.ReadInt16(); Version = (DirectorVersion)input.ReadUInt16(); StageRectangle = input.ReadRect(); MinMember = input.ReadInt16(); //Obsolete MaxMember = input.ReadInt16(); //Obsolete Tempo = input.ReadByte(); // == 0 => 20 Remnants.Enqueue(input.ReadByte()); //LightSwitch byte g = input.ReadByte(); //?? byte b = input.ReadByte(); //?? Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); //768 - Seen this one alot in DIRAPI Remnants.Enqueue(input.ReadInt16()); byte r = input.ReadByte(); //?????????? StageBackgroundColor = Color.FromArgb(r, g, b); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadByte()); //-2 when version < 0x551 Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadInt32()); MovieVersion = (DirectorVersion)input.ReadInt16(); Remnants.Enqueue(input.ReadInt16());//16? Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadByte()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); RandomNumber = input.ReadInt16(); Remnants.Enqueue(input.ReadInt32()); Remnants.Enqueue(input.ReadInt32()); OldDefaultPalette = input.ReadInt16(); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt32()); DefaultPalette = input.ReadInt32(); //TODO: //two int16?? ^^ Remnants.Enqueue(input.ReadInt16()); //two bytes? - IDA Remnants.Enqueue(input.ReadInt16()); if (!input.IsDataAvailable) { return; } DownloadFramesBeforePlaying = input.ReadInt32(); //90 //Zeros Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); Remnants.Enqueue(input.ReadInt16()); }