summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2022-07-31 20:57:18 +0200
committerGitHub <noreply@github.com>2022-07-31 20:57:18 +0200
commit706d5596bf4661ac895779bc6b9837ba8b0f8d99 (patch)
treefe6693d3759fefafed8a3e12673b49320fa83199 /src/code/z_actor.c
parent6889c275cbc143697537c1861b1a860ccb2c473e (diff)
Doc, macros, enums for `SurfaceType.data` (#1293)
* `SURFACETYPE`0/1 getter macros * Cleanup/assess/revert existing names * `SURFACETYPE0_30` -> "soft" * `SURFACETYPE0_`13/26 -> floortype/floorproperty * Introduce `SURFACETYPE_FLOORTYPE_` enum * Introduce `SURFACETYPE_FLOORPROPERTY_` enum * `SURFACETYPE0_21` -> "wall type", and maps to "wall flags" * Introduce `SURFACETYPE_WALLTYPE_` enum * Introduce `SURFACETYPE_WALLFLAG_` defines * `SURFACETYPE1_0` -> "sfx type" * `SurfaceType_GetSfx` -> `GetSfxId` and cleanup * Introduce `SURFACETYPE_SFXTYPE_` enum * Note oddity on `Player.unk_89E` (more docs needed) * `SURFACETYPE1_4` -> "floor effect" (not 100% set on the name, just something different from type and property) * Introduce `SURFACETYPE_FLOOREFFECT_` enum * Introduce `SURFACETYPE_CONVEYORSPEED_` enum * Add `SURFACETYPE_CONVEYORDIRECTION_TO_BINANG` macro * `wallDamage` -> `hasFlag27` * Be more underscore-happy * Revert "`SURFACETYPE`0/1 getter macros" This reverts commit e61cccf2e69a71c292a3680f9263b3eaf78c25f1. * remove mention to removed define * Remove surfacetype_ prefix, `SFX_TYPE_` -> `SURFACE_SFX_TYPE_`, `FLOOREFFECT_` -> `FLOOR_EFFECT_` * Formatting * 0-pad litteral to 8 nibbles
Diffstat (limited to 'src/code/z_actor.c')
-rw-r--r--src/code/z_actor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 091f6fc02..75409861f 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -1705,7 +1705,7 @@ void func_8002F850(PlayState* play, Actor* actor) {
sfxId = NA_SE_PL_WALK_WATER1 - SFX_FLAG;
}
} else {
- sfxId = SurfaceType_GetSfx(&play->colCtx, actor->floorPoly, actor->floorBgId);
+ sfxId = SurfaceType_GetSfxId(&play->colCtx, actor->floorPoly, actor->floorBgId);
}
func_80078914(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
@@ -1749,7 +1749,7 @@ void func_8002F994(Actor* actor, s32 arg1) {
// Tests if something hit Jabu Jabu surface, displaying hit splash and playing sfx if true
s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) {
- if (func_80041D4C(&play->colCtx, poly, bgId) == 8) {
+ if (SurfaceType_GetFloorType(&play->colCtx, poly, bgId) == FLOOR_TYPE_8) {
play->roomCtx.unk_74[0] = 1;
CollisionCheck_BlueBlood(play, NULL, pos);
Audio_PlayActorSfx2(actor, NA_SE_IT_WALL_HIT_BUYO);