diff --git a/assets/xml/textures/item_name_static.xml b/assets/xml/textures/item_name_static.xml
index 00c497490f..adf66fcb9b 100644
--- a/assets/xml/textures/item_name_static.xml
+++ b/assets/xml/textures/item_name_static.xml
@@ -12,7 +12,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
@@ -135,7 +135,7 @@
-
+
diff --git a/include/z64collision_check.h b/include/z64collision_check.h
index 383bbbc009..b0b6879d93 100644
--- a/include/z64collision_check.h
+++ b/include/z64collision_check.h
@@ -231,16 +231,16 @@ typedef struct {
} OcLine; // size = 0x1C
typedef enum {
- /* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
- /* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
- /* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
- /* 3 */ COLTYPE_HIT3, // No blood, white hitmark
- /* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
- /* 5 */ COLTYPE_HIT5, // No blood, red hitmark
- /* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
- /* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
- /* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
- /* 9 */ COLTYPE_METAL,
+ /* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
+ /* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
+ /* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
+ /* 3 */ COLTYPE_HIT3, // No blood, white hitmark
+ /* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
+ /* 5 */ COLTYPE_HIT5, // No blood, red hitmark
+ /* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
+ /* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
+ /* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
+ /* 9 */ COLTYPE_METAL,
/* 10 */ COLTYPE_NONE,
/* 11 */ COLTYPE_WOOD,
/* 12 */ COLTYPE_HARD,
diff --git a/include/z64environment.h b/include/z64environment.h
index 1aa5d7490e..af77159e4c 100644
--- a/include/z64environment.h
+++ b/include/z64environment.h
@@ -95,16 +95,16 @@ typedef enum {
} StormState;
typedef enum {
- /* 0x00 */ TIMESEQ_DAY_BGM,
- /* 0x01 */ TIMESEQ_FADE_DAY_BGM,
- /* 0x02 */ TIMESEQ_NIGHT_BEGIN_SFX,
- /* 0x03 */ TIMESEQ_EARLY_NIGHT_CRITTERS,
- /* 0x04 */ TIMESEQ_NIGHT_DELAY,
- /* 0x05 */ TIMESEQ_NIGHT_CRITTERS,
- /* 0x06 */ TIMESEQ_DAY_BEGIN_SFX,
- /* 0x07 */ TIMESEQ_MORNING_CRITTERS,
- /* 0x08 */ TIMESEQ_DAY_DELAY,
- /* 0xFF */ TIMESEQ_DISABLED = 0xFF
+ /* 0x00 */ TIMESEQ_DAY_BGM,
+ /* 0x01 */ TIMESEQ_FADE_DAY_BGM,
+ /* 0x02 */ TIMESEQ_NIGHT_BEGIN_SFX,
+ /* 0x03 */ TIMESEQ_EARLY_NIGHT_CRITTERS,
+ /* 0x04 */ TIMESEQ_NIGHT_DELAY,
+ /* 0x05 */ TIMESEQ_NIGHT_CRITTERS,
+ /* 0x06 */ TIMESEQ_DAY_BEGIN_SFX,
+ /* 0x07 */ TIMESEQ_MORNING_CRITTERS,
+ /* 0x08 */ TIMESEQ_DAY_DELAY,
+ /* 0xFF */ TIMESEQ_DISABLED = 0xFF
} TimeBasedSeqState;
typedef enum {
diff --git a/include/z64math.h b/include/z64math.h
index 083fedb96b..b4a128dfb3 100644
--- a/include/z64math.h
+++ b/include/z64math.h
@@ -111,9 +111,9 @@ typedef VecSphGeo VecGeo;
#define BINANG_TO_RAD_ALT2(binang) (((f32)(binang) * M_PI) / 0x8000)
// Vector macros
-#define SQXZ(vec) ((vec.x) * (vec.x) + (vec.z) * (vec.z))
-#define DOTXZ(vec1, vec2) ((vec1.x) * (vec2.x) + (vec1.z) * (vec2.z))
-#define SQXYZ(vec) ((vec.x) * (vec.x) + (vec.y) * (vec.y) + (vec.z) * (vec.z))
-#define DOTXYZ(vec1, vec2) ((vec1.x) * (vec2.x) + (vec1.y) * (vec2.y) + (vec1.z) * (vec2.z))
+#define SQXZ(vec) ((vec).x * (vec).x + (vec).z * (vec).z)
+#define DOTXZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).z * (vec2).z)
+#define SQXYZ(vec) ((vec).x * (vec).x + (vec).y * (vec).y + (vec).z * (vec).z)
+#define DOTXYZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).y * (vec2).y + (vec1).z * (vec2).z)
#endif
diff --git a/include/z64ocarina.h b/include/z64ocarina.h
index 7dc1a4b331..1dfb629f27 100644
--- a/include/z64ocarina.h
+++ b/include/z64ocarina.h
@@ -140,9 +140,9 @@ typedef enum {
} OcarinaInstrumentId;
typedef enum {
- /* 0 */ OCARINA_RECORD_OFF,
- /* 1 */ OCARINA_RECORD_SCARECROW_LONG,
- /* 2 */ OCARINA_RECORD_SCARECROW_SPAWN,
+ /* 0 */ OCARINA_RECORD_OFF,
+ /* 1 */ OCARINA_RECORD_SCARECROW_LONG,
+ /* 2 */ OCARINA_RECORD_SCARECROW_SPAWN,
/* 0xFF */ OCARINA_RECORD_REJECTED = 0xFF
} OcarinaRecordingState;
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index 7a9ab5d655..4c69f5889b 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -816,10 +816,10 @@ Vec3f* Camera_BGCheckCorner(Vec3f* dst, Vec3f* linePointA, Vec3f* linePointB, Ca
}
/**
- * Checks collision between at and eyeNext, if `checkEye` is set, if there is no collsion between
+ * Checks collision between at and eyeNext, if `checkEye` is set, if there is no collision between
* eyeNext->at, then eye->at is also checked.
* Returns:
- * 0 if no collsion is found between at->eyeNext
+ * 0 if no collision is found between at->eyeNext
* 2 if the angle between the polys is between 60 degrees and 120 degrees
* 3 ?
* 6 if the angle between the polys is greater than 120 degrees
@@ -2531,7 +2531,7 @@ s32 Camera_Jump2(Camera* camera) {
Camera_AddVecGeoToVec3f(&camBgChk.pos, at, &bgChkPara);
if (Camera_BGCheckInfo(camera, at, &camBgChk)) {
// Collision found between parallel at->eyeNext, set eye position to
- // first collsion point.
+ // first collision point.
*eye = bgChkPos;
} else {
// no collision found with the parallel at->eye, animate to be parallel
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index fd7069761f..6ac812d6bf 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -2648,8 +2648,8 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
f32 zDelta;
Actor* leftActor = left->actor;
Actor* rightActor = right->actor;
- s32 leftMassType;
s32 rightMassType;
+ s32 leftMassType;
left->ocFlags1 |= OC1_HIT;
left->oc = rightActor;
@@ -2666,8 +2666,8 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
if (leftActor == NULL || rightActor == NULL || left->ocFlags1 & OC1_NO_PUSH || right->ocFlags1 & OC1_NO_PUSH) {
return;
}
- rightMassType = CollisionCheck_GetMassType(leftActor->colChkInfo.mass);
- leftMassType = CollisionCheck_GetMassType(rightActor->colChkInfo.mass);
+ leftMassType = CollisionCheck_GetMassType(leftActor->colChkInfo.mass);
+ rightMassType = CollisionCheck_GetMassType(rightActor->colChkInfo.mass);
leftMass = leftActor->colChkInfo.mass;
rightMass = rightActor->colChkInfo.mass;
totalMass = leftMass + rightMass;
@@ -2679,30 +2679,30 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
zDelta = rightPos->z - leftPos->z;
xzDist = sqrtf(SQ(xDelta) + SQ(zDelta));
- if (rightMassType == MASSTYPE_IMMOVABLE) {
- if (leftMassType == MASSTYPE_IMMOVABLE) {
+ if (leftMassType == MASSTYPE_IMMOVABLE) {
+ if (rightMassType == MASSTYPE_IMMOVABLE) {
return;
- } else { // leftMassType == MASS_HEAVY | MASS_NORMAL
+ } else { // rightMassType == MASSTYPE_HEAVY or MASSTYPE_NORMAL
leftDispRatio = 0;
rightDispRatio = 1;
}
- } else if (rightMassType == MASSTYPE_HEAVY) {
- if (leftMassType == MASSTYPE_IMMOVABLE) {
+ } else if (leftMassType == MASSTYPE_HEAVY) {
+ if (rightMassType == MASSTYPE_IMMOVABLE) {
leftDispRatio = 1;
rightDispRatio = 0;
- } else if (leftMassType == MASSTYPE_HEAVY) {
+ } else if (rightMassType == MASSTYPE_HEAVY) {
leftDispRatio = 0.5f;
rightDispRatio = 0.5f;
- } else { // leftMassType == MASS_NORMAL
+ } else { // rightMassType == MASSTYPE_NORMAL
leftDispRatio = 0;
rightDispRatio = 1;
}
- } else { // rightMassType == MASS_NORMAL
- if (leftMassType == MASSTYPE_NORMAL) {
+ } else { // leftMassType == MASSTYPE_NORMAL
+ if (rightMassType == MASSTYPE_NORMAL) {
inverseTotalMass = 1 / totalMass;
leftDispRatio = rightMass * inverseTotalMass;
rightDispRatio = leftMass * inverseTotalMass;
- } else { // leftMassType == MASS_HEAVY | MASS_IMMOVABLE
+ } else { // rightMassType == MASSTYPE_HEAVY or MASSTYPE_IMMOVABLE
leftDispRatio = 1;
rightDispRatio = 0;
}
@@ -3494,7 +3494,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
}
radSqDiff = SQXZ(actorToItem) - SQ(radius);
if (!IS_ZERO(SQXZ(itemStep))) {
- actorDotItemXZ = DOTXZ(2.0f * itemStep, actorToItem);
+ actorDotItemXZ = (2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z);
if (SQ(actorDotItemXZ) < (4.0f * SQXZ(itemStep) * radSqDiff)) {
return 0;
}
@@ -3511,10 +3511,10 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
if (intersect2 == true) {
frac2 = (-actorDotItemXZ - closeDist) / (2.0f * SQXZ(itemStep));
}
- } else if (!IS_ZERO(DOTXZ(2.0f * itemStep, actorToItem))) {
+ } else if (!IS_ZERO((2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z))) {
intersect1 = true;
intersect2 = false;
- frac1 = -radSqDiff / DOTXZ(2.0f * itemStep, actorToItem);
+ frac1 = -radSqDiff / ((2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z));
} else {
if (radSqDiff <= 0.0f) {
test1 = (0.0f < actorToItem.y) && (actorToItem.y < height);
diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c
index 106fdee1aa..1e30438d76 100644
--- a/src/code/z_effect_soft_sprite_old_init.c
+++ b/src/code/z_effect_soft_sprite_old_init.c
@@ -748,7 +748,7 @@ void EffectSsFhgFlash_SpawnLightBall(PlayState* play, Vec3f* pos, Vec3f* velocit
* Spawn a shock effect
*
* param determines where the ligntning should go
- * 0: dont attach to any actor. spawns at the position specified by pos
+ * 0: don't attach to any actor. spawns at the position specified by pos
* 1: spawn at one of Player's body parts, chosen at random
* 2: spawn at one of Phantom Ganon's body parts, chosen at random
*/
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h
index 35281d5c7a..fc5d99cc34 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h
@@ -20,7 +20,7 @@ typedef struct BgMoriHashigo {
typedef enum {
/* -1 */ HASHIGO_CLASP = -1,
- /* 0 */ HASHIGO_LADDER
+ /* 0 */ HASHIGO_LADDER
} HasigoType;
#endif
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
index 5443da2100..ebd4255d90 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
@@ -134,7 +134,7 @@ void func_808BB0AC(BgTokiSwd* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
if (!LINK_IS_ADULT) {
Audio_PlayActorSfx2(&this->actor, NA_SE_IT_SWORD_PUTAWAY_STN);
- this->actor.draw = NULL; // sword has been pulled, dont draw sword
+ this->actor.draw = NULL; // sword has been pulled, don't draw sword
} else {
this->actor.draw = BgTokiSwd_Draw; // sword has been placed, draw the master sword
}
diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c
index cf649244d5..435889305f 100644
--- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c
+++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c
@@ -812,7 +812,7 @@ void func_809691BC(Demo6K* this, PlayState* play, s32 params) {
temp = Environment_LerpWeight(csAction->endFrame, csAction->startFrame, play->csCtx.frames);
- this->actor.world.pos.x = (((endPos.x - startPos.x) * temp) + startPos.x);
- this->actor.world.pos.y = (((endPos.y - startPos.y) * temp) + startPos.y);
- this->actor.world.pos.z = (((endPos.z - startPos.z) * temp) + startPos.z);
+ this->actor.world.pos.x = LERP(startPos.x, endPos.x, temp);
+ this->actor.world.pos.y = LERP(startPos.y, endPos.y, temp);
+ this->actor.world.pos.z = LERP(startPos.z, endPos.z, temp);
}
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
index 74344ffa9b..305b542968 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
@@ -454,9 +454,9 @@ void DemoDu_CsGoronsRuby_DaruniaFalling(DemoDu* this, PlayState* play) {
endPos.y = npcAction->endPos.y;
endPos.z = npcAction->endPos.z;
- pos->x = ((endPos.x - startPos.x) * traveledPercent) + startPos.x;
- pos->y = ((endPos.y - startPos.y) * traveledPercent) + startPos.y;
- pos->z = ((endPos.z - startPos.z) * traveledPercent) + startPos.z;
+ pos->x = LERP(startPos.x, endPos.x, traveledPercent);
+ pos->y = LERP(startPos.y, endPos.y, traveledPercent);
+ pos->z = LERP(startPos.z, endPos.z, traveledPercent);
}
}
}
diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h
index f250cafe30..9dee2f8f04 100644
--- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h
+++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h
@@ -27,17 +27,17 @@ typedef struct EnArrow {
typedef enum {
/* -10 */ ARROW_CS_NUT = -10, // cutscene deku nuts are allowed to update in blocking mode
- /* -1 */ ARROW_NORMAL_SILENT = -1, // normal arrow that does not make a sound when being shot
- /* 0 */ ARROW_NORMAL_LIT, // normal arrow lit on fire
- /* 1 */ ARROW_NORMAL_HORSE, // normal arrow shot while riding a horse
- /* 2 */ ARROW_NORMAL,
- /* 3 */ ARROW_FIRE,
- /* 4 */ ARROW_ICE,
- /* 5 */ ARROW_LIGHT,
- /* 6 */ ARROW_0C,
- /* 7 */ ARROW_0D,
- /* 8 */ ARROW_0E,
- /* 9 */ ARROW_SEED,
+ /* -1 */ ARROW_NORMAL_SILENT = -1, // normal arrow that does not make a sound when being shot
+ /* 0 */ ARROW_NORMAL_LIT, // normal arrow lit on fire
+ /* 1 */ ARROW_NORMAL_HORSE, // normal arrow shot while riding a horse
+ /* 2 */ ARROW_NORMAL,
+ /* 3 */ ARROW_FIRE,
+ /* 4 */ ARROW_ICE,
+ /* 5 */ ARROW_LIGHT,
+ /* 6 */ ARROW_0C,
+ /* 7 */ ARROW_0D,
+ /* 8 */ ARROW_0E,
+ /* 9 */ ARROW_SEED,
/* 10 */ ARROW_NUT
} ArrowType;
diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/src/overlays/actors/ovl_En_Eg/z_en_eg.c
index 591624ce1f..6ef0636c61 100644
--- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c
+++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c
@@ -16,7 +16,7 @@ void EnEg_Draw(Actor* thisx, PlayState* play);
void func_809FFDC8(EnEg* this, PlayState* play);
-static s32 voided = false;
+static s32 sVoided = false;
static EnEgActionFunc sActionFuncs[] = {
func_809FFDC8,
@@ -48,14 +48,14 @@ void EnEg_Init(Actor* thisx, PlayState* play) {
}
void func_809FFDC8(EnEg* this, PlayState* play) {
- if (!voided && (gSaveContext.timer2Value < 1) && Flags_GetSwitch(play, 0x36) && (kREG(0) == 0)) {
+ if (!sVoided && (gSaveContext.timer2Value < 1) && Flags_GetSwitch(play, 0x36) && (kREG(0) == 0)) {
// Void the player out
Play_TriggerRespawn(play);
gSaveContext.respawnFlag = -2;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
play->transitionType = TRANS_TYPE_FADE_BLACK;
EnEg_PlayVoidOutSFX();
- voided = true;
+ sVoided = true;
}
}
diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.h b/src/overlays/actors/ovl_En_Horse/z_en_horse.h
index fb07caa697..5a2f47f1b0 100644
--- a/src/overlays/actors/ovl_En_Horse/z_en_horse.h
+++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.h
@@ -5,16 +5,16 @@
#include "global.h"
typedef enum {
- /* 0 */ ENHORSE_ACT_FROZEN,
- /* 1 */ ENHORSE_ACT_INACTIVE,
- /* 2 */ ENHORSE_ACT_IDLE,
- /* 3 */ ENHORSE_ACT_FOLLOW_PLAYER,
- /* 4 */ ENHORSE_ACT_INGO_RACE,
- /* 5 */ ENHORSE_ACT_MOUNTED_IDLE,
- /* 6 */ ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING,
- /* 7 */ ENHORSE_ACT_MOUNTED_TURN,
- /* 8 */ ENHORSE_ACT_MOUNTED_WALK,
- /* 9 */ ENHORSE_ACT_MOUNTED_TROT,
+ /* 0 */ ENHORSE_ACT_FROZEN,
+ /* 1 */ ENHORSE_ACT_INACTIVE,
+ /* 2 */ ENHORSE_ACT_IDLE,
+ /* 3 */ ENHORSE_ACT_FOLLOW_PLAYER,
+ /* 4 */ ENHORSE_ACT_INGO_RACE,
+ /* 5 */ ENHORSE_ACT_MOUNTED_IDLE,
+ /* 6 */ ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING,
+ /* 7 */ ENHORSE_ACT_MOUNTED_TURN,
+ /* 8 */ ENHORSE_ACT_MOUNTED_WALK,
+ /* 9 */ ENHORSE_ACT_MOUNTED_TROT,
/* 10 */ ENHORSE_ACT_MOUNTED_GALLOP,
/* 11 */ ENHORSE_ACT_MOUNTED_REARING,
/* 12 */ ENHORSE_ACT_STOPPING,
diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h
index 72aec99c56..5cd76798c1 100644
--- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h
+++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h
@@ -9,10 +9,10 @@ struct ObjMakekinsuta;
typedef void (*ObjMakekinsutaActionFunc)(struct ObjMakekinsuta*, PlayState*);
typedef struct ObjMakekinsuta {
- /* 0x0000 */ Actor actor;
- /* 0x014C */ ObjMakekinsutaActionFunc actionFunc;
- /* 0x150 */ s16 timer;
- /* 0x152 */ s16 unk_152;
-} ObjMakekinsuta; // size = 0x0154
+ /* 0x000 */ Actor actor;
+ /* 0x14C */ ObjMakekinsutaActionFunc actionFunc;
+ /* 0x150 */ s16 timer;
+ /* 0x152 */ s16 unk_152;
+} ObjMakekinsuta; // size = 0x154
#endif
diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
index bf8b33f80a..73d78a5552 100644
--- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
+++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
@@ -849,8 +849,8 @@ void ObjectKankyo_DrawSunGraveSpark(Actor* thisx, PlayState* play2) {
weight = Environment_LerpWeight(play->csCtx.npcActions[1]->endFrame, play->csCtx.npcActions[1]->startFrame,
play->csCtx.frames);
- Matrix_Translate((end.x - start.x) * weight + start.x, (end.y - start.y) * weight + start.y,
- (end.z - start.z) * weight + start.z, MTXMODE_NEW);
+ Matrix_Translate(LERP(start.x, end.x, weight), LERP(start.y, end.y, weight), LERP(start.z, end.z, weight),
+ MTXMODE_NEW);
Matrix_Scale(this->effects[0].size, this->effects[0].size, this->effects[0].size, MTXMODE_APPLY);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++);
diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c
index 474ee4eccb..e1f2b7fe93 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -5401,11 +5401,7 @@ s32 func_8083B644(Player* this, PlayState* play) {
this->targetActor = NULL;
if (sp28 || !sp24) {
- if (this->naviTextId >= 0) {
- sp2C->textId = this->naviTextId;
- } else {
- sp2C->textId = -this->naviTextId;
- }
+ sp2C->textId = ABS(this->naviTextId);
} else {
if (sp2C->naviEnemyId != NAVI_ENEMY_NONE) {
sp2C->textId = sp2C->naviEnemyId + 0x600;
@@ -12891,11 +12887,7 @@ void func_8084F104(Player* this, PlayState* play) {
GetItemEntry* giEntry = &sGetItemTable[D_80854528[this->exchangeItemId - 1] - 1];
if (this->itemAction >= PLAYER_IA_LETTER_ZELDA) {
- if (giEntry->gi >= 0) {
- this->unk_862 = giEntry->gi;
- } else {
- this->unk_862 = -giEntry->gi;
- }
+ this->unk_862 = ABS(giEntry->gi);
}
if (this->unk_850 == 0) {
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
index f2858afd78..be37446a40 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
@@ -128,7 +128,7 @@ void EffectSsGSpk_Update(PlayState* play, u32 index, EffectSs* this) {
}
// this update mode is unused in the original game
-// with this update mode, the sparks dont move randomly in the xz plane, appearing to be on top of each other
+// with this update mode, the sparks don't move randomly in the xz plane, appearing to be on top of each other
void EffectSsGSpk_UpdateNoAccel(PlayState* play, u32 index, EffectSs* this) {
if (this->actor != NULL) {
if ((this->actor->category == ACTORCAT_EXPLOSIVE) && (this->actor->update != NULL)) {
diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c
index 43202108b7..a7050e208d 100644
--- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c
+++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c
@@ -561,7 +561,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->kbdY--;
if (this->kbdY < 0) {
- // dont go to bottom row
+ // don't go to bottom row
if (this->kbdX < 8) {
this->kbdY = 4;
this->charIndex = (s32)(this->kbdX + 52);