Document EnInsect - #1861
Conversation
|
Hi! We are trying to keep the contributions covered by the CC0 license, could you review louist103/mm-licensing#1 ? (note: OoT's EnInsect is covered by CC0 based on its git history) |
hensldm
left a comment
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
| f32 temp_f2; | |
| f32 playSpeed; |
Seems to make sense.
| 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; | ||
| } |
There was a problem hiding this comment.
| 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; |
There was a problem hiding this comment.
| 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; |
There was a problem hiding this comment.
| 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); |
There was a problem hiding this comment.
| 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 }; |
There was a problem hiding this comment.
| 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; |
There was a problem hiding this comment.
| Vec3f sp40; | |
| Vec3f ripplePos; |
Documentation based on Oot