Misc Cleanup (#1509)

* begin anim R

* sTexturesDesegmented

* more misc docs

* more misc cleanup

* small adjustments

* oh sneaky

* PR Review

* adj comment, reads better

* missed an enum

* this one actor reverses true/false

* bool

* CARNIVOROUS_LILY
This commit is contained in:
engineer124
2023-11-28 01:54:11 +11:00
committed by GitHub
parent 5284302c8f
commit 55badb7162
117 changed files with 946 additions and 881 deletions
+2 -2
View File
@@ -2041,10 +2041,10 @@ s32 Camera_Normal1(Camera* camera) {
spD8.y -= focalActorHeight + roData->unk_00;
spC4 = Camera_Vec3fMagnitude(&spD8);
if ((roData->unk_04 + roData->unk_08) < spC4) {
if (spC4 > (roData->unk_04 + roData->unk_08)) {
spC4 = 1.0f;
} else {
spC4 = spC4 / (roData->unk_04 + roData->unk_08);
spC4 /= roData->unk_04 + roData->unk_08;
}
spD0 = 0.2f;
+5 -5
View File
@@ -329,7 +329,7 @@ void func_800A640C(EnItem00* this, PlayState* play) {
if ((this->actor.params <= ITEM00_RUPEE_RED) ||
((this->actor.params == ITEM00_RECOVERY_HEART) && (this->unk152 < 0)) ||
(this->actor.params == ITEM00_HEART_PIECE) || (this->actor.params == ITEM00_HEART_CONTAINER)) {
this->actor.shape.rot.y = this->actor.shape.rot.y + 960;
this->actor.shape.rot.y += 0x3C0;
} else if ((this->actor.params >= ITEM00_SHIELD_HERO) && (this->actor.params != ITEM00_DEKU_NUTS_10) &&
(this->actor.params < ITEM00_BOMBS_0)) {
if (this->unk152 == -1) {
@@ -343,7 +343,7 @@ void func_800A640C(EnItem00* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.world.rot.x, 0, 2, 2500, 500);
} else if ((this->actor.params == ITEM00_MAP) || (this->actor.params == ITEM00_COMPASS)) {
this->unk152 = -1;
this->actor.shape.rot.y = this->actor.shape.rot.y + 960;
this->actor.shape.rot.y += 0x3C0;
}
if ((this->actor.params == ITEM00_HEART_PIECE) || (this->actor.params == ITEM00_HEART_CONTAINER)) {
@@ -381,7 +381,7 @@ void func_800A6650(EnItem00* this, PlayState* play) {
Vec3f pos;
if (this->actor.params <= ITEM00_RUPEE_RED) {
this->actor.shape.rot.y = this->actor.shape.rot.y + 960;
this->actor.shape.rot.y += 0x3C0;
}
if ((play->gameplayFrames & 1) != 0) {
@@ -395,7 +395,7 @@ void func_800A6650(EnItem00* this, PlayState* play) {
if (this->actor.velocity.y > -2.0f) {
this->actionFunc = func_800A640C;
} else {
this->actor.velocity.y = this->actor.velocity.y * -0.8f;
this->actor.velocity.y *= -0.8f;
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
}
}
@@ -1430,7 +1430,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f;
Actor_SetScale(&spawnedActor->actor, 0.0f);
spawnedActor->actionFunc = func_800A6780;
spawnedActor->actor.flags = spawnedActor->actor.flags | ACTOR_FLAG_10;
spawnedActor->actor.flags |= ACTOR_FLAG_10;
if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) &&
(spawnedActor->actor.params != ITEM00_HEART_PIECE) &&
(spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) {
+1 -1
View File
@@ -690,7 +690,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 arg2) {
envCtx->lightBlendRateOverride = LIGHT_BLENDRATE_OVERRIDE_NONE;
R_TIME_SPEED = envCtx->sceneTimeSpeed = 0;
R_TIME_SPEED = R_TIME_SPEED;
R_TIME_SPEED = R_TIME_SPEED; // Set to itself
R_ENV_DISABLE_DBG = false;
CREG(64) = 0;
+4 -4
View File
@@ -691,10 +691,10 @@ f32 Math_Vec3f_StepTo(Vec3f* start, Vec3f* target, f32 speed) {
f0 = Math3D_Vec3fMagnitude(&diff);
if (speed < f0) {
f2 = speed / f0;
f0 = f0 - speed;
start->x = start->x + f2 * diff.x;
start->y = start->y + f2 * diff.y;
start->z = start->z + f2 * diff.z;
f0 -= speed;
start->x += f2 * diff.x;
start->y += f2 * diff.y;
start->z += f2 * diff.z;
} else {
Math_Vec3f_Copy(start, target);
f0 = 0.0f;
+1 -1
View File
@@ -2284,7 +2284,7 @@ void Message_Decode(PlayState* play) {
} else if (curChar == 0x203) {
msgCtx->unk11F18 = 1;
msgCtx->choiceNum = 3;
msgCtx->unk11FF8 = msgCtx->unk11FF8 + 0x16;
msgCtx->unk11FF8 += 0x16;
} else if (curChar == 0x204) {
Message_GetTimerDigits(((void)0, gSaveContext.timerCurTimes[curChar - 0x204]), spAC);
+1 -1
View File
@@ -1098,7 +1098,7 @@ void Message_DecodeNES(PlayState* play) {
} else if (curChar == 0xC3) {
msgCtx->unk11F18 = 0;
msgCtx->choiceNum = 3;
msgCtx->unk11FF8 = msgCtx->unk11FF8 + 0x16;
msgCtx->unk11FF8 += 0x16;
} else if (curChar == 0xC4) {
Message_GetTimerDigitsNES(((void)0, gSaveContext.timerCurTimes[curChar - 0xC4]), spA8);
+1 -1
View File
@@ -3177,7 +3177,7 @@ void func_80127DA4(PlayState* play, struct_801F58B0 arg1[], struct_80128388_arg1
if (play->actorCtx.flags & ACTORCTX_FLAG_3) {
phi_s1->unk_0C.y = CLAMP(phi_s1->unk_0C.y, -0.8f, 0.8f);
} else {
phi_s1->unk_0C.y = phi_s1->unk_0C.y;
phi_s1->unk_0C.y = phi_s1->unk_0C.y; // Set to itself
f20 = Math_SinS(arg1->unk_1A);
phi_s1->unk_0C.y += (((f22 * Math_CosS(arg1->unk_1A)) + (f24 * f20)) * 0.2f);
phi_s1->unk_0C.y = CLAMP(phi_s1->unk_0C.y, -2.0f, 4.0f);
+2 -1
View File
@@ -569,7 +569,7 @@ s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex) {
if (index == 0) {
diffX = points[1].x - points[0].x;
diffZ = points[1].z - points[0].z;
} else if (index == count - 1) {
} else if (index == (count - 1)) {
diffX = points[count - 1].x - points[count - 2].x;
diffZ = points[count - 1].z - points[count - 2].z;
} else {
@@ -578,6 +578,7 @@ s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex) {
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * actor->world.pos.x) + (pz * actor->world.pos.z) + d) > 0.0f) {
reached = true;
}