Skip to content

Document EnInsect - #1861

Open
Ozero4 wants to merge 2 commits into
zeldaret:mainfrom
Ozero4:main
Open

Document EnInsect#1861
Ozero4 wants to merge 2 commits into
zeldaret:mainfrom
Ozero4:main

Conversation

@Ozero4

@Ozero4 Ozero4 commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Documentation based on Oot

@Dragorn421

Copy link
Copy Markdown
Contributor

Hi!

We are trying to keep the contributions covered by the CC0 license, could you review louist103/mm-licensing#1 ?
Thanks!

(note: OoT's EnInsect is covered by CC0 based on its git history)

Comment thread src/overlays/actors/ovl_En_Insect/z_en_insect.c Outdated
@AngheloAlf AngheloAlf added documentation Improvements or additions to documentation Overlay Needs-second-approval Second approval labels Apr 15, 2026

@hensldm hensldm 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.

Sorry its taken so long. Looks good, though I did have some suggestions.


void func_8091ACC4(EnInsect* this, PlayState* play) {
void EnInsect_SlowDown(EnInsect* this, PlayState* play) {
f32 temp_f2;

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.

Suggested change
f32 temp_f2;
f32 playSpeed;

Seems to make sense.

Comment on lines 186 to 193
temp_f2 = (Rand_ZeroOne() * 0.8f) + (this->actor.speed * 1.2f);
if (temp_f2 < 0.0f) {
this->skelAnime.playSpeed = 0.0f;
} else {
f32 clamped = CLAMP_MAX(temp_f2, 1.9f);

this->skelAnime.playSpeed = clamped;
}

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.

Suggested change
temp_f2 = (Rand_ZeroOne() * 0.8f) + (this->actor.speed * 1.2f);
this->skelAnime.playSpeed = CLAMP(temp_f2, 0.0f, 1.9f);

This also matches.

void func_8091AE5C(EnInsect* this, PlayState* play) {
void EnInsect_Crawl(EnInsect* this, PlayState* play) {
s32 pad;
f32 temp_f0;

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.

Suggested change
f32 temp_f0;
f32 playSpeed;

Again seems like a good name.

void func_8091B07C(EnInsect* this, PlayState* play) {
void EnInsect_RunFromPlayer(EnInsect* this, PlayState* play) {
s32 pad;
f32 speed;

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.

Suggested change
f32 speed;
f32 playSpeed;

To match the other instances I've suggested.


Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.1f, 0.5f, 0.0f);
Math_StepToS(&this->actor.shape.rot.x, 0x2AAA, 0x160);
Math_StepToS(&this->actor.shape.rot.x, 10922, 352);

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.

Suggested change
Math_StepToS(&this->actor.shape.rot.x, 10922, 352);
Math_StepToS(&this->actor.shape.rot.x, 0x2AAA, 0x160);

Rotation so should stay in hex.

};

Vec3f D_8091BDCC = { 0.0f, 0.0f, 0.0f };
static Vec3f accel = { 0.0f, 0.0f, 0.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.

Suggested change
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
static Vec3f sAccel = { 0.0f, 0.0f, 0.0f };

Static variable so should be prefixed with an s

void EnInsect_WalkOnWater(EnInsect* this, PlayState* play) {
s32 pad[2];
s16 temp;
Vec3f sp40;

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.

Suggested change
Vec3f sp40;
Vec3f ripplePos;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Needs-second-approval Second approval Overlay

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants