1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-15 11:26:19 +00:00

Fix misc 18 (#1423)

* two more ABS

* fixup item_name_static texs outnames

* fixup CollisionCheck_SetOCvsOC docs

* Cleanup int comments alignments

* collsion -> collision

* `SQ*` macros fixup

* use `LERP` more

* static -> `s` prefix

* grammar: dont -> don't

* 3
This commit is contained in:
Dragorn421 2022-11-13 23:47:25 +01:00 committed by GitHub
parent efe485f017
commit abb4201e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 93 additions and 101 deletions

View file

@ -12,7 +12,7 @@
<Texture Name="gBombchuItemNameENGTex" OutName="bombchu_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2400"/> <Texture Name="gBombchuItemNameENGTex" OutName="bombchu_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2400"/>
<Texture Name="gHookshotItemNameENGTex" OutName="hookshot_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2800"/> <Texture Name="gHookshotItemNameENGTex" OutName="hookshot_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2800"/>
<Texture Name="gLongshotItemNameENGTex" OutName="longshot_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2C00"/> <Texture Name="gLongshotItemNameENGTex" OutName="longshot_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2C00"/>
<Texture Name="gIceArrowItemNameENGTex" OutName="icearrow_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3000"/> <Texture Name="gIceArrowItemNameENGTex" OutName="ice_arrow_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3000"/>
<Texture Name="gFaroresWindItemNameENGTex" OutName="farores_wind_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3400"/> <Texture Name="gFaroresWindItemNameENGTex" OutName="farores_wind_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3400"/>
<Texture Name="gBoomerangItemNameENGTex" OutName="boomerang_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3800"/> <Texture Name="gBoomerangItemNameENGTex" OutName="boomerang_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3800"/>
<Texture Name="gLensItemNameENGTex" OutName="lens_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3C00"/> <Texture Name="gLensItemNameENGTex" OutName="lens_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3C00"/>
@ -124,7 +124,7 @@
<Texture Name="gUnusedBossKeyItemName7JPNTex" OutName="boss_key_item_name_unused_jpn_7" Format="ia4" Width="128" Height="16" Offset="0x1E400"/> <Texture Name="gUnusedBossKeyItemName7JPNTex" OutName="boss_key_item_name_unused_jpn_7" Format="ia4" Width="128" Height="16" Offset="0x1E400"/>
<Texture Name="gBiggoronsSwordItemNameENGTex" OutName="biggorons_sword_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x1E800"/> <Texture Name="gBiggoronsSwordItemNameENGTex" OutName="biggorons_sword_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x1E800"/>
<Texture Name="gDekuStickItemNameGERTex" OutName="deku_stick_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1EC00"/> <Texture Name="gDekuStickItemNameGERTex" OutName="deku_stick_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1EC00"/>
<Texture Name="gDekuNutItemNameGERTex" OutName="dekunut_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F000"/> <Texture Name="gDekuNutItemNameGERTex" OutName="deku_nut_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F000"/>
<Texture Name="gBombItemNameItemNameGERTex" OutName="bomb_item_name_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F400"/> <Texture Name="gBombItemNameItemNameGERTex" OutName="bomb_item_name_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F400"/>
<Texture Name="gFairyBowItemNameGERTex" OutName="fairy_bow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F800"/> <Texture Name="gFairyBowItemNameGERTex" OutName="fairy_bow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F800"/>
<Texture Name="gFireArrowItemNameUnk2GERTex" OutName="fire_arrow_item_name_unk2_ger" Format="ia4" Width="128" Height="16" Offset="0x1FC00"/> <Texture Name="gFireArrowItemNameUnk2GERTex" OutName="fire_arrow_item_name_unk2_ger" Format="ia4" Width="128" Height="16" Offset="0x1FC00"/>
@ -135,7 +135,7 @@
<Texture Name="gBombchuItemNameGERTex" OutName="bombchu_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21000"/> <Texture Name="gBombchuItemNameGERTex" OutName="bombchu_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21000"/>
<Texture Name="gHookshotItemNameGERTex" OutName="hookshot_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21400"/> <Texture Name="gHookshotItemNameGERTex" OutName="hookshot_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21400"/>
<Texture Name="gLongshotItemNameGERTex" OutName="longshot_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21800"/> <Texture Name="gLongshotItemNameGERTex" OutName="longshot_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21800"/>
<Texture Name="gIceArrowItemNameGERTex" OutName="icearrow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21C00"/> <Texture Name="gIceArrowItemNameGERTex" OutName="ice_arrow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21C00"/>
<Texture Name="gFaroresWindItemNameGERTex" OutName="farores_wind_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22000"/> <Texture Name="gFaroresWindItemNameGERTex" OutName="farores_wind_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22000"/>
<Texture Name="gBoomerangItemNameGERTex" OutName="boomerang_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22400"/> <Texture Name="gBoomerangItemNameGERTex" OutName="boomerang_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22400"/>
<Texture Name="gLensItemNameGERTex" OutName="lens_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22800"/> <Texture Name="gLensItemNameGERTex" OutName="lens_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22800"/>

View file

@ -111,9 +111,9 @@ typedef VecSphGeo VecGeo;
#define BINANG_TO_RAD_ALT2(binang) (((f32)(binang) * M_PI) / 0x8000) #define BINANG_TO_RAD_ALT2(binang) (((f32)(binang) * M_PI) / 0x8000)
// Vector macros // Vector macros
#define SQXZ(vec) ((vec.x) * (vec.x) + (vec.z) * (vec.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 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 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 DOTXYZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).y * (vec2).y + (vec1).z * (vec2).z)
#endif #endif

View file

@ -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. * eyeNext->at, then eye->at is also checked.
* Returns: * 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 * 2 if the angle between the polys is between 60 degrees and 120 degrees
* 3 ? * 3 ?
* 6 if the angle between the polys is greater than 120 degrees * 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); Camera_AddVecGeoToVec3f(&camBgChk.pos, at, &bgChkPara);
if (Camera_BGCheckInfo(camera, at, &camBgChk)) { if (Camera_BGCheckInfo(camera, at, &camBgChk)) {
// Collision found between parallel at->eyeNext, set eye position to // Collision found between parallel at->eyeNext, set eye position to
// first collsion point. // first collision point.
*eye = bgChkPos; *eye = bgChkPos;
} else { } else {
// no collision found with the parallel at->eye, animate to be parallel // no collision found with the parallel at->eye, animate to be parallel

View file

@ -2648,8 +2648,8 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
f32 zDelta; f32 zDelta;
Actor* leftActor = left->actor; Actor* leftActor = left->actor;
Actor* rightActor = right->actor; Actor* rightActor = right->actor;
s32 leftMassType;
s32 rightMassType; s32 rightMassType;
s32 leftMassType;
left->ocFlags1 |= OC1_HIT; left->ocFlags1 |= OC1_HIT;
left->oc = rightActor; 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) { if (leftActor == NULL || rightActor == NULL || left->ocFlags1 & OC1_NO_PUSH || right->ocFlags1 & OC1_NO_PUSH) {
return; return;
} }
rightMassType = CollisionCheck_GetMassType(leftActor->colChkInfo.mass); leftMassType = CollisionCheck_GetMassType(leftActor->colChkInfo.mass);
leftMassType = CollisionCheck_GetMassType(rightActor->colChkInfo.mass); rightMassType = CollisionCheck_GetMassType(rightActor->colChkInfo.mass);
leftMass = leftActor->colChkInfo.mass; leftMass = leftActor->colChkInfo.mass;
rightMass = rightActor->colChkInfo.mass; rightMass = rightActor->colChkInfo.mass;
totalMass = leftMass + rightMass; totalMass = leftMass + rightMass;
@ -2679,30 +2679,30 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
zDelta = rightPos->z - leftPos->z; zDelta = rightPos->z - leftPos->z;
xzDist = sqrtf(SQ(xDelta) + SQ(zDelta)); xzDist = sqrtf(SQ(xDelta) + SQ(zDelta));
if (rightMassType == MASSTYPE_IMMOVABLE) {
if (leftMassType == MASSTYPE_IMMOVABLE) { if (leftMassType == MASSTYPE_IMMOVABLE) {
if (rightMassType == MASSTYPE_IMMOVABLE) {
return; return;
} else { // leftMassType == MASS_HEAVY | MASS_NORMAL } else { // rightMassType == MASSTYPE_HEAVY or MASSTYPE_NORMAL
leftDispRatio = 0; leftDispRatio = 0;
rightDispRatio = 1; rightDispRatio = 1;
} }
} else if (rightMassType == MASSTYPE_HEAVY) { } else if (leftMassType == MASSTYPE_HEAVY) {
if (leftMassType == MASSTYPE_IMMOVABLE) { if (rightMassType == MASSTYPE_IMMOVABLE) {
leftDispRatio = 1; leftDispRatio = 1;
rightDispRatio = 0; rightDispRatio = 0;
} else if (leftMassType == MASSTYPE_HEAVY) { } else if (rightMassType == MASSTYPE_HEAVY) {
leftDispRatio = 0.5f; leftDispRatio = 0.5f;
rightDispRatio = 0.5f; rightDispRatio = 0.5f;
} else { // leftMassType == MASS_NORMAL } else { // rightMassType == MASSTYPE_NORMAL
leftDispRatio = 0; leftDispRatio = 0;
rightDispRatio = 1; rightDispRatio = 1;
} }
} else { // rightMassType == MASS_NORMAL } else { // leftMassType == MASSTYPE_NORMAL
if (leftMassType == MASSTYPE_NORMAL) { if (rightMassType == MASSTYPE_NORMAL) {
inverseTotalMass = 1 / totalMass; inverseTotalMass = 1 / totalMass;
leftDispRatio = rightMass * inverseTotalMass; leftDispRatio = rightMass * inverseTotalMass;
rightDispRatio = leftMass * inverseTotalMass; rightDispRatio = leftMass * inverseTotalMass;
} else { // leftMassType == MASS_HEAVY | MASS_IMMOVABLE } else { // rightMassType == MASSTYPE_HEAVY or MASSTYPE_IMMOVABLE
leftDispRatio = 1; leftDispRatio = 1;
rightDispRatio = 0; rightDispRatio = 0;
} }
@ -3494,7 +3494,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
} }
radSqDiff = SQXZ(actorToItem) - SQ(radius); radSqDiff = SQXZ(actorToItem) - SQ(radius);
if (!IS_ZERO(SQXZ(itemStep))) { 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)) { if (SQ(actorDotItemXZ) < (4.0f * SQXZ(itemStep) * radSqDiff)) {
return 0; return 0;
} }
@ -3511,10 +3511,10 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
if (intersect2 == true) { if (intersect2 == true) {
frac2 = (-actorDotItemXZ - closeDist) / (2.0f * SQXZ(itemStep)); 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; intersect1 = true;
intersect2 = false; intersect2 = false;
frac1 = -radSqDiff / DOTXZ(2.0f * itemStep, actorToItem); frac1 = -radSqDiff / ((2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z));
} else { } else {
if (radSqDiff <= 0.0f) { if (radSqDiff <= 0.0f) {
test1 = (0.0f < actorToItem.y) && (actorToItem.y < height); test1 = (0.0f < actorToItem.y) && (actorToItem.y < height);

View file

@ -748,7 +748,7 @@ void EffectSsFhgFlash_SpawnLightBall(PlayState* play, Vec3f* pos, Vec3f* velocit
* Spawn a shock effect * Spawn a shock effect
* *
* param determines where the ligntning should go * 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 * 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 * 2: spawn at one of Phantom Ganon's body parts, chosen at random
*/ */

View file

@ -134,7 +134,7 @@ void func_808BB0AC(BgTokiSwd* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) { if (Actor_HasParent(&this->actor, play)) {
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
Audio_PlayActorSfx2(&this->actor, NA_SE_IT_SWORD_PUTAWAY_STN); 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 { } else {
this->actor.draw = BgTokiSwd_Draw; // sword has been placed, draw the master sword this->actor.draw = BgTokiSwd_Draw; // sword has been placed, draw the master sword
} }

View file

@ -812,7 +812,7 @@ void func_809691BC(Demo6K* this, PlayState* play, s32 params) {
temp = Environment_LerpWeight(csAction->endFrame, csAction->startFrame, play->csCtx.frames); 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.x = LERP(startPos.x, endPos.x, temp);
this->actor.world.pos.y = (((endPos.y - startPos.y) * temp) + startPos.y); this->actor.world.pos.y = LERP(startPos.y, endPos.y, temp);
this->actor.world.pos.z = (((endPos.z - startPos.z) * temp) + startPos.z); this->actor.world.pos.z = LERP(startPos.z, endPos.z, temp);
} }

View file

@ -454,9 +454,9 @@ void DemoDu_CsGoronsRuby_DaruniaFalling(DemoDu* this, PlayState* play) {
endPos.y = npcAction->endPos.y; endPos.y = npcAction->endPos.y;
endPos.z = npcAction->endPos.z; endPos.z = npcAction->endPos.z;
pos->x = ((endPos.x - startPos.x) * traveledPercent) + startPos.x; pos->x = LERP(startPos.x, endPos.x, traveledPercent);
pos->y = ((endPos.y - startPos.y) * traveledPercent) + startPos.y; pos->y = LERP(startPos.y, endPos.y, traveledPercent);
pos->z = ((endPos.z - startPos.z) * traveledPercent) + startPos.z; pos->z = LERP(startPos.z, endPos.z, traveledPercent);
} }
} }
} }

View file

@ -16,7 +16,7 @@ void EnEg_Draw(Actor* thisx, PlayState* play);
void func_809FFDC8(EnEg* this, PlayState* play); void func_809FFDC8(EnEg* this, PlayState* play);
static s32 voided = false; static s32 sVoided = false;
static EnEgActionFunc sActionFuncs[] = { static EnEgActionFunc sActionFuncs[] = {
func_809FFDC8, func_809FFDC8,
@ -48,14 +48,14 @@ void EnEg_Init(Actor* thisx, PlayState* play) {
} }
void func_809FFDC8(EnEg* this, 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 // Void the player out
Play_TriggerRespawn(play); Play_TriggerRespawn(play);
gSaveContext.respawnFlag = -2; gSaveContext.respawnFlag = -2;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
play->transitionType = TRANS_TYPE_FADE_BLACK; play->transitionType = TRANS_TYPE_FADE_BLACK;
EnEg_PlayVoidOutSFX(); EnEg_PlayVoidOutSFX();
voided = true; sVoided = true;
} }
} }

View file

@ -9,10 +9,10 @@ struct ObjMakekinsuta;
typedef void (*ObjMakekinsutaActionFunc)(struct ObjMakekinsuta*, PlayState*); typedef void (*ObjMakekinsutaActionFunc)(struct ObjMakekinsuta*, PlayState*);
typedef struct ObjMakekinsuta { typedef struct ObjMakekinsuta {
/* 0x0000 */ Actor actor; /* 0x000 */ Actor actor;
/* 0x014C */ ObjMakekinsutaActionFunc actionFunc; /* 0x14C */ ObjMakekinsutaActionFunc actionFunc;
/* 0x150 */ s16 timer; /* 0x150 */ s16 timer;
/* 0x152 */ s16 unk_152; /* 0x152 */ s16 unk_152;
} ObjMakekinsuta; // size = 0x0154 } ObjMakekinsuta; // size = 0x154
#endif #endif

View file

@ -849,8 +849,8 @@ void ObjectKankyo_DrawSunGraveSpark(Actor* thisx, PlayState* play2) {
weight = Environment_LerpWeight(play->csCtx.npcActions[1]->endFrame, play->csCtx.npcActions[1]->startFrame, weight = Environment_LerpWeight(play->csCtx.npcActions[1]->endFrame, play->csCtx.npcActions[1]->startFrame,
play->csCtx.frames); play->csCtx.frames);
Matrix_Translate((end.x - start.x) * weight + start.x, (end.y - start.y) * weight + start.y, Matrix_Translate(LERP(start.x, end.x, weight), LERP(start.y, end.y, weight), LERP(start.z, end.z, weight),
(end.z - start.z) * weight + start.z, MTXMODE_NEW); MTXMODE_NEW);
Matrix_Scale(this->effects[0].size, this->effects[0].size, this->effects[0].size, MTXMODE_APPLY); Matrix_Scale(this->effects[0].size, this->effects[0].size, this->effects[0].size, MTXMODE_APPLY);
Gfx_SetupDL_25Xlu(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);

View file

@ -5401,11 +5401,7 @@ s32 func_8083B644(Player* this, PlayState* play) {
this->targetActor = NULL; this->targetActor = NULL;
if (sp28 || !sp24) { if (sp28 || !sp24) {
if (this->naviTextId >= 0) { sp2C->textId = ABS(this->naviTextId);
sp2C->textId = this->naviTextId;
} else {
sp2C->textId = -this->naviTextId;
}
} else { } else {
if (sp2C->naviEnemyId != NAVI_ENEMY_NONE) { if (sp2C->naviEnemyId != NAVI_ENEMY_NONE) {
sp2C->textId = sp2C->naviEnemyId + 0x600; 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]; GetItemEntry* giEntry = &sGetItemTable[D_80854528[this->exchangeItemId - 1] - 1];
if (this->itemAction >= PLAYER_IA_LETTER_ZELDA) { if (this->itemAction >= PLAYER_IA_LETTER_ZELDA) {
if (giEntry->gi >= 0) { this->unk_862 = ABS(giEntry->gi);
this->unk_862 = giEntry->gi;
} else {
this->unk_862 = -giEntry->gi;
}
} }
if (this->unk_850 == 0) { if (this->unk_850 == 0) {

View file

@ -128,7 +128,7 @@ void EffectSsGSpk_Update(PlayState* play, u32 index, EffectSs* this) {
} }
// this update mode is unused in the original game // 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) { void EffectSsGSpk_UpdateNoAccel(PlayState* play, u32 index, EffectSs* this) {
if (this->actor != NULL) { if (this->actor != NULL) {
if ((this->actor->category == ACTORCAT_EXPLOSIVE) && (this->actor->update != NULL)) { if ((this->actor->category == ACTORCAT_EXPLOSIVE) && (this->actor->update != NULL)) {

View file

@ -561,7 +561,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->kbdY--; this->kbdY--;
if (this->kbdY < 0) { if (this->kbdY < 0) {
// dont go to bottom row // don't go to bottom row
if (this->kbdX < 8) { if (this->kbdX < 8) {
this->kbdY = 4; this->kbdY = 4;
this->charIndex = (s32)(this->kbdX + 52); this->charIndex = (s32)(this->kbdX + 52);