mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +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:
parent
efe485f017
commit
abb4201e57
20 changed files with 93 additions and 101 deletions
|
@ -20,7 +20,7 @@ typedef struct BgMoriHashigo {
|
|||
|
||||
typedef enum {
|
||||
/* -1 */ HASHIGO_CLASP = -1,
|
||||
/* 0 */ HASHIGO_LADDER
|
||||
/* 0 */ HASHIGO_LADDER
|
||||
} HasigoType;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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++);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue