Add mesh reading and conversion support

This commit is contained in:
Yukai Li 2021-03-17 03:18:15 -06:00
parent 65dc96c4d6
commit aa1277a4e1
25 changed files with 2212 additions and 9 deletions

53
LibDgf/Ps2/Vif/VifCode.cs Normal file
View file

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LibDgf.Ps2.Vif
{
public struct VifCode
{
public uint Value;
public bool Interrupt
{
get
{
return (Cmd & VifCodeCmd.Interrupt) != 0;
}
}
public VifCodeCmd Cmd
{
get
{
return (VifCodeCmd)(byte)(Value >> 24);
}
}
public VifCodeCmd CmdWithoutInterrupt
{
get
{
return Cmd & ~VifCodeCmd.Interrupt;
}
}
public byte Num
{
get
{
return (byte)(Value >> 16);
}
}
public ushort Immediate
{
get
{
return (ushort)Value;
}
}
public bool IsUnpack => (Cmd & VifCodeCmd.Unpack) == VifCodeCmd.Unpack;
}
}