Skip to content

Library/Effect: Implement EffectSystemInfo#1069

Open
guymakinggames wants to merge 1 commit intoMonsterDruide1:masterfrom
guymakinggames:EffectSystemInfo
Open

Library/Effect: Implement EffectSystemInfo#1069
guymakinggames wants to merge 1 commit intoMonsterDruide1:masterfrom
guymakinggames:EffectSystemInfo

Conversation

@guymakinggames
Copy link
Copy Markdown
Contributor

@guymakinggames guymakinggames commented Apr 19, 2026

This change is Reviewable


Report for 1.0 (8f46da6 - 5890522)

📈 Matched code: 14.21% (+0.01%, +1648 bytes)

✅ 31 new matches
Unit Item Bytes Before After
Library/Effect/EffectSystemInfo al::setEffectParticleDirectionalVel(al::IUseEffectKeeper*, char const*, float) +144 0.00% 100.00%
Library/Effect/EffectSystemInfo al::trySetEffectNamedMtxPtr(al::IUseEffectKeeper*, char const*, sead::Matrix34<float> const*) +128 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectNamedMtxPtr(al::IUseEffectKeeper*, char const*, sead::Matrix34<float> const*) +92 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectEmitRatio(al::IUseEffectKeeper*, char const*, float) +60 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectParticleScale(al::IUseEffectKeeper*, char const*, float) +60 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectParticleAlpha(al::IUseEffectKeeper*, char const*, float) +60 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setParticleLifeScale(al::IUseEffectKeeper*, char const*, float) +60 0.00% 100.00%
Library/Effect/EffectSystemInfo al::updateEffectMaterialWet(al::IUseEffectKeeper*, bool) +60 0.00% 100.00%
Library/Effect/EffectSystemInfo al::updateEffectMaterialPuddle(al::IUseEffectKeeper*, bool) +60 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectFollowPosPtr(al::IUseEffectKeeper*, char const*, sead::Vector3<float> const*) +56 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectFollowMtxPtr(al::IUseEffectKeeper*, char const*, sead::Matrix34<float> const*) +56 0.00% 100.00%
Library/Effect/EffectSystemInfo al::updateEffectMaterialWater(al::IUseEffectKeeper*, bool) +56 0.00% 100.00%
Library/Effect/EffectSystemInfo al::emitEffect(al::IUseEffectKeeper*, char const*, sead::Vector3<float> const*) +52 0.00% 100.00%
Library/Effect/EffectSystemInfo al::tryEmitEffect(al::IUseEffectKeeper*, char const*, sead::Vector3<float> const*) +52 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectAllScale(al::IUseEffectKeeper*, char const*, sead::Vector3<float> const&) +52 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectEmitterVolumeScale(al::IUseEffectKeeper*, char const*, sead::Vector3<float> const&) +52 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectParticleScale(al::IUseEffectKeeper*, char const*, sead::Vector3<float> const&) +52 0.00% 100.00%
Library/Effect/EffectSystemInfo al::setEffectParticleColor(al::IUseEffectKeeper*, char const*, sead::Color4f const&) +52 0.00% 100.00%
Library/Effect/EffectSystemInfo al::isEffectEmitting(al::IUseEffectKeeper const*, char const*) +48 0.00% 100.00%
Library/Effect/EffectSystemInfo al::emitEffectCurrentPos(al::IUseEffectKeeper*, char const*) +44 0.00% 100.00%
Library/Effect/EffectSystemInfo al::deleteEffect(al::IUseEffectKeeper*, char const*) +44 0.00% 100.00%
Library/Effect/EffectSystemInfo al::tryDeleteEffect(al::IUseEffectKeeper*, char const*) +44 0.00% 100.00%
Library/Effect/EffectSystemInfo al::forceSetStopCalcAndDraw(al::IUseEffectKeeper*, bool) +44 0.00% 100.00%
Library/Effect/EffectSystemInfo al::tryUpdateEffectMaterialCode(al::IUseEffectKeeper*, char const*) +44 0.00% 100.00%
Library/Effect/EffectSystemInfo al::resetEffectMaterialCode(al::IUseEffectKeeper*) +36 0.00% 100.00%
Library/Effect/EffectSystemInfo al::deleteEffectAll(al::IUseEffectKeeper*) +28 0.00% 100.00%
Library/Effect/EffectSystemInfo al::tryKillEmitterAndParticleAll(al::IUseEffectKeeper*) +28 0.00% 100.00%
Library/Effect/EffectSystemInfo al::onCalcAndDrawEffect(al::IUseEffectKeeper*) +28 0.00% 100.00%
Library/Effect/EffectSystemInfo al::offCalcAndDrawEffect(al::IUseEffectKeeper*) +28 0.00% 100.00%
Library/Effect/EffectSystemInfo al::EffectSystemInfo::EffectSystemInfo() +16 0.00% 100.00%

...and 1 more new matches

@github-actions github-actions bot added the status:waiting for review This PR is ready to take the first or another look at it! label Apr 19, 2026
Copy link
Copy Markdown
Contributor

@german77 german77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@german77 reviewed 5 files and made 7 comments.
Reviewable status: 5 of 9 files reviewed, 7 unresolved discussions (waiting on guymakinggames).


lib/al/Library/Effect/EffectSystemInfo.cpp line 11 at r1 (raw file):

namespace al {
EffectSystemInfo::EffectSystemInfo() : _0(0), mPtclSystem(nullptr), _10(nullptr), _18(0) {}

Move members initialization to the header

Suggestion:

EffectSystemInfo::EffectSystemInfo() = default;

lib/al/Library/Effect/EffectSystemInfo.cpp line 111 at r1 (raw file):

                handle->GetEmitterSet()->directionalVel = directionalVel;
        }
    }

bound checks are generated automatically

Suggestion:

    for (s32 i = 0; i < emitterCount; i++) {
        nn::vfx::Handle* handle = effect->getEmitters()[i]->getHandle();

        if (handle->isValid())
            handle->GetEmitterSet()->directionalVel = directionalVel;
    }

lib/al/Library/Effect/PtclSystem.h line 12 at r1 (raw file):

class EffectSystem;

class PtclSystem {

Suggestion:

class PtclSystem : public sead::ptcl::PtclSystem {

lib/al/Library/Model/JointMtxPtr.h line 9 at r1 (raw file):

template <typename T>
class Matrix43;
using Matrix43f = Matrix43<f32>;

No need for forward reference matrix types. You added the header


lib/al/Library/Model/JointMtxPtr.h line 23 at r1 (raw file):

private:
    const void* mMtxPtr;

Suggestion:

    const sead::Matrix34f* mMtxPtr;

lib/al/Project/Effect/Effect.h line 9 at r1 (raw file):

#include "Library/Model/JointMtxPtr.h"
#include "Project/Effect/EffectEmitter.h"

You can forward reference this one

Code quote:

#include "Project/Effect/EffectEmitter.h"

lib/al/Project/Effect/EffectEmitter.h line 8 at r1 (raw file):

#include "Library/Model/JointMtxPtr.h"

namespace nn::vfx {

nn stuff should be defined in lib/NintendoSDK

@github-actions github-actions bot added status:waiting for author Reviews have shown that the author of this PR needs to change some things. and removed status:waiting for review This PR is ready to take the first or another look at it! labels Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:waiting for author Reviews have shown that the author of this PR needs to change some things.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants