mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:47:43 +00:00
CIntElement: Add class to handle RTOI int elements
Within the int element handling code, there seems to be a missing implementation (with the FourCC 'RTOI'), which seems to take two 32-bit floating point values, multiplies them, then converts the result to a 32-bit integer.
This commit is contained in:
@@ -284,4 +284,20 @@ int CIESubtract::GetMaxValue() const {
|
||||
return a - b;
|
||||
}
|
||||
|
||||
bool CIERealToInt::GetValue(int frame, int& valOut) const {
|
||||
float a = 0.0f;
|
||||
float b = 1.0f;
|
||||
|
||||
x8_b->GetValue(frame, b);
|
||||
x4_a->GetValue(frame, a);
|
||||
|
||||
valOut = static_cast<int>(a * b);
|
||||
return false;
|
||||
}
|
||||
|
||||
int CIERealToInt::GetMaxValue() const {
|
||||
// TODO: Implement
|
||||
return 1;
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user