Add mesh reading and conversion support
This commit is contained in:
parent
65dc96c4d6
commit
aa1277a4e1
25 changed files with 2212 additions and 9 deletions
53
LibDgf/Ps2/Vif/VifCode.cs
Normal file
53
LibDgf/Ps2/Vif/VifCode.cs
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue