Skip to content

Note is Matching - #74

Merged
Fl-ppie merged 4 commits into
SMGCommunity:mainfrom
not-aoyama:Note
Nov 29, 2026
Merged

Fl-ppie merged 4 commits into
SMGCommunity:mainfrom
not-aoyama:Note

Conversation

@not-aoyama

Copy link
Copy Markdown
Contributor

No description provided.

@decomp-dev

decomp-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Report for SB4E01 (adc8832 - f8061f0)

📈 Matched code: 20.99% (+0.03%, +1952 bytes)
📈 Linked code: 3.22% (+0.03%, +1952 bytes)
📈 Matched data: 11.38% (+0.02%, +308 bytes)
📈 Linked data: 2.66% (+0.02%, +340 bytes)

✅ 27 new matches
Unit Item Bytes Before After
main/Game/MapObj/Note Note::init(const JMapInfoIter&) +372 0.00% 100.00%
main/Game/MapObj/Note .data +264 0.00% 100.00%
main/Game/MapObj/Note Note::exeWait() +168 0.00% 100.00%
main/Game/MapObj/Note Note::exeFlyUp() +160 0.00% 100.00%
main/Game/MapObj/Note Note::calcAndSetBaseMtx() +156 0.00% 100.00%
main/Game/MapObj/Note Note::exeCountDown() +152 0.00% 100.00%
main/Game/MapObj/Note Note::attackSensor(HitSensor*, HitSensor*) +144 0.00% 100.00%
main/Game/MapObj/Note Note::Note(const char*, const JGeometry::TVec3<float>&, NoteFairy*) +132 0.00% 100.00%
main/Game/MapObj/Note Note::appear() +104 0.00% 100.00%
main/Game/MapObj/Note NoteGroup::movement() +100 0.00% 100.00%
main/Game/MapObj/Note Note::~Note() +92 0.00% 100.00%
main/Game/MapObj/Note NoteGroup::~NoteGroup() +92 0.00% 100.00%
main/Game/MapObj/Note NoteGroup::NoteGroup() +80 0.00% 100.00%
main/Game/MapObj/Note Note::control() +60 0.00% 100.00%
main/Game/MapObj/Note __sinit_\Note_cpp +52 0.00% 100.00%
main/Game/MapObj/Note .rodata +16 0.00% 100.00%
main/Game/MapObj/Note .sbss +16 0.00% 100.00%
main/Game/MapObj/Note NrvNote::NoteNrvWait::NoteNrvWait() +16 0.00% 100.00%
main/Game/MapObj/Note NrvNote::NoteNrvCountDown::NoteNrvCountDown() +16 0.00% 100.00%
main/Game/MapObj/Note NrvNote::NoteNrvFlyUp::NoteNrvFlyUp() +16 0.00% 100.00%
main/Game/MapObj/Note Note::startCountDown() +12 0.00% 100.00%
main/Game/MapObj/Note .sdata +8 0.00% 100.00%
main/Game/MapObj/Note NrvNote::NoteNrvFlyUp::execute(Spine*) const +8 0.00% 100.00%
main/Game/MapObj/Note NrvNote::NoteNrvCountDown::execute(Spine*) const +8 0.00% 100.00%
main/Game/MapObj/Note NrvNote::NoteNrvWait::execute(Spine*) const +8 0.00% 100.00%
main/Game/MapObj/Note .ctors +4 0.00% 100.00%
main/Game/MapObj/Note NoteGroup::init(const JMapInfoIter&) +4 0.00% 100.00%
📈 1 improvement in an unmatched item
Unit Item Bytes Before After
main/Game/MapObj/Note .sdata2 +19 0.00% 61.54%

Comment thread src/Game/MapObj/Note.cpp Resolved
Comment thread src/Game/MapObj/Note.cpp Resolved
Comment thread src/Game/MapObj/Note.cpp Resolved
Comment thread src/Game/MapObj/Note.cpp Resolved
@Fl-ppie

Fl-ppie commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

You should add some newlines in functions to make them more readable instead of bunching them all up.

@not-aoyama

Copy link
Copy Markdown
Contributor Author

I'm not sure which of the functions need newlines or where I should put those newlines. How do I tell where to separate the lines of code?

@Fl-ppie

Fl-ppie commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

You group lines of code that are relevant to each other, as an example:

void Note::init(const JMapInfoIter& rIter) {
    MR::createSceneObj(SceneObj_NoteGroup);

    mStartPosition.set(mPosition);

    MR::initActor(this, "Note", false);
    MR::connectToSceneNoSilhouettedMapObjStrongLight(this);

    initHitSensor(1);
    MR::addHitSensorMapObj(this, "Body", 8, ::sBodySensorRadius, TVec3f(0.0f, 0.0f, 0.0f));

    initEffectKeeper(0, nullptr, false);
    initSound(4, "Note");
    initNerve(GET_NERVE(Note, NoteNrvWait));

    mFlashCtrl = new FlashingCtrl(this, true);

    MR::calcGravityAndDropShadowVector(this, &mGravity, nullptr, 0);
    if (MR::isNearZero(mGravity)) {
        mGravity.set(0.0f, -1.0f, 0.0f);
    }

    MR::initShadowVolumeSphere(this, ::sShadowRadius);

    MR::turnVecToPlane(&mRailDirection, mRailDirection, mGravity);

    MR::invalidateClipping(this);

    makeActorDead();
}

Is probably how I would write init although its not a great example since not a lot of the code is connected with each other, but it helps with the readability.

@Fl-ppie
Fl-ppie merged commit 622823b into SMGCommunity:main Nov 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants