2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 08:27:42 +00:00

Particle/C*EPulse: Fix implementations

This commit is contained in:
2020-04-12 05:31:00 -04:00
parent 3c9fef492a
commit 5e748a0d7f
5 changed files with 42 additions and 45 deletions

View File

@@ -123,17 +123,16 @@ bool CCEPulse::GetValue(int frame, zeus::CColor& valOut) const {
int a, b;
x4_aDuration->GetValue(frame, a);
x8_bDuration->GetValue(frame, b);
int cv = zeus::max(1, a + b + 1);
int cv = a + b + 1;
if (cv < 0) {
cv = 1;
}
if (b >= 1) {
int cv2 = frame % cv;
if (cv2 >= a)
x10_bVal->GetValue(frame, valOut);
else
xc_aVal->GetValue(frame, valOut);
} else
if (b < 1 || frame % cv <= a) {
xc_aVal->GetValue(frame, valOut);
} else {
x10_bVal->GetValue(frame, valOut);
}
return false;
}