Skip to content

Related to Kameck - #2024

Open
aba4gamer wants to merge 6 commits into
SMGCommunity:masterfrom
aba4gamer:Kameck
Open

Related to Kameck#2024
aba4gamer wants to merge 6 commits into
SMGCommunity:masterfrom
aba4gamer:Kameck

Conversation

@aba4gamer

Copy link
Copy Markdown
Contributor

No description provided.

@decomp-dev

decomp-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown

Report for RMGK01 (fa77cd4 - 7ffdc37)

📈 Matched code: 71.66% (+0.11%, +5780 bytes)
📈 Matched data: 32.85% (+0.01%, +120 bytes)

✅ 71 new matches
Unit Item Bytes Before After
main/Game/Enemy/KameckBeam KameckBeam::tryChangeFire() +388 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::attackSensor(HitSensor*, HitSensor*) +292 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::attackSensor(HitSensor*, HitSensor*) +236 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::requestFollowWand(float(*)[4], float) +216 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::exeFire() +204 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::requestStorm(HitSensor*, HitSensor*) +200 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::resetBeam() +192 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::requestShootToPlayerGround(float) +172 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::tryShootEnd() +168 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::requestShootToPlayerCenter(float) +164 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::appearDirection(const JGeometry::TVec3<float>&) +164 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::exeWait() +164 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::KameckBeam(const char*) +160 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::requestShoot(const JGeometry::TVec3<float>&, float) +156 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::appearJetTurtle(bool) +156 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::receiveOtherMsg(unsigned long, HitSensor*, HitSensor*) +144 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::tryChangeTurtle() +144 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeamCollisionFilter::isInvalidParts(const CollisionParts*) const +136 0.00% 100.00%
main/Game/Enemy/KameckHolder KameckHolder::startDemoAppear() +116 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::KameckTurtle(const char*) +116 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::makeActorAppeared() +112 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::exeJetTurtle() +108 0.00% 100.00%
main/Game/Enemy/KameckHolder KameckHolder::deadForceAll() +108 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::receiveOtherMsg(unsigned long, HitSensor*, HitSensor*) +108 0.00% 100.00%
main/Game/Enemy/KameckBeam KameckBeam::~KameckBeam() +92 0.00% 100.00%
main/Game/Enemy/KameckHolder DeriveActorGroup<Kameck>::~DeriveActorGroup() +92 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::initJetTurtle() +92 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::receiveMsgPlayerAttack(unsigned long, HitSensor*, HitSensor*) +92 0.00% 100.00%
main/Game/Enemy/KameckTurtle KameckTurtle::~KameckTurtle() +92 0.00% 100.00%
main/Game/Enemy/KameckHolder KameckHolder::endDemoAppear() +88 0.00% 100.00%

...and 41 more new matches

📈 10 improvements in unmatched items
Unit Item Bytes Before After
main/Game/Enemy/KameckTurtle KameckTurtle::exeRun() +567 0.00% 99.96%
main/Game/Enemy/KameckBeam KameckBeam::init(const JMapInfoIter&) +379 0.00% 99.94%
main/Game/Enemy/KameckTurtle KameckTurtle::init(const JMapInfoIter&) +293 0.00% 99.19%
main/Game/Enemy/KameckBeam .data +244 0.00% 46.28%
main/Game/Enemy/KameckBeam KameckBeam::exeShoot() +231 0.00% 99.93%
main/Game/Enemy/KameckBeam KameckBeam::exeExplosion() +211 0.00% 99.94%
main/Game/Enemy/KameckTurtle .data +154 0.00% 50.67%
main/Game/Enemy/KameckHolder .data +41 0.00% 74.29%
main/Game/Enemy/KameckBeam .rodata +21 0.00% 91.43%
main/Game/Enemy/KameckBeam .sbss2 +8 0.00% 50.00%

@ThatNintendoNerd ThatNintendoNerd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

First pass of review comments.

Comment thread include/Game/Enemy/Kameck.hpp Outdated
Comment thread include/Game/Enemy/KameckBeam.hpp Outdated
Comment thread include/Game/Enemy/KameckBeam.hpp Outdated
Comment thread src/Game/Enemy/Kameck.cpp Outdated
Comment thread src/Game/Enemy/Kameck.cpp Outdated
Comment thread src/Game/Enemy/KameckBeam.cpp Outdated
Comment thread src/Game/Enemy/KameckBeam.cpp Outdated
Comment thread src/Game/Enemy/KameckBeam.cpp Outdated
Comment thread src/Game/Enemy/KameckBeam.cpp Outdated
Comment thread include/Game/Enemy/KameckBeam.hpp Outdated

@ThatNintendoNerd ThatNintendoNerd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please make an effort to employ the constants in your changes, not just add them in uncommented. Obviously, constants with not enough context clues can be left uncommented, but various timing ones are typically easy to insert.

Comment thread src/Game/Enemy/Kameck.cpp
MR::createKameckBeamHolder();
switch (mBeamType) {
case BeamType_None:
case 0:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Restore BeamType_None to your enumerated type and use it here (and anywhere else a mBeamType value of 0 is checked).

#pragma once

#include "Game/LiveActor/LiveActor.hpp"
#include "Game/Enemy/Kameck.hpp"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be kept to LiveActor.hpp and forward declare necessary classes from Kameck.hpp instead.

Comment thread src/Game/Enemy/Kameck.cpp
MR::blendQuatUpFront(&_A0, -mGravity, _B0, 0.04f, 0.2f);
_90->removeDeadActor();
mAnimScaleController->updateNerve();
MR::blendQuatUpFront(&_A0, -mGravity, _B0, ::sUpVecBlendRate, ::sFrontVecBlendRate);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

_B0 could be named mFrontVec.

Comment thread src/Game/Enemy/Kameck.cpp
// const f32 sDefaultActiveDistance =
const f32 sFrontVecBlendRate = 0.2f;
const f32 sUpVecBlendRate = 0.04f;
// const f32 sTurnPlayerLimit =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems like uses of 0.98f imply this constant.

}; // namespace NrvKameckBeam

KameckBeam::KameckBeam(const char* pName)
: LiveActor(pName), mEventListener(nullptr), mKameckTurtle(), _A0(), _A4(0, 0, 1), mWandLocalPosition(0, 0, 0), mBeamKind(BeamType_FireBall1) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

mEventListener can be default-initialized accordingly with an empty pair of parentheses.

easeInOut = 1.0f - MR::calcNerveEaseInOutRate(this, 200, 400);
}
MR::addVelocityMoveToDirection(this, _B0, 0.5f * easeInOut);
MR::rotateDirectionGravityDegree(this, &_A4, -25.0f * easeInOut);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

::sRunSpinDegree?

if (!isNerve(&NrvKameckTurtle::KameckTurtleNrvRun::sInstance)) {
return false;
}
if (MR::isLessStep(this, 300)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

::sEnableAttackTime?

if (!MR::normalizeOrZero(&dir)) {
_B0.set(dir);
}
MR::addVelocityJump(this, 15.0f);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

::sRunSpeed?

MR::addVelocityToGravity(this, 0.7f);
}
f32 easeInOut = 1.0f;
if (MR::isGreaterStep(this, 200)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

::sDeccelStartTime ?

MR::startLevelSound(this, "SE_EM_LV_TURTLE_SLIDE");
}
if (!MR::isBindedGround(this)) {
MR::addVelocityToGravity(this, 0.7f);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

::sRunGravity?

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.

2 participants