CPU/PGXP: Don't force inputs to valid on add/sub

This commit is contained in:
Stenzek
2024-07-08 17:00:04 +10:00
parent f5cc70923b
commit b6f7420018
2 changed files with 41 additions and 50 deletions

View File

@ -65,6 +65,14 @@ struct PGXP_value
}
ALWAYS_INLINE bool HasValid(u32 comp) const { return ConvertToBoolUnchecked((flags >> comp) & 1); }
ALWAYS_INLINE float GetValidX(u32 psxval) const
{
return (flags & 1) ? x : static_cast<float>(static_cast<s16>(psxval));
}
ALWAYS_INLINE float GetValidY(u32 psxval) const
{
return (flags & 2) ? y : static_cast<float>(static_cast<s16>(psxval >> 16));
}
};
struct State