Name some SurfaceType_ functions (#1155)

* enums

* renaming functions

* fixes

* SurfaceType_IsSoft

* type fixing

* format

* Update src/code/z_bgcheck.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_bgcheck.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* review

Co-authored-by: engineer124 <engineer124engineer124@gmail.com>

* SurfaceType_GetFloorEffect

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* format

* bss

* cleanups

* extra material docs

* cleanup

* cleanups

* Remove Bg prefix

* minor fixes

* Remove BG_

* SURFACE_MATERIAL_DIRT_SHALLOW

* format

* bss

* bss

* review

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* format

* format again

* bug

* format

* namefixer

* bss

* bss

* bss

* review

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal
2023-04-18 18:14:36 -04:00
committed by GitHub
parent 4647ebb91b
commit 38d21bbe97
52 changed files with 559 additions and 458 deletions
+6 -5
View File
@@ -250,19 +250,20 @@ void EnHy_UpdateCollider(EnHy* enHy, PlayState* play) {
s32 EnHy_PlayWalkingSound(EnHy* enHy, PlayState* play, f32 distAboveThreshold) {
u8 wasLeftFootOnGround = enHy->isLeftFootOnGround;
u8 wasRightFootOnGround = enHy->isRightFootOnGround;
s32 waterSfxId;
SurfaceSfxOffset surfaceSfxOffset;
u16 sfxId;
u8 isFootOnGround;
if (enHy->actor.bgCheckFlags & BGCHECKFLAG_WATER) {
if (enHy->actor.depthInWater < 20.0f) {
waterSfxId = NA_SE_PL_WALK_WATER0 - SFX_FLAG;
surfaceSfxOffset = SURFACE_SFX_OFFSET_WATER_SHALLOW;
} else {
waterSfxId = NA_SE_PL_WALK_WATER1 - SFX_FLAG;
surfaceSfxOffset = SURFACE_SFX_OFFSET_WATER_DEEP;
}
sfxId = waterSfxId + SFX_FLAG;
sfxId = NA_SE_PL_WALK_GROUND + surfaceSfxOffset;
} else {
sfxId = SurfaceType_GetSfx(&play->colCtx, enHy->actor.floorPoly, enHy->actor.floorBgId) + SFX_FLAG;
sfxId = NA_SE_PL_WALK_GROUND +
SurfaceType_GetSfxOffset(&play->colCtx, enHy->actor.floorPoly, enHy->actor.floorBgId);
}
enHy->isLeftFootOnGround = isFootOnGround = SubS_IsFloorAbove(play, &enHy->leftFootPos, distAboveThreshold);