mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-03 01:53:58 -04:00
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:
+9
-8
@@ -234,8 +234,9 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
|
||||
if (distToFloor <= 10.0f) {
|
||||
actor->shape.feetFloorFlags |= spB8;
|
||||
|
||||
if ((actor->depthInWater < 0.0f) && (bgId == 0x32) && ((actor->shape.unk_17 & spB8) != 0)) {
|
||||
if (func_800C9C24(&play->colCtx, poly, bgId, 1)) {
|
||||
if ((actor->depthInWater < 0.0f) && (bgId == BGCHECK_SCENE) && (actor->shape.unk_17 & spB8)) {
|
||||
if (SurfaceType_HasMaterialProperty(&play->colCtx, poly, bgId,
|
||||
MATERIAL_PROPERTY_SOFT_IMPRINT)) {
|
||||
SkinMatrix_MtxFCopy(&sp13C, &spFC);
|
||||
SkinMatrix_MulYRotation(&spFC, actor->shape.rot.y);
|
||||
EffFootmark_Add(play, &spFC, actor, i, feetPosPtr, (actor->shape.shadowScale * 0.3f),
|
||||
@@ -2183,20 +2184,20 @@ void Actor_PlaySfx(Actor* actor, u16 sfxId) {
|
||||
}
|
||||
|
||||
void func_800B8EF4(PlayState* play, Actor* actor) {
|
||||
u32 sfxId;
|
||||
SurfaceSfxOffset surfaceSfxOffset;
|
||||
|
||||
if (actor->bgCheckFlags & BGCHECKFLAG_WATER) {
|
||||
if (actor->depthInWater < 20.0f) {
|
||||
sfxId = NA_SE_PL_WALK_WATER0 - SFX_FLAG;
|
||||
surfaceSfxOffset = SURFACE_SFX_OFFSET_WATER_SHALLOW;
|
||||
} else {
|
||||
sfxId = NA_SE_PL_WALK_WATER1 - SFX_FLAG;
|
||||
surfaceSfxOffset = SURFACE_SFX_OFFSET_WATER_DEEP;
|
||||
}
|
||||
} else {
|
||||
sfxId = SurfaceType_GetSfx(&play->colCtx, actor->floorPoly, actor->floorBgId);
|
||||
surfaceSfxOffset = SurfaceType_GetSfxOffset(&play->colCtx, actor->floorPoly, actor->floorBgId);
|
||||
}
|
||||
|
||||
Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
|
||||
Audio_PlaySfxAtPos(&actor->projectedPos, sfxId + SFX_FLAG);
|
||||
Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
|
||||
}
|
||||
|
||||
void func_800B8F98(Actor* actor, u16 sfxId) {
|
||||
@@ -2248,7 +2249,7 @@ void func_800B9098(Actor* actor) {
|
||||
}
|
||||
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4) {
|
||||
if (func_800C99D4(&play->colCtx, polygon, bgId) == 8) {
|
||||
if (SurfaceType_GetFloorType(&play->colCtx, polygon, bgId) == FLOOR_TYPE_8) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user