From f70e363392a7e5f1d5b0f488b28697e578f1d3d2 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Fri, 27 Sep 2024 11:29:19 +0200 Subject: [PATCH] [headers] z64bgcheck.h functions (#2239) * [headers] z64bgcheck.h functions * format * bss --- include/functions.h | 121 --------------------------------- include/z64bgcheck.h | 127 +++++++++++++++++++++++++++++++++++ src/code/z_collision_check.c | 1 - 3 files changed, 127 insertions(+), 122 deletions(-) diff --git a/include/functions.h b/include/functions.h index e3216f105c..7b437bfdb7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -218,127 +218,6 @@ void Overlay_FreeGameState(GameStateOverlay* overlayEntry); void ActorOverlayTable_LogPrint(void); void ActorOverlayTable_Init(void); void ActorOverlayTable_Cleanup(void); -void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest); -f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point); -void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest); -void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader* colHeader); -f32 BgCheck_EntityRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos); -f32 BgCheck_EntityRaycastDown2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos); -f32 BgCheck_EntityRaycastDown3(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Vec3f* pos); -f32 BgCheck_EntityRaycastDown4(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor, - Vec3f* pos); -f32 BgCheck_EntityRaycastDown5(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, - Actor* actor, Vec3f* pos); -f32 BgCheck_EntityRaycastDown6(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor, - Vec3f* pos, f32 chkDist); -f32 BgCheck_EntityRaycastDown7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos); -f32 BgCheck_AnyRaycastDown1(CollisionContext* colCtx, CollisionPoly* outGroundPoly, Vec3f* pos); -f32 BgCheck_AnyRaycastDown2(CollisionContext* colCtx, CollisionPoly* outGroundPoly, s32* bgId, Vec3f* pos); -f32 BgCheck_CameraRaycastDown2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos); -f32 BgCheck_EntityRaycastDownWalls(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos); -f32 BgCheck_EntityRaycastDown9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos); -s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, - CollisionPoly** outPoly, f32 checkHeight); -s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, - CollisionPoly** outPoly, s32* outBgId, f32 checkHeight); -s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, - CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight); -s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, - CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight); -s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight); -s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight, - CollisionPoly** outPoly, s32* outBgId, Actor* actor); -s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, - CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); -s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, - CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); -s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, - CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); -s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, - CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, - Actor* actor); -s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, - CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, - Actor* actor, f32 chkDist); -s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, - CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, - s32* bgId); -s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, - s32 chkOneFace); -s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, - s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace); -s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, - s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); -s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius); -s32 DynaPoly_IsBgIdBgActor(s32 bgId); -void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader); -DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId); -void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgId); -void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna); -void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor); -void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna); -void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyna); -void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest); -void func_800418D0(CollisionContext* colCtx, PlayState* play); -u32 SurfaceType_GetBgCamIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u16 BgCheck_GetBgCamSettingImpl(CollisionContext* colCtx, u32 bgCamIndex, s32 bgId); -u16 BgCheck_GetBgCamSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u16 BgCheck_GetBgCamCount(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -Vec3s* BgCheck_GetBgCamFuncDataImpl(CollisionContext* colCtx, s32 bgCamIndex, s32 bgId); -Vec3s* BgCheck_GetBgCamFuncData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetFloorType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_GetWallFlags(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_CheckWallFlag0(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_CheckWallFlag1(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_CheckWallFlag2(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetFloorProperty(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_IsSoft(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetMaterial(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u16 SurfaceType_GetSfxOffset(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetLightSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_CanHookshot(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 SurfaceType_IsFloorConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -u32 func_80042108(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -s32 WaterBox_GetSurface1(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, - WaterBox** outWaterBox); -s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist, - WaterBox** outWaterBox); -s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, - WaterBox** outWaterBox); -u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox); -u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox); -u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox); -s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint); -s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint); -#if OOT_DEBUG -void BgCheck_DrawDynaCollision(PlayState*, CollisionContext*); -void BgCheck_DrawStaticCollision(PlayState*, CollisionContext*); -#endif -void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId); -s32 DynaPolyActor_TransformCarriedActor(CollisionContext* colCtx, s32 bgId, Actor* carriedActor); -void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 transformFlags); -void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor); -void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor); -void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId); -void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId); -void func_80043538(DynaPolyActor* dynaActor); -s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor); -s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor); -s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor); -s32 func_800435B4(DynaPolyActor* dynaActor); -s32 func_800435D8(PlayState* play, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4); void SaveContext_Init(void); s32 func_800635D0(s32); diff --git a/include/z64bgcheck.h b/include/z64bgcheck.h index d5364a24b3..5dd5eeab75 100644 --- a/include/z64bgcheck.h +++ b/include/z64bgcheck.h @@ -361,4 +361,131 @@ typedef struct DynaLineTest { /* 0x28 */ f32 chkDist; // distance from poly } DynaLineTest; +void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest); +f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point); +void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest); +void BgCheck_Allocate(CollisionContext* colCtx, struct PlayState* play, CollisionHeader* colHeader); +f32 BgCheck_EntityRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos); +f32 BgCheck_EntityRaycastDown2(struct PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, + Vec3f* pos); +f32 BgCheck_EntityRaycastDown3(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Vec3f* pos); +f32 BgCheck_EntityRaycastDown4(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, struct Actor* actor, + Vec3f* pos); +f32 BgCheck_EntityRaycastDown5(struct PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, + s32* bgId, struct Actor* actor, Vec3f* pos); +f32 BgCheck_EntityRaycastDown6(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, struct Actor* actor, + Vec3f* pos, f32 chkDist); +f32 BgCheck_EntityRaycastDown7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor, + Vec3f* pos); +f32 BgCheck_AnyRaycastDown1(CollisionContext* colCtx, CollisionPoly* outGroundPoly, Vec3f* pos); +f32 BgCheck_AnyRaycastDown2(CollisionContext* colCtx, CollisionPoly* outGroundPoly, s32* bgId, Vec3f* pos); +f32 BgCheck_CameraRaycastDown2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos); +f32 BgCheck_EntityRaycastDownWalls(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor, + Vec3f* pos); +f32 BgCheck_EntityRaycastDown9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos); +s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, + CollisionPoly** outPoly, f32 checkHeight); +s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, + CollisionPoly** outPoly, s32* outBgId, f32 checkHeight); +s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, + CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight); +s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, + CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight); +s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight); +s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight, + CollisionPoly** outPoly, s32* outBgId, struct Actor* actor); +s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, + CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); +s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, + CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); +s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, + CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); +s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, + CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, + struct Actor* actor); +s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, + CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, + struct Actor* actor, f32 chkDist); +s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, + CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, + s32* bgId); +s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, + s32 chkOneFace); +s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, + s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace); +s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, + s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId); +s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius); +s32 DynaPoly_IsBgIdBgActor(s32 bgId); +void DynaPoly_DisableCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId); +void DynaPoly_EnableCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId); +void DynaPoly_DisableCeilingCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId); +s32 DynaPoly_SetBgActor(struct PlayState* play, DynaCollisionContext* dyna, struct Actor* actor, + CollisionHeader* colHeader); +struct DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId); +void DynaPoly_DeleteBgActor(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId); +void DynaPoly_InvalidateLookup(struct PlayState* play, DynaCollisionContext* dyna); +void DynaPoly_UnsetAllInteractFlags(struct PlayState* play, DynaCollisionContext* dyna, struct Actor* actor); +void DynaPoly_UpdateContext(struct PlayState* play, DynaCollisionContext* dyna); +void DynaPoly_UpdateBgActorTransforms(struct PlayState* play, DynaCollisionContext* dyna); +void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest); +void func_800418D0(CollisionContext* colCtx, struct PlayState* play); +u32 SurfaceType_GetBgCamIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u16 BgCheck_GetBgCamSettingImpl(CollisionContext* colCtx, u32 bgCamIndex, s32 bgId); +u16 BgCheck_GetBgCamSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u16 BgCheck_GetBgCamCount(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +Vec3s* BgCheck_GetBgCamFuncDataImpl(CollisionContext* colCtx, s32 bgCamIndex, s32 bgId); +Vec3s* BgCheck_GetBgCamFuncData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetFloorType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_GetWallFlags(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_CheckWallFlag0(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_CheckWallFlag1(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_CheckWallFlag2(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetFloorProperty(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_IsSoft(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetMaterial(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u16 SurfaceType_GetSfxOffset(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetLightSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_CanHookshot(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 SurfaceType_IsFloorConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +u32 func_80042108(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); +s32 WaterBox_GetSurface1(struct PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, + WaterBox** outWaterBox); +s32 WaterBox_GetSurface2(struct PlayState* play, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist, + WaterBox** outWaterBox); +s32 WaterBox_GetSurfaceImpl(struct PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, + WaterBox** outWaterBox); +u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox); +u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox); +u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox); +s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint); +s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint); +#if OOT_DEBUG +void BgCheck_DrawDynaCollision(struct PlayState*, CollisionContext*); +void BgCheck_DrawStaticCollision(struct PlayState*, CollisionContext*); +#endif + +void func_80043334(CollisionContext* colCtx, struct Actor* actor, s32 bgId); +s32 DynaPolyActor_TransformCarriedActor(CollisionContext* colCtx, s32 bgId, struct Actor* carriedActor); +void DynaPolyActor_Init(struct DynaPolyActor* dynaActor, s32 transformFlags); +void DynaPolyActor_UnsetAllInteractFlags(struct DynaPolyActor* dynaActor); +void DynaPolyActor_SetActorOnTop(struct DynaPolyActor* dynaActor); +void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId); +void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId); +void func_80043538(struct DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsActorOnTop(struct DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsPlayerOnTop(struct DynaPolyActor* dynaActor); +s32 DynaPolyActor_IsPlayerAbove(struct DynaPolyActor* dynaActor); +s32 func_800435B4(struct DynaPolyActor* dynaActor); +s32 func_800435D8(struct PlayState* play, struct DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4); + #endif diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 27629dd829..9e93ce2cd1 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -2258,7 +2258,6 @@ void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChk #if OOT_DEBUG static s8 sBssDummy0; -static s8 sBssDummy1; #endif void CollisionCheck_ATQuadVsACCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {