Merge remote-tracking branch 'upstream/master' into ovl_Eff_Dust

This commit is contained in:
angie
2021-01-23 01:22:30 -03:00
1003 changed files with 28386 additions and 22481 deletions
+155 -174
View File
@@ -347,12 +347,13 @@ void EffectSsIceSmoke_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocit
void FlagSet_Update(GlobalContext* globalCtx);
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3);
void ActorShadow_DrawFunc_Circle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawFunc_Squiggly(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void func_8002BDB0(Actor* actor, s32 arg1, s32 arg2, Vec3f* arg3, s32 arg4, Vec3f* arg5);
void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale);
void ActorShadow_DrawCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawWhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawHorse(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx);
void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex,
Vec3f* rightFootPos);
void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx);
s32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
void Flags_SetSwitch(GlobalContext* globalCtx, s32 flag);
@@ -376,7 +377,7 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt
s32 arg5, s32 arg6, s32 arg7);
s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx);
void Actor_Kill(Actor* actor);
void Actor_SetHeight(Actor* actor, f32 offset);
void Actor_SetFocus(Actor* actor, f32 offset);
void Actor_SetScale(Actor* actor, f32 scale);
void Actor_SetObjectDependency(GlobalContext* globalCtx, Actor* actor);
void func_8002D7EC(Actor* actor);
@@ -385,14 +386,14 @@ void Actor_MoveForward(Actor* actor);
void func_8002D908(Actor* actor);
void func_8002D97C(Actor* actor);
void func_8002D9A4(Actor* actor, f32 arg1);
s16 func_8002DA78(Actor* actorA, Actor* actorB);
s16 func_8002DAC0(Actor* actor, Vec3f* arg1);
f32 func_8002DB48(Actor* actorA, Actor* actorB);
f32 func_8002DB6C(Actor* actor, Vec3f* arg1);
s16 func_8002DAE0(Actor* actorA, Actor* actorB);
s16 func_8002DB28(Actor* actor, Vec3f* arg1);
f32 func_8002DB8C(Actor* actorA, Actor* actorB);
f32 func_8002DBB0(Actor* actor, Vec3f* arg1);
s16 Actor_WorldYawTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldYawTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
f32 Actor_WorldDistXYZToPoint(Actor* actor, Vec3f* refPoint);
s16 Actor_WorldPitchTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldPitchTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXZToActor(Actor* actorA, Actor* actorB);
f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2);
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
f32 Player_GetHeight(Player* player);
@@ -414,14 +415,14 @@ s32 func_8002DFC8(Actor* actor, s16 arg1, GlobalContext* globalCtx);
s32 func_8002E084(Actor* actor, s16 arg1);
s32 func_8002E12C(Actor* actor, f32 arg1, s16 arg2);
s32 func_8002E1A8(Actor* actorA, Actor* actorB, f32 arg2, s16 arg3);
void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag);
void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag);
PosRot* func_8002EEE4(PosRot* arg0, Actor* actor);
PosRot* func_8002EF14(PosRot* arg0, Actor* actor);
PosRot* func_8002EF44(PosRot* arg0, Actor* actor);
PosRot* Actor_GetFocus(PosRot* arg0, Actor* actor);
PosRot* Actor_GetWorld(PosRot* arg0, Actor* actor);
PosRot* Actor_GetWorldPosShapeRot(PosRot* arg0, Actor* actor);
s32 func_8002F0C8(Actor* actor, Player* player, s32 arg2);
u32 func_8002F194(Actor* actor, GlobalContext* globalCtx);
s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u32 arg4);
@@ -469,7 +470,7 @@ void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCt
Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, GlobalContext* globalCtx);
Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalCtx);
Actor* func_80032AF0(GlobalContext* globalCtx, ActorContext* actorCtx, Actor** actorPtr, Player* player);
Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorType);
Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory);
void func_80032C7C(GlobalContext* globalCtx, Actor* actor);
void func_80032E24(struct_80032E24* arg0, s32 arg1, GlobalContext* globalCtx);
void func_80032F54(struct_80032E24* arg0, s32 arg1, s32 arg2, s32 arg3, u32 arg4, Gfx** dList, s16 arg6);
@@ -480,7 +481,7 @@ void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s1
Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider);
Actor* func_80033684(GlobalContext* globalCtx, Actor* explosiveActor);
Actor* func_80033780(GlobalContext* globalCtx, Actor* refActor, f32 arg2);
void Actor_ChangeType(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorType);
void Actor_ChangeCategory(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
void Actor_SetTextWithPrefix(GlobalContext* globalCtx, Actor* actor, s16 textIdLower);
s16 func_800339B8(Actor* actor, GlobalContext* globalCtx, f32 arg2, s16 arg3);
s32 func_80033A84(GlobalContext* globalCtx, Actor* actor);
@@ -511,13 +512,13 @@ void func_80034F54(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3);
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist);
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist);
Actor* Actor_FindNearby(GlobalContext* globalCtx, Actor* refActor, s16 actorId, u8 actorType, f32 range);
Actor* Actor_FindNearby(GlobalContext* globalCtx, Actor* refActor, s16 actorId, u8 actorCategory, f32 range);
s32 func_800354B4(GlobalContext* globalCtx, Actor* actor, f32 range, s16 arg3, s16 arg4, s16 arg5);
void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3);
void func_800355B8(GlobalContext* globalCtx, Vec3f* arg1);
u8 func_800355E4(GlobalContext* globalCtx, Collider* collider);
u8 Actor_ApplyDamage(Actor* actor);
void func_80035650(Actor* actor, ColliderBody* colBody, s32 freezeFlag);
void func_80035650(Actor* actor, ColliderInfo* colBody, s32 freezeFlag);
void func_8003573C(Actor* actor, ColliderJntSph* colBody, s32 freezeFlag);
void func_80035844(Vec3f* arg0, Vec3f* arg1, s16* arg2, s32 arg3);
void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
@@ -560,8 +561,10 @@ void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionCon
// ? func_8003992C(?);
// ? BgCheck_ComputeWallDisplacement(?);
// ? BgCheck_SphVsStaticWall(?);
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight, CollisionPoly** outPoly);
s32 func_8003A5B8(SSList* headNodeId, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB, Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq, f32 chkDist, s32 bccFlags);
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
f32 checkHeight, CollisionPoly** outPoly);
s32 func_8003A5B8(SSList* headNodeId, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq, f32 chkDist, s32 bccFlags);
// ? func_8003A7D8(?);
// ? BgCheck_SphVsFirstStaticPolyList(?);
// ? BgCheck_SphVsFirstStaticPoly(?);
@@ -580,37 +583,60 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
// ? BgCheck_GetCollisionHeader(?);
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly,
Vec3f* pos);
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* arg4);
f32 BgCheck_EntityRaycastFloor5(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos, f32 chkDist);
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor,
Vec3f* arg4);
f32 BgCheck_EntityRaycastFloor5(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId,
Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos,
f32 chkDist);
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
s32 BgCheck_SphVsWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
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_SphVsWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev,
f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
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);
// ? BgCheck_CheckCeilingImpl(?);
s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* arg1, Vec3f* arg2, f32 arg3, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_LineTestImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 chkDist, u32 bccFlags);
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_EntityCheckCeiling(CollisionContext* colCtx, f32* arg1, Vec3f* arg2, f32 arg3, CollisionPoly** outPoly,
s32* outBgId, Actor* actor);
s32 BgCheck_LineTestImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
Vec3f* posResult, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 chkDist, u32 bccFlags);
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);
// ? BgCheck_SphVsFirstPolyImpl(?);
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
void SSNodeList_Initialize(SSNodeList*);
void SSNodeList_Alloc(GlobalContext* globalCtx, SSNodeList* this, s32 tblMax, s32 numPolys);
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
@@ -644,15 +670,19 @@ void DynaPoly_UpdateBgActorTransforms(GlobalContext* globalCtx, DynaCollisionCon
// ? BgCheck_RaycastFloorDynaList(?);
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
// ? BgCheck_SphVsDynaWallInBgActor(?);
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
// ? BgCheck_CheckDynaCeilingList(?);
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist,
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
// ? func_80040FA4(?);
// ? func_80041128(?);
s32 func_80041240(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist, s32 bccFlags);
s32 func_80041240(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist, s32 bccFlags);
// ? BgCheck_SphVsFirstDynaPolyList(?);
// ? BgCheck_SphVsFirstDynaPolyInBgActor(?);
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId, Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
// ? CollisionHeader_SegmentedToVirtual(?);
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
void BgCheck_ResetPolyCheckTbl(SSNodeList* nodeList, s32 numPolys);
@@ -687,9 +717,12 @@ s32 SurfaceType_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bg
u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 WaterBox_GetSurface1(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist, WaterBox** outWaterBox);
s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
s32 WaterBox_GetSurface1(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
WaterBox** outWaterBox);
s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist,
WaterBox** outWaterBox);
s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
WaterBox** outWaterBox);
u32 WaterBox_GetCamDataIndex(CollisionContext* colCtx, WaterBox* waterBox);
u16 WaterBox_GetCameraSType(CollisionContext* colCtx, WaterBox* waterBox);
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox);
@@ -708,8 +741,8 @@ s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags);
void func_800434A0(DynaPolyActor* dynaActor);
void func_800434A8(DynaPolyActor* dynaActor);
void func_800434C8(CollisionContext* colCtx, s32 floorPolySource);
void func_80043508(CollisionContext* colCtx, s32 floorPolySource);
void func_800434C8(CollisionContext* colCtx, s32 floorBgId);
void func_80043508(CollisionContext* colCtx, s32 floorBgId);
void func_80043538(DynaPolyActor* dynaActor);
s32 func_80043548(DynaPolyActor* dynaActor);
s32 func_8004356C(DynaPolyActor* dynaActor);
@@ -742,99 +775,59 @@ void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* d
UNK_TYPE arg6);
s16 func_8005B1A4(Camera* camera);
DamageTable* DamageTable_Get(s32 index);
void func_8005B280(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
void func_8005B2AC(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
s32 Collider_InitBase(GlobalContext* globalCtx, Collider* collider);
s32 Collider_DestroyBase(GlobalContext* globalCtx, Collider* collider);
s32 Collider_SetBase_Actor(GlobalContext* globalCtx, Collider* collider, ColliderInit_Actor* src);
s32 Collider_SetBase_Set3(GlobalContext* globalCtx, Collider* collider, Actor* actor, ColliderInit_Set3* src);
s32 Collider_SetBase(GlobalContext* globalCtx, Collider* collider, Actor* actor, ColliderInit* src);
void Collider_BaseSetAT(GlobalContext* globalCtx, Collider* collider);
void Collider_BaseSetAC(GlobalContext* globalCtx, Collider* collider);
void Collider_BaseSetOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitTouch(GlobalContext* globalCtx, ColliderTouch* touch);
s32 Collider_DestroyTouch(GlobalContext* globalCtx, ColliderTouch* touch);
s32 Collider_SetTouch(GlobalContext* globalCtx, ColliderTouch* dest, ColliderTouch* src);
void Collider_BodySetAT_Unk(GlobalContext* globalCtx, ColliderBody* body);
s32 Collider_InitBump(GlobalContext* globalCtx, ColliderBump* bump);
s32 Collider_DestroyBump(GlobalContext* globalCtx, ColliderBump* bump);
s32 Collider_SetBump(GlobalContext* globalCtx, ColliderBump* bump, ColliderBumpInit* init);
s32 Collider_InitBody(GlobalContext* globalCtx, ColliderBody* body);
s32 Collider_DestroyBody(GlobalContext* globalCtx, ColliderBody* body);
s32 Collider_SetBody(GlobalContext* globalCtx, ColliderBody* body, ColliderBodyInit* bodyInit);
void Collider_BodySetAT(GlobalContext* globalCtx, ColliderBody* body);
void Collider_BodySetAC(GlobalContext* globalCtx, ColliderBody* body);
void Collider_BodySetOC(GlobalContext* globalCtx, ColliderBody* body);
s32 Collider_InitJntSphItemDim(GlobalContext* globalCtx, ColliderJntSphItemDim* dim);
s32 Collider_DestroyJntSphItemDim(GlobalContext* globalCtx, ColliderJntSphItemDim* item);
s32 Collider_SetJntSphItemDim(GlobalContext* globalCtx, ColliderJntSphItemDim* dest, ColliderJntSphItemDimInit* src);
s32 Collider_InitJntSphItem(GlobalContext* globalCtx, ColliderJntSphItem* item);
s32 Collider_DestroyJntSphItem(GlobalContext* globalCtx, ColliderJntSphItem* item);
s32 Collider_SetJntSphItem(GlobalContext* globalCtx, ColliderJntSphItem* dest, ColliderJntSphItemInit* src);
s32 Collider_JntSphItemSetAT(GlobalContext* globalCtx, ColliderJntSphItem* collider);
s32 Collider_JntSphItemSetAC(GlobalContext* globalCtx, ColliderJntSphItem* collider);
s32 Collider_JntSphItemSetOC(GlobalContext* globalCtx, ColliderJntSphItem* collider);
void DamageTable_Clear(DamageTable* table);
void Collider_DrawRedPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
s32 Collider_InitJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
s32 Collider_FreeJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
s32 Collider_DestroyJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
s32 Collider_SetJntSph_Set(GlobalContext* globalCtx, ColliderJntSph* dest, ColliderJntSphInit_Actor* src);
s32 Collider_SetJntSph_Set3(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit_Set3* src);
s32 Collider_SetJntSph_Set5(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src);
s32 Collider_SetJntSphToActor(GlobalContext* globalCtx, ColliderJntSph* dest, ColliderJntSphInitToActor* src);
s32 Collider_SetJntSphAllocType1(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor,
ColliderJntSphInitType1* src);
s32 Collider_SetJntSphAlloc(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src);
s32 Collider_SetJntSph(GlobalContext* globalCtx, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src,
ColliderJntSphItem* list);
s32 Collider_InitCylinderDim(GlobalContext* globalCtx, Cylinder16* dim);
s32 Collider_DestroyCylinderDim(GlobalContext* globalCtx, Cylinder16* dim);
s32 Collider_SetCylinderDim(GlobalContext* globalCtx, Cylinder16* dest, Cylinder16* src);
ColliderJntSphElement* elements);
s32 Collider_ResetJntSphAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetJntSphAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetJntSphOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitCylinder(GlobalContext* globalCtx, ColliderCylinder* collider);
s32 Collider_DestroyCylinder(GlobalContext* globalCtx, ColliderCylinder* collider);
s32 Collider_SetCylinder_Actor(GlobalContext* globalCtx, ColliderCylinder* collider, ColliderCylinderInit_Actor* arg2);
s32 Collider_SetCylinder_Set3(GlobalContext* globalCtx, ColliderCylinder* collider, Actor* actor,
ColliderCylinderInit_Set3* src);
s32 Collider_SetCylinderToActor(GlobalContext* globalCtx, ColliderCylinder* collider, ColliderCylinderInitToActor* src);
s32 Collider_SetCylinderType1(GlobalContext* globalCtx, ColliderCylinder* collider, Actor* actor,
ColliderCylinderInitType1* src);
s32 Collider_SetCylinder(GlobalContext* globalCtx, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src);
s32 Collider_CylinderSetAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_CylinderSetAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_CylinderSetOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitTrisItemDim(GlobalContext* globalCtx, TriNorm* dim);
s32 Collider_DestroyTrisItemDim(GlobalContext* globalCtx, TriNorm* dim);
s32 Collider_SetTrisItemDim(GlobalContext* globalCtx, TriNorm* dest, ColliderTrisItemDimInit* src);
s32 Collider_InitTrisItem(GlobalContext* globalCtx, ColliderTrisItem* collider);
s32 Collider_DestroyTrisItem(GlobalContext* globalCtx, ColliderTrisItem* collider);
s32 Collider_SetTrisItem(GlobalContext* globalCtx, ColliderTrisItem* dest, ColliderTrisItemInit* src);
s32 Collider_TrisItemSetAT(GlobalContext* globalCtx, ColliderTrisItem* item);
s32 Collider_TrisItemSetAC(GlobalContext* globalCtx, ColliderTrisItem* item);
s32 Collider_TrisItemSetOC(GlobalContext* globalCtx, ColliderTrisItem* item);
s32 Collider_ResetCylinderAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetCylinderAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetCylinderOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitTris(GlobalContext* globalCtx, ColliderTris* tris);
s32 Collider_FreeTris(GlobalContext* globalCtx, ColliderTris* tris);
s32 Collider_DestroyTris(GlobalContext* globalCtx, ColliderTris* tris);
s32 Collider_SetTris_Set3(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInit_Set3* src);
s32 Collider_SetTris_Set5(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInit* src);
s32 Collider_SetTrisAllocType1(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInitType1* src);
s32 Collider_SetTrisAlloc(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInit* src);
s32 Collider_SetTris(GlobalContext* globalCtx, ColliderTris* dest, Actor* actor, ColliderTrisInit* src,
ColliderTrisItem* list);
s32 Collider_TrisSetAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_TrisSetAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_TrisSetOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitQuadDim(GlobalContext* globalCtx, ColliderQuadDim* dim);
s32 Collider_DestroyQuadDim(GlobalContext* globalCtx, ColliderQuadDim* dim);
s32 func_8005CEC4(GlobalContext* globalCtx, ColliderQuadDim* dim);
void func_8005CEDC(ColliderQuadDim* dim);
s32 Collider_SetQuadDim(GlobalContext* globalCtx, ColliderQuadDim* dest, ColliderQuadDimInit* src);
ColliderTrisElement* elements);
s32 Collider_ResetTrisAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetTrisAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetTrisOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitQuad(GlobalContext* globalCtx, ColliderQuad* collider);
s32 Collider_DestroyQuad(GlobalContext* globalCtx, ColliderQuad* collider);
s32 Collider_SetQuad_Set3(GlobalContext* globalCtx, ColliderQuad* collider, Actor* actor, ColliderQuadInit_Set3* src);
s32 Collider_SetQuadType1(GlobalContext* globalCtx, ColliderQuad* collider, Actor* actor, ColliderQuadInitType1* src);
s32 Collider_SetQuad(GlobalContext* globalCtx, ColliderQuad* collider, Actor* actor, ColliderQuadInit* src);
s32 Collider_QuadSetAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_QuadSetAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_QuadSetOC(GlobalContext* globalCtx, Collider* collider);
s32 func_8005D218(GlobalContext* globalCtx, ColliderQuad* quad, Vec3f* arg2);
s32 Collider_InitOcLine(GlobalContext* globalCtx, OcLine* line);
s32 Collider_DestroyOcLine(GlobalContext* globalCtx, OcLine* line);
void func_8005D3BC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_DestroyContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
s32 Collider_ResetQuadAT(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetQuadAC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_ResetQuadOC(GlobalContext* globalCtx, Collider* collider);
s32 Collider_InitLine(GlobalContext* globalCtx, OcLine* line);
s32 Collider_DestroyLine(GlobalContext* globalCtx, OcLine* line);
s32 Collider_SetLinePoints(GlobalContext* globalCtx, OcLine* ocLine, Vec3f* a, Vec3f* b);
s32 Collider_SetLine(GlobalContext* globalCtx, OcLine* dest, OcLine* src);
s32 Collider_ResetLineOC(GlobalContext* globalCtx, OcLine* line);
void CollisionCheck_InitContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_DestroyContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_ClearContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_EnableSAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_DisableSAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void func_8005D4DC(GlobalContext* globalCtx, Collider* collider);
void CollisionCheck_Draw(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void Collider_Draw(GlobalContext* globalCtx, Collider* collider);
void CollisionCheck_DrawCollision(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
s32 CollisionCheck_SetAT_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
@@ -842,49 +835,35 @@ s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* co
s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
s32 CollisionCheck_SetOCLine(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, OcLine* collider);
// ? func_8005DF2C(?);
// ? func_8005DF50(?);
// ? func_8005DF74(?);
void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* pos);
void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* pos);
// ? func_8005E2EC(?);
// ? func_8005E4F8(?);
// ? func_8005E604(?);
// ? func_8005E800(?);
// ? func_8005E81C(?);
// ? func_800611A0(?);
// ? func_80061274(?);
void func_8006139C(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
// ? func_8006146C(?);
// ? func_800614A4(?);
// ? func_80061BF4(?);
// ? func_80061C18(?);
void CollisionCheck_BlueBlood(GlobalContext* globalCtx, Collider* collider, Vec3f* v);
void CollisionCheck_AT(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
void CollisionCheck_OC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
// ? func_80061E48(?);
void func_80061E8C(CollisionCheckInfo* info);
void func_80061EB0(CollisionCheckInfo* info, CollisionCheckInfoInit* init);
void func_80061ED4(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit* init);
void func_80061EFC(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit2* init);
// ? func_80061F64(?);
// ? func_800622E4(?);
s32 CollisionCheck_GeneralLineOcCheck(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* camera_3C,
Vec3f* arg3, Actor** arg4, s32 arg5);
s32 func_800626B0(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* camera_3C, Vec3f* arg3,
Actor** arg4, s32 arg5);
void Collider_CylinderUpdate(Actor* actor, ColliderCylinder* collider);
void func_80062718(ColliderCylinder* collider, Vec3s* pos);
void func_80062734(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
void func_800627A0(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
void func_800628A4(s32 arg0, ColliderJntSph* collider);
void func_80062A28(GlobalContext*, Vec3f*);
void func_80062B80(GlobalContext*, Vec3f*);
void func_80062CD4(GlobalContext* globalCtx, Vec3f* v);
void func_80062D60(GlobalContext* globalCtx, Vec3f* v);
void func_80062DAC(GlobalContext* globalCtx, Vec3f* v, Vec3f* arg2);
void func_80062DF4(GlobalContext* globalCtx, Vec3f* v);
void func_80062E14(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2);
s32 func_80062ECC(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos, Vec3f* itemProjPos, Vec3f* out1,
Vec3f* out2);
void CollisionCheck_InitInfo(CollisionCheckInfo* info);
void CollisionCheck_ResetDamage(CollisionCheckInfo* info);
void CollisionCheck_SetInfoNoDamageTable(CollisionCheckInfo* info, CollisionCheckInfoInit* init);
void CollisionCheck_SetInfo(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit* init);
void CollisionCheck_SetInfo2(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit2* init);
void CollisionCheck_SetInfoGetDamageTable(CollisionCheckInfo* info, s32 index, CollisionCheckInfoInit2* init);
void CollisionCheck_Damage(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
s32 CollisionCheck_LineOCCheckAll(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b);
s32 CollisionCheck_LineOCCheck(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b,
Actor** exclusions, s32 numExclusions);
void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider);
void Collider_SetCylinderPosition(ColliderCylinder* collider, Vec3s* pos);
void Collider_SetQuadVertices(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
void Collider_SetTrisDim(GlobalContext* globalCtx, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* init);
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* collider);
void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticles(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec3f* v, Vec3f* actorPos);
void CollisionCheck_SpawnShieldParticlesMetal2(GlobalContext* globalCtx, Vec3f* v);
void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* b, Vec3f* actorPos);
s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos,
Vec3f* itemProjPos, Vec3f* out1, Vec3f* out2);
u8 CollisionCheck_GetSwordDamage(s32 dmgFlags);
void SaveContext_Init(void);
// ? func_800636C0(?);
void func_8006375C(s32 arg0, s32 arg1, const char* text);
@@ -934,6 +913,7 @@ void SkelCurve_Draw(Actor* actor, GlobalContext* globalCtx, SkelAnimeCurve* skel
// ? func_8006D0EC(?);
// ? func_8006D684(?);
void func_8006DC68(GlobalContext* globalCtx, Player* player);
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
u32 Jpeg_SendTask(JpegContext* ctx);
void Jpeg_CopyToZbuffer(u16* src, u16* zbuffer, s32 x, s32 y);
u16 Jpeg_GetU16(u8* ptr);
@@ -1092,7 +1072,7 @@ s16 func_800800F8(GlobalContext* globalCtx, s16 csID, s16 timer, Actor* actor, s
void func_800803F0(GlobalContext* globalCtx, s16 camId);
s16 func_80080480(GlobalContext* globalCtx, Actor* actor);
void func_800806BC(GlobalContext* globalCtx, Actor* actor, u16 sfxId);
UNK_TYPE func_80080728(GlobalContext* globalCtx, u8 actorType);
UNK_TYPE func_80080728(GlobalContext* globalCtx, u8 actorCategory);
void func_80080788(UNK_TYPE, UNK_TYPE);
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx);
void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor);
@@ -2256,6 +2236,7 @@ void func_800F4010(Vec3f*, u16 sfxId, f32);
void func_800F41E0(Vec3f*, u16 sfxId, u8);
void func_800F4138(Vec3f*, u16 sfxId, f32);
void func_800F4190(Vec3f*, u16 sfxId);
void func_800F4254(Vec3f* pos, u8 arg1);
void func_800F436C(Vec3f*, s16 arg1, f32 arg2);
void func_800F4414(Vec3f*, u16, f32);
void func_800F44EC(UNK_TYPE arg0, UNK_TYPE arg1);
+2 -2
View File
@@ -12,14 +12,14 @@
#define SQ(x) ((x)*(x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
#define DECR(x) ((x) == 0 ? 0 : --(x))
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
#define RGBA8(r, g, b, a) (((r & 0xFF) << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | ((a & 0xFF) << 0))
#define PLAYER ((Player*)globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].first)
#define PLAYER ((Player*)globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head)
#define ACTIVE_CAM globalCtx->cameraPtrs[globalCtx->activeCamera]
+4 -4
View File
@@ -173,9 +173,9 @@ extern u8 D_80114930[];
//extern ? D_801159A8;
//extern ? D_801159A9;
//extern ? D_801159AA;
extern EffectSsOverlay gEffectSsOverlayTable[37];
extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX];
extern Gfx D_80116280[];
extern ActorOverlay gActorOverlayTable[471]; // original name: "actor_dlftbls" 801162A0
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
extern s32 gMaxActorId; // original name: "MaxProfile"
//extern ? D_80119E2C;
//extern ? D_80119E52;
@@ -397,9 +397,9 @@ extern u8 gItemSlots[56];
extern void (*gSceneCmdHandlers[26])(GlobalContext*, SceneCmd*);
extern s16 gLinkObjectIds[2];
extern u32 gObjectTableSize;
extern RomFile gObjectTable[402];
extern RomFile gObjectTable[OBJECT_ID_MAX];
extern EntranceInfo gEntranceTable[1556];
extern Scene gSceneTable[110];
extern Scene gSceneTable[SCENE_ID_MAX];
//extern ? D_8012A4A0;
extern u16 gSramSlotOffsets[2][3];
//extern ? D_8012A690;
+12 -12
View File
@@ -205,7 +205,7 @@ typedef struct {
/* 0x40 */ f32 unk_40;
/* 0x44 */ f32 unk_44;
/* 0x48 */ s16 unk_48;
/* 0x4A */ u8 activeType;
/* 0x4A */ u8 activeCategory;
/* 0x4B */ u8 unk_4B;
/* 0x4C */ s8 unk_4C;
/* 0x4D */ char unk_4D[0x03];
@@ -228,8 +228,8 @@ typedef struct {
} TitleCardContext; // size = 0x10
typedef struct {
/* 0x00 */ s32 length; // number of actors loaded of this type
/* 0x04 */ Actor* first; // pointer to first actor of this type
/* 0x00 */ s32 length; // number of actors loaded of this category
/* 0x04 */ Actor* head; // pointer to head of the linked list of this category (most recent actor added)
} ActorListEntry; // size = 0x08
typedef struct {
@@ -240,7 +240,7 @@ typedef struct {
/* 0x0004 */ char unk_04[0x04];
/* 0x0008 */ u8 total; // total number of actors loaded
/* 0x0009 */ char unk_09[0x03];
/* 0x000C */ ActorListEntry actorList[12];
/* 0x000C */ ActorListEntry actorLists[12];
/* 0x006C */ TargetContext targetCtx;
struct {
/* 0x0104 */ u32 swch;
@@ -667,15 +667,15 @@ typedef struct {
} RoomContext; // size = 0x74
typedef struct {
/* 0x000 */ s16 colAtCount;
/* 0x000 */ s16 colATCount;
/* 0x002 */ u16 sacFlags;
/* 0x004 */ Collider* colAt[COLLISION_CHECK_AT_MAX];
/* 0x0CC */ s32 colAcCount;
/* 0x0D0 */ Collider* colAc[COLLISION_CHECK_AC_MAX];
/* 0x1C0 */ s32 colOcCount;
/* 0x1C4 */ Collider* colOc[COLLISION_CHECK_OC_MAX];
/* 0x28C */ s32 colOcLineCount;
/* 0x290 */ OcLine* colOcLine[COLLISION_CHECK_OC_LINE_MAX];
/* 0x004 */ Collider* colAT[COLLISION_CHECK_AT_MAX];
/* 0x0CC */ s32 colACCount;
/* 0x0D0 */ Collider* colAC[COLLISION_CHECK_AC_MAX];
/* 0x1C0 */ s32 colOCCount;
/* 0x1C4 */ Collider* colOC[COLLISION_CHECK_OC_MAX];
/* 0x28C */ s32 colLineCount;
/* 0x290 */ OcLine* colLine[COLLISION_CHECK_OC_LINE_MAX];
} CollisionCheckContext; // size = 0x29C
typedef struct ListAlloc {
+135 -108
View File
@@ -9,52 +9,51 @@
#define ACTOR_NUMBER_MAX 200
#define INVISIBLE_ACTOR_MAX 20
#define AM_FIELD_SIZE 0x27A0
#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC collisions
#define MASS_HEAVY 0xFE // Can only be pushed by OC collisions with IMMOVABLE and HEAVY objects.
struct Actor;
// From z64.h
struct GlobalContext;
// From z64light.h
struct Lights;
typedef void (*ActorFunc)(struct Actor*, struct GlobalContext*);
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct GlobalContext*);
typedef u16 (*callback1_800343CC)(struct GlobalContext*, struct Actor*);
typedef s16 (*callback2_800343CC)(struct GlobalContext*, struct Actor*);
typedef struct {
Vec3f pos;
Vec3s rot;
} PosRot; // size = 0x14
typedef void (*ActorFunc)(struct Actor*, struct GlobalContext*);
typedef u16 (*callback1_800343CC)(struct GlobalContext*, struct Actor*);
typedef s16 (*callback2_800343CC)(struct GlobalContext*, struct Actor*);
typedef struct {
/* 0x00 */ s16 id;
/* 0x02 */ u8 type; // Classifies actor and determines when actor will execute
/* 0x02 */ u8 category; // Classifies actor and determines when it will update or draw
/* 0x04 */ u32 flags;
/* 0x08 */ s16 objectId;
/* 0x0C */ u32 instanceSize;
/* 0x10 */ ActorFunc init; // Constructor
/* 0x14 */ ActorFunc destroy; // Destructor
/* 0x18 */ ActorFunc update; // Main Update Function
/* 0x18 */ ActorFunc update; // Update Function
/* 0x1C */ ActorFunc draw; // Draw function
} ActorInit; // size = 0x20
typedef enum {
ALLOCTYPE_NORMAL,
ALLOCTYPE_ABSOLUTE,
ALLOCTYPE_PERMANENT
/* 0 */ ALLOCTYPE_NORMAL,
/* 1 */ ALLOCTYPE_ABSOLUTE,
/* 2 */ ALLOCTYPE_PERMANENT
} AllocType;
typedef struct {
/* 0x00 */ u32 vromStart;
/* 0x04 */ u32 vromEnd;
/* 0x00 */ u32 vromStart;
/* 0x04 */ u32 vromEnd;
/* 0x08 */ void* vramStart;
/* 0x0C */ void* vramEnd;
/* 0x10 */ void* loadedRamAddr; // original name: "allocp"
/* 0x14 */ ActorInit* initInfo;
/* 0x18 */ char* name;
/* 0x1C */ u16 allocType;
/* 0x1E */ s8 nbLoaded; // original name: "clients"
/* 0x1C */ u16 allocType;
/* 0x1E */ s8 nbLoaded; // original name: "clients"
} ActorOverlay; // size = 0x20
typedef struct {
@@ -63,103 +62,131 @@ typedef struct {
typedef struct {
/* 0x00 */ u8 health;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x02 */ s16 cylRadius;
/* 0x04 */ s16 cylHeight;
/* 0x06 */ u8 mass;
} CollisionCheckInfoInit;
typedef struct {
/* 0x00 */ u8 health;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x02 */ s16 cylRadius;
/* 0x04 */ s16 cylHeight;
/* 0x06 */ s16 cylYShift;
/* 0x08 */ u8 mass;
} CollisionCheckInfoInit2;
typedef struct {
/* 0x00 */ DamageTable* damageTable; // For actors which contain one (example: Stalfos)...
/* 0x00 */ DamageTable* damageTable;
/* 0x04 */ Vec3f displacement; // Amount to correct velocity (0x5C) by when colliding into a body
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 unk_12;
/* 0x14 */ u16 unk_14;
/* 0x16 */ u8 mass; // Used to compute displacement, 50 is common value, 0xFF for infinite mass/unmoveable
/* 0x17 */ u8 health;
/* 0x18 */ u8 damage; // Amount to decrement health by
/* 0x19 */ u8 damageEffect; // Stores what effect should occur when hit by a weapon
/* 0x1A */ u8 atHitEffect; // Stores what effect should occur when AT connects with an AC
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT
/* 0x10 */ s16 cylRadius; // Used for various purposes
/* 0x12 */ s16 cylHeight; // Used for various purposes
/* 0x14 */ s16 cylYShift; // Unused. Purpose inferred from Cylinder16 and CollisionCheck_CylSideVsLineSeg
/* 0x16 */ u8 mass; // Used to compute displacement for OC collisions
/* 0x17 */ u8 health; // Note: some actors may use their own health variable instead of this one
/* 0x18 */ u8 damage; // Amount to decrement health by
/* 0x19 */ u8 damageEffect; // Stores what effect should occur when hit by a weapon
/* 0x1A */ u8 atHitEffect; // Stores what effect should occur when AT connects with an AC
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT
} CollisionCheckInfo; // size = 0x1C
typedef struct {
/* 0x00 */ Vec3s rot; // Current actor shape rotation
/* 0x06 */ s16 unk_06;
/* 0x08 */ f32 unk_08; // Model y axis offset. Represents model space units. collision mesh related
/* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct Lights*, struct GlobalContext*);
/* 0x10 */ f32 unk_10;
/* 0x14 */ u8 unk_14;
/* 0x15 */ u8 unk_15;
/* 0x00 */ Vec3s rot; // Current actor shape rotation
/* 0x06 */ s16 face; // Used to index eyebrow/eye/mouth textures. Only used by player
/* 0x08 */ f32 yOffset; // Model y axis offset. Represents model space units
/* 0x0C */ ActorShadowFunc shadowDraw; // Shadow draw function
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
/* 0x14 */ u8 shadowAlpha; // Default is 255
/* 0x15 */ u8 feetFloorFlags; // Set if the actor's foot is clipped under the floor. & 1 is right foot, & 2 is left
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw
} ActorShape; // size = 0x18
typedef struct Actor {
/* 0x000 */ s16 id; // Actor Id
/* 0x002 */ u8 type; // Actor Type. Refer to the corresponding enum for values
/* 0x003 */ s8 room; // Room number the actor is in. -1 denotes that the actor won't despawn on a room change
/* 0x004 */ u32 flags; // Flags used for various purposes
/* 0x008 */ PosRot initPosRot; // Initial position/rotation when spawned. Is sometimes used for other purposes
/* 0x01C */ s16 params; // original name: "args_data"; Configurable variable set by an actor's spawn data
/* 0x01E */ s8 objBankIndex; // original name: "bank"; Object bank index of this actor's object dependency
/* 0x01F */ s8 unk_1F;
/* 0x020 */ u16 sfx; // Plays sound effect relative to actor's location (if within range of camera?)
/* 0x024 */ PosRot posRot; // position/rotation in the world
/* 0x038 */ PosRot posRot2;
/* 0x04C */ f32 unk_4C;
/* 0x050 */ Vec3f scale; // Sets x,y,z scaling factor. Typically, a factor of 0.01 is used for each axis
/* 0x05C */ Vec3f velocity;
/* 0x068 */ f32 speedXZ; // Always positive, stores how fast the actor is traveling along the XZ plane
/* 0x06C */ f32 gravity; // Acceleration due to gravity; value is added to Y velocity every frame
/* 0x070 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
/* 0x074 */ CollisionPoly* wallPoly; // Wall polygon an actor is touching
/* 0x078 */ CollisionPoly* floorPoly; // Floor polygon an actor is over/touching
/* 0x07C */ u8 wallPolySource; // Complex Poly Surface Source. 0x32 = Scene
/* 0x07D */ u8 floorPolySource; // Complex Poly Surface Source. 0x32 = Scene. related to 0x80/88
/* 0x07E */ s16 wallPolyRot; // Rotation of the wall poly
/* 0x080 */ f32 groundY; // Floor poly height
/* 0x084 */ f32 yDistToWater; // Distance from water surface
/* 0x088 */ u16 bgCheckFlags;
/* 0x08A */ s16 yawTowardsLink;
/* 0x08C */ f32 xyzDistToLinkSq;
/* 0x090 */ f32 xzDistToLink;
/* 0x094 */ f32 yDistToLink;
/* 0x098 */ CollisionCheckInfo colChkInfo;
/* 0x0B4 */ ActorShape shape;
/* 0x0CC */ Vec3f unk_CC[2];
/* 0x0E4 */ Vec3f projectedPos; // actor position in projected space
/* 0x0F0 */ f32 projectedW; // w component of the projected actor position vector
/* 0x0F4 */ f32 uncullZoneForward; // amount to increase the uncull zone forward by (in projected space)
/* 0x0F8 */ f32 uncullZoneScale; // amount to increase the uncull zone scale by (in projected space)
/* 0x0FC */ f32 uncullZoneDownward; // amount to increase uncull zone downward by (in projected space)
/* 0x100 */ Vec3f pos4; // previous position
/* 0x10C */ u8 unk_10C; // Z-Target related
/* 0x10D */ u8 unk_10D; // Z-Target related
/* 0x10E */ u16 textId; // Text id to pass to link/display when interacting with an actor
/* 0x110 */ u16 freezeTimer;
/* 0x112 */ u16 dmgEffectParams; // Specifies damage effect color (white/red/blue) and if opaque or translucent
/* 0x114 */ u8 dmgEffectTimer;
/* 0x115 */ u8 isDrawn; // Indicates whether the actor is currently being drawn (but not seen through lens)
/* 0x116 */ u8 unk_116;
/* 0x117 */ u8 naviEnemyId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
/* 0x118 */ struct Actor* parent;
/* 0x11C */ struct Actor* child;
/* 0x120 */ struct Actor* prev; // Previous Actor of this type
/* 0x124 */ struct Actor* next; // Next Actor of this type
/* 0x128 */ ActorFunc init; // Initialization Routine. Called by Actor_Init or Actor_UpdateAll
/* 0x12C */ ActorFunc destroy; // Destruction Routine. Called by Actor_Destroy
/* 0x130 */ ActorFunc update; // Update Routine. Called by Actor_UpdateAll
/* 0x134 */ ActorFunc draw; // Draw Routine. Called by Actor_Draw
/* 0x000 */ s16 id; // Actor ID
/* 0x002 */ u8 category; // Actor category. Refer to the corresponding enum for values
/* 0x003 */ s8 room; // Room number the actor is in. -1 denotes that the actor won't despawn on a room change
/* 0x004 */ u32 flags; // Flags used for various purposes
/* 0x008 */ PosRot home; // Initial position/rotation when spawned. Can be used for other purposes
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
/* 0x020 */ u16 sfx; // SFX ID to play. Sound plays when value is set, then is cleared the following update cycle
/* 0x024 */ PosRot world; // Position/rotation in the world
/* 0x038 */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
/* 0x04C */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position
/* 0x050 */ Vec3f scale; // Scale of the actor in each axis
/* 0x05C */ Vec3f velocity; // Velocity of the actor in each axis
/* 0x068 */ f32 speedXZ; // How fast the actor is traveling along the XZ plane
/* 0x06C */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame
/* 0x070 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
/* 0x074 */ CollisionPoly* wallPoly; // Wall polygon the actor is touching
/* 0x078 */ CollisionPoly* floorPoly; // Floor polygon directly below the actor
/* 0x07C */ u8 wallBgId; // Bg ID of the wall polygon the actor is touching
/* 0x07D */ u8 floorBgId; // Bg ID of the floor polygon directly below the actor
/* 0x07E */ s16 wallYaw; // Y rotation of the wall polygon the actor is touching
/* 0x080 */ f32 floorHeight; // Y position of the floor polygon directly below the actor
/* 0x084 */ f32 yDistToWater; // Distance to the surface of active waterbox. Negative value means above water
/* 0x088 */ u16 bgCheckFlags; // See comments below actor struct for wip docs. TODO: macros for these flags
/* 0x08A */ s16 yawTowardsPlayer; // Y rotation difference between the actor and the player
/* 0x08C */ f32 xyzDistToPlayerSq; // Squared distance between the actor and the player in the x,y,z axis
/* 0x090 */ f32 xzDistToPlayer; // Distance between the actor and the player in the XZ plane
/* 0x094 */ f32 yDistToPlayer; // Dist is negative if the actor is above the player
/* 0x098 */ CollisionCheckInfo colChkInfo; // Variables related to the Collision Check system
/* 0x0B4 */ ActorShape shape; // Variables related to the physical shape of the actor
/* 0x0E4 */ Vec3f projectedPos; // Position of the actor in projected space
/* 0x0F0 */ f32 projectedW; // w component of the projected actor position
/* 0x0F4 */ f32 uncullZoneForward; // Amount to increase the uncull zone forward by (in projected space)
/* 0x0F8 */ f32 uncullZoneScale; // Amount to increase the uncull zone scale by (in projected space)
/* 0x0FC */ f32 uncullZoneDownward; // Amount to increase uncull zone downward by (in projected space)
/* 0x100 */ Vec3f prevPos; // World position from the previous update cycle
/* 0x10C */ u8 isTargeted; // Set to true if the actor is currently being targeted by the player
/* 0x10D */ u8 targetPriority; // Lower values have higher priority. Resets to 0 when player stops targeting
/* 0x10E */ u16 textId; // Text ID to pass to link/display when interacting with the actor
/* 0x110 */ u16 freezeTimer; // Actor does not update when set. Timer decrements automatically
/* 0x112 */ u16 colorFilterParams; // Set color filter to red, blue, or white. Toggle opa or xlu
/* 0x114 */ u8 colorFilterTimer; // A non-zero value enables the color filter. Decrements automatically
/* 0x115 */ u8 isDrawn; // Set to true if the actor is currently being drawn. Always stays false for lens actors
/* 0x116 */ u8 dropFlag; // Configures what item is dropped by the actor from `Item_DropCollectibleRandom`
/* 0x117 */ u8 naviEnemyId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
/* 0x118 */ struct Actor* parent; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
/* 0x11C */ struct Actor* child; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
/* 0x120 */ struct Actor* prev; // Previous actor of this category
/* 0x124 */ struct Actor* next; // Next actor of this category
/* 0x128 */ ActorFunc init; // Initialization Routine. Called by `Actor_Init` or `Actor_UpdateAll`
/* 0x12C */ ActorFunc destroy; // Destruction Routine. Called by `Actor_Destroy`
/* 0x130 */ ActorFunc update; // Update Routine. Called by `Actor_UpdateAll`
/* 0x134 */ ActorFunc draw; // Draw Routine. Called by `Actor_Draw`
/* 0x138 */ ActorOverlay* overlayEntry; // Pointer to the overlay table entry for this actor
/* 0x13C */ char dbgPad[0x10]; // Padding that only exists in the debug rom
/* 0x13C */ char dbgPad[0x10]; // Padding that only exists in the debug rom
} Actor; // size = 0x14C
typedef enum {
/* 0 */ FOOT_LEFT,
/* 1 */ FOOT_RIGHT
} ActorFootIndex;
/*
BgCheckFlags WIP documentation:
& 0x001 : Standing on the ground
& 0x002 : Has touched the ground (only active for 1 frame)
& 0x004 : Has left the ground (only active for 1 frame)
& 0x008 : Touching a wall
& 0x010 : Touching a ceiling
& 0x020 : On or below water surface
& 0x040 : Has touched water (actor is responsible for unsetting this the frame it touches the water)
& 0x080 : Similar to & 0x1 but with no velocity check and is cleared every frame
& 0x100 : Crushed between a floor and ceiling (triggers a void for player)
& 0x200 : Unknown (only set/used by player so far)
*/
/*
colorFilterParams WIP documentation
& 0x8000 : white
& 0x4000 : red
if neither of the above are set : blue
(& 0x1F00 >> 5) | 7 : color intensity
0x2000 : translucent, else opaque
*/
typedef struct DynaPolyActor {
/* 0x000 */ struct Actor actor;
@@ -262,19 +289,19 @@ typedef struct EnAObj {
} EnAObj; // size = 0x1C8
typedef enum {
/* 0x00 */ ACTORTYPE_SWITCH,
/* 0x01 */ ACTORTYPE_BG,
/* 0x02 */ ACTORTYPE_PLAYER,
/* 0x03 */ ACTORTYPE_EXPLOSIVES,
/* 0x04 */ ACTORTYPE_NPC,
/* 0x05 */ ACTORTYPE_ENEMY,
/* 0x06 */ ACTORTYPE_PROP,
/* 0x07 */ ACTORTYPE_ITEMACTION,
/* 0x08 */ ACTORTYPE_MISC,
/* 0x09 */ ACTORTYPE_BOSS,
/* 0x0A */ ACTORTYPE_DOOR,
/* 0x0B */ ACTORTYPE_CHEST
} ActorType;
/* 0x00 */ ACTORCAT_SWITCH,
/* 0x01 */ ACTORCAT_BG,
/* 0x02 */ ACTORCAT_PLAYER,
/* 0x03 */ ACTORCAT_EXPLOSIVE,
/* 0x04 */ ACTORCAT_NPC,
/* 0x05 */ ACTORCAT_ENEMY,
/* 0x06 */ ACTORCAT_PROP,
/* 0x07 */ ACTORCAT_ITEMACTION,
/* 0x08 */ ACTORCAT_MISC,
/* 0x09 */ ACTORCAT_BOSS,
/* 0x0A */ ACTORCAT_DOOR,
/* 0x0B */ ACTORCAT_CHEST
} ActorCategory;
typedef enum {
/* 0x0000 */ ACTOR_PLAYER,
+2 -2
View File
@@ -677,9 +677,9 @@ typedef struct {
* & 0x00FF = atInitFlags
* & 0xFF00 = eyeInitFlags
* 0x1: Direct Copy of atTargetInit
* if initFlags & 0x6060: use posRot2 for focus point
* if initFlags & 0x6060: use head for focus point
* 0x2: Add atTargetInit to view's lookAt
* if initFlags & 0x6060: use posRot for focus point
* if initFlags & 0x6060: use world for focus point
* 0x3: Add atTargetInit to camera's at
* 0x4: Don't update targets?
* 0x8: flag to use atTagetInit as f32 pitch, yaw, r
+260 -123
View File
@@ -9,245 +9,382 @@
// From z64.h
struct Actor;
typedef enum {
COLTYPE_UNK0,
COLTYPE_UNK1,
COLTYPE_UNK2,
COLTYPE_UNK3,
COLTYPE_UNK4,
COLTYPE_UNK5,
COLTYPE_UNK6,
COLTYPE_UNK7,
COLTYPE_UNK8,
COLTYPE_METAL_SHIELD,
COLTYPE_UNK10,
COLTYPE_WOODEN_SHIELD,
COLTYPE_UNK12,
COLTYPE_UNK13
} ColliderType;
typedef enum {
COLSHAPE_JNTSPH,
COLSHAPE_CYLINDER,
COLSHAPE_TRIS,
COLSHAPE_QUAD,
COLSHAPE_INVALID
} ColliderShape;
typedef struct {
/* 0x00 */ struct Actor* actor;
/* 0x04 */ struct Actor* at;
/* 0x08 */ struct Actor* ac;
/* 0x0C */ struct Actor* oc;
/* 0x10 */ u8 atFlags; // Compared to acFlags
/* 0x11 */ u8 acFlags; // Compared to atFlags
/* 0x12 */ u8 maskA; // Bitwise-and compared to maskB
/* 0x13 */ u8 maskB; // Bitwise-and compared to maskA
/* 0x14 */ u8 type;
/* 0x15 */ u8 shape; // ColliderShape
/* 0x00 */ struct Actor* actor; // Attached actor
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} Collider; // size = 0x18
typedef struct {
/* 0x00 */ u8 type;
/* 0x01 */ u8 atFlags;
/* 0x02 */ u8 acFlags;
/* 0x03 */ u8 maskA; // Bitwise-And with maskB
/* 0x04 */ u8 maskB; // Bitwise-And with maskA
/* 0x05 */ u8 shape; // ColliderShape
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
/* 0x02 */ u8 acFlags; // Information flags for OC collisions.
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x04 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x05 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInit; // size = 0x06
typedef struct {
/* 0x00 */ u8 type;
/* 0x01 */ u8 atFlags;
/* 0x02 */ u8 acFlags;
/* 0x03 */ u8 maskA; // Bitwise-And with maskB
/* 0x04 */ u8 shape; // Collider Type
} ColliderInit_Set3; // size = 0x05
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
/* 0x02 */ u8 acFlags; // Information flags for AC collisions.
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x04 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitType1; // size = 0x05
typedef struct {
/* 0x00 */ struct Actor* actor;
/* 0x04 */ u8 atFlags; // Compared to acFlags
/* 0x05 */ u8 acFlags; // Compared to atFlags
/* 0x06 */ u8 maskA; // Bitwise-and compared to maskB
/* 0x07 */ u8 shape; // ColliderShape
} ColliderInit_Actor; // size = 0x08
/* 0x04 */ u8 atFlags; // Information flags for AT collisions.
/* 0x05 */ u8 acFlags; // Information flags for AC collisions.
/* 0x06 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x07 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitToActor; // size = 0x08
typedef struct {
/* 0x00 */ u32 flags; // Toucher Attack ID Flags
/* 0x04 */ u8 effect;
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 damage; // Damage or Stun Timer
} ColliderTouch; // size = 0x08
typedef struct {
/* 0x00 */ u32 flags; // Collision Exclusion Mask
/* 0x00 */ u32 dmgFlags; // Bumper damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
/* 0x06 */ Vec3s unk_06;
/* 0x06 */ Vec3s hitPos; // Point of contact
} ColliderBump; // size = 0x0C
typedef struct {
/* 0x00 */ u32 flags; // Collision Exclusion Mask
/* 0x00 */ u32 dmgFlags; // Bumper exclusion mask
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense;
/* 0x05 */ u8 defense; // Damage Resistance
} ColliderBumpInit; // size = 0x08
typedef struct ColliderBody {
/* 0x00 */ ColliderTouch toucher;
/* 0x08 */ ColliderBump bumper;
/* 0x14 */ u8 flags; // affects sfx reaction when attacked by Link
/* 0x15 */ u8 toucherFlags;
/* 0x16 */ u8 bumperFlags;
/* 0x17 */ u8 ocFlags;
/* 0x18 */ Collider* atHit; // object touching this object's AT collider
/* 0x1C */ Collider* acHit; // object touching this object's AC collider
/* 0x20 */ struct ColliderBody* atHitItem; // element that hit the AT collider
/* 0x24 */ struct ColliderBody* acHitItem; // element that hit the AC collider
} ColliderBody; // size = 0x28
typedef struct ColliderInfo {
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
} ColliderInfo; // size = 0x28
typedef struct {
/* 0x00 */ u8 bodyFlags;
/* 0x04 */ ColliderTouch toucher;
/* 0x0C */ ColliderBumpInit bumper;
/* 0x14 */ u8 toucherFlags; // Attack Toucher Flags
/* 0x15 */ u8 bumperFlags; // Bumper Flags
/* 0x16 */ u8 bodyFlags2;
} ColliderBodyInit; // size = 0x18
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x04 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
} ColliderInfoInit; // size = 0x18
typedef struct {
/* 0x00 */ Sphere16 modelSphere; // model space sphere
/* 0x08 */ Sphere16 worldSphere; // world space sphere
/* 0x10 */ f32 scale; // world space sphere = model * scale * 0.01
/* 0x14 */ u8 joint;
} ColliderJntSphItemDim; // size = 0x18
/* 0x14 */ u8 limb; // attached limb
} ColliderJntSphElementDim; // size = 0x18
typedef struct {
/* 0x00 */ u8 joint;
/* 0x02 */ Sphere16 modelSphere;
/* 0x0A */ s16 scale;
} ColliderJntSphItemDimInit; // size = 0x0C
/* 0x00 */ u8 limb; // attached limb
/* 0x02 */ Sphere16 modelSphere; // model space sphere
/* 0x0A */ s16 scale; // world space sphere = model * scale * 0.01
} ColliderJntSphElementDimInit; // size = 0x0C
typedef struct {
/* 0x00 */ ColliderBody body;
/* 0x28 */ ColliderJntSphItemDim dim;
} ColliderJntSphItem; // size = 0x40
/* 0x00 */ ColliderInfo info;
/* 0x28 */ ColliderJntSphElementDim dim;
} ColliderJntSphElement; // size = 0x40
typedef struct {
/* 0x00 */ ColliderBodyInit body;
/* 0x18 */ ColliderJntSphItemDimInit dim;
} ColliderJntSphItemInit; // size = 0x24
/* 0x00 */ ColliderInfoInit info;
/* 0x18 */ ColliderJntSphElementDimInit dim;
} ColliderJntSphElementInit; // size = 0x24
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderJntSphItem* list;
/* 0x1C */ ColliderJntSphElement* elements;
} ColliderJntSph; // size = 0x20
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphItemInit* list;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInit_Set3 base;
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphItemInit* list;
} ColliderJntSphInit_Set3; // size = 0x10
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitType1; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInit_Actor base;
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphItemInit* list;
} ColliderJntSphInit_Actor; // size = 0x10
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitToActor; // size = 0x10
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderBody body;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ Cylinder16 dim;
} ColliderCylinder; // size = 0x4C
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderBodyInit body;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInit_Set3 base;
/* 0x08 */ ColliderBodyInit body;
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit_Set3; // size = 0x2C
} ColliderCylinderInitType1; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInit_Actor base;
/* 0x08 */ ColliderBodyInit body;
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit_Actor; // size = 0x2C
} ColliderCylinderInitToActor; // size = 0x2C
typedef struct {
/* 0x00 */ Vec3f vtx[3];
} ColliderTrisItemDimInit; // size = 0x24
} ColliderTrisElementDimInit; // size = 0x24
typedef struct {
/* 0x00 */ ColliderBody body;
/* 0x00 */ ColliderInfo info;
/* 0x28 */ TriNorm dim;
} ColliderTrisItem; // size = 0x5C
} ColliderTrisElement; // size = 0x5C
typedef struct {
/* 0x00 */ ColliderBodyInit body;
/* 0x18 */ ColliderTrisItemDimInit dim;
} ColliderTrisItemInit; // size 0x3C
/* 0x00 */ ColliderInfoInit info;
/* 0x18 */ ColliderTrisElementDimInit dim;
} ColliderTrisElementInit; // size 0x3C
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderTrisItem* list;
/* 0x1C */ ColliderTrisElement* elements;
} ColliderTris; // size = 0x20
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisItemInit* list;
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInit_Set3 base;
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisItemInit* list;
} ColliderTrisInit_Set3; // size = 0x10
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInitType1; // size = 0x10
typedef struct {
/* 0x00 */ Vec3f quad[4];
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
/* 0x3C */ f32 unk_3C;
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
} ColliderQuadDim; // size = 0x40
typedef struct {
/* 0x00 */ Vec3f quad[4];
} ColliderQuadDimInit; // size = 0x30
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x24 */ ColliderQuadDim dim;
} ColliderQuadElement; // size = 0x68
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderBody body;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ ColliderQuadDim dim;
} ColliderQuad; // size = 0x80
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderBodyInit body;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit; // size = 0x50
typedef struct {
/* 0x00 */ ColliderInit_Set3 base;
/* 0x08 */ ColliderBodyInit body;
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit_Set3; // size = 0x50
} ColliderQuadInitType1; // size = 0x50
typedef struct {
/* 0x00 */ Linef line;
/* 0x18 */ u16 unk_18;
/* 0x18 */ u16 ocFlags;
} OcLine; // size = 0x1C
typedef enum {
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
/* 9 */ COLTYPE_METAL,
/* 10 */ COLTYPE_NONE,
/* 11 */ COLTYPE_WOOD,
/* 12 */ COLTYPE_HARD,
/* 13 */ COLTYPE_TREE
} ColliderType;
typedef enum {
/* 0 */ COLSHAPE_JNTSPH,
/* 1 */ COLSHAPE_CYLINDER,
/* 2 */ COLSHAPE_TRIS,
/* 3 */ COLSHAPE_QUAD,
/* 4 */ COLSHAPE_INVALID
} ColliderShape;
/**
* Affects the sound Link's sword makes when hitting it, hookability,
* and possibly other things. It's definitely not flags, as all checks
* are == or !=. Will probably need more actors decomped to truly
* understand what this is.
*/
typedef enum {
/* 0 */ ELEMTYPE_UNK0,
/* 1 */ ELEMTYPE_UNK1,
/* 2 */ ELEMTYPE_UNK2,
/* 3 */ ELEMTYPE_UNK3,
/* 4 */ ELEMTYPE_UNK4,
/* 5 */ ELEMTYPE_UNK5,
/* 6 */ ELEMTYPE_UNK6,
/* 7 */ ELEMTYPE_UNK7
} ElementType;
#define AT_NONE 0 // No flags set. Cannot have AT collisions when set as AT
#define AT_ON (1 << 0) // Can have AT collisions when set as AT
#define AT_HIT (1 << 1) // Had an AT collision
#define AT_BOUNCED (1 << 2) // Had an AT collision with an AC_HARD collider
#define AT_TYPE_PLAYER (1 << 3) // Has player-aligned damage
#define AT_TYPE_ENEMY (1 << 4) // Has enemy-aligned damage
#define AT_TYPE_OTHER (1 << 5) // Has non-aligned damage
#define AT_SELF (1 << 6) // Can have AT collisions with colliders attached to the same actor
#define AT_TYPE_ALL (AT_TYPE_PLAYER | AT_TYPE_ENEMY | AT_TYPE_OTHER) // Has all three damage alignments
#define AC_NONE 0 // No flags set. Cannot have AC collisions when set as AC
#define AC_ON (1 << 0) // Can have AC collisions when set as AC
#define AC_HIT (1 << 1) // Had an AC collision
#define AC_HARD (1 << 2) // Causes AT colliders to bounce off it
#define AC_TYPE_PLAYER AT_TYPE_PLAYER // Takes player-aligned damage
#define AC_TYPE_ENEMY AT_TYPE_ENEMY // Takes enemy-aligned damage
#define AC_TYPE_OTHER AT_TYPE_OTHER // Takes non-aligned damage
#define AC_NO_DAMAGE (1 << 6) // Collider does not take damage
#define AC_BOUNCED (1 << 7) // Caused an AT collider to bounce off it
#define AC_TYPE_ALL (AC_TYPE_PLAYER | AC_TYPE_ENEMY | AC_TYPE_OTHER) // Takes damage from all three alignments
#define OC1_NONE 0 // No flags set. Cannot have OC collisions when set as OC
#define OC1_ON (1 << 0) // Can have OC collisions when set as OC
#define OC1_HIT (1 << 1) // Had an OC collision
#define OC1_NO_PUSH (1 << 2) // Does not push other colliders away during OC collisions
#define OC1_TYPE_PLAYER (1 << 3) // Can have OC collisions with OC type player
#define OC1_TYPE_1 (1 << 4) // Can have OC collisions with OC type 1
#define OC1_TYPE_2 (1 << 5) // Can have OC collisions with OC type 2
#define OC1_TYPE_ALL (OC1_TYPE_PLAYER | OC1_TYPE_1 | OC1_TYPE_2) // Can have collisions with all three OC types
#define OC2_NONE 0 // No flags set. Has no OC type
#define OC2_HIT_PLAYER (1 << 0) // Had an OC collision with OC type player
#define OC2_UNK1 (1 << 1) // Prevents OC collisions with OC2_UNK2. Some horses and toki_sword have it.
#define OC2_UNK2 (1 << 2) // Prevents OC collisions with OC2_UNK1. Nothing has it.
#define OC2_TYPE_PLAYER OC1_TYPE_PLAYER // Has OC type player
#define OC2_TYPE_1 OC1_TYPE_1 // Has OC type 1
#define OC2_TYPE_2 OC1_TYPE_2 // Has OC type 2
#define OC2_FIRST_ONLY (1 << 6) // Skips AC checks on elements after the first collision. Only used by Ganon
#define TOUCH_NONE 0 // No flags set. Cannot have AT collisions
#define TOUCH_ON (1 << 0) // Can have AT collisions
#define TOUCH_HIT (1 << 1) // Had an AT collision
#define TOUCH_NEAREST (1 << 2) // If a Quad, only collides with the closest bumper
#define TOUCH_SFX_NORMAL (0 << 3) // Hit sound effect based on AC collider's type
#define TOUCH_SFX_HARD (1 << 3) // Always uses hard deflection sound
#define TOUCH_SFX_WOOD (2 << 3) // Always uses wood deflection sound
#define TOUCH_SFX_NONE (3 << 3) // No hit sound effect
#define TOUCH_AT_HITMARK (1 << 5) // Draw hitmarks for every AT collision
#define TOUCH_DREW_HITMARK (1 << 6) // Already drew hitmark for this frame
#define TOUCH_UNK7 (1 << 7) // Unknown purpose. Used by some enemy quads
#define BUMP_NONE 0 // No flags set. Cannot have AC collisions
#define BUMP_ON (1 << 0) // Can have AC collisions
#define BUMP_HIT (1 << 1) // Had an AC collision
#define BUMP_HOOKABLE (1 << 2) // Can be hooked if actor has hookability flags set.
#define BUMP_NO_AT_INFO (1 << 3) // Does not give its info to the AT collider that hit it.
#define BUMP_NO_DAMAGE (1 << 4) // Does not take damage.
#define BUMP_NO_SWORD_SFX (1 << 5) // Does not have a sound when hit by player-attached AT colliders.
#define BUMP_NO_HITMARK (1 << 6) // Skips hit effects.
#define BUMP_DRAW_HITMARK (1 << 7) // Draw hitmark for AC collision this frame.
#define OCELEM_NONE 0 // No flags set. Cannot have OC collisions
#define OCELEM_ON (1 << 0) // Can have OC collisions
#define OCELEM_HIT (1 << 1) // Had an OC collision
#define OCELEM_UNK3 (1 << 3) // Unknown purpose. Used by Dead Hand element 0 and Dodongo element 5
#define OCLINE_NONE 0 // Did not have an OcLine collision
#define OCLINE_HIT (1 << 0) // Had an OcLine collision
#define DMG_ENTRY(damage, effect) ((damage) | ((effect) << 4))
// These flags are not to be used in code until we figure out how we want to format them. They are only here for reference
#define DMG_DEKU_NUT (1 << 0x00)
#define DMG_DEKU_STICK (1 << 0x01)
#define DMG_SLINGSHOT (1 << 0x02)
#define DMG_EXPLOSIVE (1 << 0x03)
#define DMG_BOOMERANG (1 << 0x04)
#define DMG_ARROW_NORMAL (1 << 0x05)
#define DMG_HAMMER_SWING (1 << 0x06)
#define DMG_HOOKSHOT (1 << 0x07)
#define DMG_SLASH_KOKIRI (1 << 0x08)
#define DMG_SLASH_MASTER (1 << 0x09)
#define DMG_SLASH_GIANT (1 << 0x0A)
#define DMG_ARROW_FIRE (1 << 0x0B)
#define DMG_ARROW_ICE (1 << 0x0C)
#define DMG_ARROW_LIGHT (1 << 0x0D)
#define DMG_ARROW_UNK1 (1 << 0x0E)
#define DMG_ARROW_UNK2 (1 << 0x0F)
#define DMG_ARROW_UNK3 (1 << 0x10)
#define DMG_MAGIC_FIRE (1 << 0x11)
#define DMG_MAGIC_ICE (1 << 0x12)
#define DMG_MAGIC_LIGHT (1 << 0x13)
#define DMG_SHIELD (1 << 0x14)
#define DMG_MIR_RAY (1 << 0x15)
#define DMG_SPIN_KOKIRI (1 << 0x16)
#define DMG_SPIN_GIANT (1 << 0x17)
#define DMG_SPIN_MASTER (1 << 0x18)
#define DMG_JUMP_KOKIRI (1 << 0x19)
#define DMG_JUMP_GIANT (1 << 0x1A)
#define DMG_JUMP_MASTER (1 << 0x1B)
#define DMG_UNKNOWN_1 (1 << 0x1C)
#define DMG_UNBLOCKABLE (1 << 0x1D)
#define DMG_HAMMER_JUMP (1 << 0x1E)
#define DMG_UNKNOWN_2 (1 << 0x1F)
#define DMG_SLASH (DMG_SLASH_KOKIRI | DMG_SLASH_MASTER | DMG_SLASH_GIANT)
#define DMG_SPIN_ATTACK (DMG_SPIN_KOKIRI | DMG_SPIN_MASTER | DMG_SPIN_GIANT)
#define DMG_JUMP_SLASH (DMG_JUMP_KOKIRI | DMG_JUMP_MASTER | DMG_JUMP_GIANT)
#define DMG_SWORD (DMG_SLASH | DMG_SPIN_ATTACK | DMG_JUMP_SLASH)
#define DMG_HAMMER (DMG_HAMMER_SWING | DMG_HAMMER_JUMP)
#define DMG_FIRE (DMG_ARROW_FIRE | DMG_MAGIC_FIRE)
#define DMG_ARROW (DMG_ARROW_NORMAL | DMG_ARROW_FIRE | DMG_ARROW_ICE | DMG_ARROW_LIGHT | DMG_UNK_ARROW_1 | DMG_UNK_ARROW_2 | DMG_UNK_ARROW_3)
#define DMG_RANGED (DMG_ARROW | DMG_HOOKSHOT | DMG_SLINGSHOT)
#define DMG_DEFAULT ~(DMG_SHIELD | DMG_MIR_RAY)
#endif
+2 -1
View File
@@ -405,7 +405,8 @@ typedef enum {
/* 0x018E */ OBJECT_DOOR_KILLER,
/* 0x018F */ OBJECT_OUKE_HAKA,
/* 0x0190 */ OBJECT_TIMEBLOCK,
/* 0x0191 */ OBJECT_ZL4
/* 0x0191 */ OBJECT_ZL4,
/* 0x0192 */ OBJECT_ID_MAX
} ObjectID;
#endif
+2 -1
View File
@@ -413,7 +413,8 @@ typedef enum {
/* 0x6A */ SCENE_SUTARU,
/* 0x6B */ SCENE_HAIRAL_NIWA2,
/* 0x6C */ SCENE_SASATEST,
/* 0x6D */ SCENE_TESTROOM
/* 0x6D */ SCENE_TESTROOM,
/* 0x6E */ SCENE_ID_MAX
} SceneID;
#endif