Common: Refactor CDImage class to support multiple tracks/indices

This commit is contained in:
Connor McLaughlin
2019-10-18 18:18:04 +10:00
parent 52c16deba6
commit 513bbe44f3
10 changed files with 548 additions and 123 deletions

View File

@ -145,12 +145,12 @@ constexpr u32 Truncate32(TValue value)
}
// BCD helpers
inline u8 DecimalToBCD(u8 value)
constexpr u8 DecimalToBCD(u8 value)
{
return ((value / 10) << 4) + (value % 10);
}
inline u8 BCDToDecimal(u8 value)
constexpr u8 BCDToDecimal(u8 value)
{
return ((value >> 4) * 10) + (value % 16);
}