public OtherModelAddition( System.IO.Stream stream, uint refStringStart ) { Str = stream.ReadAsciiNulltermFromLocationAndReset( stream.ReadUInt32().SwapEndian() + refStringStart ); Unknown1 = (byte)stream.ReadByte(); Unknown2 = (byte)stream.ReadByte(); stream.DiscardBytes( 0x1A ); }
public CharacterModelDefinition( System.IO.Stream stream, uint refStringStart ) { Strings = new string[100]; for ( uint i = 0; i < 100; ++i ) { Strings[i] = stream.ReadAsciiNulltermFromLocationAndReset( stream.ReadUInt32().SwapEndian() + refStringStart ); } CustomIndex = stream.ReadUInt32().SwapEndian(); CustomCount = (byte)stream.ReadByte(); OtherCount = (byte)stream.ReadByte(); Unknown0x20AreaCount = (byte)stream.ReadByte(); Unknown1d = (byte)stream.ReadByte(); OtherIndex = stream.ReadUInt32().SwapEndian(); Unknown0x20AreaIndex = stream.ReadUInt32().SwapEndian(); Unknown4a = (byte)stream.ReadByte(); Unknown4b = (byte)stream.ReadByte(); Unknown4c = (byte)stream.ReadByte(); Unknown4d = (byte)stream.ReadByte(); stream.DiscardBytes( 4 ); Unknown0x80AreaIndex = stream.ReadUInt32().SwapEndian(); Unknown0x80AreaCount = (byte)stream.ReadByte(); Unknown7b = (byte)stream.ReadByte(); stream.DiscardBytes( 2 ); stream.DiscardBytes( 80 ); }
public T8BTVAEntry( System.IO.Stream stream, uint refStringStart ) { Data = new uint[33]; for ( int i = 0; i < 33; ++i ) { Data[i] = stream.ReadUInt32().SwapEndian(); } RefString = stream.ReadAsciiNulltermFromLocationAndReset( refStringStart + Data[22] ); ScenarioStart = Data[2]; ScenarioEnd = Data[3]; CharacterBitmask = Data[5]; KillCharacterBitmask = Data[6]; }
public T8BTVABlock( System.IO.Stream stream, uint refStringStart ) { uint size = stream.PeekUInt32().SwapEndian(); if ( size % 4 != 0 ) { throw new Exception( "T8BTVABlock size must be divisible by 4!" ); } if ( size / 4 < 14 ) { throw new Exception( "T8BTVABlock must contain at least 14 ints!" ); } Size = stream.ReadUInt32().SwapEndian(); IndexInArray = stream.ReadUInt32().SwapEndian(); IndexInGame = stream.ReadUInt32().SwapEndian(); IdentifierLocation = stream.ReadUInt32().SwapEndian(); CharacterSpecificData = new uint[9]; for ( int i = 0; i < 9; ++i ) { CharacterSpecificData[i] = stream.ReadUInt32().SwapEndian(); } EntryCount = stream.ReadUInt32().SwapEndian(); Identifier = stream.ReadAsciiNulltermFromLocationAndReset( IdentifierLocation + refStringStart ); Entries = new List<T8BTVAEntry>( (int)EntryCount ); for ( uint i = 0; i < EntryCount; ++i ) { Entries.Add( new T8BTVAEntry( stream, refStringStart ) ); } }
public CustomModelAddition( System.IO.Stream stream, uint refStringStart ) { Str = stream.ReadAsciiNulltermFromLocationAndReset( stream.ReadUInt32().SwapEndian() + refStringStart ); }