MCPcopy Create free account
hub / github.com/doldecomp/mkdd / calcAffect

Method calcAffect

libs/JSystem/JParticle/JPAFieldBlock.cpp:8–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "types.h"
7
8void JPAFieldBase::calcAffect(JPAFieldBlock *block, JPABaseParticle *particle)
9{
10 JGeometry::TVec3f vec = _04;
11 if (!particle->checkStatus(0x4) && block->checkStatus(0x8 | 0x30 | 0x40)) {
12 vec.scale(calcFadeAffect(block, particle->mTime));
13 }
14
15 switch (block->getAddType()) {
16 case 0:
17 particle->mVelType0.add(vec);
18 break;
19 case 1:
20 particle->mVelType1.add(vec);
21 break;
22 case 2:
23 particle->mVelType2.add(vec);
24 break;
25 }
26}
27
28f32 JPAFieldBase::calcFadeAffect(JPAFieldBlock *block, f32 time) const
29{

Callers

nothing calls this directly

Calls 4

getAddTypeMethod · 0.80
checkStatusMethod · 0.45
scaleMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected