You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.8 KiB
C#

using mmfparser;
using NetMFAPatcher.mmfparser.mfaloaders.mfachunks;
using NetMFAPatcher.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NetMFAPatcher.utils;
namespace NetMFAPatcher.mmfparser.mfaloaders
{
class FrameItem : DataLoader
{
public int ObjectType;
public int Handle;
public string Name;
public bool Transparent;
public int InkEffect;
public int InkEffectParameter;
public int AntiAliasing;
public int Flags;
public int IconType;
public override void Print()
{
Console.WriteLine($"Name: {Name}");
}
public override void Read()
{
ObjectType = Reader.ReadInt32();
Handle = Reader.ReadInt32();
Name = Helper.AutoReadUnicode(Reader);
var transparent1 = Reader.ReadInt32();
InkEffect = Reader.ReadInt32();
InkEffectParameter = Reader.ReadInt32();
AntiAliasing = Reader.ReadInt32();
Flags = Reader.ReadInt32();
IconType = Reader.ReadInt32();
if(IconType==1)
{
var iconHandle = Reader.ReadInt32();
}
else
{
throw new NotImplementedException("invalid icon");
}
var chunks = new mmfparser.mfaloaders.ChunkList(Reader);
chunks.Read();
if(ObjectType>=32)//extension base
{
//swallow some cum
}
else
{
var loader = new Active(Reader);
loader.Read();
}
Print();
}
public FrameItem(ByteIO reader):base(reader)
{ }
}
}