mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Document Surface Material (#1447)
* material * cleanup * iron boots * climb * more docs * rename * small fix * comments * adjust bug comment * simplify comment
This commit is contained in:
parent
92f081d7f3
commit
c7a61aa670
26 changed files with 263 additions and 231 deletions
|
@ -251,9 +251,9 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
Audio_PlayActorSfx2(
|
||||
&this->dyna.actor,
|
||||
SurfaceType_GetSfxId(&play->colCtx, this->dyna.actor.floorPoly, this->dyna.actor.floorBgId) + SFX_FLAG);
|
||||
Audio_PlayActorSfx2(&this->dyna.actor,
|
||||
NA_SE_PL_WALK_GROUND + SurfaceType_GetSfxOffset(&play->colCtx, this->dyna.actor.floorPoly,
|
||||
this->dyna.actor.floorBgId));
|
||||
}
|
||||
|
||||
this->unk_16C -= 0.5f;
|
||||
|
|
|
@ -2465,7 +2465,7 @@ void BossGanon_HitByLightBall(BossGanon* this, PlayState* play) {
|
|||
BossGanonEff_SpawnSparkle(play, &this->unk_1FC, &sp50, &sZeroVec, Rand_ZeroFloat(200.0f) + 500.0f,
|
||||
0x14);
|
||||
}
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_WATER2);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_TALL_GRASS);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1])) {
|
||||
|
@ -2647,7 +2647,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
|
|||
0x14);
|
||||
}
|
||||
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_WATER2);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_TALL_GRASS);
|
||||
this->timers[3] = 50;
|
||||
}
|
||||
|
||||
|
|
|
@ -1239,7 +1239,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
|
|||
}
|
||||
if (this->flyMode != GND_FLY_PAINTING) {
|
||||
if (acHit && (this->actionFunc != BossGanondrof_Stunned) && (hurtbox->toucher.dmgFlags & DMG_RANGED)) {
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_GROUND - SFX_FLAG);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_NONE);
|
||||
osSyncPrintf("hit != 0 \n");
|
||||
} else if (this->actionFunc != BossGanondrof_Charge) {
|
||||
if (this->returnCount == 0) {
|
||||
|
@ -1270,7 +1270,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
|
|||
horse->hitTimer = 20;
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FANTOM_DAMAGE);
|
||||
} else {
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_GROUND - SFX_FLAG);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_NONE);
|
||||
}
|
||||
} else if (acHit && (hurtbox->toucher.dmgFlags & DMG_RANGED)) {
|
||||
this->work[GND_INVINC_TIMER] = 10;
|
||||
|
|
|
@ -3040,53 +3040,56 @@ void BossMo_Unknown(void) {
|
|||
// Appears to be a test function for sound effects.
|
||||
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
static u16 unkSfx[] = {
|
||||
NA_SE_PL_WALK_GROUND,
|
||||
NA_SE_PL_WALK_GROUND,
|
||||
NA_SE_PL_WALK_GROUND,
|
||||
NA_SE_PL_WALK_SAND,
|
||||
NA_SE_PL_WALK_CONCRETE,
|
||||
NA_SE_PL_WALK_DIRT,
|
||||
NA_SE_PL_WALK_WATER0,
|
||||
NA_SE_PL_WALK_WATER1,
|
||||
NA_SE_PL_WALK_WATER2,
|
||||
NA_SE_PL_WALK_MAGMA,
|
||||
NA_SE_PL_WALK_GRASS,
|
||||
NA_SE_PL_WALK_GLASS,
|
||||
NA_SE_PL_WALK_LADDER,
|
||||
NA_SE_PL_WALK_GLASS,
|
||||
NA_SE_PL_WALK_WALL,
|
||||
NA_SE_PL_WALK_HEAVYBOOTS,
|
||||
NA_SE_PL_WALK_ICE,
|
||||
NA_SE_PL_JUMP,
|
||||
NA_SE_PL_JUMP,
|
||||
NA_SE_PL_JUMP_SAND,
|
||||
NA_SE_PL_JUMP_CONCRETE,
|
||||
NA_SE_PL_JUMP_DIRT,
|
||||
NA_SE_PL_JUMP_WATER0,
|
||||
NA_SE_PL_JUMP_WATER1,
|
||||
NA_SE_PL_JUMP_WATER2,
|
||||
NA_SE_PL_JUMP_MAGMA,
|
||||
NA_SE_PL_JUMP_GRASS,
|
||||
NA_SE_PL_JUMP_GLASS,
|
||||
NA_SE_PL_JUMP_LADDER,
|
||||
NA_SE_PL_JUMP_GLASS,
|
||||
NA_SE_PL_JUMP_HEAVYBOOTS,
|
||||
NA_SE_PL_JUMP_ICE,
|
||||
NA_SE_PL_LAND,
|
||||
NA_SE_PL_LAND,
|
||||
NA_SE_PL_LAND_SAND,
|
||||
NA_SE_PL_LAND_CONCRETE,
|
||||
NA_SE_PL_LAND_DIRT,
|
||||
NA_SE_PL_LAND_WATER0,
|
||||
NA_SE_PL_LAND_WATER1,
|
||||
NA_SE_PL_LAND_WATER2,
|
||||
NA_SE_PL_LAND_MAGMA,
|
||||
NA_SE_PL_LAND_GRASS,
|
||||
NA_SE_PL_LAND_GLASS,
|
||||
NA_SE_PL_LAND_LADDER,
|
||||
NA_SE_PL_LAND_GLASS,
|
||||
NA_SE_PL_LAND_HEAVYBOOTS,
|
||||
NA_SE_PL_LAND_ICE,
|
||||
// Walking
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_SAND,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_JABU,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WATER_SHALLOW,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WATER_DEEP,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_TALL_GRASS,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_LAVA,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_GRASS,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_VINE,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_IRON_BOOTS,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_ICE,
|
||||
// Jumping
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_SAND,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_STONE,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_JABU,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_WATER_SHALLOW,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_WATER_DEEP,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_TALL_GRASS,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_LAVA,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_GRASS,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_WOOD,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_IRON_BOOTS,
|
||||
NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_ICE,
|
||||
// Landing
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_SAND,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_STONE,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_JABU,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WATER_SHALLOW,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WATER_DEEP,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_TALL_GRASS,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_LAVA,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_GRASS,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_IRON_BOOTS,
|
||||
NA_SE_PL_LAND + SURFACE_SFX_OFFSET_ICE,
|
||||
NA_SE_PL_SLIPDOWN,
|
||||
NA_SE_PL_CLIMB_CLIFF,
|
||||
NA_SE_PL_CLIMB_CLIFF,
|
||||
|
@ -3114,37 +3117,39 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_PL_SKIP,
|
||||
NA_SE_PL_BODY_HIT,
|
||||
NA_SE_PL_DAMAGE,
|
||||
NA_SE_PL_SLIP,
|
||||
NA_SE_PL_SLIP,
|
||||
NA_SE_PL_SLIP,
|
||||
NA_SE_PL_SLIP_SAND,
|
||||
NA_SE_PL_SLIP_CONCRETE,
|
||||
NA_SE_PL_SLIP_DIRT,
|
||||
NA_SE_PL_SLIP_WATER0,
|
||||
NA_SE_PL_SLIP_WATER1,
|
||||
NA_SE_PL_SLIP_WATER2,
|
||||
NA_SE_PL_SLIP_MAGMA,
|
||||
NA_SE_PL_SLIP_GRASS,
|
||||
NA_SE_PL_SLIP_GLASS,
|
||||
NA_SE_PL_SLIP_LADDER,
|
||||
NA_SE_PL_SLIP_GLASS,
|
||||
NA_SE_PL_SLIP_HEAVYBOOTS,
|
||||
NA_SE_PL_SLIP_ICE,
|
||||
NA_SE_PL_BOUND,
|
||||
NA_SE_PL_BOUND,
|
||||
NA_SE_PL_BOUND_SAND,
|
||||
NA_SE_PL_BOUND_CONCRETE,
|
||||
NA_SE_PL_BOUND_DIRT,
|
||||
NA_SE_PL_BOUND_WATER0,
|
||||
NA_SE_PL_BOUND_WATER1,
|
||||
NA_SE_PL_BOUND_WATER2,
|
||||
NA_SE_PL_BOUND_MAGMA,
|
||||
NA_SE_PL_BOUND_GRASS,
|
||||
NA_SE_PL_BOUND_WOOD,
|
||||
NA_SE_PL_BOUND_LADDER,
|
||||
NA_SE_PL_BOUND_WOOD,
|
||||
NA_SE_PL_BOUND_HEAVYBOOTS,
|
||||
NA_SE_PL_BOUND_ICE,
|
||||
// Slipping
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_SAND,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_STONE,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_JABU,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_WATER_SHALLOW,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_WATER_DEEP,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_TALL_GRASS,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_LAVA,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_GRASS,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_WOOD,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_IRON_BOOTS,
|
||||
NA_SE_PL_SLIP + SURFACE_SFX_OFFSET_ICE,
|
||||
// Bound
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_DIRT,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_SAND,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_STONE,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_JABU,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_WATER_SHALLOW,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_WATER_DEEP,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_TALL_GRASS,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_LAVA,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_GRASS,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_WOOD,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_BRIDGE,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_IRON_BOOTS,
|
||||
NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_ICE,
|
||||
NA_SE_PL_FACE_UP,
|
||||
NA_SE_PL_DIVE_BUBBLE,
|
||||
NA_SE_PL_MOVE_BUBBLE,
|
||||
|
@ -3175,8 +3180,8 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_IT_ARROW_STICK_CRE,
|
||||
NA_SE_IT_ARROW_STICK_CRE,
|
||||
NA_SE_IT_ARROW_STICK_OBJ,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_IT_SWORD_SWING_HARD,
|
||||
NA_SE_IT_WALL_HIT_HARD,
|
||||
NA_SE_IT_WALL_HIT_SOFT,
|
||||
|
@ -3289,8 +3294,8 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_EV_TREE_CUT,
|
||||
NA_SE_EV_WATERDROP,
|
||||
NA_SE_EV_TORCH,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_EN_DODO_J_WALK,
|
||||
NA_SE_EN_DODO_J_CRY,
|
||||
NA_SE_EN_DODO_J_FIRE - SFX_FLAG,
|
||||
|
@ -3441,13 +3446,13 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_EN_OCTAROCK_LAND,
|
||||
NA_SE_EN_OCTAROCK_SINK,
|
||||
NA_SE_EN_OCTAROCK_BUBLE,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_SY_WIN_OPEN,
|
||||
NA_SE_SY_WIN_CLOSE,
|
||||
NA_SE_SY_CORRECT_CHIME,
|
||||
|
@ -3463,7 +3468,7 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_SY_HP_RECOVER,
|
||||
NA_SE_SY_ATTENTION_ON,
|
||||
NA_SE_SY_ATTENTION_ON,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_SY_LOCK_ON,
|
||||
NA_SE_SY_LOCK_ON,
|
||||
NA_SE_SY_LOCK_OFF,
|
||||
|
@ -3473,9 +3478,9 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_SY_ATTENTION_ON_OLD,
|
||||
NA_SE_SY_ATTENTION_URGENCY,
|
||||
NA_SE_SY_MESSAGE_PASS,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_SY_PIECE_OF_HEART,
|
||||
NA_SE_SY_GET_ITEM,
|
||||
NA_SE_SY_WIN_SCROLL_LEFT,
|
||||
|
@ -3488,7 +3493,7 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_SY_ATTENTION_ON,
|
||||
NA_SE_SY_ATTENTION_URGENCY,
|
||||
NA_SE_OC_OCARINA,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_PL_LAND - SFX_FLAG,
|
||||
NA_SE_VO_LI_SWORD_N,
|
||||
NA_SE_VO_LI_SWORD_N,
|
||||
|
@ -3566,12 +3571,12 @@ void BossMo_Unknown(void) {
|
|||
NA_SE_EN_DEADHAND_BITE,
|
||||
NA_SE_EN_DEADHAND_WALK,
|
||||
NA_SE_EN_DEADHAND_GRIP,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_PL_WALK_GROUND - SFX_FLAG,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
NA_SE_NONE,
|
||||
};
|
||||
|
||||
if (BREG(32) != 0) {
|
||||
|
|
|
@ -717,9 +717,9 @@ void func_8098652C(DemoIm* this, PlayState* play) {
|
|||
|
||||
void func_80986570(DemoIm* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
u32 sfxId = SFX_FLAG;
|
||||
u32 sfxId = NA_SE_PL_WALK_GROUND;
|
||||
|
||||
sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
Audio_PlaySfxGeneral(sfxId, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
|
|||
if ((this->curNumSpawn < this->maxCurSpawns) && (this->totalNumSpawn < this->maxTotalSpawns)) {
|
||||
while ((this->curNumSpawn < this->maxCurSpawns) && (this->totalNumSpawn < this->maxTotalSpawns)) {
|
||||
if (play->sceneId == SCENE_HYRULE_FIELD) {
|
||||
if ((player->unk_89E == SURFACE_SFX_TYPE_0) || (player->actor.floorBgId != BGCHECK_SCENE) ||
|
||||
if ((player->floorSfxOffset == SURFACE_SFX_OFFSET_DIRT) || (player->actor.floorBgId != BGCHECK_SCENE) ||
|
||||
!(player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (player->stateFlags1 & PLAYER_STATE1_27)) {
|
||||
|
||||
this->fieldSpawnTimer = 60;
|
||||
|
|
|
@ -174,8 +174,8 @@ void EnJs_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) ==
|
||||
(NA_SE_PL_WALK_SAND - SFX_FLAG)) {
|
||||
if (SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) ==
|
||||
SURFACE_SFX_OFFSET_SAND) {
|
||||
Math_ApproachF(&this->actor.shape.yOffset, sREG(80) + -2000.0f, 1.0f, (sREG(81) / 10.0f) + 50.0f);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -717,7 +717,7 @@ void EnNb_PlayLookRightSFX(EnNb* this) {
|
|||
s32 pad[2];
|
||||
|
||||
if ((this->skelAnime.mode == 2) && Animation_OnFrame(&this->skelAnime, 9.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_CONCRETE);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -725,7 +725,7 @@ void EnNb_PlayLookLeftSFX(EnNb* this) {
|
|||
s32 pad[2];
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, 9.0f) || Animation_OnFrame(&this->skelAnime, 13.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_CONCRETE);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -833,7 +833,7 @@ void func_80AEC650(EnRu1* this) {
|
|||
|
||||
if (this->unk_280 == 0) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_JABU);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1899,7 +1899,7 @@ void func_80AEF40C(EnRu1* this) {
|
|||
if (Animation_OnFrame(skelAnime, 2.0f) || Animation_OnFrame(skelAnime, 7.0f) ||
|
||||
Animation_OnFrame(skelAnime, 12.0f) || Animation_OnFrame(skelAnime, 18.0f) ||
|
||||
Animation_OnFrame(skelAnime, 25.0f) || Animation_OnFrame(skelAnime, 33.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_JABU);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -676,8 +676,8 @@ void func_80AF68E4(EnSa* this, PlayState* play) {
|
|||
phi_v0 = this->unk_20C;
|
||||
}
|
||||
if (phi_v0 == 0) {
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->unk_20C = 8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -431,7 +431,7 @@ void EnTa_RunWithAccelerationAndSfx(EnTa* this, PlayState* play) {
|
|||
s32 framesMod12 = (s32)play->state.frames % 12;
|
||||
|
||||
if (framesMod12 == 0 || framesMod12 == 6) {
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_GROUND);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT);
|
||||
}
|
||||
if (this->actor.speedXZ < 6.0f) {
|
||||
this->actor.speedXZ += 0.4f;
|
||||
|
|
|
@ -371,8 +371,8 @@ void EnXc_SetWalkingSFX(EnXc* this, PlayState* play) {
|
|||
|
||||
if (Animation_OnFrame(&this->skelAnime, 11.0f) || Animation_OnFrame(&this->skelAnime, 23.0f)) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
sfxId = SFX_FLAG;
|
||||
sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
sfxId = NA_SE_PL_WALK_GROUND;
|
||||
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
func_80078914(&this->actor.projectedPos, sfxId);
|
||||
}
|
||||
}
|
||||
|
@ -385,8 +385,8 @@ void EnXc_SetNutThrowSFX(EnXc* this, PlayState* play) {
|
|||
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f)) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
sfxId = SFX_FLAG;
|
||||
sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
sfxId = NA_SE_PL_WALK_GROUND;
|
||||
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
func_80078914(&this->actor.projectedPos, sfxId);
|
||||
}
|
||||
}
|
||||
|
@ -401,8 +401,8 @@ void EnXc_SetLandingSFX(EnXc* this, PlayState* play) {
|
|||
|
||||
if ((gSaveContext.sceneLayer != 4) || (sceneId != SCENE_DESERT_COLOSSUS)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 11.0f)) {
|
||||
sfxId = SFX_FLAG;
|
||||
sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
sfxId = NA_SE_PL_WALK_GROUND;
|
||||
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
func_80078914(&this->actor.projectedPos, sfxId);
|
||||
}
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ void EnXc_SetColossusAppearSFX(EnXc* this, PlayState* play) {
|
|||
s32 pad;
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &sXyzDist, wDest);
|
||||
func_80078914(&sXyzDist, NA_SE_PL_WALK_CONCRETE);
|
||||
func_80078914(&sXyzDist, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1746,14 +1746,14 @@ void EnXc_SetThrownAroundSFX(EnXc* this) {
|
|||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
if (Animation_OnFrame(skelAnime, 9.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_BOUND_GRASS);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_GRASS);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_VO_SK_CRASH);
|
||||
} else if (Animation_OnFrame(skelAnime, 26.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_BOUND_GRASS);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_BOUND + SURFACE_SFX_OFFSET_GRASS);
|
||||
} else if (Animation_OnFrame(skelAnime, 28.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GRASS);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_GRASS);
|
||||
} else if (Animation_OnFrame(skelAnime, 34.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GRASS);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -589,7 +589,7 @@ void func_80B4FD90(EnZl2* this, PlayState* play) {
|
|||
|
||||
void func_80B4FDD4(EnZl2* this) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 14.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_CONCRETE);
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_STONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1436,8 +1436,8 @@ void func_80B51D24(EnZl2* this, PlayState* play) {
|
|||
|
||||
if (Animation_OnFrame(skelAnime, 6.0f) || Animation_OnFrame(skelAnime, 0.0f)) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
sfxId = SFX_FLAG;
|
||||
sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
sfxId = NA_SE_PL_WALK_GROUND;
|
||||
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
func_80078914(&this->actor.projectedPos, sfxId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1541,8 +1541,8 @@ void func_80B56E38(EnZl3* this, PlayState* play) {
|
|||
|
||||
if ((Animation_OnFrame(sp20, 6.0f) || Animation_OnFrame(sp20, 0.0f)) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
sfxId = 0x800;
|
||||
sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
sfxId = NA_SE_PL_WALK_GROUND;
|
||||
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
func_80078914(&this->actor.projectedPos, sfxId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2479,7 +2479,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
|
|||
sLureRot.x = 0.0f;
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
D_80B7E144 += 6.0f;
|
||||
func_80078914(&D_80B7AF94, NA_SE_PL_WALK_SAND);
|
||||
func_80078914(&D_80B7AF94, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_SAND);
|
||||
}
|
||||
} else {
|
||||
if (D_80B7E144 > 150.0f) {
|
||||
|
|
|
@ -605,9 +605,10 @@ void ObjOshihiki_Fall(ObjOshihiki* this, PlayState* play) {
|
|||
ObjOshihiki_SetupOnActor(this, play);
|
||||
}
|
||||
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
|
||||
Audio_PlayActorSfx2(&this->dyna.actor, SurfaceType_GetSfxId(&play->colCtx, this->floorPolys[this->highestFloor],
|
||||
this->floorBgIds[this->highestFloor]) +
|
||||
SFX_FLAG);
|
||||
Audio_PlayActorSfx2(&this->dyna.actor,
|
||||
NA_SE_PL_WALK_GROUND + SurfaceType_GetSfxOffset(&play->colCtx,
|
||||
this->floorPolys[this->highestFloor],
|
||||
this->floorBgIds[this->highestFloor]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1732,7 +1732,7 @@ void func_808326F0(Player* this) {
|
|||
}
|
||||
|
||||
u16 func_8083275C(Player* this, u16 sfxId) {
|
||||
return sfxId + this->unk_89E;
|
||||
return sfxId + this->floorSfxOffset;
|
||||
}
|
||||
|
||||
void func_80832770(Player* this, u16 sfxId) {
|
||||
|
@ -1740,7 +1740,7 @@ void func_80832770(Player* this, u16 sfxId) {
|
|||
}
|
||||
|
||||
u16 func_808327A4(Player* this, u16 sfxId) {
|
||||
return sfxId + this->unk_89E + this->ageProperties->unk_94;
|
||||
return sfxId + this->floorSfxOffset + this->ageProperties->unk_94;
|
||||
}
|
||||
|
||||
void func_808327C4(Player* this, u16 sfxId) {
|
||||
|
@ -1751,7 +1751,7 @@ void func_808327F8(Player* this, f32 arg1) {
|
|||
s32 sfxId;
|
||||
|
||||
if (this->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
sfxId = NA_SE_PL_WALK_HEAVYBOOTS;
|
||||
sfxId = NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_IRON_BOOTS;
|
||||
} else {
|
||||
sfxId = func_808327A4(this, NA_SE_PL_WALK_GROUND);
|
||||
}
|
||||
|
@ -1763,7 +1763,7 @@ void func_80832854(Player* this) {
|
|||
s32 sfxId;
|
||||
|
||||
if (this->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
sfxId = NA_SE_PL_JUMP_HEAVYBOOTS;
|
||||
sfxId = NA_SE_PL_JUMP + SURFACE_SFX_OFFSET_IRON_BOOTS;
|
||||
} else {
|
||||
sfxId = func_808327A4(this, NA_SE_PL_JUMP);
|
||||
}
|
||||
|
@ -1775,7 +1775,7 @@ void func_808328A0(Player* this) {
|
|||
s32 sfxId;
|
||||
|
||||
if (this->currentBoots == PLAYER_BOOTS_IRON) {
|
||||
sfxId = NA_SE_PL_LAND_HEAVYBOOTS;
|
||||
sfxId = NA_SE_PL_LAND + SURFACE_SFX_OFFSET_IRON_BOOTS;
|
||||
} else {
|
||||
sfxId = func_808327A4(this, NA_SE_PL_LAND);
|
||||
}
|
||||
|
@ -1815,7 +1815,8 @@ void func_80832924(Player* this, struct_80832924* entry) {
|
|||
} else if (flags == 0x4000) {
|
||||
func_808327F8(this, 0.0f);
|
||||
} else if (flags == 0x4800) {
|
||||
func_800F4010(&this->actor.projectedPos, this->ageProperties->unk_94 + NA_SE_PL_WALK_LADDER, 0.0f);
|
||||
func_800F4010(&this->actor.projectedPos,
|
||||
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD + this->ageProperties->unk_94, 0.0f);
|
||||
}
|
||||
}
|
||||
cont = (entry->field >= 0);
|
||||
|
@ -5058,7 +5059,7 @@ void func_8083AA10(Player* this, PlayState* play) {
|
|||
func_80835C58(play, this, func_8084411C, 1);
|
||||
func_80832440(play, this);
|
||||
|
||||
this->unk_89E = this->unk_A82;
|
||||
this->floorSfxOffset = this->prevFloorSfxOffset;
|
||||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_LEAVE) && !(this->stateFlags1 & PLAYER_STATE1_27) &&
|
||||
(D_80853604 != FLOOR_PROPERTY_6) && (D_80853604 != FLOOR_PROPERTY_9) && (D_80853600 > 20.0f) &&
|
||||
|
@ -7924,7 +7925,7 @@ static Vec3f D_808545C0 = { 0.0f, 0.0f, 0.0f };
|
|||
s32 func_8084269C(PlayState* play, Player* this) {
|
||||
Vec3f sp2C;
|
||||
|
||||
if ((this->unk_89E == SURFACE_SFX_TYPE_0) || (this->unk_89E == SURFACE_SFX_TYPE_1)) {
|
||||
if ((this->floorSfxOffset == SURFACE_SFX_OFFSET_DIRT) || (this->floorSfxOffset == SURFACE_SFX_OFFSET_SAND)) {
|
||||
func_8084260C(&this->actor.shape.feetPos[FOOT_LEFT], &sp2C,
|
||||
this->actor.floorHeight - this->actor.shape.feetPos[FOOT_LEFT].y, 7.0f, 5.0f);
|
||||
func_800286CC(play, &sp2C, &D_808545B4, &D_808545C0, 50, 30);
|
||||
|
@ -8064,13 +8065,13 @@ void func_80842D20(PlayState* play, Player* this) {
|
|||
|
||||
s32 func_80842DF4(PlayState* play, Player* this) {
|
||||
f32 phi_f2;
|
||||
CollisionPoly* sp78;
|
||||
s32 sp74;
|
||||
CollisionPoly* groundPoly;
|
||||
s32 bgId;
|
||||
Vec3f sp68;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp50;
|
||||
s32 temp1;
|
||||
s32 sp48;
|
||||
s32 surfaceMaterial;
|
||||
|
||||
if (this->meleeWeaponState > 0) {
|
||||
if (this->meleeWeaponAnimation < PLAYER_MWA_SPIN_ATTACK_1H) {
|
||||
|
@ -8088,11 +8089,11 @@ s32 func_80842DF4(PlayState* play, Player* this) {
|
|||
sp68.y = this->meleeWeaponInfo[0].tip.y + (sp50.y * phi_f2);
|
||||
sp68.z = this->meleeWeaponInfo[0].tip.z + (sp50.z * phi_f2);
|
||||
|
||||
if (BgCheck_EntityLineTest1(&play->colCtx, &sp68, &this->meleeWeaponInfo[0].tip, &sp5C, &sp78, true,
|
||||
false, false, true, &sp74) &&
|
||||
!SurfaceType_IsIgnoredByEntities(&play->colCtx, sp78, sp74) &&
|
||||
(SurfaceType_GetFloorType(&play->colCtx, sp78, sp74) != FLOOR_TYPE_6) &&
|
||||
(func_8002F9EC(play, &this->actor, sp78, sp74, &sp5C) == 0)) {
|
||||
if (BgCheck_EntityLineTest1(&play->colCtx, &sp68, &this->meleeWeaponInfo[0].tip, &sp5C, &groundPoly,
|
||||
true, false, false, true, &bgId) &&
|
||||
!SurfaceType_IsIgnoredByEntities(&play->colCtx, groundPoly, bgId) &&
|
||||
(SurfaceType_GetFloorType(&play->colCtx, groundPoly, bgId) != FLOOR_TYPE_6) &&
|
||||
(func_8002F9EC(play, &this->actor, groundPoly, bgId, &sp5C) == 0)) {
|
||||
|
||||
if (this->heldItemAction == PLAYER_IA_HAMMER) {
|
||||
func_80832630(play);
|
||||
|
@ -8102,13 +8103,13 @@ s32 func_80842DF4(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
if (this->linearVelocity >= 0.0f) {
|
||||
sp48 = SurfaceType_GetSfxType(&play->colCtx, sp78, sp74);
|
||||
surfaceMaterial = SurfaceType_GetMaterial(&play->colCtx, groundPoly, bgId);
|
||||
|
||||
if (sp48 == SURFACE_SFX_TYPE_10) {
|
||||
if (surfaceMaterial == SURFACE_MATERIAL_WOOD) {
|
||||
CollisionCheck_SpawnShieldParticlesWood(play, &sp5C, &this->actor.projectedPos);
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticles(play, &sp5C);
|
||||
if (sp48 == SURFACE_SFX_TYPE_11) {
|
||||
if (surfaceMaterial == SURFACE_MATERIAL_DIRT_SOFT) {
|
||||
func_8002F7DC(&this->actor, NA_SE_IT_WALL_HIT_SOFT);
|
||||
} else {
|
||||
func_8002F7DC(&this->actor, NA_SE_IT_WALL_HIT_HARD);
|
||||
|
@ -10008,20 +10009,19 @@ void func_80847BA0(PlayState* play, Player* this) {
|
|||
|
||||
if (floorPoly != NULL) {
|
||||
this->unk_A7A = SurfaceType_GetFloorProperty(&play->colCtx, floorPoly, this->actor.floorBgId);
|
||||
this->unk_A82 = this->unk_89E;
|
||||
this->prevFloorSfxOffset = this->floorSfxOffset;
|
||||
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WATER) {
|
||||
if (this->actor.yDistToWater < 20.0f) {
|
||||
this->unk_89E = SURFACE_SFX_TYPE_4;
|
||||
this->floorSfxOffset = SURFACE_SFX_OFFSET_WATER_SHALLOW;
|
||||
} else {
|
||||
this->unk_89E = SURFACE_SFX_TYPE_5;
|
||||
this->floorSfxOffset = SURFACE_SFX_OFFSET_WATER_DEEP;
|
||||
}
|
||||
} else {
|
||||
if (this->stateFlags2 & PLAYER_STATE2_9) {
|
||||
this->unk_89E = SURFACE_SFX_TYPE_1;
|
||||
this->floorSfxOffset = SURFACE_SFX_OFFSET_SAND;
|
||||
} else {
|
||||
// unk_89E is a sfxType, but SurfaceType_GetSfxId returns a sfxId?
|
||||
this->unk_89E = SurfaceType_GetSfxId(&play->colCtx, floorPoly, this->actor.floorBgId);
|
||||
this->floorSfxOffset = SurfaceType_GetSfxOffset(&play->colCtx, floorPoly, this->actor.floorBgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11565,7 +11565,8 @@ void func_8084BDFC(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8084BEE4(Player* this) {
|
||||
func_8002F7DC(&this->actor, (this->unk_84F != 0) ? NA_SE_PL_WALK_WALL : NA_SE_PL_WALK_LADDER);
|
||||
func_8002F7DC(&this->actor, (this->unk_84F != 0) ? NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_VINE
|
||||
: NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD);
|
||||
}
|
||||
|
||||
void func_8084BF1C(Player* this, PlayState* play) {
|
||||
|
@ -11715,16 +11716,16 @@ static f32 D_80854898[] = { 10.0f, 20.0f };
|
|||
static f32 D_808548A0[] = { 40.0f, 50.0f };
|
||||
|
||||
static struct_80832924 D_808548A8[] = {
|
||||
{ NA_SE_PL_WALK_LADDER, 0x80A },
|
||||
{ NA_SE_PL_WALK_LADDER, 0x814 },
|
||||
{ NA_SE_PL_WALK_LADDER, -0x81E },
|
||||
{ NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, 0x80A },
|
||||
{ NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, 0x814 },
|
||||
{ NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD, -0x81E },
|
||||
};
|
||||
|
||||
void func_8084C5F8(Player* this, PlayState* play) {
|
||||
s32 temp;
|
||||
f32* sp38;
|
||||
CollisionPoly* groundPoly;
|
||||
s32 sp30;
|
||||
s32 bgId;
|
||||
Vec3f sp24;
|
||||
|
||||
this->stateFlags2 |= PLAYER_STATE2_6;
|
||||
|
@ -11753,8 +11754,11 @@ void func_8084C5F8(Player* this, PlayState* play) {
|
|||
sp24.x = this->actor.world.pos.x;
|
||||
sp24.y = this->actor.world.pos.y + 20.0f;
|
||||
sp24.z = this->actor.world.pos.z;
|
||||
if (BgCheck_EntityRaycastDown3(&play->colCtx, &groundPoly, &sp30, &sp24) != 0.0f) {
|
||||
this->unk_89E = SurfaceType_GetSfxType(&play->colCtx, groundPoly, sp30);
|
||||
if (BgCheck_EntityRaycastDown3(&play->colCtx, &groundPoly, &bgId, &sp24) != 0.0f) {
|
||||
//! @bug should use `SurfaceType_GetSfxOffset` instead of `SurfaceType_GetMaterial`.
|
||||
// Most material and sfxOffsets share identical enum values,
|
||||
// so this will mostly result in the correct sfx played, but not in all cases, such as carpet and ice.
|
||||
this->floorSfxOffset = SurfaceType_GetMaterial(&play->colCtx, groundPoly, bgId);
|
||||
func_808328A0(this);
|
||||
}
|
||||
}
|
||||
|
@ -14307,7 +14311,7 @@ void func_80851FB0(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
|||
}
|
||||
|
||||
static struct_80832924 D_808551C8[] = {
|
||||
{ NA_SE_PL_LAND_LADDER, 0x843 },
|
||||
{ NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD, 0x843 },
|
||||
{ 0, 0x4854 },
|
||||
{ 0, 0x485A },
|
||||
{ 0, -0x4860 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue